diff --git a/java-dataplex/README.md b/java-dataplex/README.md index 433faa70129c..35948da7eab3 100644 --- a/java-dataplex/README.md +++ b/java-dataplex/README.md @@ -195,7 +195,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html [stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-dataplex.svg -[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dataplex/1.19.0 +[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-dataplex/1.20.0 [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 diff --git a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/DataScanServiceClient.java b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/DataScanServiceClient.java index cd8082b668b2..fd329faea4ec 100644 --- a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/DataScanServiceClient.java +++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/DataScanServiceClient.java @@ -1275,6 +1275,7 @@ public final ListDataScanJobsPagedResponse listDataScanJobs(String parent) { * .setParent(DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") * .build(); * for (DataScanJob element : dataScanServiceClient.listDataScanJobs(request).iterateAll()) { * // doThingsWith(element); @@ -1307,6 +1308,7 @@ public final ListDataScanJobsPagedResponse listDataScanJobs(ListDataScanJobsRequ * .setParent(DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") * .build(); * ApiFuture future = * dataScanServiceClient.listDataScanJobsPagedCallable().futureCall(request); @@ -1340,6 +1342,7 @@ public final ListDataScanJobsPagedResponse listDataScanJobs(ListDataScanJobsRequ * .setParent(DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString()) * .setPageSize(883849137) * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") * .build(); * while (true) { * ListDataScanJobsResponse response = diff --git a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/DataTaxonomyServiceClient.java b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/DataTaxonomyServiceClient.java new file mode 100644 index 000000000000..3a547a44ec3b --- /dev/null +++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/DataTaxonomyServiceClient.java @@ -0,0 +1,3091 @@ +/* + * Copyright 2023 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.dataplex.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.dataplex.v1.stub.DataTaxonomyServiceStub; +import com.google.cloud.dataplex.v1.stub.DataTaxonomyServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +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: DataTaxonomyService enables attribute-based governance. The resources + * currently offered include DataTaxonomy and DataAttribute. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+ *   DataTaxonomyName name = DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]");
+ *   DataTaxonomy response = dataTaxonomyServiceClient.getDataTaxonomy(name);
+ * }
+ * }
+ * + *

Note: close() needs to be called on the DataTaxonomyServiceClient 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 DataTaxonomyServiceSettings 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
+ * DataTaxonomyServiceSettings dataTaxonomyServiceSettings =
+ *     DataTaxonomyServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * DataTaxonomyServiceClient dataTaxonomyServiceClient =
+ *     DataTaxonomyServiceClient.create(dataTaxonomyServiceSettings);
+ * }
+ * + *

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
+ * DataTaxonomyServiceSettings dataTaxonomyServiceSettings =
+ *     DataTaxonomyServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * DataTaxonomyServiceClient dataTaxonomyServiceClient =
+ *     DataTaxonomyServiceClient.create(dataTaxonomyServiceSettings);
+ * }
+ * + *

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
+ * DataTaxonomyServiceSettings dataTaxonomyServiceSettings =
+ *     DataTaxonomyServiceSettings.newHttpJsonBuilder().build();
+ * DataTaxonomyServiceClient dataTaxonomyServiceClient =
+ *     DataTaxonomyServiceClient.create(dataTaxonomyServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class DataTaxonomyServiceClient implements BackgroundResource { + private final DataTaxonomyServiceSettings settings; + private final DataTaxonomyServiceStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of DataTaxonomyServiceClient with default settings. */ + public static final DataTaxonomyServiceClient create() throws IOException { + return create(DataTaxonomyServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of DataTaxonomyServiceClient, 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 DataTaxonomyServiceClient create(DataTaxonomyServiceSettings settings) + throws IOException { + return new DataTaxonomyServiceClient(settings); + } + + /** + * Constructs an instance of DataTaxonomyServiceClient, using the given stub for making calls. + * This is for advanced usage - prefer using create(DataTaxonomyServiceSettings). + */ + public static final DataTaxonomyServiceClient create(DataTaxonomyServiceStub stub) { + return new DataTaxonomyServiceClient(stub); + } + + /** + * Constructs an instance of DataTaxonomyServiceClient, 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 DataTaxonomyServiceClient(DataTaxonomyServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((DataTaxonomyServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected DataTaxonomyServiceClient(DataTaxonomyServiceStub 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 DataTaxonomyServiceSettings getSettings() { + return settings; + } + + public DataTaxonomyServiceStub 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. + /** + * Create a DataTaxonomy resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   DataTaxonomy dataTaxonomy = DataTaxonomy.newBuilder().build();
+   *   String dataTaxonomyId = "dataTaxonomyId987458454";
+   *   DataTaxonomy response =
+   *       dataTaxonomyServiceClient
+   *           .createDataTaxonomyAsync(parent, dataTaxonomy, dataTaxonomyId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the data taxonomy location, of the form: + * projects/{project_number}/locations/{location_id} where `location_id` refers to a GCP + * region. + * @param dataTaxonomy Required. DataTaxonomy resource. + * @param dataTaxonomyId Required. DataTaxonomy identifier. + * + * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createDataTaxonomyAsync( + LocationName parent, DataTaxonomy dataTaxonomy, String dataTaxonomyId) { + CreateDataTaxonomyRequest request = + CreateDataTaxonomyRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setDataTaxonomy(dataTaxonomy) + .setDataTaxonomyId(dataTaxonomyId) + .build(); + return createDataTaxonomyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a DataTaxonomy resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   DataTaxonomy dataTaxonomy = DataTaxonomy.newBuilder().build();
+   *   String dataTaxonomyId = "dataTaxonomyId987458454";
+   *   DataTaxonomy response =
+   *       dataTaxonomyServiceClient
+   *           .createDataTaxonomyAsync(parent, dataTaxonomy, dataTaxonomyId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the data taxonomy location, of the form: + * projects/{project_number}/locations/{location_id} where `location_id` refers to a GCP + * region. + * @param dataTaxonomy Required. DataTaxonomy resource. + * @param dataTaxonomyId Required. DataTaxonomy identifier. + * + * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createDataTaxonomyAsync( + String parent, DataTaxonomy dataTaxonomy, String dataTaxonomyId) { + CreateDataTaxonomyRequest request = + CreateDataTaxonomyRequest.newBuilder() + .setParent(parent) + .setDataTaxonomy(dataTaxonomy) + .setDataTaxonomyId(dataTaxonomyId) + .build(); + return createDataTaxonomyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a DataTaxonomy resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   CreateDataTaxonomyRequest request =
+   *       CreateDataTaxonomyRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setDataTaxonomyId("dataTaxonomyId987458454")
+   *           .setDataTaxonomy(DataTaxonomy.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   DataTaxonomy response = dataTaxonomyServiceClient.createDataTaxonomyAsync(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 createDataTaxonomyAsync( + CreateDataTaxonomyRequest request) { + return createDataTaxonomyOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a DataTaxonomy resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   CreateDataTaxonomyRequest request =
+   *       CreateDataTaxonomyRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setDataTaxonomyId("dataTaxonomyId987458454")
+   *           .setDataTaxonomy(DataTaxonomy.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       dataTaxonomyServiceClient.createDataTaxonomyOperationCallable().futureCall(request);
+   *   // Do something.
+   *   DataTaxonomy response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createDataTaxonomyOperationCallable() { + return stub.createDataTaxonomyOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a DataTaxonomy resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   CreateDataTaxonomyRequest request =
+   *       CreateDataTaxonomyRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setDataTaxonomyId("dataTaxonomyId987458454")
+   *           .setDataTaxonomy(DataTaxonomy.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future =
+   *       dataTaxonomyServiceClient.createDataTaxonomyCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createDataTaxonomyCallable() { + return stub.createDataTaxonomyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a DataTaxonomy resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   DataTaxonomy dataTaxonomy = DataTaxonomy.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   DataTaxonomy response =
+   *       dataTaxonomyServiceClient.updateDataTaxonomyAsync(dataTaxonomy, updateMask).get();
+   * }
+   * }
+ * + * @param dataTaxonomy Required. Only fields specified in `update_mask` are updated. + * @param updateMask Required. Mask of fields to update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateDataTaxonomyAsync( + DataTaxonomy dataTaxonomy, FieldMask updateMask) { + UpdateDataTaxonomyRequest request = + UpdateDataTaxonomyRequest.newBuilder() + .setDataTaxonomy(dataTaxonomy) + .setUpdateMask(updateMask) + .build(); + return updateDataTaxonomyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a DataTaxonomy resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   UpdateDataTaxonomyRequest request =
+   *       UpdateDataTaxonomyRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setDataTaxonomy(DataTaxonomy.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   DataTaxonomy response = dataTaxonomyServiceClient.updateDataTaxonomyAsync(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 updateDataTaxonomyAsync( + UpdateDataTaxonomyRequest request) { + return updateDataTaxonomyOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a DataTaxonomy resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   UpdateDataTaxonomyRequest request =
+   *       UpdateDataTaxonomyRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setDataTaxonomy(DataTaxonomy.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       dataTaxonomyServiceClient.updateDataTaxonomyOperationCallable().futureCall(request);
+   *   // Do something.
+   *   DataTaxonomy response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateDataTaxonomyOperationCallable() { + return stub.updateDataTaxonomyOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a DataTaxonomy resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   UpdateDataTaxonomyRequest request =
+   *       UpdateDataTaxonomyRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setDataTaxonomy(DataTaxonomy.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future =
+   *       dataTaxonomyServiceClient.updateDataTaxonomyCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateDataTaxonomyCallable() { + return stub.updateDataTaxonomyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy must be deleted before + * the DataTaxonomy can be deleted. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   DataTaxonomyName name = DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]");
+   *   dataTaxonomyServiceClient.deleteDataTaxonomyAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name of the DataTaxonomy: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteDataTaxonomyAsync( + DataTaxonomyName name) { + DeleteDataTaxonomyRequest request = + DeleteDataTaxonomyRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteDataTaxonomyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy must be deleted before + * the DataTaxonomy can be deleted. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   String name = DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString();
+   *   dataTaxonomyServiceClient.deleteDataTaxonomyAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name of the DataTaxonomy: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteDataTaxonomyAsync(String name) { + DeleteDataTaxonomyRequest request = + DeleteDataTaxonomyRequest.newBuilder().setName(name).build(); + return deleteDataTaxonomyAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy must be deleted before + * the DataTaxonomy can be deleted. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   DeleteDataTaxonomyRequest request =
+   *       DeleteDataTaxonomyRequest.newBuilder()
+   *           .setName(
+   *               DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString())
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   dataTaxonomyServiceClient.deleteDataTaxonomyAsync(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 deleteDataTaxonomyAsync( + DeleteDataTaxonomyRequest request) { + return deleteDataTaxonomyOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy must be deleted before + * the DataTaxonomy can be deleted. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   DeleteDataTaxonomyRequest request =
+   *       DeleteDataTaxonomyRequest.newBuilder()
+   *           .setName(
+   *               DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString())
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   OperationFuture future =
+   *       dataTaxonomyServiceClient.deleteDataTaxonomyOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteDataTaxonomyOperationCallable() { + return stub.deleteDataTaxonomyOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy must be deleted before + * the DataTaxonomy can be deleted. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   DeleteDataTaxonomyRequest request =
+   *       DeleteDataTaxonomyRequest.newBuilder()
+   *           .setName(
+   *               DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString())
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   ApiFuture future =
+   *       dataTaxonomyServiceClient.deleteDataTaxonomyCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteDataTaxonomyCallable() { + return stub.deleteDataTaxonomyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataTaxonomy resources in a project and location. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (DataTaxonomy element :
+   *       dataTaxonomyServiceClient.listDataTaxonomies(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the DataTaxonomy location, of the form: + * projects/{project_number}/locations/{location_id} where `location_id` refers to a GCP + * region. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDataTaxonomiesPagedResponse listDataTaxonomies(LocationName parent) { + ListDataTaxonomiesRequest request = + ListDataTaxonomiesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDataTaxonomies(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataTaxonomy resources in a project and location. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (DataTaxonomy element :
+   *       dataTaxonomyServiceClient.listDataTaxonomies(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the DataTaxonomy location, of the form: + * projects/{project_number}/locations/{location_id} where `location_id` refers to a GCP + * region. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDataTaxonomiesPagedResponse listDataTaxonomies(String parent) { + ListDataTaxonomiesRequest request = + ListDataTaxonomiesRequest.newBuilder().setParent(parent).build(); + return listDataTaxonomies(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataTaxonomy resources in a project and location. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   ListDataTaxonomiesRequest request =
+   *       ListDataTaxonomiesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (DataTaxonomy element :
+   *       dataTaxonomyServiceClient.listDataTaxonomies(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 ListDataTaxonomiesPagedResponse listDataTaxonomies( + ListDataTaxonomiesRequest request) { + return listDataTaxonomiesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataTaxonomy resources in a project and location. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   ListDataTaxonomiesRequest request =
+   *       ListDataTaxonomiesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       dataTaxonomyServiceClient.listDataTaxonomiesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (DataTaxonomy element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDataTaxonomiesPagedCallable() { + return stub.listDataTaxonomiesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataTaxonomy resources in a project and location. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   ListDataTaxonomiesRequest request =
+   *       ListDataTaxonomiesRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListDataTaxonomiesResponse response =
+   *         dataTaxonomyServiceClient.listDataTaxonomiesCallable().call(request);
+   *     for (DataTaxonomy element : response.getDataTaxonomiesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDataTaxonomiesCallable() { + return stub.listDataTaxonomiesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a DataTaxonomy resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   DataTaxonomyName name = DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]");
+   *   DataTaxonomy response = dataTaxonomyServiceClient.getDataTaxonomy(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the DataTaxonomy: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataTaxonomy getDataTaxonomy(DataTaxonomyName name) { + GetDataTaxonomyRequest request = + GetDataTaxonomyRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getDataTaxonomy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a DataTaxonomy resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   String name = DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString();
+   *   DataTaxonomy response = dataTaxonomyServiceClient.getDataTaxonomy(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the DataTaxonomy: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataTaxonomy getDataTaxonomy(String name) { + GetDataTaxonomyRequest request = GetDataTaxonomyRequest.newBuilder().setName(name).build(); + return getDataTaxonomy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a DataTaxonomy resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   GetDataTaxonomyRequest request =
+   *       GetDataTaxonomyRequest.newBuilder()
+   *           .setName(
+   *               DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString())
+   *           .build();
+   *   DataTaxonomy response = dataTaxonomyServiceClient.getDataTaxonomy(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 DataTaxonomy getDataTaxonomy(GetDataTaxonomyRequest request) { + return getDataTaxonomyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a DataTaxonomy resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   GetDataTaxonomyRequest request =
+   *       GetDataTaxonomyRequest.newBuilder()
+   *           .setName(
+   *               DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       dataTaxonomyServiceClient.getDataTaxonomyCallable().futureCall(request);
+   *   // Do something.
+   *   DataTaxonomy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getDataTaxonomyCallable() { + return stub.getDataTaxonomyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a DataAttributeBinding resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   DataAttributeBinding dataAttributeBinding = DataAttributeBinding.newBuilder().build();
+   *   String dataAttributeBindingId = "dataAttributeBindingId1952425102";
+   *   DataAttributeBinding response =
+   *       dataTaxonomyServiceClient
+   *           .createDataAttributeBindingAsync(parent, dataAttributeBinding, dataAttributeBindingId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the parent data taxonomy + * projects/{project_number}/locations/{location_id} + * @param dataAttributeBinding Required. DataAttributeBinding resource. + * @param dataAttributeBindingId Required. DataAttributeBinding identifier. + *
    + *
  • Must contain only lowercase letters, numbers and hyphens. + *
  • Must start with a letter. + *
  • Must be between 1-63 characters. + *
  • Must end with a number or a letter. + *
  • Must be unique within the Location. + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createDataAttributeBindingAsync( + LocationName parent, + DataAttributeBinding dataAttributeBinding, + String dataAttributeBindingId) { + CreateDataAttributeBindingRequest request = + CreateDataAttributeBindingRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setDataAttributeBinding(dataAttributeBinding) + .setDataAttributeBindingId(dataAttributeBindingId) + .build(); + return createDataAttributeBindingAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a DataAttributeBinding resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   DataAttributeBinding dataAttributeBinding = DataAttributeBinding.newBuilder().build();
+   *   String dataAttributeBindingId = "dataAttributeBindingId1952425102";
+   *   DataAttributeBinding response =
+   *       dataTaxonomyServiceClient
+   *           .createDataAttributeBindingAsync(parent, dataAttributeBinding, dataAttributeBindingId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the parent data taxonomy + * projects/{project_number}/locations/{location_id} + * @param dataAttributeBinding Required. DataAttributeBinding resource. + * @param dataAttributeBindingId Required. DataAttributeBinding identifier. + *
    + *
  • Must contain only lowercase letters, numbers and hyphens. + *
  • Must start with a letter. + *
  • Must be between 1-63 characters. + *
  • Must end with a number or a letter. + *
  • Must be unique within the Location. + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + createDataAttributeBindingAsync( + String parent, DataAttributeBinding dataAttributeBinding, String dataAttributeBindingId) { + CreateDataAttributeBindingRequest request = + CreateDataAttributeBindingRequest.newBuilder() + .setParent(parent) + .setDataAttributeBinding(dataAttributeBinding) + .setDataAttributeBindingId(dataAttributeBindingId) + .build(); + return createDataAttributeBindingAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a DataAttributeBinding resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   CreateDataAttributeBindingRequest request =
+   *       CreateDataAttributeBindingRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setDataAttributeBindingId("dataAttributeBindingId1952425102")
+   *           .setDataAttributeBinding(DataAttributeBinding.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   DataAttributeBinding response =
+   *       dataTaxonomyServiceClient.createDataAttributeBindingAsync(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 + createDataAttributeBindingAsync(CreateDataAttributeBindingRequest request) { + return createDataAttributeBindingOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a DataAttributeBinding resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   CreateDataAttributeBindingRequest request =
+   *       CreateDataAttributeBindingRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setDataAttributeBindingId("dataAttributeBindingId1952425102")
+   *           .setDataAttributeBinding(DataAttributeBinding.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       dataTaxonomyServiceClient
+   *           .createDataAttributeBindingOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   DataAttributeBinding response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + CreateDataAttributeBindingRequest, DataAttributeBinding, OperationMetadata> + createDataAttributeBindingOperationCallable() { + return stub.createDataAttributeBindingOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a DataAttributeBinding resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   CreateDataAttributeBindingRequest request =
+   *       CreateDataAttributeBindingRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setDataAttributeBindingId("dataAttributeBindingId1952425102")
+   *           .setDataAttributeBinding(DataAttributeBinding.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future =
+   *       dataTaxonomyServiceClient.createDataAttributeBindingCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createDataAttributeBindingCallable() { + return stub.createDataAttributeBindingCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a DataAttributeBinding resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   DataAttributeBinding dataAttributeBinding = DataAttributeBinding.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   DataAttributeBinding response =
+   *       dataTaxonomyServiceClient
+   *           .updateDataAttributeBindingAsync(dataAttributeBinding, updateMask)
+   *           .get();
+   * }
+   * }
+ * + * @param dataAttributeBinding Required. Only fields specified in `update_mask` are updated. + * @param updateMask Required. Mask of fields to update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + updateDataAttributeBindingAsync( + DataAttributeBinding dataAttributeBinding, FieldMask updateMask) { + UpdateDataAttributeBindingRequest request = + UpdateDataAttributeBindingRequest.newBuilder() + .setDataAttributeBinding(dataAttributeBinding) + .setUpdateMask(updateMask) + .build(); + return updateDataAttributeBindingAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a DataAttributeBinding resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   UpdateDataAttributeBindingRequest request =
+   *       UpdateDataAttributeBindingRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setDataAttributeBinding(DataAttributeBinding.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   DataAttributeBinding response =
+   *       dataTaxonomyServiceClient.updateDataAttributeBindingAsync(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 + updateDataAttributeBindingAsync(UpdateDataAttributeBindingRequest request) { + return updateDataAttributeBindingOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a DataAttributeBinding resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   UpdateDataAttributeBindingRequest request =
+   *       UpdateDataAttributeBindingRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setDataAttributeBinding(DataAttributeBinding.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       dataTaxonomyServiceClient
+   *           .updateDataAttributeBindingOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   DataAttributeBinding response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + UpdateDataAttributeBindingRequest, DataAttributeBinding, OperationMetadata> + updateDataAttributeBindingOperationCallable() { + return stub.updateDataAttributeBindingOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a DataAttributeBinding resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   UpdateDataAttributeBindingRequest request =
+   *       UpdateDataAttributeBindingRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setDataAttributeBinding(DataAttributeBinding.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future =
+   *       dataTaxonomyServiceClient.updateDataAttributeBindingCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateDataAttributeBindingCallable() { + return stub.updateDataAttributeBindingCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a DataAttributeBinding resource. All attributes within the DataAttributeBinding must be + * deleted before the DataAttributeBinding can be deleted. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   DataAttributeBindingName name =
+   *       DataAttributeBindingName.of("[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]");
+   *   dataTaxonomyServiceClient.deleteDataAttributeBindingAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name of the DataAttributeBinding: + * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteDataAttributeBindingAsync( + DataAttributeBindingName name) { + DeleteDataAttributeBindingRequest request = + DeleteDataAttributeBindingRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteDataAttributeBindingAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a DataAttributeBinding resource. All attributes within the DataAttributeBinding must be + * deleted before the DataAttributeBinding can be deleted. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   String name =
+   *       DataAttributeBindingName.of("[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]")
+   *           .toString();
+   *   dataTaxonomyServiceClient.deleteDataAttributeBindingAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name of the DataAttributeBinding: + * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteDataAttributeBindingAsync( + String name) { + DeleteDataAttributeBindingRequest request = + DeleteDataAttributeBindingRequest.newBuilder().setName(name).build(); + return deleteDataAttributeBindingAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a DataAttributeBinding resource. All attributes within the DataAttributeBinding must be + * deleted before the DataAttributeBinding can be deleted. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   DeleteDataAttributeBindingRequest request =
+   *       DeleteDataAttributeBindingRequest.newBuilder()
+   *           .setName(
+   *               DataAttributeBindingName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]")
+   *                   .toString())
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   dataTaxonomyServiceClient.deleteDataAttributeBindingAsync(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 deleteDataAttributeBindingAsync( + DeleteDataAttributeBindingRequest request) { + return deleteDataAttributeBindingOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a DataAttributeBinding resource. All attributes within the DataAttributeBinding must be + * deleted before the DataAttributeBinding can be deleted. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   DeleteDataAttributeBindingRequest request =
+   *       DeleteDataAttributeBindingRequest.newBuilder()
+   *           .setName(
+   *               DataAttributeBindingName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]")
+   *                   .toString())
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   OperationFuture future =
+   *       dataTaxonomyServiceClient
+   *           .deleteDataAttributeBindingOperationCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteDataAttributeBindingOperationCallable() { + return stub.deleteDataAttributeBindingOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a DataAttributeBinding resource. All attributes within the DataAttributeBinding must be + * deleted before the DataAttributeBinding can be deleted. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   DeleteDataAttributeBindingRequest request =
+   *       DeleteDataAttributeBindingRequest.newBuilder()
+   *           .setName(
+   *               DataAttributeBindingName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]")
+   *                   .toString())
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   ApiFuture future =
+   *       dataTaxonomyServiceClient.deleteDataAttributeBindingCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + deleteDataAttributeBindingCallable() { + return stub.deleteDataAttributeBindingCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataAttributeBinding resources in a project and location. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (DataAttributeBinding element :
+   *       dataTaxonomyServiceClient.listDataAttributeBindings(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location: + * projects/{project_number}/locations/{location_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDataAttributeBindingsPagedResponse listDataAttributeBindings( + LocationName parent) { + ListDataAttributeBindingsRequest request = + ListDataAttributeBindingsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDataAttributeBindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataAttributeBinding resources in a project and location. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+   *   for (DataAttributeBinding element :
+   *       dataTaxonomyServiceClient.listDataAttributeBindings(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the Location: + * projects/{project_number}/locations/{location_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDataAttributeBindingsPagedResponse listDataAttributeBindings(String parent) { + ListDataAttributeBindingsRequest request = + ListDataAttributeBindingsRequest.newBuilder().setParent(parent).build(); + return listDataAttributeBindings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataAttributeBinding resources in a project and location. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   ListDataAttributeBindingsRequest request =
+   *       ListDataAttributeBindingsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (DataAttributeBinding element :
+   *       dataTaxonomyServiceClient.listDataAttributeBindings(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 ListDataAttributeBindingsPagedResponse listDataAttributeBindings( + ListDataAttributeBindingsRequest request) { + return listDataAttributeBindingsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataAttributeBinding resources in a project and location. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   ListDataAttributeBindingsRequest request =
+   *       ListDataAttributeBindingsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       dataTaxonomyServiceClient.listDataAttributeBindingsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (DataAttributeBinding element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable< + ListDataAttributeBindingsRequest, ListDataAttributeBindingsPagedResponse> + listDataAttributeBindingsPagedCallable() { + return stub.listDataAttributeBindingsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DataAttributeBinding resources in a project and location. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   ListDataAttributeBindingsRequest request =
+   *       ListDataAttributeBindingsRequest.newBuilder()
+   *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListDataAttributeBindingsResponse response =
+   *         dataTaxonomyServiceClient.listDataAttributeBindingsCallable().call(request);
+   *     for (DataAttributeBinding element : response.getDataAttributeBindingsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDataAttributeBindingsCallable() { + return stub.listDataAttributeBindingsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a DataAttributeBinding resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   DataAttributeBindingName name =
+   *       DataAttributeBindingName.of("[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]");
+   *   DataAttributeBinding response = dataTaxonomyServiceClient.getDataAttributeBinding(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the DataAttributeBinding: + * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataAttributeBinding getDataAttributeBinding(DataAttributeBindingName name) { + GetDataAttributeBindingRequest request = + GetDataAttributeBindingRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getDataAttributeBinding(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a DataAttributeBinding resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   String name =
+   *       DataAttributeBindingName.of("[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]")
+   *           .toString();
+   *   DataAttributeBinding response = dataTaxonomyServiceClient.getDataAttributeBinding(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the DataAttributeBinding: + * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataAttributeBinding getDataAttributeBinding(String name) { + GetDataAttributeBindingRequest request = + GetDataAttributeBindingRequest.newBuilder().setName(name).build(); + return getDataAttributeBinding(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a DataAttributeBinding resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   GetDataAttributeBindingRequest request =
+   *       GetDataAttributeBindingRequest.newBuilder()
+   *           .setName(
+   *               DataAttributeBindingName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]")
+   *                   .toString())
+   *           .build();
+   *   DataAttributeBinding response = dataTaxonomyServiceClient.getDataAttributeBinding(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 DataAttributeBinding getDataAttributeBinding( + GetDataAttributeBindingRequest request) { + return getDataAttributeBindingCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a DataAttributeBinding resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   GetDataAttributeBindingRequest request =
+   *       GetDataAttributeBindingRequest.newBuilder()
+   *           .setName(
+   *               DataAttributeBindingName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       dataTaxonomyServiceClient.getDataAttributeBindingCallable().futureCall(request);
+   *   // Do something.
+   *   DataAttributeBinding response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getDataAttributeBindingCallable() { + return stub.getDataAttributeBindingCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a DataAttribute resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   DataTaxonomyName parent =
+   *       DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]");
+   *   DataAttribute dataAttribute = DataAttribute.newBuilder().build();
+   *   String dataAttributeId = "dataAttributeId-44128563";
+   *   DataAttribute response =
+   *       dataTaxonomyServiceClient
+   *           .createDataAttributeAsync(parent, dataAttribute, dataAttributeId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the parent data taxonomy + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * @param dataAttribute Required. DataAttribute resource. + * @param dataAttributeId Required. DataAttribute identifier. + *
    + *
  • Must contain only lowercase letters, numbers and hyphens. + *
  • Must start with a letter. + *
  • Must be between 1-63 characters. + *
  • Must end with a number or a letter. + *
  • Must be unique within the DataTaxonomy. + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createDataAttributeAsync( + DataTaxonomyName parent, DataAttribute dataAttribute, String dataAttributeId) { + CreateDataAttributeRequest request = + CreateDataAttributeRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setDataAttribute(dataAttribute) + .setDataAttributeId(dataAttributeId) + .build(); + return createDataAttributeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a DataAttribute resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   String parent =
+   *       DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString();
+   *   DataAttribute dataAttribute = DataAttribute.newBuilder().build();
+   *   String dataAttributeId = "dataAttributeId-44128563";
+   *   DataAttribute response =
+   *       dataTaxonomyServiceClient
+   *           .createDataAttributeAsync(parent, dataAttribute, dataAttributeId)
+   *           .get();
+   * }
+   * }
+ * + * @param parent Required. The resource name of the parent data taxonomy + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * @param dataAttribute Required. DataAttribute resource. + * @param dataAttributeId Required. DataAttribute identifier. + *
    + *
  • Must contain only lowercase letters, numbers and hyphens. + *
  • Must start with a letter. + *
  • Must be between 1-63 characters. + *
  • Must end with a number or a letter. + *
  • Must be unique within the DataTaxonomy. + *
+ * + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createDataAttributeAsync( + String parent, DataAttribute dataAttribute, String dataAttributeId) { + CreateDataAttributeRequest request = + CreateDataAttributeRequest.newBuilder() + .setParent(parent) + .setDataAttribute(dataAttribute) + .setDataAttributeId(dataAttributeId) + .build(); + return createDataAttributeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a DataAttribute resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   CreateDataAttributeRequest request =
+   *       CreateDataAttributeRequest.newBuilder()
+   *           .setParent(
+   *               DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString())
+   *           .setDataAttributeId("dataAttributeId-44128563")
+   *           .setDataAttribute(DataAttribute.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   DataAttribute response = dataTaxonomyServiceClient.createDataAttributeAsync(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 createDataAttributeAsync( + CreateDataAttributeRequest request) { + return createDataAttributeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a DataAttribute resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   CreateDataAttributeRequest request =
+   *       CreateDataAttributeRequest.newBuilder()
+   *           .setParent(
+   *               DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString())
+   *           .setDataAttributeId("dataAttributeId-44128563")
+   *           .setDataAttribute(DataAttribute.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       dataTaxonomyServiceClient.createDataAttributeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   DataAttribute response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createDataAttributeOperationCallable() { + return stub.createDataAttributeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a DataAttribute resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   CreateDataAttributeRequest request =
+   *       CreateDataAttributeRequest.newBuilder()
+   *           .setParent(
+   *               DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString())
+   *           .setDataAttributeId("dataAttributeId-44128563")
+   *           .setDataAttribute(DataAttribute.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future =
+   *       dataTaxonomyServiceClient.createDataAttributeCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createDataAttributeCallable() { + return stub.createDataAttributeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a DataAttribute resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   DataAttribute dataAttribute = DataAttribute.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   DataAttribute response =
+   *       dataTaxonomyServiceClient.updateDataAttributeAsync(dataAttribute, updateMask).get();
+   * }
+   * }
+ * + * @param dataAttribute Required. Only fields specified in `update_mask` are updated. + * @param updateMask Required. Mask of fields to update. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture updateDataAttributeAsync( + DataAttribute dataAttribute, FieldMask updateMask) { + UpdateDataAttributeRequest request = + UpdateDataAttributeRequest.newBuilder() + .setDataAttribute(dataAttribute) + .setUpdateMask(updateMask) + .build(); + return updateDataAttributeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a DataAttribute resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   UpdateDataAttributeRequest request =
+   *       UpdateDataAttributeRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setDataAttribute(DataAttribute.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   DataAttribute response = dataTaxonomyServiceClient.updateDataAttributeAsync(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 updateDataAttributeAsync( + UpdateDataAttributeRequest request) { + return updateDataAttributeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a DataAttribute resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   UpdateDataAttributeRequest request =
+   *       UpdateDataAttributeRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setDataAttribute(DataAttribute.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       dataTaxonomyServiceClient.updateDataAttributeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   DataAttribute response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + updateDataAttributeOperationCallable() { + return stub.updateDataAttributeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a DataAttribute resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   UpdateDataAttributeRequest request =
+   *       UpdateDataAttributeRequest.newBuilder()
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .setDataAttribute(DataAttribute.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future =
+   *       dataTaxonomyServiceClient.updateDataAttributeCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updateDataAttributeCallable() { + return stub.updateDataAttributeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Data Attribute resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   DataAttributeName name =
+   *       DataAttributeName.of("[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]");
+   *   dataTaxonomyServiceClient.deleteDataAttributeAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name of the DataAttribute: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteDataAttributeAsync( + DataAttributeName name) { + DeleteDataAttributeRequest request = + DeleteDataAttributeRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return deleteDataAttributeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Data Attribute resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   String name =
+   *       DataAttributeName.of("[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]")
+   *           .toString();
+   *   dataTaxonomyServiceClient.deleteDataAttributeAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name of the DataAttribute: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteDataAttributeAsync(String name) { + DeleteDataAttributeRequest request = + DeleteDataAttributeRequest.newBuilder().setName(name).build(); + return deleteDataAttributeAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Data Attribute resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   DeleteDataAttributeRequest request =
+   *       DeleteDataAttributeRequest.newBuilder()
+   *           .setName(
+   *               DataAttributeName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]")
+   *                   .toString())
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   dataTaxonomyServiceClient.deleteDataAttributeAsync(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 deleteDataAttributeAsync( + DeleteDataAttributeRequest request) { + return deleteDataAttributeOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Data Attribute resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   DeleteDataAttributeRequest request =
+   *       DeleteDataAttributeRequest.newBuilder()
+   *           .setName(
+   *               DataAttributeName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]")
+   *                   .toString())
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   OperationFuture future =
+   *       dataTaxonomyServiceClient.deleteDataAttributeOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteDataAttributeOperationCallable() { + return stub.deleteDataAttributeOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a Data Attribute resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   DeleteDataAttributeRequest request =
+   *       DeleteDataAttributeRequest.newBuilder()
+   *           .setName(
+   *               DataAttributeName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]")
+   *                   .toString())
+   *           .setEtag("etag3123477")
+   *           .build();
+   *   ApiFuture future =
+   *       dataTaxonomyServiceClient.deleteDataAttributeCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteDataAttributeCallable() { + return stub.deleteDataAttributeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Data Attribute resources in a DataTaxonomy. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   DataTaxonomyName parent =
+   *       DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]");
+   *   for (DataAttribute element :
+   *       dataTaxonomyServiceClient.listDataAttributes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the DataTaxonomy: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDataAttributesPagedResponse listDataAttributes(DataTaxonomyName parent) { + ListDataAttributesRequest request = + ListDataAttributesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDataAttributes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Data Attribute resources in a DataTaxonomy. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   String parent =
+   *       DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString();
+   *   for (DataAttribute element :
+   *       dataTaxonomyServiceClient.listDataAttributes(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the DataTaxonomy: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDataAttributesPagedResponse listDataAttributes(String parent) { + ListDataAttributesRequest request = + ListDataAttributesRequest.newBuilder().setParent(parent).build(); + return listDataAttributes(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Data Attribute resources in a DataTaxonomy. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   ListDataAttributesRequest request =
+   *       ListDataAttributesRequest.newBuilder()
+   *           .setParent(
+   *               DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (DataAttribute element :
+   *       dataTaxonomyServiceClient.listDataAttributes(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 ListDataAttributesPagedResponse listDataAttributes( + ListDataAttributesRequest request) { + return listDataAttributesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Data Attribute resources in a DataTaxonomy. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   ListDataAttributesRequest request =
+   *       ListDataAttributesRequest.newBuilder()
+   *           .setParent(
+   *               DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       dataTaxonomyServiceClient.listDataAttributesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (DataAttribute element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDataAttributesPagedCallable() { + return stub.listDataAttributesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists Data Attribute resources in a DataTaxonomy. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   ListDataAttributesRequest request =
+   *       ListDataAttributesRequest.newBuilder()
+   *           .setParent(
+   *               DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   while (true) {
+   *     ListDataAttributesResponse response =
+   *         dataTaxonomyServiceClient.listDataAttributesCallable().call(request);
+   *     for (DataAttribute element : response.getDataAttributesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listDataAttributesCallable() { + return stub.listDataAttributesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a Data Attribute resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   DataAttributeName name =
+   *       DataAttributeName.of("[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]");
+   *   DataAttribute response = dataTaxonomyServiceClient.getDataAttribute(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the dataAttribute: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataAttribute getDataAttribute(DataAttributeName name) { + GetDataAttributeRequest request = + GetDataAttributeRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getDataAttribute(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a Data Attribute resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   String name =
+   *       DataAttributeName.of("[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]")
+   *           .toString();
+   *   DataAttribute response = dataTaxonomyServiceClient.getDataAttribute(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the dataAttribute: + * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataAttribute getDataAttribute(String name) { + GetDataAttributeRequest request = GetDataAttributeRequest.newBuilder().setName(name).build(); + return getDataAttribute(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a Data Attribute resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   GetDataAttributeRequest request =
+   *       GetDataAttributeRequest.newBuilder()
+   *           .setName(
+   *               DataAttributeName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]")
+   *                   .toString())
+   *           .build();
+   *   DataAttribute response = dataTaxonomyServiceClient.getDataAttribute(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 DataAttribute getDataAttribute(GetDataAttributeRequest request) { + return getDataAttributeCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Retrieves a Data Attribute resource. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   GetDataAttributeRequest request =
+   *       GetDataAttributeRequest.newBuilder()
+   *           .setName(
+   *               DataAttributeName.of(
+   *                       "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]")
+   *                   .toString())
+   *           .build();
+   *   ApiFuture future =
+   *       dataTaxonomyServiceClient.getDataAttributeCallable().futureCall(request);
+   *   // Do something.
+   *   DataAttribute response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getDataAttributeCallable() { + return stub.getDataAttributeCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Location element : dataTaxonomyServiceClient.listLocations(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 ListLocationsPagedResponse listLocations(ListLocationsRequest request) { + return listLocationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       dataTaxonomyServiceClient.listLocationsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Location element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listLocationsPagedCallable() { + return stub.listLocationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists information about the supported locations for this service. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   ListLocationsRequest request =
+   *       ListLocationsRequest.newBuilder()
+   *           .setName("name3373707")
+   *           .setFilter("filter-1274492040")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListLocationsResponse response =
+   *         dataTaxonomyServiceClient.listLocationsCallable().call(request);
+   *     for (Location element : response.getLocationsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listLocationsCallable() { + return stub.listLocationsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   Location response = dataTaxonomyServiceClient.getLocation(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 Location getLocation(GetLocationRequest request) { + return getLocationCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets information about a location. + * + *

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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+   *   GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future =
+   *       dataTaxonomyServiceClient.getLocationCallable().futureCall(request);
+   *   // Do something.
+   *   Location response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getLocationCallable() { + return stub.getLocationCallable(); + } + + @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 ListDataTaxonomiesPagedResponse + extends AbstractPagedListResponse< + ListDataTaxonomiesRequest, + ListDataTaxonomiesResponse, + DataTaxonomy, + ListDataTaxonomiesPage, + ListDataTaxonomiesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDataTaxonomiesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListDataTaxonomiesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListDataTaxonomiesPagedResponse(ListDataTaxonomiesPage page) { + super(page, ListDataTaxonomiesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDataTaxonomiesPage + extends AbstractPage< + ListDataTaxonomiesRequest, + ListDataTaxonomiesResponse, + DataTaxonomy, + ListDataTaxonomiesPage> { + + private ListDataTaxonomiesPage( + PageContext context, + ListDataTaxonomiesResponse response) { + super(context, response); + } + + private static ListDataTaxonomiesPage createEmptyPage() { + return new ListDataTaxonomiesPage(null, null); + } + + @Override + protected ListDataTaxonomiesPage createPage( + PageContext context, + ListDataTaxonomiesResponse response) { + return new ListDataTaxonomiesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDataTaxonomiesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDataTaxonomiesRequest, + ListDataTaxonomiesResponse, + DataTaxonomy, + ListDataTaxonomiesPage, + ListDataTaxonomiesFixedSizeCollection> { + + private ListDataTaxonomiesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDataTaxonomiesFixedSizeCollection createEmptyCollection() { + return new ListDataTaxonomiesFixedSizeCollection(null, 0); + } + + @Override + protected ListDataTaxonomiesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListDataTaxonomiesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListDataAttributeBindingsPagedResponse + extends AbstractPagedListResponse< + ListDataAttributeBindingsRequest, + ListDataAttributeBindingsResponse, + DataAttributeBinding, + ListDataAttributeBindingsPage, + ListDataAttributeBindingsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListDataAttributeBindingsRequest, + ListDataAttributeBindingsResponse, + DataAttributeBinding> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDataAttributeBindingsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListDataAttributeBindingsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListDataAttributeBindingsPagedResponse(ListDataAttributeBindingsPage page) { + super(page, ListDataAttributeBindingsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDataAttributeBindingsPage + extends AbstractPage< + ListDataAttributeBindingsRequest, + ListDataAttributeBindingsResponse, + DataAttributeBinding, + ListDataAttributeBindingsPage> { + + private ListDataAttributeBindingsPage( + PageContext< + ListDataAttributeBindingsRequest, + ListDataAttributeBindingsResponse, + DataAttributeBinding> + context, + ListDataAttributeBindingsResponse response) { + super(context, response); + } + + private static ListDataAttributeBindingsPage createEmptyPage() { + return new ListDataAttributeBindingsPage(null, null); + } + + @Override + protected ListDataAttributeBindingsPage createPage( + PageContext< + ListDataAttributeBindingsRequest, + ListDataAttributeBindingsResponse, + DataAttributeBinding> + context, + ListDataAttributeBindingsResponse response) { + return new ListDataAttributeBindingsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListDataAttributeBindingsRequest, + ListDataAttributeBindingsResponse, + DataAttributeBinding> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDataAttributeBindingsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDataAttributeBindingsRequest, + ListDataAttributeBindingsResponse, + DataAttributeBinding, + ListDataAttributeBindingsPage, + ListDataAttributeBindingsFixedSizeCollection> { + + private ListDataAttributeBindingsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDataAttributeBindingsFixedSizeCollection createEmptyCollection() { + return new ListDataAttributeBindingsFixedSizeCollection(null, 0); + } + + @Override + protected ListDataAttributeBindingsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListDataAttributeBindingsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListDataAttributesPagedResponse + extends AbstractPagedListResponse< + ListDataAttributesRequest, + ListDataAttributesResponse, + DataAttribute, + ListDataAttributesPage, + ListDataAttributesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListDataAttributesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListDataAttributesPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListDataAttributesPagedResponse(ListDataAttributesPage page) { + super(page, ListDataAttributesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListDataAttributesPage + extends AbstractPage< + ListDataAttributesRequest, + ListDataAttributesResponse, + DataAttribute, + ListDataAttributesPage> { + + private ListDataAttributesPage( + PageContext context, + ListDataAttributesResponse response) { + super(context, response); + } + + private static ListDataAttributesPage createEmptyPage() { + return new ListDataAttributesPage(null, null); + } + + @Override + protected ListDataAttributesPage createPage( + PageContext context, + ListDataAttributesResponse response) { + return new ListDataAttributesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListDataAttributesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListDataAttributesRequest, + ListDataAttributesResponse, + DataAttribute, + ListDataAttributesPage, + ListDataAttributesFixedSizeCollection> { + + private ListDataAttributesFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListDataAttributesFixedSizeCollection createEmptyCollection() { + return new ListDataAttributesFixedSizeCollection(null, 0); + } + + @Override + protected ListDataAttributesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListDataAttributesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListLocationsPagedResponse + extends AbstractPagedListResponse< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListLocationsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListLocationsPagedResponse(ListLocationsPage page) { + super(page, ListLocationsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListLocationsPage + extends AbstractPage< + ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> { + + private ListLocationsPage( + PageContext context, + ListLocationsResponse response) { + super(context, response); + } + + private static ListLocationsPage createEmptyPage() { + return new ListLocationsPage(null, null); + } + + @Override + protected ListLocationsPage createPage( + PageContext context, + ListLocationsResponse response) { + return new ListLocationsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListLocationsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListLocationsRequest, + ListLocationsResponse, + Location, + ListLocationsPage, + ListLocationsFixedSizeCollection> { + + private ListLocationsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListLocationsFixedSizeCollection createEmptyCollection() { + return new ListLocationsFixedSizeCollection(null, 0); + } + + @Override + protected ListLocationsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListLocationsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/DataTaxonomyServiceSettings.java b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/DataTaxonomyServiceSettings.java new file mode 100644 index 000000000000..afd6072768b6 --- /dev/null +++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/DataTaxonomyServiceSettings.java @@ -0,0 +1,542 @@ +/* + * Copyright 2023 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.dataplex.v1; + +import static com.google.cloud.dataplex.v1.DataTaxonomyServiceClient.ListDataAttributeBindingsPagedResponse; +import static com.google.cloud.dataplex.v1.DataTaxonomyServiceClient.ListDataAttributesPagedResponse; +import static com.google.cloud.dataplex.v1.DataTaxonomyServiceClient.ListDataTaxonomiesPagedResponse; +import static com.google.cloud.dataplex.v1.DataTaxonomyServiceClient.ListLocationsPagedResponse; + +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.dataplex.v1.stub.DataTaxonomyServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +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 DataTaxonomyServiceClient}. + * + *

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

    + *
  • The default service address (dataplex.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 getDataTaxonomy 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
+ * DataTaxonomyServiceSettings.Builder dataTaxonomyServiceSettingsBuilder =
+ *     DataTaxonomyServiceSettings.newBuilder();
+ * dataTaxonomyServiceSettingsBuilder
+ *     .getDataTaxonomySettings()
+ *     .setRetrySettings(
+ *         dataTaxonomyServiceSettingsBuilder
+ *             .getDataTaxonomySettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * DataTaxonomyServiceSettings dataTaxonomyServiceSettings =
+ *     dataTaxonomyServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class DataTaxonomyServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createDataTaxonomy. */ + public UnaryCallSettings createDataTaxonomySettings() { + return ((DataTaxonomyServiceStubSettings) getStubSettings()).createDataTaxonomySettings(); + } + + /** Returns the object with the settings used for calls to createDataTaxonomy. */ + public OperationCallSettings + createDataTaxonomyOperationSettings() { + return ((DataTaxonomyServiceStubSettings) getStubSettings()) + .createDataTaxonomyOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateDataTaxonomy. */ + public UnaryCallSettings updateDataTaxonomySettings() { + return ((DataTaxonomyServiceStubSettings) getStubSettings()).updateDataTaxonomySettings(); + } + + /** Returns the object with the settings used for calls to updateDataTaxonomy. */ + public OperationCallSettings + updateDataTaxonomyOperationSettings() { + return ((DataTaxonomyServiceStubSettings) getStubSettings()) + .updateDataTaxonomyOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteDataTaxonomy. */ + public UnaryCallSettings deleteDataTaxonomySettings() { + return ((DataTaxonomyServiceStubSettings) getStubSettings()).deleteDataTaxonomySettings(); + } + + /** Returns the object with the settings used for calls to deleteDataTaxonomy. */ + public OperationCallSettings + deleteDataTaxonomyOperationSettings() { + return ((DataTaxonomyServiceStubSettings) getStubSettings()) + .deleteDataTaxonomyOperationSettings(); + } + + /** Returns the object with the settings used for calls to listDataTaxonomies. */ + public PagedCallSettings< + ListDataTaxonomiesRequest, ListDataTaxonomiesResponse, ListDataTaxonomiesPagedResponse> + listDataTaxonomiesSettings() { + return ((DataTaxonomyServiceStubSettings) getStubSettings()).listDataTaxonomiesSettings(); + } + + /** Returns the object with the settings used for calls to getDataTaxonomy. */ + public UnaryCallSettings getDataTaxonomySettings() { + return ((DataTaxonomyServiceStubSettings) getStubSettings()).getDataTaxonomySettings(); + } + + /** Returns the object with the settings used for calls to createDataAttributeBinding. */ + public UnaryCallSettings + createDataAttributeBindingSettings() { + return ((DataTaxonomyServiceStubSettings) getStubSettings()) + .createDataAttributeBindingSettings(); + } + + /** Returns the object with the settings used for calls to createDataAttributeBinding. */ + public OperationCallSettings< + CreateDataAttributeBindingRequest, DataAttributeBinding, OperationMetadata> + createDataAttributeBindingOperationSettings() { + return ((DataTaxonomyServiceStubSettings) getStubSettings()) + .createDataAttributeBindingOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateDataAttributeBinding. */ + public UnaryCallSettings + updateDataAttributeBindingSettings() { + return ((DataTaxonomyServiceStubSettings) getStubSettings()) + .updateDataAttributeBindingSettings(); + } + + /** Returns the object with the settings used for calls to updateDataAttributeBinding. */ + public OperationCallSettings< + UpdateDataAttributeBindingRequest, DataAttributeBinding, OperationMetadata> + updateDataAttributeBindingOperationSettings() { + return ((DataTaxonomyServiceStubSettings) getStubSettings()) + .updateDataAttributeBindingOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteDataAttributeBinding. */ + public UnaryCallSettings + deleteDataAttributeBindingSettings() { + return ((DataTaxonomyServiceStubSettings) getStubSettings()) + .deleteDataAttributeBindingSettings(); + } + + /** Returns the object with the settings used for calls to deleteDataAttributeBinding. */ + public OperationCallSettings + deleteDataAttributeBindingOperationSettings() { + return ((DataTaxonomyServiceStubSettings) getStubSettings()) + .deleteDataAttributeBindingOperationSettings(); + } + + /** Returns the object with the settings used for calls to listDataAttributeBindings. */ + public PagedCallSettings< + ListDataAttributeBindingsRequest, + ListDataAttributeBindingsResponse, + ListDataAttributeBindingsPagedResponse> + listDataAttributeBindingsSettings() { + return ((DataTaxonomyServiceStubSettings) getStubSettings()) + .listDataAttributeBindingsSettings(); + } + + /** Returns the object with the settings used for calls to getDataAttributeBinding. */ + public UnaryCallSettings + getDataAttributeBindingSettings() { + return ((DataTaxonomyServiceStubSettings) getStubSettings()).getDataAttributeBindingSettings(); + } + + /** Returns the object with the settings used for calls to createDataAttribute. */ + public UnaryCallSettings createDataAttributeSettings() { + return ((DataTaxonomyServiceStubSettings) getStubSettings()).createDataAttributeSettings(); + } + + /** Returns the object with the settings used for calls to createDataAttribute. */ + public OperationCallSettings + createDataAttributeOperationSettings() { + return ((DataTaxonomyServiceStubSettings) getStubSettings()) + .createDataAttributeOperationSettings(); + } + + /** Returns the object with the settings used for calls to updateDataAttribute. */ + public UnaryCallSettings updateDataAttributeSettings() { + return ((DataTaxonomyServiceStubSettings) getStubSettings()).updateDataAttributeSettings(); + } + + /** Returns the object with the settings used for calls to updateDataAttribute. */ + public OperationCallSettings + updateDataAttributeOperationSettings() { + return ((DataTaxonomyServiceStubSettings) getStubSettings()) + .updateDataAttributeOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteDataAttribute. */ + public UnaryCallSettings deleteDataAttributeSettings() { + return ((DataTaxonomyServiceStubSettings) getStubSettings()).deleteDataAttributeSettings(); + } + + /** Returns the object with the settings used for calls to deleteDataAttribute. */ + public OperationCallSettings + deleteDataAttributeOperationSettings() { + return ((DataTaxonomyServiceStubSettings) getStubSettings()) + .deleteDataAttributeOperationSettings(); + } + + /** Returns the object with the settings used for calls to listDataAttributes. */ + public PagedCallSettings< + ListDataAttributesRequest, ListDataAttributesResponse, ListDataAttributesPagedResponse> + listDataAttributesSettings() { + return ((DataTaxonomyServiceStubSettings) getStubSettings()).listDataAttributesSettings(); + } + + /** Returns the object with the settings used for calls to getDataAttribute. */ + public UnaryCallSettings getDataAttributeSettings() { + return ((DataTaxonomyServiceStubSettings) getStubSettings()).getDataAttributeSettings(); + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return ((DataTaxonomyServiceStubSettings) getStubSettings()).listLocationsSettings(); + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return ((DataTaxonomyServiceStubSettings) getStubSettings()).getLocationSettings(); + } + + public static final DataTaxonomyServiceSettings create(DataTaxonomyServiceStubSettings stub) + throws IOException { + return new DataTaxonomyServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return DataTaxonomyServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return DataTaxonomyServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DataTaxonomyServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return DataTaxonomyServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return DataTaxonomyServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return DataTaxonomyServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return DataTaxonomyServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DataTaxonomyServiceStubSettings.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 DataTaxonomyServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for DataTaxonomyServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(DataTaxonomyServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(DataTaxonomyServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(DataTaxonomyServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(DataTaxonomyServiceStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(DataTaxonomyServiceStubSettings.newHttpJsonBuilder()); + } + + public DataTaxonomyServiceStubSettings.Builder getStubSettingsBuilder() { + return ((DataTaxonomyServiceStubSettings.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 createDataTaxonomy. */ + public UnaryCallSettings.Builder + createDataTaxonomySettings() { + return getStubSettingsBuilder().createDataTaxonomySettings(); + } + + /** Returns the builder for the settings used for calls to createDataTaxonomy. */ + public OperationCallSettings.Builder + createDataTaxonomyOperationSettings() { + return getStubSettingsBuilder().createDataTaxonomyOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateDataTaxonomy. */ + public UnaryCallSettings.Builder + updateDataTaxonomySettings() { + return getStubSettingsBuilder().updateDataTaxonomySettings(); + } + + /** Returns the builder for the settings used for calls to updateDataTaxonomy. */ + public OperationCallSettings.Builder + updateDataTaxonomyOperationSettings() { + return getStubSettingsBuilder().updateDataTaxonomyOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDataTaxonomy. */ + public UnaryCallSettings.Builder + deleteDataTaxonomySettings() { + return getStubSettingsBuilder().deleteDataTaxonomySettings(); + } + + /** Returns the builder for the settings used for calls to deleteDataTaxonomy. */ + public OperationCallSettings.Builder + deleteDataTaxonomyOperationSettings() { + return getStubSettingsBuilder().deleteDataTaxonomyOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listDataTaxonomies. */ + public PagedCallSettings.Builder< + ListDataTaxonomiesRequest, ListDataTaxonomiesResponse, ListDataTaxonomiesPagedResponse> + listDataTaxonomiesSettings() { + return getStubSettingsBuilder().listDataTaxonomiesSettings(); + } + + /** Returns the builder for the settings used for calls to getDataTaxonomy. */ + public UnaryCallSettings.Builder + getDataTaxonomySettings() { + return getStubSettingsBuilder().getDataTaxonomySettings(); + } + + /** Returns the builder for the settings used for calls to createDataAttributeBinding. */ + public UnaryCallSettings.Builder + createDataAttributeBindingSettings() { + return getStubSettingsBuilder().createDataAttributeBindingSettings(); + } + + /** Returns the builder for the settings used for calls to createDataAttributeBinding. */ + public OperationCallSettings.Builder< + CreateDataAttributeBindingRequest, DataAttributeBinding, OperationMetadata> + createDataAttributeBindingOperationSettings() { + return getStubSettingsBuilder().createDataAttributeBindingOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateDataAttributeBinding. */ + public UnaryCallSettings.Builder + updateDataAttributeBindingSettings() { + return getStubSettingsBuilder().updateDataAttributeBindingSettings(); + } + + /** Returns the builder for the settings used for calls to updateDataAttributeBinding. */ + public OperationCallSettings.Builder< + UpdateDataAttributeBindingRequest, DataAttributeBinding, OperationMetadata> + updateDataAttributeBindingOperationSettings() { + return getStubSettingsBuilder().updateDataAttributeBindingOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDataAttributeBinding. */ + public UnaryCallSettings.Builder + deleteDataAttributeBindingSettings() { + return getStubSettingsBuilder().deleteDataAttributeBindingSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDataAttributeBinding. */ + public OperationCallSettings.Builder< + DeleteDataAttributeBindingRequest, Empty, OperationMetadata> + deleteDataAttributeBindingOperationSettings() { + return getStubSettingsBuilder().deleteDataAttributeBindingOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listDataAttributeBindings. */ + public PagedCallSettings.Builder< + ListDataAttributeBindingsRequest, + ListDataAttributeBindingsResponse, + ListDataAttributeBindingsPagedResponse> + listDataAttributeBindingsSettings() { + return getStubSettingsBuilder().listDataAttributeBindingsSettings(); + } + + /** Returns the builder for the settings used for calls to getDataAttributeBinding. */ + public UnaryCallSettings.Builder + getDataAttributeBindingSettings() { + return getStubSettingsBuilder().getDataAttributeBindingSettings(); + } + + /** Returns the builder for the settings used for calls to createDataAttribute. */ + public UnaryCallSettings.Builder + createDataAttributeSettings() { + return getStubSettingsBuilder().createDataAttributeSettings(); + } + + /** Returns the builder for the settings used for calls to createDataAttribute. */ + public OperationCallSettings.Builder< + CreateDataAttributeRequest, DataAttribute, OperationMetadata> + createDataAttributeOperationSettings() { + return getStubSettingsBuilder().createDataAttributeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to updateDataAttribute. */ + public UnaryCallSettings.Builder + updateDataAttributeSettings() { + return getStubSettingsBuilder().updateDataAttributeSettings(); + } + + /** Returns the builder for the settings used for calls to updateDataAttribute. */ + public OperationCallSettings.Builder< + UpdateDataAttributeRequest, DataAttribute, OperationMetadata> + updateDataAttributeOperationSettings() { + return getStubSettingsBuilder().updateDataAttributeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDataAttribute. */ + public UnaryCallSettings.Builder + deleteDataAttributeSettings() { + return getStubSettingsBuilder().deleteDataAttributeSettings(); + } + + /** Returns the builder for the settings used for calls to deleteDataAttribute. */ + public OperationCallSettings.Builder + deleteDataAttributeOperationSettings() { + return getStubSettingsBuilder().deleteDataAttributeOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listDataAttributes. */ + public PagedCallSettings.Builder< + ListDataAttributesRequest, ListDataAttributesResponse, ListDataAttributesPagedResponse> + listDataAttributesSettings() { + return getStubSettingsBuilder().listDataAttributesSettings(); + } + + /** Returns the builder for the settings used for calls to getDataAttribute. */ + public UnaryCallSettings.Builder + getDataAttributeSettings() { + return getStubSettingsBuilder().getDataAttributeSettings(); + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return getStubSettingsBuilder().listLocationsSettings(); + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getStubSettingsBuilder().getLocationSettings(); + } + + @Override + public DataTaxonomyServiceSettings build() throws IOException { + return new DataTaxonomyServiceSettings(this); + } + } +} diff --git a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/DataplexServiceClient.java b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/DataplexServiceClient.java index 63130ce9a3ed..eaf59238a6d6 100644 --- a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/DataplexServiceClient.java +++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/DataplexServiceClient.java @@ -3832,6 +3832,8 @@ public final RunTaskResponse runTask(String name) { * RunTaskRequest request = * RunTaskRequest.newBuilder() * .setName(TaskName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[TASK]").toString()) + * .putAllLabels(new HashMap()) + * .putAllArgs(new HashMap()) * .build(); * RunTaskResponse response = dataplexServiceClient.runTask(request); * } @@ -3860,6 +3862,8 @@ public final RunTaskResponse runTask(RunTaskRequest request) { * RunTaskRequest request = * RunTaskRequest.newBuilder() * .setName(TaskName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[TASK]").toString()) + * .putAllLabels(new HashMap()) + * .putAllArgs(new HashMap()) * .build(); * ApiFuture future = * dataplexServiceClient.runTaskCallable().futureCall(request); diff --git a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/gapic_metadata.json b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/gapic_metadata.json index e619af05b4a2..50b1e08fb5e6 100644 --- a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/gapic_metadata.json +++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/gapic_metadata.json @@ -44,6 +44,66 @@ } } }, + "DataTaxonomyService": { + "clients": { + "grpc": { + "libraryClient": "DataTaxonomyServiceClient", + "rpcs": { + "CreateDataAttribute": { + "methods": ["createDataAttributeAsync", "createDataAttributeAsync", "createDataAttributeAsync", "createDataAttributeOperationCallable", "createDataAttributeCallable"] + }, + "CreateDataAttributeBinding": { + "methods": ["createDataAttributeBindingAsync", "createDataAttributeBindingAsync", "createDataAttributeBindingAsync", "createDataAttributeBindingOperationCallable", "createDataAttributeBindingCallable"] + }, + "CreateDataTaxonomy": { + "methods": ["createDataTaxonomyAsync", "createDataTaxonomyAsync", "createDataTaxonomyAsync", "createDataTaxonomyOperationCallable", "createDataTaxonomyCallable"] + }, + "DeleteDataAttribute": { + "methods": ["deleteDataAttributeAsync", "deleteDataAttributeAsync", "deleteDataAttributeAsync", "deleteDataAttributeOperationCallable", "deleteDataAttributeCallable"] + }, + "DeleteDataAttributeBinding": { + "methods": ["deleteDataAttributeBindingAsync", "deleteDataAttributeBindingAsync", "deleteDataAttributeBindingAsync", "deleteDataAttributeBindingOperationCallable", "deleteDataAttributeBindingCallable"] + }, + "DeleteDataTaxonomy": { + "methods": ["deleteDataTaxonomyAsync", "deleteDataTaxonomyAsync", "deleteDataTaxonomyAsync", "deleteDataTaxonomyOperationCallable", "deleteDataTaxonomyCallable"] + }, + "GetDataAttribute": { + "methods": ["getDataAttribute", "getDataAttribute", "getDataAttribute", "getDataAttributeCallable"] + }, + "GetDataAttributeBinding": { + "methods": ["getDataAttributeBinding", "getDataAttributeBinding", "getDataAttributeBinding", "getDataAttributeBindingCallable"] + }, + "GetDataTaxonomy": { + "methods": ["getDataTaxonomy", "getDataTaxonomy", "getDataTaxonomy", "getDataTaxonomyCallable"] + }, + "GetLocation": { + "methods": ["getLocation", "getLocationCallable"] + }, + "ListDataAttributeBindings": { + "methods": ["listDataAttributeBindings", "listDataAttributeBindings", "listDataAttributeBindings", "listDataAttributeBindingsPagedCallable", "listDataAttributeBindingsCallable"] + }, + "ListDataAttributes": { + "methods": ["listDataAttributes", "listDataAttributes", "listDataAttributes", "listDataAttributesPagedCallable", "listDataAttributesCallable"] + }, + "ListDataTaxonomies": { + "methods": ["listDataTaxonomies", "listDataTaxonomies", "listDataTaxonomies", "listDataTaxonomiesPagedCallable", "listDataTaxonomiesCallable"] + }, + "ListLocations": { + "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"] + }, + "UpdateDataAttribute": { + "methods": ["updateDataAttributeAsync", "updateDataAttributeAsync", "updateDataAttributeOperationCallable", "updateDataAttributeCallable"] + }, + "UpdateDataAttributeBinding": { + "methods": ["updateDataAttributeBindingAsync", "updateDataAttributeBindingAsync", "updateDataAttributeBindingOperationCallable", "updateDataAttributeBindingCallable"] + }, + "UpdateDataTaxonomy": { + "methods": ["updateDataTaxonomyAsync", "updateDataTaxonomyAsync", "updateDataTaxonomyOperationCallable", "updateDataTaxonomyCallable"] + } + } + } + } + }, "DataScanService": { "clients": { "grpc": { diff --git a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/package-info.java b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/package-info.java index 39f7e101c258..7584ffc895d7 100644 --- a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/package-info.java +++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/package-info.java @@ -38,6 +38,25 @@ * } * } * + *

======================= DataTaxonomyServiceClient ======================= + * + *

Service Description: DataTaxonomyService enables attribute-based governance. The resources + * currently offered include DataTaxonomy and DataAttribute. + * + *

Sample for DataTaxonomyServiceClient: + * + *

{@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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
+ *   DataTaxonomyName name = DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]");
+ *   DataTaxonomy response = dataTaxonomyServiceClient.getDataTaxonomy(name);
+ * }
+ * }
+ * *

======================= DataScanServiceClient ======================= * *

Service Description: DataScanService manages DataScan resources which can be configured to run diff --git a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/DataTaxonomyServiceStub.java b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/DataTaxonomyServiceStub.java new file mode 100644 index 000000000000..61adeed325bf --- /dev/null +++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/DataTaxonomyServiceStub.java @@ -0,0 +1,232 @@ +/* + * Copyright 2023 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.dataplex.v1.stub; + +import static com.google.cloud.dataplex.v1.DataTaxonomyServiceClient.ListDataAttributeBindingsPagedResponse; +import static com.google.cloud.dataplex.v1.DataTaxonomyServiceClient.ListDataAttributesPagedResponse; +import static com.google.cloud.dataplex.v1.DataTaxonomyServiceClient.ListDataTaxonomiesPagedResponse; +import static com.google.cloud.dataplex.v1.DataTaxonomyServiceClient.ListLocationsPagedResponse; + +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.dataplex.v1.CreateDataAttributeBindingRequest; +import com.google.cloud.dataplex.v1.CreateDataAttributeRequest; +import com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest; +import com.google.cloud.dataplex.v1.DataAttribute; +import com.google.cloud.dataplex.v1.DataAttributeBinding; +import com.google.cloud.dataplex.v1.DataTaxonomy; +import com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest; +import com.google.cloud.dataplex.v1.DeleteDataAttributeRequest; +import com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest; +import com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest; +import com.google.cloud.dataplex.v1.GetDataAttributeRequest; +import com.google.cloud.dataplex.v1.GetDataTaxonomyRequest; +import com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest; +import com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse; +import com.google.cloud.dataplex.v1.ListDataAttributesRequest; +import com.google.cloud.dataplex.v1.ListDataAttributesResponse; +import com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest; +import com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse; +import com.google.cloud.dataplex.v1.OperationMetadata; +import com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest; +import com.google.cloud.dataplex.v1.UpdateDataAttributeRequest; +import com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +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 DataTaxonomyService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class DataTaxonomyServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public OperationCallable + createDataTaxonomyOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createDataTaxonomyOperationCallable()"); + } + + public UnaryCallable createDataTaxonomyCallable() { + throw new UnsupportedOperationException("Not implemented: createDataTaxonomyCallable()"); + } + + public OperationCallable + updateDataTaxonomyOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateDataTaxonomyOperationCallable()"); + } + + public UnaryCallable updateDataTaxonomyCallable() { + throw new UnsupportedOperationException("Not implemented: updateDataTaxonomyCallable()"); + } + + public OperationCallable + deleteDataTaxonomyOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteDataTaxonomyOperationCallable()"); + } + + public UnaryCallable deleteDataTaxonomyCallable() { + throw new UnsupportedOperationException("Not implemented: deleteDataTaxonomyCallable()"); + } + + public UnaryCallable + listDataTaxonomiesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listDataTaxonomiesPagedCallable()"); + } + + public UnaryCallable + listDataTaxonomiesCallable() { + throw new UnsupportedOperationException("Not implemented: listDataTaxonomiesCallable()"); + } + + public UnaryCallable getDataTaxonomyCallable() { + throw new UnsupportedOperationException("Not implemented: getDataTaxonomyCallable()"); + } + + public OperationCallable< + CreateDataAttributeBindingRequest, DataAttributeBinding, OperationMetadata> + createDataAttributeBindingOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createDataAttributeBindingOperationCallable()"); + } + + public UnaryCallable + createDataAttributeBindingCallable() { + throw new UnsupportedOperationException( + "Not implemented: createDataAttributeBindingCallable()"); + } + + public OperationCallable< + UpdateDataAttributeBindingRequest, DataAttributeBinding, OperationMetadata> + updateDataAttributeBindingOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateDataAttributeBindingOperationCallable()"); + } + + public UnaryCallable + updateDataAttributeBindingCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateDataAttributeBindingCallable()"); + } + + public OperationCallable + deleteDataAttributeBindingOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteDataAttributeBindingOperationCallable()"); + } + + public UnaryCallable + deleteDataAttributeBindingCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteDataAttributeBindingCallable()"); + } + + public UnaryCallable + listDataAttributeBindingsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listDataAttributeBindingsPagedCallable()"); + } + + public UnaryCallable + listDataAttributeBindingsCallable() { + throw new UnsupportedOperationException("Not implemented: listDataAttributeBindingsCallable()"); + } + + public UnaryCallable + getDataAttributeBindingCallable() { + throw new UnsupportedOperationException("Not implemented: getDataAttributeBindingCallable()"); + } + + public OperationCallable + createDataAttributeOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createDataAttributeOperationCallable()"); + } + + public UnaryCallable createDataAttributeCallable() { + throw new UnsupportedOperationException("Not implemented: createDataAttributeCallable()"); + } + + public OperationCallable + updateDataAttributeOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: updateDataAttributeOperationCallable()"); + } + + public UnaryCallable updateDataAttributeCallable() { + throw new UnsupportedOperationException("Not implemented: updateDataAttributeCallable()"); + } + + public OperationCallable + deleteDataAttributeOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: deleteDataAttributeOperationCallable()"); + } + + public UnaryCallable deleteDataAttributeCallable() { + throw new UnsupportedOperationException("Not implemented: deleteDataAttributeCallable()"); + } + + public UnaryCallable + listDataAttributesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listDataAttributesPagedCallable()"); + } + + public UnaryCallable + listDataAttributesCallable() { + throw new UnsupportedOperationException("Not implemented: listDataAttributesCallable()"); + } + + public UnaryCallable getDataAttributeCallable() { + throw new UnsupportedOperationException("Not implemented: getDataAttributeCallable()"); + } + + public UnaryCallable + listLocationsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()"); + } + + public UnaryCallable listLocationsCallable() { + throw new UnsupportedOperationException("Not implemented: listLocationsCallable()"); + } + + public UnaryCallable getLocationCallable() { + throw new UnsupportedOperationException("Not implemented: getLocationCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/DataTaxonomyServiceStubSettings.java b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/DataTaxonomyServiceStubSettings.java new file mode 100644 index 000000000000..4f802858e870 --- /dev/null +++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/DataTaxonomyServiceStubSettings.java @@ -0,0 +1,1483 @@ +/* + * Copyright 2023 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.dataplex.v1.stub; + +import static com.google.cloud.dataplex.v1.DataTaxonomyServiceClient.ListDataAttributeBindingsPagedResponse; +import static com.google.cloud.dataplex.v1.DataTaxonomyServiceClient.ListDataAttributesPagedResponse; +import static com.google.cloud.dataplex.v1.DataTaxonomyServiceClient.ListDataTaxonomiesPagedResponse; +import static com.google.cloud.dataplex.v1.DataTaxonomyServiceClient.ListLocationsPagedResponse; + +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.dataplex.v1.CreateDataAttributeBindingRequest; +import com.google.cloud.dataplex.v1.CreateDataAttributeRequest; +import com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest; +import com.google.cloud.dataplex.v1.DataAttribute; +import com.google.cloud.dataplex.v1.DataAttributeBinding; +import com.google.cloud.dataplex.v1.DataTaxonomy; +import com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest; +import com.google.cloud.dataplex.v1.DeleteDataAttributeRequest; +import com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest; +import com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest; +import com.google.cloud.dataplex.v1.GetDataAttributeRequest; +import com.google.cloud.dataplex.v1.GetDataTaxonomyRequest; +import com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest; +import com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse; +import com.google.cloud.dataplex.v1.ListDataAttributesRequest; +import com.google.cloud.dataplex.v1.ListDataAttributesResponse; +import com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest; +import com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse; +import com.google.cloud.dataplex.v1.OperationMetadata; +import com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest; +import com.google.cloud.dataplex.v1.UpdateDataAttributeRequest; +import com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +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 DataTaxonomyServiceStub}. + * + *

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

    + *
  • The default service address (dataplex.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 getDataTaxonomy 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
+ * DataTaxonomyServiceStubSettings.Builder dataTaxonomyServiceSettingsBuilder =
+ *     DataTaxonomyServiceStubSettings.newBuilder();
+ * dataTaxonomyServiceSettingsBuilder
+ *     .getDataTaxonomySettings()
+ *     .setRetrySettings(
+ *         dataTaxonomyServiceSettingsBuilder
+ *             .getDataTaxonomySettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * DataTaxonomyServiceStubSettings dataTaxonomyServiceSettings =
+ *     dataTaxonomyServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class DataTaxonomyServiceStubSettings 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 createDataTaxonomySettings; + private final OperationCallSettings + createDataTaxonomyOperationSettings; + private final UnaryCallSettings updateDataTaxonomySettings; + private final OperationCallSettings + updateDataTaxonomyOperationSettings; + private final UnaryCallSettings deleteDataTaxonomySettings; + private final OperationCallSettings + deleteDataTaxonomyOperationSettings; + private final PagedCallSettings< + ListDataTaxonomiesRequest, ListDataTaxonomiesResponse, ListDataTaxonomiesPagedResponse> + listDataTaxonomiesSettings; + private final UnaryCallSettings getDataTaxonomySettings; + private final UnaryCallSettings + createDataAttributeBindingSettings; + private final OperationCallSettings< + CreateDataAttributeBindingRequest, DataAttributeBinding, OperationMetadata> + createDataAttributeBindingOperationSettings; + private final UnaryCallSettings + updateDataAttributeBindingSettings; + private final OperationCallSettings< + UpdateDataAttributeBindingRequest, DataAttributeBinding, OperationMetadata> + updateDataAttributeBindingOperationSettings; + private final UnaryCallSettings + deleteDataAttributeBindingSettings; + private final OperationCallSettings + deleteDataAttributeBindingOperationSettings; + private final PagedCallSettings< + ListDataAttributeBindingsRequest, + ListDataAttributeBindingsResponse, + ListDataAttributeBindingsPagedResponse> + listDataAttributeBindingsSettings; + private final UnaryCallSettings + getDataAttributeBindingSettings; + private final UnaryCallSettings + createDataAttributeSettings; + private final OperationCallSettings + createDataAttributeOperationSettings; + private final UnaryCallSettings + updateDataAttributeSettings; + private final OperationCallSettings + updateDataAttributeOperationSettings; + private final UnaryCallSettings + deleteDataAttributeSettings; + private final OperationCallSettings + deleteDataAttributeOperationSettings; + private final PagedCallSettings< + ListDataAttributesRequest, ListDataAttributesResponse, ListDataAttributesPagedResponse> + listDataAttributesSettings; + private final UnaryCallSettings getDataAttributeSettings; + private final PagedCallSettings< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings getLocationSettings; + + private static final PagedListDescriptor< + ListDataTaxonomiesRequest, ListDataTaxonomiesResponse, DataTaxonomy> + LIST_DATA_TAXONOMIES_PAGE_STR_DESC = + new PagedListDescriptor< + ListDataTaxonomiesRequest, ListDataTaxonomiesResponse, DataTaxonomy>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListDataTaxonomiesRequest injectToken( + ListDataTaxonomiesRequest payload, String token) { + return ListDataTaxonomiesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListDataTaxonomiesRequest injectPageSize( + ListDataTaxonomiesRequest payload, int pageSize) { + return ListDataTaxonomiesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListDataTaxonomiesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListDataTaxonomiesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListDataTaxonomiesResponse payload) { + return payload.getDataTaxonomiesList() == null + ? ImmutableList.of() + : payload.getDataTaxonomiesList(); + } + }; + + private static final PagedListDescriptor< + ListDataAttributeBindingsRequest, ListDataAttributeBindingsResponse, DataAttributeBinding> + LIST_DATA_ATTRIBUTE_BINDINGS_PAGE_STR_DESC = + new PagedListDescriptor< + ListDataAttributeBindingsRequest, + ListDataAttributeBindingsResponse, + DataAttributeBinding>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListDataAttributeBindingsRequest injectToken( + ListDataAttributeBindingsRequest payload, String token) { + return ListDataAttributeBindingsRequest.newBuilder(payload) + .setPageToken(token) + .build(); + } + + @Override + public ListDataAttributeBindingsRequest injectPageSize( + ListDataAttributeBindingsRequest payload, int pageSize) { + return ListDataAttributeBindingsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListDataAttributeBindingsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListDataAttributeBindingsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListDataAttributeBindingsResponse payload) { + return payload.getDataAttributeBindingsList() == null + ? ImmutableList.of() + : payload.getDataAttributeBindingsList(); + } + }; + + private static final PagedListDescriptor< + ListDataAttributesRequest, ListDataAttributesResponse, DataAttribute> + LIST_DATA_ATTRIBUTES_PAGE_STR_DESC = + new PagedListDescriptor< + ListDataAttributesRequest, ListDataAttributesResponse, DataAttribute>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListDataAttributesRequest injectToken( + ListDataAttributesRequest payload, String token) { + return ListDataAttributesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListDataAttributesRequest injectPageSize( + ListDataAttributesRequest payload, int pageSize) { + return ListDataAttributesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListDataAttributesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListDataAttributesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListDataAttributesResponse payload) { + return payload.getDataAttributesList() == null + ? ImmutableList.of() + : payload.getDataAttributesList(); + } + }; + + private static final PagedListDescriptor + LIST_LOCATIONS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) { + return ListLocationsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) { + return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListLocationsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListLocationsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListLocationsResponse payload) { + return payload.getLocationsList() == null + ? ImmutableList.of() + : payload.getLocationsList(); + } + }; + + private static final PagedListResponseFactory< + ListDataTaxonomiesRequest, ListDataTaxonomiesResponse, ListDataTaxonomiesPagedResponse> + LIST_DATA_TAXONOMIES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListDataTaxonomiesRequest, + ListDataTaxonomiesResponse, + ListDataTaxonomiesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListDataTaxonomiesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_DATA_TAXONOMIES_PAGE_STR_DESC, request, context); + return ListDataTaxonomiesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListDataAttributeBindingsRequest, + ListDataAttributeBindingsResponse, + ListDataAttributeBindingsPagedResponse> + LIST_DATA_ATTRIBUTE_BINDINGS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListDataAttributeBindingsRequest, + ListDataAttributeBindingsResponse, + ListDataAttributeBindingsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListDataAttributeBindingsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListDataAttributeBindingsRequest, + ListDataAttributeBindingsResponse, + DataAttributeBinding> + pageContext = + PageContext.create( + callable, LIST_DATA_ATTRIBUTE_BINDINGS_PAGE_STR_DESC, request, context); + return ListDataAttributeBindingsPagedResponse.createAsync( + pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListDataAttributesRequest, ListDataAttributesResponse, ListDataAttributesPagedResponse> + LIST_DATA_ATTRIBUTES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListDataAttributesRequest, + ListDataAttributesResponse, + ListDataAttributesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListDataAttributesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_DATA_ATTRIBUTES_PAGE_STR_DESC, request, context); + return ListDataAttributesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + LIST_LOCATIONS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListLocationsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context); + return ListLocationsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createDataTaxonomy. */ + public UnaryCallSettings createDataTaxonomySettings() { + return createDataTaxonomySettings; + } + + /** Returns the object with the settings used for calls to createDataTaxonomy. */ + public OperationCallSettings + createDataTaxonomyOperationSettings() { + return createDataTaxonomyOperationSettings; + } + + /** Returns the object with the settings used for calls to updateDataTaxonomy. */ + public UnaryCallSettings updateDataTaxonomySettings() { + return updateDataTaxonomySettings; + } + + /** Returns the object with the settings used for calls to updateDataTaxonomy. */ + public OperationCallSettings + updateDataTaxonomyOperationSettings() { + return updateDataTaxonomyOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteDataTaxonomy. */ + public UnaryCallSettings deleteDataTaxonomySettings() { + return deleteDataTaxonomySettings; + } + + /** Returns the object with the settings used for calls to deleteDataTaxonomy. */ + public OperationCallSettings + deleteDataTaxonomyOperationSettings() { + return deleteDataTaxonomyOperationSettings; + } + + /** Returns the object with the settings used for calls to listDataTaxonomies. */ + public PagedCallSettings< + ListDataTaxonomiesRequest, ListDataTaxonomiesResponse, ListDataTaxonomiesPagedResponse> + listDataTaxonomiesSettings() { + return listDataTaxonomiesSettings; + } + + /** Returns the object with the settings used for calls to getDataTaxonomy. */ + public UnaryCallSettings getDataTaxonomySettings() { + return getDataTaxonomySettings; + } + + /** Returns the object with the settings used for calls to createDataAttributeBinding. */ + public UnaryCallSettings + createDataAttributeBindingSettings() { + return createDataAttributeBindingSettings; + } + + /** Returns the object with the settings used for calls to createDataAttributeBinding. */ + public OperationCallSettings< + CreateDataAttributeBindingRequest, DataAttributeBinding, OperationMetadata> + createDataAttributeBindingOperationSettings() { + return createDataAttributeBindingOperationSettings; + } + + /** Returns the object with the settings used for calls to updateDataAttributeBinding. */ + public UnaryCallSettings + updateDataAttributeBindingSettings() { + return updateDataAttributeBindingSettings; + } + + /** Returns the object with the settings used for calls to updateDataAttributeBinding. */ + public OperationCallSettings< + UpdateDataAttributeBindingRequest, DataAttributeBinding, OperationMetadata> + updateDataAttributeBindingOperationSettings() { + return updateDataAttributeBindingOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteDataAttributeBinding. */ + public UnaryCallSettings + deleteDataAttributeBindingSettings() { + return deleteDataAttributeBindingSettings; + } + + /** Returns the object with the settings used for calls to deleteDataAttributeBinding. */ + public OperationCallSettings + deleteDataAttributeBindingOperationSettings() { + return deleteDataAttributeBindingOperationSettings; + } + + /** Returns the object with the settings used for calls to listDataAttributeBindings. */ + public PagedCallSettings< + ListDataAttributeBindingsRequest, + ListDataAttributeBindingsResponse, + ListDataAttributeBindingsPagedResponse> + listDataAttributeBindingsSettings() { + return listDataAttributeBindingsSettings; + } + + /** Returns the object with the settings used for calls to getDataAttributeBinding. */ + public UnaryCallSettings + getDataAttributeBindingSettings() { + return getDataAttributeBindingSettings; + } + + /** Returns the object with the settings used for calls to createDataAttribute. */ + public UnaryCallSettings createDataAttributeSettings() { + return createDataAttributeSettings; + } + + /** Returns the object with the settings used for calls to createDataAttribute. */ + public OperationCallSettings + createDataAttributeOperationSettings() { + return createDataAttributeOperationSettings; + } + + /** Returns the object with the settings used for calls to updateDataAttribute. */ + public UnaryCallSettings updateDataAttributeSettings() { + return updateDataAttributeSettings; + } + + /** Returns the object with the settings used for calls to updateDataAttribute. */ + public OperationCallSettings + updateDataAttributeOperationSettings() { + return updateDataAttributeOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteDataAttribute. */ + public UnaryCallSettings deleteDataAttributeSettings() { + return deleteDataAttributeSettings; + } + + /** Returns the object with the settings used for calls to deleteDataAttribute. */ + public OperationCallSettings + deleteDataAttributeOperationSettings() { + return deleteDataAttributeOperationSettings; + } + + /** Returns the object with the settings used for calls to listDataAttributes. */ + public PagedCallSettings< + ListDataAttributesRequest, ListDataAttributesResponse, ListDataAttributesPagedResponse> + listDataAttributesSettings() { + return listDataAttributesSettings; + } + + /** Returns the object with the settings used for calls to getDataAttribute. */ + public UnaryCallSettings getDataAttributeSettings() { + return getDataAttributeSettings; + } + + /** Returns the object with the settings used for calls to listLocations. */ + public PagedCallSettings + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the object with the settings used for calls to getLocation. */ + public UnaryCallSettings getLocationSettings() { + return getLocationSettings; + } + + public DataTaxonomyServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcDataTaxonomyServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonDataTaxonomyServiceStub.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 "dataplex.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "dataplex.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(DataTaxonomyServiceStubSettings.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(DataTaxonomyServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return DataTaxonomyServiceStubSettings.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 DataTaxonomyServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createDataTaxonomySettings = settingsBuilder.createDataTaxonomySettings().build(); + createDataTaxonomyOperationSettings = + settingsBuilder.createDataTaxonomyOperationSettings().build(); + updateDataTaxonomySettings = settingsBuilder.updateDataTaxonomySettings().build(); + updateDataTaxonomyOperationSettings = + settingsBuilder.updateDataTaxonomyOperationSettings().build(); + deleteDataTaxonomySettings = settingsBuilder.deleteDataTaxonomySettings().build(); + deleteDataTaxonomyOperationSettings = + settingsBuilder.deleteDataTaxonomyOperationSettings().build(); + listDataTaxonomiesSettings = settingsBuilder.listDataTaxonomiesSettings().build(); + getDataTaxonomySettings = settingsBuilder.getDataTaxonomySettings().build(); + createDataAttributeBindingSettings = + settingsBuilder.createDataAttributeBindingSettings().build(); + createDataAttributeBindingOperationSettings = + settingsBuilder.createDataAttributeBindingOperationSettings().build(); + updateDataAttributeBindingSettings = + settingsBuilder.updateDataAttributeBindingSettings().build(); + updateDataAttributeBindingOperationSettings = + settingsBuilder.updateDataAttributeBindingOperationSettings().build(); + deleteDataAttributeBindingSettings = + settingsBuilder.deleteDataAttributeBindingSettings().build(); + deleteDataAttributeBindingOperationSettings = + settingsBuilder.deleteDataAttributeBindingOperationSettings().build(); + listDataAttributeBindingsSettings = settingsBuilder.listDataAttributeBindingsSettings().build(); + getDataAttributeBindingSettings = settingsBuilder.getDataAttributeBindingSettings().build(); + createDataAttributeSettings = settingsBuilder.createDataAttributeSettings().build(); + createDataAttributeOperationSettings = + settingsBuilder.createDataAttributeOperationSettings().build(); + updateDataAttributeSettings = settingsBuilder.updateDataAttributeSettings().build(); + updateDataAttributeOperationSettings = + settingsBuilder.updateDataAttributeOperationSettings().build(); + deleteDataAttributeSettings = settingsBuilder.deleteDataAttributeSettings().build(); + deleteDataAttributeOperationSettings = + settingsBuilder.deleteDataAttributeOperationSettings().build(); + listDataAttributesSettings = settingsBuilder.listDataAttributesSettings().build(); + getDataAttributeSettings = settingsBuilder.getDataAttributeSettings().build(); + listLocationsSettings = settingsBuilder.listLocationsSettings().build(); + getLocationSettings = settingsBuilder.getLocationSettings().build(); + } + + /** Builder for DataTaxonomyServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + createDataTaxonomySettings; + private final OperationCallSettings.Builder< + CreateDataTaxonomyRequest, DataTaxonomy, OperationMetadata> + createDataTaxonomyOperationSettings; + private final UnaryCallSettings.Builder + updateDataTaxonomySettings; + private final OperationCallSettings.Builder< + UpdateDataTaxonomyRequest, DataTaxonomy, OperationMetadata> + updateDataTaxonomyOperationSettings; + private final UnaryCallSettings.Builder + deleteDataTaxonomySettings; + private final OperationCallSettings.Builder + deleteDataTaxonomyOperationSettings; + private final PagedCallSettings.Builder< + ListDataTaxonomiesRequest, ListDataTaxonomiesResponse, ListDataTaxonomiesPagedResponse> + listDataTaxonomiesSettings; + private final UnaryCallSettings.Builder + getDataTaxonomySettings; + private final UnaryCallSettings.Builder + createDataAttributeBindingSettings; + private final OperationCallSettings.Builder< + CreateDataAttributeBindingRequest, DataAttributeBinding, OperationMetadata> + createDataAttributeBindingOperationSettings; + private final UnaryCallSettings.Builder + updateDataAttributeBindingSettings; + private final OperationCallSettings.Builder< + UpdateDataAttributeBindingRequest, DataAttributeBinding, OperationMetadata> + updateDataAttributeBindingOperationSettings; + private final UnaryCallSettings.Builder + deleteDataAttributeBindingSettings; + private final OperationCallSettings.Builder< + DeleteDataAttributeBindingRequest, Empty, OperationMetadata> + deleteDataAttributeBindingOperationSettings; + private final PagedCallSettings.Builder< + ListDataAttributeBindingsRequest, + ListDataAttributeBindingsResponse, + ListDataAttributeBindingsPagedResponse> + listDataAttributeBindingsSettings; + private final UnaryCallSettings.Builder + getDataAttributeBindingSettings; + private final UnaryCallSettings.Builder + createDataAttributeSettings; + private final OperationCallSettings.Builder< + CreateDataAttributeRequest, DataAttribute, OperationMetadata> + createDataAttributeOperationSettings; + private final UnaryCallSettings.Builder + updateDataAttributeSettings; + private final OperationCallSettings.Builder< + UpdateDataAttributeRequest, DataAttribute, OperationMetadata> + updateDataAttributeOperationSettings; + private final UnaryCallSettings.Builder + deleteDataAttributeSettings; + private final OperationCallSettings.Builder< + DeleteDataAttributeRequest, Empty, OperationMetadata> + deleteDataAttributeOperationSettings; + private final PagedCallSettings.Builder< + ListDataAttributesRequest, ListDataAttributesResponse, ListDataAttributesPagedResponse> + listDataAttributesSettings; + private final UnaryCallSettings.Builder + getDataAttributeSettings; + private final PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings; + private final UnaryCallSettings.Builder getLocationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + createDataTaxonomySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createDataTaxonomyOperationSettings = OperationCallSettings.newBuilder(); + updateDataTaxonomySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateDataTaxonomyOperationSettings = OperationCallSettings.newBuilder(); + deleteDataTaxonomySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteDataTaxonomyOperationSettings = OperationCallSettings.newBuilder(); + listDataTaxonomiesSettings = PagedCallSettings.newBuilder(LIST_DATA_TAXONOMIES_PAGE_STR_FACT); + getDataTaxonomySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createDataAttributeBindingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createDataAttributeBindingOperationSettings = OperationCallSettings.newBuilder(); + updateDataAttributeBindingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateDataAttributeBindingOperationSettings = OperationCallSettings.newBuilder(); + deleteDataAttributeBindingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteDataAttributeBindingOperationSettings = OperationCallSettings.newBuilder(); + listDataAttributeBindingsSettings = + PagedCallSettings.newBuilder(LIST_DATA_ATTRIBUTE_BINDINGS_PAGE_STR_FACT); + getDataAttributeBindingSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createDataAttributeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createDataAttributeOperationSettings = OperationCallSettings.newBuilder(); + updateDataAttributeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateDataAttributeOperationSettings = OperationCallSettings.newBuilder(); + deleteDataAttributeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteDataAttributeOperationSettings = OperationCallSettings.newBuilder(); + listDataAttributesSettings = PagedCallSettings.newBuilder(LIST_DATA_ATTRIBUTES_PAGE_STR_FACT); + getDataAttributeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT); + getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createDataTaxonomySettings, + updateDataTaxonomySettings, + deleteDataTaxonomySettings, + listDataTaxonomiesSettings, + getDataTaxonomySettings, + createDataAttributeBindingSettings, + updateDataAttributeBindingSettings, + deleteDataAttributeBindingSettings, + listDataAttributeBindingsSettings, + getDataAttributeBindingSettings, + createDataAttributeSettings, + updateDataAttributeSettings, + deleteDataAttributeSettings, + listDataAttributesSettings, + getDataAttributeSettings, + listLocationsSettings, + getLocationSettings); + initDefaults(this); + } + + protected Builder(DataTaxonomyServiceStubSettings settings) { + super(settings); + + createDataTaxonomySettings = settings.createDataTaxonomySettings.toBuilder(); + createDataTaxonomyOperationSettings = + settings.createDataTaxonomyOperationSettings.toBuilder(); + updateDataTaxonomySettings = settings.updateDataTaxonomySettings.toBuilder(); + updateDataTaxonomyOperationSettings = + settings.updateDataTaxonomyOperationSettings.toBuilder(); + deleteDataTaxonomySettings = settings.deleteDataTaxonomySettings.toBuilder(); + deleteDataTaxonomyOperationSettings = + settings.deleteDataTaxonomyOperationSettings.toBuilder(); + listDataTaxonomiesSettings = settings.listDataTaxonomiesSettings.toBuilder(); + getDataTaxonomySettings = settings.getDataTaxonomySettings.toBuilder(); + createDataAttributeBindingSettings = settings.createDataAttributeBindingSettings.toBuilder(); + createDataAttributeBindingOperationSettings = + settings.createDataAttributeBindingOperationSettings.toBuilder(); + updateDataAttributeBindingSettings = settings.updateDataAttributeBindingSettings.toBuilder(); + updateDataAttributeBindingOperationSettings = + settings.updateDataAttributeBindingOperationSettings.toBuilder(); + deleteDataAttributeBindingSettings = settings.deleteDataAttributeBindingSettings.toBuilder(); + deleteDataAttributeBindingOperationSettings = + settings.deleteDataAttributeBindingOperationSettings.toBuilder(); + listDataAttributeBindingsSettings = settings.listDataAttributeBindingsSettings.toBuilder(); + getDataAttributeBindingSettings = settings.getDataAttributeBindingSettings.toBuilder(); + createDataAttributeSettings = settings.createDataAttributeSettings.toBuilder(); + createDataAttributeOperationSettings = + settings.createDataAttributeOperationSettings.toBuilder(); + updateDataAttributeSettings = settings.updateDataAttributeSettings.toBuilder(); + updateDataAttributeOperationSettings = + settings.updateDataAttributeOperationSettings.toBuilder(); + deleteDataAttributeSettings = settings.deleteDataAttributeSettings.toBuilder(); + deleteDataAttributeOperationSettings = + settings.deleteDataAttributeOperationSettings.toBuilder(); + listDataAttributesSettings = settings.listDataAttributesSettings.toBuilder(); + getDataAttributeSettings = settings.getDataAttributeSettings.toBuilder(); + listLocationsSettings = settings.listLocationsSettings.toBuilder(); + getLocationSettings = settings.getLocationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createDataTaxonomySettings, + updateDataTaxonomySettings, + deleteDataTaxonomySettings, + listDataTaxonomiesSettings, + getDataTaxonomySettings, + createDataAttributeBindingSettings, + updateDataAttributeBindingSettings, + deleteDataAttributeBindingSettings, + listDataAttributeBindingsSettings, + getDataAttributeBindingSettings, + createDataAttributeSettings, + updateDataAttributeSettings, + deleteDataAttributeSettings, + listDataAttributesSettings, + getDataAttributeSettings, + listLocationsSettings, + getLocationSettings); + } + + 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 + .createDataTaxonomySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateDataTaxonomySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteDataTaxonomySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listDataTaxonomiesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getDataTaxonomySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createDataAttributeBindingSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateDataAttributeBindingSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteDataAttributeBindingSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listDataAttributeBindingsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getDataAttributeBindingSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createDataAttributeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateDataAttributeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteDataAttributeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listDataAttributesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getDataAttributeSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listLocationsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .getLocationSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createDataTaxonomyOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(DataTaxonomy.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 + .updateDataTaxonomyOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(DataTaxonomy.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 + .deleteDataTaxonomyOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_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 + .createDataAttributeBindingOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(DataAttributeBinding.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 + .updateDataAttributeBindingOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(DataAttributeBinding.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 + .deleteDataAttributeBindingOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_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 + .createDataAttributeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(DataAttribute.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 + .updateDataAttributeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(DataAttribute.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 + .deleteDataAttributeOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_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 createDataTaxonomy. */ + public UnaryCallSettings.Builder + createDataTaxonomySettings() { + return createDataTaxonomySettings; + } + + /** Returns the builder for the settings used for calls to createDataTaxonomy. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createDataTaxonomyOperationSettings() { + return createDataTaxonomyOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateDataTaxonomy. */ + public UnaryCallSettings.Builder + updateDataTaxonomySettings() { + return updateDataTaxonomySettings; + } + + /** Returns the builder for the settings used for calls to updateDataTaxonomy. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + updateDataTaxonomyOperationSettings() { + return updateDataTaxonomyOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteDataTaxonomy. */ + public UnaryCallSettings.Builder + deleteDataTaxonomySettings() { + return deleteDataTaxonomySettings; + } + + /** Returns the builder for the settings used for calls to deleteDataTaxonomy. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteDataTaxonomyOperationSettings() { + return deleteDataTaxonomyOperationSettings; + } + + /** Returns the builder for the settings used for calls to listDataTaxonomies. */ + public PagedCallSettings.Builder< + ListDataTaxonomiesRequest, ListDataTaxonomiesResponse, ListDataTaxonomiesPagedResponse> + listDataTaxonomiesSettings() { + return listDataTaxonomiesSettings; + } + + /** Returns the builder for the settings used for calls to getDataTaxonomy. */ + public UnaryCallSettings.Builder + getDataTaxonomySettings() { + return getDataTaxonomySettings; + } + + /** Returns the builder for the settings used for calls to createDataAttributeBinding. */ + public UnaryCallSettings.Builder + createDataAttributeBindingSettings() { + return createDataAttributeBindingSettings; + } + + /** Returns the builder for the settings used for calls to createDataAttributeBinding. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateDataAttributeBindingRequest, DataAttributeBinding, OperationMetadata> + createDataAttributeBindingOperationSettings() { + return createDataAttributeBindingOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateDataAttributeBinding. */ + public UnaryCallSettings.Builder + updateDataAttributeBindingSettings() { + return updateDataAttributeBindingSettings; + } + + /** Returns the builder for the settings used for calls to updateDataAttributeBinding. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + UpdateDataAttributeBindingRequest, DataAttributeBinding, OperationMetadata> + updateDataAttributeBindingOperationSettings() { + return updateDataAttributeBindingOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteDataAttributeBinding. */ + public UnaryCallSettings.Builder + deleteDataAttributeBindingSettings() { + return deleteDataAttributeBindingSettings; + } + + /** Returns the builder for the settings used for calls to deleteDataAttributeBinding. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + DeleteDataAttributeBindingRequest, Empty, OperationMetadata> + deleteDataAttributeBindingOperationSettings() { + return deleteDataAttributeBindingOperationSettings; + } + + /** Returns the builder for the settings used for calls to listDataAttributeBindings. */ + public PagedCallSettings.Builder< + ListDataAttributeBindingsRequest, + ListDataAttributeBindingsResponse, + ListDataAttributeBindingsPagedResponse> + listDataAttributeBindingsSettings() { + return listDataAttributeBindingsSettings; + } + + /** Returns the builder for the settings used for calls to getDataAttributeBinding. */ + public UnaryCallSettings.Builder + getDataAttributeBindingSettings() { + return getDataAttributeBindingSettings; + } + + /** Returns the builder for the settings used for calls to createDataAttribute. */ + public UnaryCallSettings.Builder + createDataAttributeSettings() { + return createDataAttributeSettings; + } + + /** Returns the builder for the settings used for calls to createDataAttribute. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + CreateDataAttributeRequest, DataAttribute, OperationMetadata> + createDataAttributeOperationSettings() { + return createDataAttributeOperationSettings; + } + + /** Returns the builder for the settings used for calls to updateDataAttribute. */ + public UnaryCallSettings.Builder + updateDataAttributeSettings() { + return updateDataAttributeSettings; + } + + /** Returns the builder for the settings used for calls to updateDataAttribute. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + UpdateDataAttributeRequest, DataAttribute, OperationMetadata> + updateDataAttributeOperationSettings() { + return updateDataAttributeOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteDataAttribute. */ + public UnaryCallSettings.Builder + deleteDataAttributeSettings() { + return deleteDataAttributeSettings; + } + + /** Returns the builder for the settings used for calls to deleteDataAttribute. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteDataAttributeOperationSettings() { + return deleteDataAttributeOperationSettings; + } + + /** Returns the builder for the settings used for calls to listDataAttributes. */ + public PagedCallSettings.Builder< + ListDataAttributesRequest, ListDataAttributesResponse, ListDataAttributesPagedResponse> + listDataAttributesSettings() { + return listDataAttributesSettings; + } + + /** Returns the builder for the settings used for calls to getDataAttribute. */ + public UnaryCallSettings.Builder + getDataAttributeSettings() { + return getDataAttributeSettings; + } + + /** Returns the builder for the settings used for calls to listLocations. */ + public PagedCallSettings.Builder< + ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse> + listLocationsSettings() { + return listLocationsSettings; + } + + /** Returns the builder for the settings used for calls to getLocation. */ + public UnaryCallSettings.Builder getLocationSettings() { + return getLocationSettings; + } + + @Override + public DataTaxonomyServiceStubSettings build() throws IOException { + return new DataTaxonomyServiceStubSettings(this); + } + } +} diff --git a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/GrpcDataTaxonomyServiceCallableFactory.java b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/GrpcDataTaxonomyServiceCallableFactory.java new file mode 100644 index 000000000000..7e9c5d4bd2c8 --- /dev/null +++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/GrpcDataTaxonomyServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2023 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.dataplex.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 DataTaxonomyService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcDataTaxonomyServiceCallableFactory 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-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/GrpcDataTaxonomyServiceStub.java b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/GrpcDataTaxonomyServiceStub.java new file mode 100644 index 000000000000..58d6684fa0e4 --- /dev/null +++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/GrpcDataTaxonomyServiceStub.java @@ -0,0 +1,901 @@ +/* + * Copyright 2023 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.dataplex.v1.stub; + +import static com.google.cloud.dataplex.v1.DataTaxonomyServiceClient.ListDataAttributeBindingsPagedResponse; +import static com.google.cloud.dataplex.v1.DataTaxonomyServiceClient.ListDataAttributesPagedResponse; +import static com.google.cloud.dataplex.v1.DataTaxonomyServiceClient.ListDataTaxonomiesPagedResponse; +import static com.google.cloud.dataplex.v1.DataTaxonomyServiceClient.ListLocationsPagedResponse; + +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.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest; +import com.google.cloud.dataplex.v1.CreateDataAttributeRequest; +import com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest; +import com.google.cloud.dataplex.v1.DataAttribute; +import com.google.cloud.dataplex.v1.DataAttributeBinding; +import com.google.cloud.dataplex.v1.DataTaxonomy; +import com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest; +import com.google.cloud.dataplex.v1.DeleteDataAttributeRequest; +import com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest; +import com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest; +import com.google.cloud.dataplex.v1.GetDataAttributeRequest; +import com.google.cloud.dataplex.v1.GetDataTaxonomyRequest; +import com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest; +import com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse; +import com.google.cloud.dataplex.v1.ListDataAttributesRequest; +import com.google.cloud.dataplex.v1.ListDataAttributesResponse; +import com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest; +import com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse; +import com.google.cloud.dataplex.v1.OperationMetadata; +import com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest; +import com.google.cloud.dataplex.v1.UpdateDataAttributeRequest; +import com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +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 DataTaxonomyService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcDataTaxonomyServiceStub extends DataTaxonomyServiceStub { + private static final MethodDescriptor + createDataTaxonomyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dataplex.v1.DataTaxonomyService/CreateDataTaxonomy") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateDataTaxonomyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateDataTaxonomyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dataplex.v1.DataTaxonomyService/UpdateDataTaxonomy") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateDataTaxonomyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteDataTaxonomyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dataplex.v1.DataTaxonomyService/DeleteDataTaxonomy") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteDataTaxonomyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listDataTaxonomiesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dataplex.v1.DataTaxonomyService/ListDataTaxonomies") + .setRequestMarshaller( + ProtoUtils.marshaller(ListDataTaxonomiesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListDataTaxonomiesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getDataTaxonomyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dataplex.v1.DataTaxonomyService/GetDataTaxonomy") + .setRequestMarshaller( + ProtoUtils.marshaller(GetDataTaxonomyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(DataTaxonomy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createDataAttributeBindingMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.dataplex.v1.DataTaxonomyService/CreateDataAttributeBinding") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateDataAttributeBindingRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateDataAttributeBindingMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.dataplex.v1.DataTaxonomyService/UpdateDataAttributeBinding") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateDataAttributeBindingRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteDataAttributeBindingMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.dataplex.v1.DataTaxonomyService/DeleteDataAttributeBinding") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteDataAttributeBindingRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListDataAttributeBindingsRequest, ListDataAttributeBindingsResponse> + listDataAttributeBindingsMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.dataplex.v1.DataTaxonomyService/ListDataAttributeBindings") + .setRequestMarshaller( + ProtoUtils.marshaller(ListDataAttributeBindingsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListDataAttributeBindingsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getDataAttributeBindingMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.dataplex.v1.DataTaxonomyService/GetDataAttributeBinding") + .setRequestMarshaller( + ProtoUtils.marshaller(GetDataAttributeBindingRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(DataAttributeBinding.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createDataAttributeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dataplex.v1.DataTaxonomyService/CreateDataAttribute") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateDataAttributeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateDataAttributeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dataplex.v1.DataTaxonomyService/UpdateDataAttribute") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateDataAttributeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteDataAttributeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dataplex.v1.DataTaxonomyService/DeleteDataAttribute") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteDataAttributeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listDataAttributesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dataplex.v1.DataTaxonomyService/ListDataAttributes") + .setRequestMarshaller( + ProtoUtils.marshaller(ListDataAttributesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListDataAttributesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getDataAttributeMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.dataplex.v1.DataTaxonomyService/GetDataAttribute") + .setRequestMarshaller( + ProtoUtils.marshaller(GetDataAttributeRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(DataAttribute.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listLocationsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setRequestMarshaller( + ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getLocationMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .build(); + + private final UnaryCallable createDataTaxonomyCallable; + private final OperationCallable + createDataTaxonomyOperationCallable; + private final UnaryCallable updateDataTaxonomyCallable; + private final OperationCallable + updateDataTaxonomyOperationCallable; + private final UnaryCallable deleteDataTaxonomyCallable; + private final OperationCallable + deleteDataTaxonomyOperationCallable; + private final UnaryCallable + listDataTaxonomiesCallable; + private final UnaryCallable + listDataTaxonomiesPagedCallable; + private final UnaryCallable getDataTaxonomyCallable; + private final UnaryCallable + createDataAttributeBindingCallable; + private final OperationCallable< + CreateDataAttributeBindingRequest, DataAttributeBinding, OperationMetadata> + createDataAttributeBindingOperationCallable; + private final UnaryCallable + updateDataAttributeBindingCallable; + private final OperationCallable< + UpdateDataAttributeBindingRequest, DataAttributeBinding, OperationMetadata> + updateDataAttributeBindingOperationCallable; + private final UnaryCallable + deleteDataAttributeBindingCallable; + private final OperationCallable + deleteDataAttributeBindingOperationCallable; + private final UnaryCallable + listDataAttributeBindingsCallable; + private final UnaryCallable< + ListDataAttributeBindingsRequest, ListDataAttributeBindingsPagedResponse> + listDataAttributeBindingsPagedCallable; + private final UnaryCallable + getDataAttributeBindingCallable; + private final UnaryCallable createDataAttributeCallable; + private final OperationCallable + createDataAttributeOperationCallable; + private final UnaryCallable updateDataAttributeCallable; + private final OperationCallable + updateDataAttributeOperationCallable; + private final UnaryCallable deleteDataAttributeCallable; + private final OperationCallable + deleteDataAttributeOperationCallable; + private final UnaryCallable + listDataAttributesCallable; + private final UnaryCallable + listDataAttributesPagedCallable; + private final UnaryCallable getDataAttributeCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcDataTaxonomyServiceStub create(DataTaxonomyServiceStubSettings settings) + throws IOException { + return new GrpcDataTaxonomyServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcDataTaxonomyServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcDataTaxonomyServiceStub( + DataTaxonomyServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcDataTaxonomyServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcDataTaxonomyServiceStub( + DataTaxonomyServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcDataTaxonomyServiceStub, 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 GrpcDataTaxonomyServiceStub( + DataTaxonomyServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcDataTaxonomyServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcDataTaxonomyServiceStub, 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 GrpcDataTaxonomyServiceStub( + DataTaxonomyServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createDataTaxonomyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createDataTaxonomyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateDataTaxonomyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateDataTaxonomyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "data_taxonomy.name", String.valueOf(request.getDataTaxonomy().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteDataTaxonomyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteDataTaxonomyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listDataTaxonomiesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listDataTaxonomiesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getDataTaxonomyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getDataTaxonomyMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + createDataAttributeBindingTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createDataAttributeBindingMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + updateDataAttributeBindingTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateDataAttributeBindingMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "data_attribute_binding.name", + String.valueOf(request.getDataAttributeBinding().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + deleteDataAttributeBindingTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteDataAttributeBindingMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listDataAttributeBindingsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listDataAttributeBindingsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings + getDataAttributeBindingTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getDataAttributeBindingMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings createDataAttributeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createDataAttributeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings updateDataAttributeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateDataAttributeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "data_attribute.name", String.valueOf(request.getDataAttribute().getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings deleteDataAttributeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteDataAttributeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings + listDataAttributesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listDataAttributesMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + GrpcCallSettings getDataAttributeTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getDataAttributeMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings listLocationsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + GrpcCallSettings getLocationTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.createDataTaxonomyCallable = + callableFactory.createUnaryCallable( + createDataTaxonomyTransportSettings, + settings.createDataTaxonomySettings(), + clientContext); + this.createDataTaxonomyOperationCallable = + callableFactory.createOperationCallable( + createDataTaxonomyTransportSettings, + settings.createDataTaxonomyOperationSettings(), + clientContext, + operationsStub); + this.updateDataTaxonomyCallable = + callableFactory.createUnaryCallable( + updateDataTaxonomyTransportSettings, + settings.updateDataTaxonomySettings(), + clientContext); + this.updateDataTaxonomyOperationCallable = + callableFactory.createOperationCallable( + updateDataTaxonomyTransportSettings, + settings.updateDataTaxonomyOperationSettings(), + clientContext, + operationsStub); + this.deleteDataTaxonomyCallable = + callableFactory.createUnaryCallable( + deleteDataTaxonomyTransportSettings, + settings.deleteDataTaxonomySettings(), + clientContext); + this.deleteDataTaxonomyOperationCallable = + callableFactory.createOperationCallable( + deleteDataTaxonomyTransportSettings, + settings.deleteDataTaxonomyOperationSettings(), + clientContext, + operationsStub); + this.listDataTaxonomiesCallable = + callableFactory.createUnaryCallable( + listDataTaxonomiesTransportSettings, + settings.listDataTaxonomiesSettings(), + clientContext); + this.listDataTaxonomiesPagedCallable = + callableFactory.createPagedCallable( + listDataTaxonomiesTransportSettings, + settings.listDataTaxonomiesSettings(), + clientContext); + this.getDataTaxonomyCallable = + callableFactory.createUnaryCallable( + getDataTaxonomyTransportSettings, settings.getDataTaxonomySettings(), clientContext); + this.createDataAttributeBindingCallable = + callableFactory.createUnaryCallable( + createDataAttributeBindingTransportSettings, + settings.createDataAttributeBindingSettings(), + clientContext); + this.createDataAttributeBindingOperationCallable = + callableFactory.createOperationCallable( + createDataAttributeBindingTransportSettings, + settings.createDataAttributeBindingOperationSettings(), + clientContext, + operationsStub); + this.updateDataAttributeBindingCallable = + callableFactory.createUnaryCallable( + updateDataAttributeBindingTransportSettings, + settings.updateDataAttributeBindingSettings(), + clientContext); + this.updateDataAttributeBindingOperationCallable = + callableFactory.createOperationCallable( + updateDataAttributeBindingTransportSettings, + settings.updateDataAttributeBindingOperationSettings(), + clientContext, + operationsStub); + this.deleteDataAttributeBindingCallable = + callableFactory.createUnaryCallable( + deleteDataAttributeBindingTransportSettings, + settings.deleteDataAttributeBindingSettings(), + clientContext); + this.deleteDataAttributeBindingOperationCallable = + callableFactory.createOperationCallable( + deleteDataAttributeBindingTransportSettings, + settings.deleteDataAttributeBindingOperationSettings(), + clientContext, + operationsStub); + this.listDataAttributeBindingsCallable = + callableFactory.createUnaryCallable( + listDataAttributeBindingsTransportSettings, + settings.listDataAttributeBindingsSettings(), + clientContext); + this.listDataAttributeBindingsPagedCallable = + callableFactory.createPagedCallable( + listDataAttributeBindingsTransportSettings, + settings.listDataAttributeBindingsSettings(), + clientContext); + this.getDataAttributeBindingCallable = + callableFactory.createUnaryCallable( + getDataAttributeBindingTransportSettings, + settings.getDataAttributeBindingSettings(), + clientContext); + this.createDataAttributeCallable = + callableFactory.createUnaryCallable( + createDataAttributeTransportSettings, + settings.createDataAttributeSettings(), + clientContext); + this.createDataAttributeOperationCallable = + callableFactory.createOperationCallable( + createDataAttributeTransportSettings, + settings.createDataAttributeOperationSettings(), + clientContext, + operationsStub); + this.updateDataAttributeCallable = + callableFactory.createUnaryCallable( + updateDataAttributeTransportSettings, + settings.updateDataAttributeSettings(), + clientContext); + this.updateDataAttributeOperationCallable = + callableFactory.createOperationCallable( + updateDataAttributeTransportSettings, + settings.updateDataAttributeOperationSettings(), + clientContext, + operationsStub); + this.deleteDataAttributeCallable = + callableFactory.createUnaryCallable( + deleteDataAttributeTransportSettings, + settings.deleteDataAttributeSettings(), + clientContext); + this.deleteDataAttributeOperationCallable = + callableFactory.createOperationCallable( + deleteDataAttributeTransportSettings, + settings.deleteDataAttributeOperationSettings(), + clientContext, + operationsStub); + this.listDataAttributesCallable = + callableFactory.createUnaryCallable( + listDataAttributesTransportSettings, + settings.listDataAttributesSettings(), + clientContext); + this.listDataAttributesPagedCallable = + callableFactory.createPagedCallable( + listDataAttributesTransportSettings, + settings.listDataAttributesSettings(), + clientContext); + this.getDataAttributeCallable = + callableFactory.createUnaryCallable( + getDataAttributeTransportSettings, settings.getDataAttributeSettings(), clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable createDataTaxonomyCallable() { + return createDataTaxonomyCallable; + } + + @Override + public OperationCallable + createDataTaxonomyOperationCallable() { + return createDataTaxonomyOperationCallable; + } + + @Override + public UnaryCallable updateDataTaxonomyCallable() { + return updateDataTaxonomyCallable; + } + + @Override + public OperationCallable + updateDataTaxonomyOperationCallable() { + return updateDataTaxonomyOperationCallable; + } + + @Override + public UnaryCallable deleteDataTaxonomyCallable() { + return deleteDataTaxonomyCallable; + } + + @Override + public OperationCallable + deleteDataTaxonomyOperationCallable() { + return deleteDataTaxonomyOperationCallable; + } + + @Override + public UnaryCallable + listDataTaxonomiesCallable() { + return listDataTaxonomiesCallable; + } + + @Override + public UnaryCallable + listDataTaxonomiesPagedCallable() { + return listDataTaxonomiesPagedCallable; + } + + @Override + public UnaryCallable getDataTaxonomyCallable() { + return getDataTaxonomyCallable; + } + + @Override + public UnaryCallable + createDataAttributeBindingCallable() { + return createDataAttributeBindingCallable; + } + + @Override + public OperationCallable< + CreateDataAttributeBindingRequest, DataAttributeBinding, OperationMetadata> + createDataAttributeBindingOperationCallable() { + return createDataAttributeBindingOperationCallable; + } + + @Override + public UnaryCallable + updateDataAttributeBindingCallable() { + return updateDataAttributeBindingCallable; + } + + @Override + public OperationCallable< + UpdateDataAttributeBindingRequest, DataAttributeBinding, OperationMetadata> + updateDataAttributeBindingOperationCallable() { + return updateDataAttributeBindingOperationCallable; + } + + @Override + public UnaryCallable + deleteDataAttributeBindingCallable() { + return deleteDataAttributeBindingCallable; + } + + @Override + public OperationCallable + deleteDataAttributeBindingOperationCallable() { + return deleteDataAttributeBindingOperationCallable; + } + + @Override + public UnaryCallable + listDataAttributeBindingsCallable() { + return listDataAttributeBindingsCallable; + } + + @Override + public UnaryCallable + listDataAttributeBindingsPagedCallable() { + return listDataAttributeBindingsPagedCallable; + } + + @Override + public UnaryCallable + getDataAttributeBindingCallable() { + return getDataAttributeBindingCallable; + } + + @Override + public UnaryCallable createDataAttributeCallable() { + return createDataAttributeCallable; + } + + @Override + public OperationCallable + createDataAttributeOperationCallable() { + return createDataAttributeOperationCallable; + } + + @Override + public UnaryCallable updateDataAttributeCallable() { + return updateDataAttributeCallable; + } + + @Override + public OperationCallable + updateDataAttributeOperationCallable() { + return updateDataAttributeOperationCallable; + } + + @Override + public UnaryCallable deleteDataAttributeCallable() { + return deleteDataAttributeCallable; + } + + @Override + public OperationCallable + deleteDataAttributeOperationCallable() { + return deleteDataAttributeOperationCallable; + } + + @Override + public UnaryCallable + listDataAttributesCallable() { + return listDataAttributesCallable; + } + + @Override + public UnaryCallable + listDataAttributesPagedCallable() { + return listDataAttributesPagedCallable; + } + + @Override + public UnaryCallable getDataAttributeCallable() { + return getDataAttributeCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @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-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/HttpJsonDataScanServiceStub.java b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/HttpJsonDataScanServiceStub.java index 9b0934a6c951..a4348cd1dc8f 100644 --- a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/HttpJsonDataScanServiceStub.java +++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/HttpJsonDataScanServiceStub.java @@ -374,6 +374,7 @@ public class HttpJsonDataScanServiceStub extends DataScanServiceStub { Map> fields = new HashMap<>(); ProtoRestSerializer serializer = ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); serializer.putQueryParam(fields, "pageSize", request.getPageSize()); serializer.putQueryParam(fields, "pageToken", request.getPageToken()); serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); diff --git a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/HttpJsonDataTaxonomyServiceCallableFactory.java b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/HttpJsonDataTaxonomyServiceCallableFactory.java new file mode 100644 index 000000000000..473cbd6f5943 --- /dev/null +++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/HttpJsonDataTaxonomyServiceCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2023 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.dataplex.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 DataTaxonomyService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonDataTaxonomyServiceCallableFactory + 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-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/HttpJsonDataTaxonomyServiceStub.java b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/HttpJsonDataTaxonomyServiceStub.java new file mode 100644 index 000000000000..6c5d53b09247 --- /dev/null +++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/HttpJsonDataTaxonomyServiceStub.java @@ -0,0 +1,1495 @@ +/* + * Copyright 2023 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.dataplex.v1.stub; + +import static com.google.cloud.dataplex.v1.DataTaxonomyServiceClient.ListDataAttributeBindingsPagedResponse; +import static com.google.cloud.dataplex.v1.DataTaxonomyServiceClient.ListDataAttributesPagedResponse; +import static com.google.cloud.dataplex.v1.DataTaxonomyServiceClient.ListDataTaxonomiesPagedResponse; +import static com.google.cloud.dataplex.v1.DataTaxonomyServiceClient.ListLocationsPagedResponse; + +import com.google.api.HttpRule; +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.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest; +import com.google.cloud.dataplex.v1.CreateDataAttributeRequest; +import com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest; +import com.google.cloud.dataplex.v1.DataAttribute; +import com.google.cloud.dataplex.v1.DataAttributeBinding; +import com.google.cloud.dataplex.v1.DataTaxonomy; +import com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest; +import com.google.cloud.dataplex.v1.DeleteDataAttributeRequest; +import com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest; +import com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest; +import com.google.cloud.dataplex.v1.GetDataAttributeRequest; +import com.google.cloud.dataplex.v1.GetDataTaxonomyRequest; +import com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest; +import com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse; +import com.google.cloud.dataplex.v1.ListDataAttributesRequest; +import com.google.cloud.dataplex.v1.ListDataAttributesResponse; +import com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest; +import com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse; +import com.google.cloud.dataplex.v1.OperationMetadata; +import com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest; +import com.google.cloud.dataplex.v1.UpdateDataAttributeRequest; +import com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.collect.ImmutableMap; +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 DataTaxonomyService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonDataTaxonomyServiceStub extends DataTaxonomyServiceStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(Empty.getDescriptor()) + .add(DataAttribute.getDescriptor()) + .add(DataAttributeBinding.getDescriptor()) + .add(OperationMetadata.getDescriptor()) + .add(DataTaxonomy.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + createDataTaxonomyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dataplex.v1.DataTaxonomyService/CreateDataTaxonomy") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/dataTaxonomies", + 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, "dataTaxonomyId", request.getDataTaxonomyId()); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("dataTaxonomy", request.getDataTaxonomy(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateDataTaxonomyRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateDataTaxonomyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dataplex.v1.DataTaxonomyService/UpdateDataTaxonomy") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{dataTaxonomy.name=projects/*/locations/*/dataTaxonomies/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "dataTaxonomy.name", request.getDataTaxonomy().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("dataTaxonomy", request.getDataTaxonomy(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateDataTaxonomyRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteDataTaxonomyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dataplex.v1.DataTaxonomyService/DeleteDataTaxonomy") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/dataTaxonomies/*}", + 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, "etag", request.getEtag()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteDataTaxonomyRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listDataTaxonomiesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dataplex.v1.DataTaxonomyService/ListDataTaxonomies") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/dataTaxonomies", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + 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(ListDataTaxonomiesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getDataTaxonomyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dataplex.v1.DataTaxonomyService/GetDataTaxonomy") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/dataTaxonomies/*}", + 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(DataTaxonomy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createDataAttributeBindingMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.dataplex.v1.DataTaxonomyService/CreateDataAttributeBinding") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/dataAttributeBindings", + 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, + "dataAttributeBindingId", + request.getDataAttributeBindingId()); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "dataAttributeBinding", + request.getDataAttributeBinding(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateDataAttributeBindingRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateDataAttributeBindingMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.dataplex.v1.DataTaxonomyService/UpdateDataAttributeBinding") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{dataAttributeBinding.name=projects/*/locations/*/dataAttributeBindings/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, + "dataAttributeBinding.name", + request.getDataAttributeBinding().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "dataAttributeBinding", + request.getDataAttributeBinding(), + true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateDataAttributeBindingRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteDataAttributeBindingMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.dataplex.v1.DataTaxonomyService/DeleteDataAttributeBinding") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/dataAttributeBindings/*}", + 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, "etag", request.getEtag()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteDataAttributeBindingRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor< + ListDataAttributeBindingsRequest, ListDataAttributeBindingsResponse> + listDataAttributeBindingsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.dataplex.v1.DataTaxonomyService/ListDataAttributeBindings") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*}/dataAttributeBindings", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + 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(ListDataAttributeBindingsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getDataAttributeBindingMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.dataplex.v1.DataTaxonomyService/GetDataAttributeBinding") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/dataAttributeBindings/*}", + 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(DataAttributeBinding.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createDataAttributeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dataplex.v1.DataTaxonomyService/CreateDataAttribute") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/dataTaxonomies/*}/attributes", + 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, "dataAttributeId", request.getDataAttributeId()); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("dataAttribute", request.getDataAttribute(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateDataAttributeRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + updateDataAttributeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dataplex.v1.DataTaxonomyService/UpdateDataAttribute") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{dataAttribute.name=projects/*/locations/*/dataTaxonomies/*/attributes/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "dataAttribute.name", request.getDataAttribute().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + serializer.putQueryParam( + fields, "validateOnly", request.getValidateOnly()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("dataAttribute", request.getDataAttribute(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (UpdateDataAttributeRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + deleteDataAttributeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dataplex.v1.DataTaxonomyService/DeleteDataAttribute") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/dataTaxonomies/*/attributes/*}", + 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, "etag", request.getEtag()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (DeleteDataAttributeRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor + listDataAttributesMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dataplex.v1.DataTaxonomyService/ListDataAttributes") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/dataTaxonomies/*}/attributes", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "orderBy", request.getOrderBy()); + 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(ListDataAttributesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getDataAttributeMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.dataplex.v1.DataTaxonomyService/GetDataAttribute") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*/dataTaxonomies/*/attributes/*}", + 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(DataAttribute.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listLocationsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/ListLocations") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*}/locations", + 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(ListLocationsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getLocationMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.location.Locations/GetLocation") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/locations/*}", + 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(Location.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable createDataTaxonomyCallable; + private final OperationCallable + createDataTaxonomyOperationCallable; + private final UnaryCallable updateDataTaxonomyCallable; + private final OperationCallable + updateDataTaxonomyOperationCallable; + private final UnaryCallable deleteDataTaxonomyCallable; + private final OperationCallable + deleteDataTaxonomyOperationCallable; + private final UnaryCallable + listDataTaxonomiesCallable; + private final UnaryCallable + listDataTaxonomiesPagedCallable; + private final UnaryCallable getDataTaxonomyCallable; + private final UnaryCallable + createDataAttributeBindingCallable; + private final OperationCallable< + CreateDataAttributeBindingRequest, DataAttributeBinding, OperationMetadata> + createDataAttributeBindingOperationCallable; + private final UnaryCallable + updateDataAttributeBindingCallable; + private final OperationCallable< + UpdateDataAttributeBindingRequest, DataAttributeBinding, OperationMetadata> + updateDataAttributeBindingOperationCallable; + private final UnaryCallable + deleteDataAttributeBindingCallable; + private final OperationCallable + deleteDataAttributeBindingOperationCallable; + private final UnaryCallable + listDataAttributeBindingsCallable; + private final UnaryCallable< + ListDataAttributeBindingsRequest, ListDataAttributeBindingsPagedResponse> + listDataAttributeBindingsPagedCallable; + private final UnaryCallable + getDataAttributeBindingCallable; + private final UnaryCallable createDataAttributeCallable; + private final OperationCallable + createDataAttributeOperationCallable; + private final UnaryCallable updateDataAttributeCallable; + private final OperationCallable + updateDataAttributeOperationCallable; + private final UnaryCallable deleteDataAttributeCallable; + private final OperationCallable + deleteDataAttributeOperationCallable; + private final UnaryCallable + listDataAttributesCallable; + private final UnaryCallable + listDataAttributesPagedCallable; + private final UnaryCallable getDataAttributeCallable; + private final UnaryCallable listLocationsCallable; + private final UnaryCallable + listLocationsPagedCallable; + private final UnaryCallable getLocationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonDataTaxonomyServiceStub create( + DataTaxonomyServiceStubSettings settings) throws IOException { + return new HttpJsonDataTaxonomyServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonDataTaxonomyServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonDataTaxonomyServiceStub( + DataTaxonomyServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonDataTaxonomyServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonDataTaxonomyServiceStub( + DataTaxonomyServiceStubSettings.newHttpJsonBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonDataTaxonomyServiceStub, 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 HttpJsonDataTaxonomyServiceStub( + DataTaxonomyServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonDataTaxonomyServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonDataTaxonomyServiceStub, 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 HttpJsonDataTaxonomyServiceStub( + DataTaxonomyServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create( + clientContext, + callableFactory, + typeRegistry, + ImmutableMap.builder() + .put( + "google.longrunning.Operations.CancelOperation", + HttpRule.newBuilder() + .setPost("/v1/{name=projects/*/locations/*/operations/*}:cancel") + .build()) + .put( + "google.longrunning.Operations.DeleteOperation", + HttpRule.newBuilder() + .setDelete("/v1/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.GetOperation", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*/operations/*}") + .build()) + .put( + "google.longrunning.Operations.ListOperations", + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/locations/*}/operations") + .build()) + .build()); + + HttpJsonCallSettings createDataTaxonomyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createDataTaxonomyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings updateDataTaxonomyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateDataTaxonomyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "data_taxonomy.name", String.valueOf(request.getDataTaxonomy().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings deleteDataTaxonomyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteDataTaxonomyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listDataTaxonomiesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listDataTaxonomiesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getDataTaxonomyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getDataTaxonomyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + createDataAttributeBindingTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createDataAttributeBindingMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + updateDataAttributeBindingTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateDataAttributeBindingMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "data_attribute_binding.name", + String.valueOf(request.getDataAttributeBinding().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + deleteDataAttributeBindingTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteDataAttributeBindingMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listDataAttributeBindingsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listDataAttributeBindingsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + getDataAttributeBindingTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getDataAttributeBindingMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + createDataAttributeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createDataAttributeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + updateDataAttributeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateDataAttributeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add( + "data_attribute.name", + String.valueOf(request.getDataAttribute().getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + deleteDataAttributeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteDataAttributeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listDataAttributesTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listDataAttributesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getDataAttributeTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getDataAttributeMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings + listLocationsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listLocationsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + HttpJsonCallSettings getLocationTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getLocationMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("name", String.valueOf(request.getName())); + return builder.build(); + }) + .build(); + + this.createDataTaxonomyCallable = + callableFactory.createUnaryCallable( + createDataTaxonomyTransportSettings, + settings.createDataTaxonomySettings(), + clientContext); + this.createDataTaxonomyOperationCallable = + callableFactory.createOperationCallable( + createDataTaxonomyTransportSettings, + settings.createDataTaxonomyOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateDataTaxonomyCallable = + callableFactory.createUnaryCallable( + updateDataTaxonomyTransportSettings, + settings.updateDataTaxonomySettings(), + clientContext); + this.updateDataTaxonomyOperationCallable = + callableFactory.createOperationCallable( + updateDataTaxonomyTransportSettings, + settings.updateDataTaxonomyOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteDataTaxonomyCallable = + callableFactory.createUnaryCallable( + deleteDataTaxonomyTransportSettings, + settings.deleteDataTaxonomySettings(), + clientContext); + this.deleteDataTaxonomyOperationCallable = + callableFactory.createOperationCallable( + deleteDataTaxonomyTransportSettings, + settings.deleteDataTaxonomyOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listDataTaxonomiesCallable = + callableFactory.createUnaryCallable( + listDataTaxonomiesTransportSettings, + settings.listDataTaxonomiesSettings(), + clientContext); + this.listDataTaxonomiesPagedCallable = + callableFactory.createPagedCallable( + listDataTaxonomiesTransportSettings, + settings.listDataTaxonomiesSettings(), + clientContext); + this.getDataTaxonomyCallable = + callableFactory.createUnaryCallable( + getDataTaxonomyTransportSettings, settings.getDataTaxonomySettings(), clientContext); + this.createDataAttributeBindingCallable = + callableFactory.createUnaryCallable( + createDataAttributeBindingTransportSettings, + settings.createDataAttributeBindingSettings(), + clientContext); + this.createDataAttributeBindingOperationCallable = + callableFactory.createOperationCallable( + createDataAttributeBindingTransportSettings, + settings.createDataAttributeBindingOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateDataAttributeBindingCallable = + callableFactory.createUnaryCallable( + updateDataAttributeBindingTransportSettings, + settings.updateDataAttributeBindingSettings(), + clientContext); + this.updateDataAttributeBindingOperationCallable = + callableFactory.createOperationCallable( + updateDataAttributeBindingTransportSettings, + settings.updateDataAttributeBindingOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteDataAttributeBindingCallable = + callableFactory.createUnaryCallable( + deleteDataAttributeBindingTransportSettings, + settings.deleteDataAttributeBindingSettings(), + clientContext); + this.deleteDataAttributeBindingOperationCallable = + callableFactory.createOperationCallable( + deleteDataAttributeBindingTransportSettings, + settings.deleteDataAttributeBindingOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listDataAttributeBindingsCallable = + callableFactory.createUnaryCallable( + listDataAttributeBindingsTransportSettings, + settings.listDataAttributeBindingsSettings(), + clientContext); + this.listDataAttributeBindingsPagedCallable = + callableFactory.createPagedCallable( + listDataAttributeBindingsTransportSettings, + settings.listDataAttributeBindingsSettings(), + clientContext); + this.getDataAttributeBindingCallable = + callableFactory.createUnaryCallable( + getDataAttributeBindingTransportSettings, + settings.getDataAttributeBindingSettings(), + clientContext); + this.createDataAttributeCallable = + callableFactory.createUnaryCallable( + createDataAttributeTransportSettings, + settings.createDataAttributeSettings(), + clientContext); + this.createDataAttributeOperationCallable = + callableFactory.createOperationCallable( + createDataAttributeTransportSettings, + settings.createDataAttributeOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.updateDataAttributeCallable = + callableFactory.createUnaryCallable( + updateDataAttributeTransportSettings, + settings.updateDataAttributeSettings(), + clientContext); + this.updateDataAttributeOperationCallable = + callableFactory.createOperationCallable( + updateDataAttributeTransportSettings, + settings.updateDataAttributeOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.deleteDataAttributeCallable = + callableFactory.createUnaryCallable( + deleteDataAttributeTransportSettings, + settings.deleteDataAttributeSettings(), + clientContext); + this.deleteDataAttributeOperationCallable = + callableFactory.createOperationCallable( + deleteDataAttributeTransportSettings, + settings.deleteDataAttributeOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.listDataAttributesCallable = + callableFactory.createUnaryCallable( + listDataAttributesTransportSettings, + settings.listDataAttributesSettings(), + clientContext); + this.listDataAttributesPagedCallable = + callableFactory.createPagedCallable( + listDataAttributesTransportSettings, + settings.listDataAttributesSettings(), + clientContext); + this.getDataAttributeCallable = + callableFactory.createUnaryCallable( + getDataAttributeTransportSettings, settings.getDataAttributeSettings(), clientContext); + this.listLocationsCallable = + callableFactory.createUnaryCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.listLocationsPagedCallable = + callableFactory.createPagedCallable( + listLocationsTransportSettings, settings.listLocationsSettings(), clientContext); + this.getLocationCallable = + callableFactory.createUnaryCallable( + getLocationTransportSettings, settings.getLocationSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(createDataTaxonomyMethodDescriptor); + methodDescriptors.add(updateDataTaxonomyMethodDescriptor); + methodDescriptors.add(deleteDataTaxonomyMethodDescriptor); + methodDescriptors.add(listDataTaxonomiesMethodDescriptor); + methodDescriptors.add(getDataTaxonomyMethodDescriptor); + methodDescriptors.add(createDataAttributeBindingMethodDescriptor); + methodDescriptors.add(updateDataAttributeBindingMethodDescriptor); + methodDescriptors.add(deleteDataAttributeBindingMethodDescriptor); + methodDescriptors.add(listDataAttributeBindingsMethodDescriptor); + methodDescriptors.add(getDataAttributeBindingMethodDescriptor); + methodDescriptors.add(createDataAttributeMethodDescriptor); + methodDescriptors.add(updateDataAttributeMethodDescriptor); + methodDescriptors.add(deleteDataAttributeMethodDescriptor); + methodDescriptors.add(listDataAttributesMethodDescriptor); + methodDescriptors.add(getDataAttributeMethodDescriptor); + methodDescriptors.add(listLocationsMethodDescriptor); + methodDescriptors.add(getLocationMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable createDataTaxonomyCallable() { + return createDataTaxonomyCallable; + } + + @Override + public OperationCallable + createDataTaxonomyOperationCallable() { + return createDataTaxonomyOperationCallable; + } + + @Override + public UnaryCallable updateDataTaxonomyCallable() { + return updateDataTaxonomyCallable; + } + + @Override + public OperationCallable + updateDataTaxonomyOperationCallable() { + return updateDataTaxonomyOperationCallable; + } + + @Override + public UnaryCallable deleteDataTaxonomyCallable() { + return deleteDataTaxonomyCallable; + } + + @Override + public OperationCallable + deleteDataTaxonomyOperationCallable() { + return deleteDataTaxonomyOperationCallable; + } + + @Override + public UnaryCallable + listDataTaxonomiesCallable() { + return listDataTaxonomiesCallable; + } + + @Override + public UnaryCallable + listDataTaxonomiesPagedCallable() { + return listDataTaxonomiesPagedCallable; + } + + @Override + public UnaryCallable getDataTaxonomyCallable() { + return getDataTaxonomyCallable; + } + + @Override + public UnaryCallable + createDataAttributeBindingCallable() { + return createDataAttributeBindingCallable; + } + + @Override + public OperationCallable< + CreateDataAttributeBindingRequest, DataAttributeBinding, OperationMetadata> + createDataAttributeBindingOperationCallable() { + return createDataAttributeBindingOperationCallable; + } + + @Override + public UnaryCallable + updateDataAttributeBindingCallable() { + return updateDataAttributeBindingCallable; + } + + @Override + public OperationCallable< + UpdateDataAttributeBindingRequest, DataAttributeBinding, OperationMetadata> + updateDataAttributeBindingOperationCallable() { + return updateDataAttributeBindingOperationCallable; + } + + @Override + public UnaryCallable + deleteDataAttributeBindingCallable() { + return deleteDataAttributeBindingCallable; + } + + @Override + public OperationCallable + deleteDataAttributeBindingOperationCallable() { + return deleteDataAttributeBindingOperationCallable; + } + + @Override + public UnaryCallable + listDataAttributeBindingsCallable() { + return listDataAttributeBindingsCallable; + } + + @Override + public UnaryCallable + listDataAttributeBindingsPagedCallable() { + return listDataAttributeBindingsPagedCallable; + } + + @Override + public UnaryCallable + getDataAttributeBindingCallable() { + return getDataAttributeBindingCallable; + } + + @Override + public UnaryCallable createDataAttributeCallable() { + return createDataAttributeCallable; + } + + @Override + public OperationCallable + createDataAttributeOperationCallable() { + return createDataAttributeOperationCallable; + } + + @Override + public UnaryCallable updateDataAttributeCallable() { + return updateDataAttributeCallable; + } + + @Override + public OperationCallable + updateDataAttributeOperationCallable() { + return updateDataAttributeOperationCallable; + } + + @Override + public UnaryCallable deleteDataAttributeCallable() { + return deleteDataAttributeCallable; + } + + @Override + public OperationCallable + deleteDataAttributeOperationCallable() { + return deleteDataAttributeOperationCallable; + } + + @Override + public UnaryCallable + listDataAttributesCallable() { + return listDataAttributesCallable; + } + + @Override + public UnaryCallable + listDataAttributesPagedCallable() { + return listDataAttributesPagedCallable; + } + + @Override + public UnaryCallable getDataAttributeCallable() { + return getDataAttributeCallable; + } + + @Override + public UnaryCallable listLocationsCallable() { + return listLocationsCallable; + } + + @Override + public UnaryCallable + listLocationsPagedCallable() { + return listLocationsPagedCallable; + } + + @Override + public UnaryCallable getLocationCallable() { + return getLocationCallable; + } + + @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-dataplex/google-cloud-dataplex/src/main/resources/META-INF/native-image/com.google.cloud.dataplex.v1/reflect-config.json b/java-dataplex/google-cloud-dataplex/src/main/resources/META-INF/native-image/com.google.cloud.dataplex.v1/reflect-config.json index be760f9bd362..2cbf16a59810 100644 --- a/java-dataplex/google-cloud-dataplex/src/main/resources/META-INF/native-image/com.google.cloud.dataplex.v1/reflect-config.json +++ b/java-dataplex/google-cloud-dataplex/src/main/resources/META-INF/native-image/com.google.cloud.dataplex.v1/reflect-config.json @@ -917,6 +917,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.CreateDataAttributeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.CreateDataAttributeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dataplex.v1.CreateDataScanRequest", "queryAllDeclaredConstructors": true, @@ -935,6 +971,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dataplex.v1.CreateEntityRequest", "queryAllDeclaredConstructors": true, @@ -1043,6 +1097,78 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dataplex.v1.DataAccessSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataAccessSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataAttribute", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataAttribute$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataAttributeBinding", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataAttributeBinding$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataAttributeBinding$Path", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataAttributeBinding$Path$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dataplex.v1.DataProfileResult", "queryAllDeclaredConstructors": true, @@ -1061,6 +1187,51 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dataplex.v1.DataProfileResult$PostScanActionsResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataProfileResult$PostScanActionsResult$BigQueryExportResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataProfileResult$PostScanActionsResult$BigQueryExportResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataProfileResult$PostScanActionsResult$BigQueryExportResult$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataProfileResult$PostScanActionsResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dataplex.v1.DataProfileResult$Profile", "queryAllDeclaredConstructors": true, @@ -1205,6 +1376,60 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dataplex.v1.DataProfileSpec$PostScanActions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataProfileSpec$PostScanActions$BigQueryExport", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataProfileSpec$PostScanActions$BigQueryExport$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataProfileSpec$PostScanActions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataProfileSpec$SelectedFields", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataProfileSpec$SelectedFields$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dataplex.v1.DataQualityDimensionResult", "queryAllDeclaredConstructors": true, @@ -1241,6 +1466,51 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dataplex.v1.DataQualityResult$PostScanActionsResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataQualityResult$PostScanActionsResult$BigQueryExportResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataQualityResult$PostScanActionsResult$BigQueryExportResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataQualityResult$PostScanActionsResult$BigQueryExportResult$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataQualityResult$PostScanActionsResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dataplex.v1.DataQualityRule", "queryAllDeclaredConstructors": true, @@ -1430,6 +1700,51 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dataplex.v1.DataQualityScanRuleResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataQualityScanRuleResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataQualityScanRuleResult$EvaluationType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataQualityScanRuleResult$Result", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataQualityScanRuleResult$RuleType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dataplex.v1.DataQualitySpec", "queryAllDeclaredConstructors": true, @@ -1448,6 +1763,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dataplex.v1.DataQualitySpec$PostScanActions", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataQualitySpec$PostScanActions$BigQueryExport", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataQualitySpec$PostScanActions$BigQueryExport$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataQualitySpec$PostScanActions$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dataplex.v1.DataScan", "queryAllDeclaredConstructors": true, @@ -1521,7 +1872,160 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dataplex.v1.DataScanEvent$DataProfileResult", + "name": "com.google.cloud.dataplex.v1.DataScanEvent$DataProfileAppliedConfigs", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataScanEvent$DataProfileAppliedConfigs$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataScanEvent$DataProfileResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataScanEvent$DataProfileResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataScanEvent$DataQualityAppliedConfigs", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataScanEvent$DataQualityAppliedConfigs$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataScanEvent$DataQualityResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataScanEvent$DataQualityResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataScanEvent$PostScanActionsResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataScanEvent$PostScanActionsResult$BigQueryExportResult", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataScanEvent$PostScanActionsResult$BigQueryExportResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataScanEvent$PostScanActionsResult$BigQueryExportResult$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataScanEvent$PostScanActionsResult$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataScanEvent$ScanType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataScanEvent$Scope", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataScanEvent$State", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataScanEvent$Trigger", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.DataScanJob", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1530,7 +2034,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dataplex.v1.DataScanEvent$DataProfileResult$Builder", + "name": "com.google.cloud.dataplex.v1.DataScanJob$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1539,7 +2043,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dataplex.v1.DataScanEvent$DataQualityResult", + "name": "com.google.cloud.dataplex.v1.DataScanJob$State", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1548,7 +2052,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dataplex.v1.DataScanEvent$DataQualityResult$Builder", + "name": "com.google.cloud.dataplex.v1.DataScanType", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1557,7 +2061,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dataplex.v1.DataScanEvent$ScanType", + "name": "com.google.cloud.dataplex.v1.DataSource", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1566,7 +2070,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dataplex.v1.DataScanEvent$Scope", + "name": "com.google.cloud.dataplex.v1.DataSource$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1575,7 +2079,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dataplex.v1.DataScanEvent$State", + "name": "com.google.cloud.dataplex.v1.DataTaxonomy", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1584,7 +2088,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dataplex.v1.DataScanEvent$Trigger", + "name": "com.google.cloud.dataplex.v1.DataTaxonomy$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1593,7 +2097,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dataplex.v1.DataScanJob", + "name": "com.google.cloud.dataplex.v1.DeleteAssetRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1602,7 +2106,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dataplex.v1.DataScanJob$Builder", + "name": "com.google.cloud.dataplex.v1.DeleteAssetRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1611,7 +2115,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dataplex.v1.DataScanJob$State", + "name": "com.google.cloud.dataplex.v1.DeleteContentRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1620,7 +2124,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dataplex.v1.DataScanType", + "name": "com.google.cloud.dataplex.v1.DeleteContentRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1629,7 +2133,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dataplex.v1.DataSource", + "name": "com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1638,7 +2142,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dataplex.v1.DataSource$Builder", + "name": "com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1647,7 +2151,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dataplex.v1.DeleteAssetRequest", + "name": "com.google.cloud.dataplex.v1.DeleteDataAttributeRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1656,7 +2160,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dataplex.v1.DeleteAssetRequest$Builder", + "name": "com.google.cloud.dataplex.v1.DeleteDataAttributeRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1665,7 +2169,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dataplex.v1.DeleteContentRequest", + "name": "com.google.cloud.dataplex.v1.DeleteDataScanRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1674,7 +2178,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dataplex.v1.DeleteContentRequest$Builder", + "name": "com.google.cloud.dataplex.v1.DeleteDataScanRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1683,7 +2187,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dataplex.v1.DeleteDataScanRequest", + "name": "com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -1692,7 +2196,7 @@ "allPublicClasses": true }, { - "name": "com.google.cloud.dataplex.v1.DeleteDataScanRequest$Builder", + "name": "com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest$Builder", "queryAllDeclaredConstructors": true, "queryAllPublicConstructors": true, "queryAllDeclaredMethods": true, @@ -2150,6 +2654,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.GetDataAttributeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.GetDataAttributeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dataplex.v1.GetDataScanJobRequest", "queryAllDeclaredConstructors": true, @@ -2204,6 +2744,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dataplex.v1.GetDataTaxonomyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.GetDataTaxonomyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dataplex.v1.GetEntityRequest", "queryAllDeclaredConstructors": true, @@ -2375,6 +2933,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dataplex.v1.Job$Trigger", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dataplex.v1.JobEvent", "queryAllDeclaredConstructors": true, @@ -2393,6 +2960,15 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dataplex.v1.JobEvent$ExecutionTrigger", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dataplex.v1.JobEvent$Service", "queryAllDeclaredConstructors": true, @@ -2591,6 +3167,78 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.ListDataAttributesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.ListDataAttributesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.ListDataAttributesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.ListDataAttributesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dataplex.v1.ListDataScanJobsRequest", "queryAllDeclaredConstructors": true, @@ -2663,6 +3311,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dataplex.v1.ListEntitiesRequest", "queryAllDeclaredConstructors": true, @@ -3032,6 +3716,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dataplex.v1.ResourceAccessSpec", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.ResourceAccessSpec$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dataplex.v1.RunDataScanRequest", "queryAllDeclaredConstructors": true, @@ -3707,6 +4409,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.UpdateDataAttributeRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.UpdateDataAttributeRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dataplex.v1.UpdateDataScanRequest", "queryAllDeclaredConstructors": true, @@ -3725,6 +4463,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.dataplex.v1.UpdateEntityRequest", "queryAllDeclaredConstructors": true, diff --git a/java-dataplex/google-cloud-dataplex/src/test/java/com/google/cloud/dataplex/v1/DataTaxonomyServiceClientHttpJsonTest.java b/java-dataplex/google-cloud-dataplex/src/test/java/com/google/cloud/dataplex/v1/DataTaxonomyServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..1dfbfc6ad725 --- /dev/null +++ b/java-dataplex/google-cloud-dataplex/src/test/java/com/google/cloud/dataplex/v1/DataTaxonomyServiceClientHttpJsonTest.java @@ -0,0 +1,1843 @@ +/* + * Copyright 2023 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.dataplex.v1; + +import static com.google.cloud.dataplex.v1.DataTaxonomyServiceClient.ListDataAttributeBindingsPagedResponse; +import static com.google.cloud.dataplex.v1.DataTaxonomyServiceClient.ListDataAttributesPagedResponse; +import static com.google.cloud.dataplex.v1.DataTaxonomyServiceClient.ListDataTaxonomiesPagedResponse; +import static com.google.cloud.dataplex.v1.DataTaxonomyServiceClient.ListLocationsPagedResponse; + +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.dataplex.v1.stub.HttpJsonDataTaxonomyServiceStub; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +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 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 DataTaxonomyServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static DataTaxonomyServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonDataTaxonomyServiceStub.getMethodDescriptors(), + DataTaxonomyServiceSettings.getDefaultEndpoint()); + DataTaxonomyServiceSettings settings = + DataTaxonomyServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + DataTaxonomyServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DataTaxonomyServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void createDataTaxonomyTest() throws Exception { + DataTaxonomy expectedResponse = + DataTaxonomy.newBuilder() + .setName( + DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setAttributeCount(-688916052) + .setEtag("etag3123477") + .setClassCount(-424516728) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDataTaxonomyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + DataTaxonomy dataTaxonomy = DataTaxonomy.newBuilder().build(); + String dataTaxonomyId = "dataTaxonomyId987458454"; + + DataTaxonomy actualResponse = + client.createDataTaxonomyAsync(parent, dataTaxonomy, dataTaxonomyId).get(); + 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 createDataTaxonomyExceptionTest() 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]"); + DataTaxonomy dataTaxonomy = DataTaxonomy.newBuilder().build(); + String dataTaxonomyId = "dataTaxonomyId987458454"; + client.createDataTaxonomyAsync(parent, dataTaxonomy, dataTaxonomyId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createDataTaxonomyTest2() throws Exception { + DataTaxonomy expectedResponse = + DataTaxonomy.newBuilder() + .setName( + DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setAttributeCount(-688916052) + .setEtag("etag3123477") + .setClassCount(-424516728) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDataTaxonomyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + DataTaxonomy dataTaxonomy = DataTaxonomy.newBuilder().build(); + String dataTaxonomyId = "dataTaxonomyId987458454"; + + DataTaxonomy actualResponse = + client.createDataTaxonomyAsync(parent, dataTaxonomy, dataTaxonomyId).get(); + 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 createDataTaxonomyExceptionTest2() 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"; + DataTaxonomy dataTaxonomy = DataTaxonomy.newBuilder().build(); + String dataTaxonomyId = "dataTaxonomyId987458454"; + client.createDataTaxonomyAsync(parent, dataTaxonomy, dataTaxonomyId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateDataTaxonomyTest() throws Exception { + DataTaxonomy expectedResponse = + DataTaxonomy.newBuilder() + .setName( + DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setAttributeCount(-688916052) + .setEtag("etag3123477") + .setClassCount(-424516728) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateDataTaxonomyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + DataTaxonomy dataTaxonomy = + DataTaxonomy.newBuilder() + .setName( + DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setAttributeCount(-688916052) + .setEtag("etag3123477") + .setClassCount(-424516728) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + DataTaxonomy actualResponse = client.updateDataTaxonomyAsync(dataTaxonomy, updateMask).get(); + 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 updateDataTaxonomyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataTaxonomy dataTaxonomy = + DataTaxonomy.newBuilder() + .setName( + DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setAttributeCount(-688916052) + .setEtag("etag3123477") + .setClassCount(-424516728) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDataTaxonomyAsync(dataTaxonomy, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteDataTaxonomyTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDataTaxonomyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + DataTaxonomyName name = DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]"); + + client.deleteDataTaxonomyAsync(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 deleteDataTaxonomyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataTaxonomyName name = DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]"); + client.deleteDataTaxonomyAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteDataTaxonomyTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDataTaxonomyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = "projects/project-743/locations/location-743/dataTaxonomies/dataTaxonomie-743"; + + client.deleteDataTaxonomyAsync(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 deleteDataTaxonomyExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-743/locations/location-743/dataTaxonomies/dataTaxonomie-743"; + client.deleteDataTaxonomyAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listDataTaxonomiesTest() throws Exception { + DataTaxonomy responsesElement = DataTaxonomy.newBuilder().build(); + ListDataTaxonomiesResponse expectedResponse = + ListDataTaxonomiesResponse.newBuilder() + .setNextPageToken("") + .addAllDataTaxonomies(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListDataTaxonomiesPagedResponse pagedListResponse = client.listDataTaxonomies(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataTaxonomiesList().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 listDataTaxonomiesExceptionTest() 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.listDataTaxonomies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDataTaxonomiesTest2() throws Exception { + DataTaxonomy responsesElement = DataTaxonomy.newBuilder().build(); + ListDataTaxonomiesResponse expectedResponse = + ListDataTaxonomiesResponse.newBuilder() + .setNextPageToken("") + .addAllDataTaxonomies(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListDataTaxonomiesPagedResponse pagedListResponse = client.listDataTaxonomies(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataTaxonomiesList().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 listDataTaxonomiesExceptionTest2() 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.listDataTaxonomies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataTaxonomyTest() throws Exception { + DataTaxonomy expectedResponse = + DataTaxonomy.newBuilder() + .setName( + DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setAttributeCount(-688916052) + .setEtag("etag3123477") + .setClassCount(-424516728) + .build(); + mockService.addResponse(expectedResponse); + + DataTaxonomyName name = DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]"); + + DataTaxonomy actualResponse = client.getDataTaxonomy(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 getDataTaxonomyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataTaxonomyName name = DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]"); + client.getDataTaxonomy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataTaxonomyTest2() throws Exception { + DataTaxonomy expectedResponse = + DataTaxonomy.newBuilder() + .setName( + DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setAttributeCount(-688916052) + .setEtag("etag3123477") + .setClassCount(-424516728) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-743/locations/location-743/dataTaxonomies/dataTaxonomie-743"; + + DataTaxonomy actualResponse = client.getDataTaxonomy(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 getDataTaxonomyExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-743/locations/location-743/dataTaxonomies/dataTaxonomie-743"; + client.getDataTaxonomy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDataAttributeBindingTest() throws Exception { + DataAttributeBinding expectedResponse = + DataAttributeBinding.newBuilder() + .setName( + DataAttributeBindingName.of( + "[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]") + .toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .addAllAttributes(new ArrayList()) + .addAllPaths(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDataAttributeBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + DataAttributeBinding dataAttributeBinding = DataAttributeBinding.newBuilder().build(); + String dataAttributeBindingId = "dataAttributeBindingId1952425102"; + + DataAttributeBinding actualResponse = + client + .createDataAttributeBindingAsync(parent, dataAttributeBinding, dataAttributeBindingId) + .get(); + 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 createDataAttributeBindingExceptionTest() 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]"); + DataAttributeBinding dataAttributeBinding = DataAttributeBinding.newBuilder().build(); + String dataAttributeBindingId = "dataAttributeBindingId1952425102"; + client + .createDataAttributeBindingAsync(parent, dataAttributeBinding, dataAttributeBindingId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createDataAttributeBindingTest2() throws Exception { + DataAttributeBinding expectedResponse = + DataAttributeBinding.newBuilder() + .setName( + DataAttributeBindingName.of( + "[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]") + .toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .addAllAttributes(new ArrayList()) + .addAllPaths(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDataAttributeBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = "projects/project-5833/locations/location-5833"; + DataAttributeBinding dataAttributeBinding = DataAttributeBinding.newBuilder().build(); + String dataAttributeBindingId = "dataAttributeBindingId1952425102"; + + DataAttributeBinding actualResponse = + client + .createDataAttributeBindingAsync(parent, dataAttributeBinding, dataAttributeBindingId) + .get(); + 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 createDataAttributeBindingExceptionTest2() 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"; + DataAttributeBinding dataAttributeBinding = DataAttributeBinding.newBuilder().build(); + String dataAttributeBindingId = "dataAttributeBindingId1952425102"; + client + .createDataAttributeBindingAsync(parent, dataAttributeBinding, dataAttributeBindingId) + .get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateDataAttributeBindingTest() throws Exception { + DataAttributeBinding expectedResponse = + DataAttributeBinding.newBuilder() + .setName( + DataAttributeBindingName.of( + "[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]") + .toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .addAllAttributes(new ArrayList()) + .addAllPaths(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateDataAttributeBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + DataAttributeBinding dataAttributeBinding = + DataAttributeBinding.newBuilder() + .setName( + DataAttributeBindingName.of( + "[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]") + .toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .addAllAttributes(new ArrayList()) + .addAllPaths(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + DataAttributeBinding actualResponse = + client.updateDataAttributeBindingAsync(dataAttributeBinding, updateMask).get(); + 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 updateDataAttributeBindingExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataAttributeBinding dataAttributeBinding = + DataAttributeBinding.newBuilder() + .setName( + DataAttributeBindingName.of( + "[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]") + .toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .addAllAttributes(new ArrayList()) + .addAllPaths(new ArrayList()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDataAttributeBindingAsync(dataAttributeBinding, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteDataAttributeBindingTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDataAttributeBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + DataAttributeBindingName name = + DataAttributeBindingName.of("[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]"); + + client.deleteDataAttributeBindingAsync(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 deleteDataAttributeBindingExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataAttributeBindingName name = + DataAttributeBindingName.of("[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]"); + client.deleteDataAttributeBindingAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteDataAttributeBindingTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDataAttributeBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-3418/locations/location-3418/dataAttributeBindings/dataAttributeBinding-3418"; + + client.deleteDataAttributeBindingAsync(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 deleteDataAttributeBindingExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-3418/locations/location-3418/dataAttributeBindings/dataAttributeBinding-3418"; + client.deleteDataAttributeBindingAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listDataAttributeBindingsTest() throws Exception { + DataAttributeBinding responsesElement = DataAttributeBinding.newBuilder().build(); + ListDataAttributeBindingsResponse expectedResponse = + ListDataAttributeBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllDataAttributeBindings(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListDataAttributeBindingsPagedResponse pagedListResponse = + client.listDataAttributeBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataAttributeBindingsList().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 listDataAttributeBindingsExceptionTest() 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.listDataAttributeBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDataAttributeBindingsTest2() throws Exception { + DataAttributeBinding responsesElement = DataAttributeBinding.newBuilder().build(); + ListDataAttributeBindingsResponse expectedResponse = + ListDataAttributeBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllDataAttributeBindings(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5833/locations/location-5833"; + + ListDataAttributeBindingsPagedResponse pagedListResponse = + client.listDataAttributeBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataAttributeBindingsList().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 listDataAttributeBindingsExceptionTest2() 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.listDataAttributeBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataAttributeBindingTest() throws Exception { + DataAttributeBinding expectedResponse = + DataAttributeBinding.newBuilder() + .setName( + DataAttributeBindingName.of( + "[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]") + .toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .addAllAttributes(new ArrayList()) + .addAllPaths(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + DataAttributeBindingName name = + DataAttributeBindingName.of("[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]"); + + DataAttributeBinding actualResponse = client.getDataAttributeBinding(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 getDataAttributeBindingExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataAttributeBindingName name = + DataAttributeBindingName.of("[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]"); + client.getDataAttributeBinding(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataAttributeBindingTest2() throws Exception { + DataAttributeBinding expectedResponse = + DataAttributeBinding.newBuilder() + .setName( + DataAttributeBindingName.of( + "[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]") + .toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .addAllAttributes(new ArrayList()) + .addAllPaths(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-3418/locations/location-3418/dataAttributeBindings/dataAttributeBinding-3418"; + + DataAttributeBinding actualResponse = client.getDataAttributeBinding(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 getDataAttributeBindingExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-3418/locations/location-3418/dataAttributeBindings/dataAttributeBinding-3418"; + client.getDataAttributeBinding(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDataAttributeTest() throws Exception { + DataAttribute expectedResponse = + DataAttribute.newBuilder() + .setName( + DataAttributeName.of( + "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]") + .toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setParentId( + DataAttributeName.of( + "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]") + .toString()) + .setAttributeCount(-688916052) + .setEtag("etag3123477") + .setResourceAccessSpec(ResourceAccessSpec.newBuilder().build()) + .setDataAccessSpec(DataAccessSpec.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDataAttributeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + DataTaxonomyName parent = DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]"); + DataAttribute dataAttribute = DataAttribute.newBuilder().build(); + String dataAttributeId = "dataAttributeId-44128563"; + + DataAttribute actualResponse = + client.createDataAttributeAsync(parent, dataAttribute, dataAttributeId).get(); + 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 createDataAttributeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataTaxonomyName parent = + DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]"); + DataAttribute dataAttribute = DataAttribute.newBuilder().build(); + String dataAttributeId = "dataAttributeId-44128563"; + client.createDataAttributeAsync(parent, dataAttribute, dataAttributeId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void createDataAttributeTest2() throws Exception { + DataAttribute expectedResponse = + DataAttribute.newBuilder() + .setName( + DataAttributeName.of( + "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]") + .toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setParentId( + DataAttributeName.of( + "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]") + .toString()) + .setAttributeCount(-688916052) + .setEtag("etag3123477") + .setResourceAccessSpec(ResourceAccessSpec.newBuilder().build()) + .setDataAccessSpec(DataAccessSpec.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDataAttributeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String parent = + "projects/project-8950/locations/location-8950/dataTaxonomies/dataTaxonomie-8950"; + DataAttribute dataAttribute = DataAttribute.newBuilder().build(); + String dataAttributeId = "dataAttributeId-44128563"; + + DataAttribute actualResponse = + client.createDataAttributeAsync(parent, dataAttribute, dataAttributeId).get(); + 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 createDataAttributeExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-8950/locations/location-8950/dataTaxonomies/dataTaxonomie-8950"; + DataAttribute dataAttribute = DataAttribute.newBuilder().build(); + String dataAttributeId = "dataAttributeId-44128563"; + client.createDataAttributeAsync(parent, dataAttribute, dataAttributeId).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void updateDataAttributeTest() throws Exception { + DataAttribute expectedResponse = + DataAttribute.newBuilder() + .setName( + DataAttributeName.of( + "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]") + .toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setParentId( + DataAttributeName.of( + "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]") + .toString()) + .setAttributeCount(-688916052) + .setEtag("etag3123477") + .setResourceAccessSpec(ResourceAccessSpec.newBuilder().build()) + .setDataAccessSpec(DataAccessSpec.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateDataAttributeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + DataAttribute dataAttribute = + DataAttribute.newBuilder() + .setName( + DataAttributeName.of( + "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]") + .toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setParentId( + DataAttributeName.of( + "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]") + .toString()) + .setAttributeCount(-688916052) + .setEtag("etag3123477") + .setResourceAccessSpec(ResourceAccessSpec.newBuilder().build()) + .setDataAccessSpec(DataAccessSpec.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + DataAttribute actualResponse = client.updateDataAttributeAsync(dataAttribute, updateMask).get(); + 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 updateDataAttributeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataAttribute dataAttribute = + DataAttribute.newBuilder() + .setName( + DataAttributeName.of( + "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]") + .toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setParentId( + DataAttributeName.of( + "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]") + .toString()) + .setAttributeCount(-688916052) + .setEtag("etag3123477") + .setResourceAccessSpec(ResourceAccessSpec.newBuilder().build()) + .setDataAccessSpec(DataAccessSpec.newBuilder().build()) + .build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDataAttributeAsync(dataAttribute, updateMask).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteDataAttributeTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDataAttributeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + DataAttributeName name = + DataAttributeName.of("[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]"); + + client.deleteDataAttributeAsync(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 deleteDataAttributeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataAttributeName name = + DataAttributeName.of("[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]"); + client.deleteDataAttributeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void deleteDataAttributeTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDataAttributeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockService.addResponse(resultOperation); + + String name = + "projects/project-7880/locations/location-7880/dataTaxonomies/dataTaxonomie-7880/attributes/attribute-7880"; + + client.deleteDataAttributeAsync(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 deleteDataAttributeExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-7880/locations/location-7880/dataTaxonomies/dataTaxonomie-7880/attributes/attribute-7880"; + client.deleteDataAttributeAsync(name).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + } + } + + @Test + public void listDataAttributesTest() throws Exception { + DataAttribute responsesElement = DataAttribute.newBuilder().build(); + ListDataAttributesResponse expectedResponse = + ListDataAttributesResponse.newBuilder() + .setNextPageToken("") + .addAllDataAttributes(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + DataTaxonomyName parent = DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]"); + + ListDataAttributesPagedResponse pagedListResponse = client.listDataAttributes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataAttributesList().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 listDataAttributesExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataTaxonomyName parent = + DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]"); + client.listDataAttributes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDataAttributesTest2() throws Exception { + DataAttribute responsesElement = DataAttribute.newBuilder().build(); + ListDataAttributesResponse expectedResponse = + ListDataAttributesResponse.newBuilder() + .setNextPageToken("") + .addAllDataAttributes(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = + "projects/project-8950/locations/location-8950/dataTaxonomies/dataTaxonomie-8950"; + + ListDataAttributesPagedResponse pagedListResponse = client.listDataAttributes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataAttributesList().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 listDataAttributesExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = + "projects/project-8950/locations/location-8950/dataTaxonomies/dataTaxonomie-8950"; + client.listDataAttributes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataAttributeTest() throws Exception { + DataAttribute expectedResponse = + DataAttribute.newBuilder() + .setName( + DataAttributeName.of( + "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]") + .toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setParentId( + DataAttributeName.of( + "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]") + .toString()) + .setAttributeCount(-688916052) + .setEtag("etag3123477") + .setResourceAccessSpec(ResourceAccessSpec.newBuilder().build()) + .setDataAccessSpec(DataAccessSpec.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + DataAttributeName name = + DataAttributeName.of("[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]"); + + DataAttribute actualResponse = client.getDataAttribute(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 getDataAttributeExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + DataAttributeName name = + DataAttributeName.of("[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]"); + client.getDataAttribute(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataAttributeTest2() throws Exception { + DataAttribute expectedResponse = + DataAttribute.newBuilder() + .setName( + DataAttributeName.of( + "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]") + .toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setParentId( + DataAttributeName.of( + "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]") + .toString()) + .setAttributeCount(-688916052) + .setEtag("etag3123477") + .setResourceAccessSpec(ResourceAccessSpec.newBuilder().build()) + .setDataAccessSpec(DataAccessSpec.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = + "projects/project-7880/locations/location-7880/dataTaxonomies/dataTaxonomie-7880/attributes/attribute-7880"; + + DataAttribute actualResponse = client.getDataAttribute(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 getDataAttributeExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = + "projects/project-7880/locations/location-7880/dataTaxonomies/dataTaxonomie-7880/attributes/attribute-7880"; + client.getDataAttribute(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().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 listLocationsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("projects/project-3664") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + + Location actualResponse = client.getLocation(request); + 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 getLocationExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + GetLocationRequest request = + GetLocationRequest.newBuilder() + .setName("projects/project-9062/locations/location-9062") + .build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-dataplex/google-cloud-dataplex/src/test/java/com/google/cloud/dataplex/v1/DataTaxonomyServiceClientTest.java b/java-dataplex/google-cloud-dataplex/src/test/java/com/google/cloud/dataplex/v1/DataTaxonomyServiceClientTest.java new file mode 100644 index 000000000000..2542c83a2198 --- /dev/null +++ b/java-dataplex/google-cloud-dataplex/src/test/java/com/google/cloud/dataplex/v1/DataTaxonomyServiceClientTest.java @@ -0,0 +1,1636 @@ +/* + * Copyright 2023 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.dataplex.v1; + +import static com.google.cloud.dataplex.v1.DataTaxonomyServiceClient.ListDataAttributeBindingsPagedResponse; +import static com.google.cloud.dataplex.v1.DataTaxonomyServiceClient.ListDataAttributesPagedResponse; +import static com.google.cloud.dataplex.v1.DataTaxonomyServiceClient.ListDataTaxonomiesPagedResponse; +import static com.google.cloud.dataplex.v1.DataTaxonomyServiceClient.ListLocationsPagedResponse; + +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.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +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 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 DataTaxonomyServiceClientTest { + private static MockDataTaxonomyService mockDataTaxonomyService; + private static MockIAMPolicy mockIAMPolicy; + private static MockLocations mockLocations; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private DataTaxonomyServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockDataTaxonomyService = new MockDataTaxonomyService(); + mockLocations = new MockLocations(); + mockIAMPolicy = new MockIAMPolicy(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockDataTaxonomyService, mockLocations, mockIAMPolicy)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + DataTaxonomyServiceSettings settings = + DataTaxonomyServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = DataTaxonomyServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void createDataTaxonomyTest() throws Exception { + DataTaxonomy expectedResponse = + DataTaxonomy.newBuilder() + .setName( + DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setAttributeCount(-688916052) + .setEtag("etag3123477") + .setClassCount(-424516728) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDataTaxonomyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataTaxonomyService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + DataTaxonomy dataTaxonomy = DataTaxonomy.newBuilder().build(); + String dataTaxonomyId = "dataTaxonomyId987458454"; + + DataTaxonomy actualResponse = + client.createDataTaxonomyAsync(parent, dataTaxonomy, dataTaxonomyId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTaxonomyService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDataTaxonomyRequest actualRequest = ((CreateDataTaxonomyRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(dataTaxonomy, actualRequest.getDataTaxonomy()); + Assert.assertEquals(dataTaxonomyId, actualRequest.getDataTaxonomyId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDataTaxonomyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTaxonomyService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + DataTaxonomy dataTaxonomy = DataTaxonomy.newBuilder().build(); + String dataTaxonomyId = "dataTaxonomyId987458454"; + client.createDataTaxonomyAsync(parent, dataTaxonomy, dataTaxonomyId).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 createDataTaxonomyTest2() throws Exception { + DataTaxonomy expectedResponse = + DataTaxonomy.newBuilder() + .setName( + DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setAttributeCount(-688916052) + .setEtag("etag3123477") + .setClassCount(-424516728) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDataTaxonomyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataTaxonomyService.addResponse(resultOperation); + + String parent = "parent-995424086"; + DataTaxonomy dataTaxonomy = DataTaxonomy.newBuilder().build(); + String dataTaxonomyId = "dataTaxonomyId987458454"; + + DataTaxonomy actualResponse = + client.createDataTaxonomyAsync(parent, dataTaxonomy, dataTaxonomyId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTaxonomyService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDataTaxonomyRequest actualRequest = ((CreateDataTaxonomyRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(dataTaxonomy, actualRequest.getDataTaxonomy()); + Assert.assertEquals(dataTaxonomyId, actualRequest.getDataTaxonomyId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDataTaxonomyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTaxonomyService.addException(exception); + + try { + String parent = "parent-995424086"; + DataTaxonomy dataTaxonomy = DataTaxonomy.newBuilder().build(); + String dataTaxonomyId = "dataTaxonomyId987458454"; + client.createDataTaxonomyAsync(parent, dataTaxonomy, dataTaxonomyId).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 updateDataTaxonomyTest() throws Exception { + DataTaxonomy expectedResponse = + DataTaxonomy.newBuilder() + .setName( + DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setAttributeCount(-688916052) + .setEtag("etag3123477") + .setClassCount(-424516728) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateDataTaxonomyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataTaxonomyService.addResponse(resultOperation); + + DataTaxonomy dataTaxonomy = DataTaxonomy.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + DataTaxonomy actualResponse = client.updateDataTaxonomyAsync(dataTaxonomy, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTaxonomyService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateDataTaxonomyRequest actualRequest = ((UpdateDataTaxonomyRequest) actualRequests.get(0)); + + Assert.assertEquals(dataTaxonomy, actualRequest.getDataTaxonomy()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateDataTaxonomyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTaxonomyService.addException(exception); + + try { + DataTaxonomy dataTaxonomy = DataTaxonomy.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDataTaxonomyAsync(dataTaxonomy, updateMask).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 deleteDataTaxonomyTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDataTaxonomyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataTaxonomyService.addResponse(resultOperation); + + DataTaxonomyName name = DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]"); + + client.deleteDataTaxonomyAsync(name).get(); + + List actualRequests = mockDataTaxonomyService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDataTaxonomyRequest actualRequest = ((DeleteDataTaxonomyRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDataTaxonomyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTaxonomyService.addException(exception); + + try { + DataTaxonomyName name = DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]"); + client.deleteDataTaxonomyAsync(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 deleteDataTaxonomyTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDataTaxonomyTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataTaxonomyService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteDataTaxonomyAsync(name).get(); + + List actualRequests = mockDataTaxonomyService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDataTaxonomyRequest actualRequest = ((DeleteDataTaxonomyRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDataTaxonomyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTaxonomyService.addException(exception); + + try { + String name = "name3373707"; + client.deleteDataTaxonomyAsync(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 listDataTaxonomiesTest() throws Exception { + DataTaxonomy responsesElement = DataTaxonomy.newBuilder().build(); + ListDataTaxonomiesResponse expectedResponse = + ListDataTaxonomiesResponse.newBuilder() + .setNextPageToken("") + .addAllDataTaxonomies(Arrays.asList(responsesElement)) + .build(); + mockDataTaxonomyService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListDataTaxonomiesPagedResponse pagedListResponse = client.listDataTaxonomies(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataTaxonomiesList().get(0), resources.get(0)); + + List actualRequests = mockDataTaxonomyService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDataTaxonomiesRequest actualRequest = ((ListDataTaxonomiesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDataTaxonomiesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTaxonomyService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listDataTaxonomies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDataTaxonomiesTest2() throws Exception { + DataTaxonomy responsesElement = DataTaxonomy.newBuilder().build(); + ListDataTaxonomiesResponse expectedResponse = + ListDataTaxonomiesResponse.newBuilder() + .setNextPageToken("") + .addAllDataTaxonomies(Arrays.asList(responsesElement)) + .build(); + mockDataTaxonomyService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListDataTaxonomiesPagedResponse pagedListResponse = client.listDataTaxonomies(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataTaxonomiesList().get(0), resources.get(0)); + + List actualRequests = mockDataTaxonomyService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDataTaxonomiesRequest actualRequest = ((ListDataTaxonomiesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDataTaxonomiesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTaxonomyService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listDataTaxonomies(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataTaxonomyTest() throws Exception { + DataTaxonomy expectedResponse = + DataTaxonomy.newBuilder() + .setName( + DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setAttributeCount(-688916052) + .setEtag("etag3123477") + .setClassCount(-424516728) + .build(); + mockDataTaxonomyService.addResponse(expectedResponse); + + DataTaxonomyName name = DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]"); + + DataTaxonomy actualResponse = client.getDataTaxonomy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTaxonomyService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDataTaxonomyRequest actualRequest = ((GetDataTaxonomyRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDataTaxonomyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTaxonomyService.addException(exception); + + try { + DataTaxonomyName name = DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]"); + client.getDataTaxonomy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataTaxonomyTest2() throws Exception { + DataTaxonomy expectedResponse = + DataTaxonomy.newBuilder() + .setName( + DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setAttributeCount(-688916052) + .setEtag("etag3123477") + .setClassCount(-424516728) + .build(); + mockDataTaxonomyService.addResponse(expectedResponse); + + String name = "name3373707"; + + DataTaxonomy actualResponse = client.getDataTaxonomy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTaxonomyService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDataTaxonomyRequest actualRequest = ((GetDataTaxonomyRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDataTaxonomyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTaxonomyService.addException(exception); + + try { + String name = "name3373707"; + client.getDataTaxonomy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDataAttributeBindingTest() throws Exception { + DataAttributeBinding expectedResponse = + DataAttributeBinding.newBuilder() + .setName( + DataAttributeBindingName.of( + "[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]") + .toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .addAllAttributes(new ArrayList()) + .addAllPaths(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDataAttributeBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataTaxonomyService.addResponse(resultOperation); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + DataAttributeBinding dataAttributeBinding = DataAttributeBinding.newBuilder().build(); + String dataAttributeBindingId = "dataAttributeBindingId1952425102"; + + DataAttributeBinding actualResponse = + client + .createDataAttributeBindingAsync(parent, dataAttributeBinding, dataAttributeBindingId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTaxonomyService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDataAttributeBindingRequest actualRequest = + ((CreateDataAttributeBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(dataAttributeBinding, actualRequest.getDataAttributeBinding()); + Assert.assertEquals(dataAttributeBindingId, actualRequest.getDataAttributeBindingId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDataAttributeBindingExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTaxonomyService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + DataAttributeBinding dataAttributeBinding = DataAttributeBinding.newBuilder().build(); + String dataAttributeBindingId = "dataAttributeBindingId1952425102"; + client + .createDataAttributeBindingAsync(parent, dataAttributeBinding, dataAttributeBindingId) + .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 createDataAttributeBindingTest2() throws Exception { + DataAttributeBinding expectedResponse = + DataAttributeBinding.newBuilder() + .setName( + DataAttributeBindingName.of( + "[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]") + .toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .addAllAttributes(new ArrayList()) + .addAllPaths(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDataAttributeBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataTaxonomyService.addResponse(resultOperation); + + String parent = "parent-995424086"; + DataAttributeBinding dataAttributeBinding = DataAttributeBinding.newBuilder().build(); + String dataAttributeBindingId = "dataAttributeBindingId1952425102"; + + DataAttributeBinding actualResponse = + client + .createDataAttributeBindingAsync(parent, dataAttributeBinding, dataAttributeBindingId) + .get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTaxonomyService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDataAttributeBindingRequest actualRequest = + ((CreateDataAttributeBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(dataAttributeBinding, actualRequest.getDataAttributeBinding()); + Assert.assertEquals(dataAttributeBindingId, actualRequest.getDataAttributeBindingId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDataAttributeBindingExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTaxonomyService.addException(exception); + + try { + String parent = "parent-995424086"; + DataAttributeBinding dataAttributeBinding = DataAttributeBinding.newBuilder().build(); + String dataAttributeBindingId = "dataAttributeBindingId1952425102"; + client + .createDataAttributeBindingAsync(parent, dataAttributeBinding, dataAttributeBindingId) + .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 updateDataAttributeBindingTest() throws Exception { + DataAttributeBinding expectedResponse = + DataAttributeBinding.newBuilder() + .setName( + DataAttributeBindingName.of( + "[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]") + .toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .addAllAttributes(new ArrayList()) + .addAllPaths(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateDataAttributeBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataTaxonomyService.addResponse(resultOperation); + + DataAttributeBinding dataAttributeBinding = DataAttributeBinding.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + DataAttributeBinding actualResponse = + client.updateDataAttributeBindingAsync(dataAttributeBinding, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTaxonomyService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateDataAttributeBindingRequest actualRequest = + ((UpdateDataAttributeBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(dataAttributeBinding, actualRequest.getDataAttributeBinding()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateDataAttributeBindingExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTaxonomyService.addException(exception); + + try { + DataAttributeBinding dataAttributeBinding = DataAttributeBinding.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDataAttributeBindingAsync(dataAttributeBinding, updateMask).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 deleteDataAttributeBindingTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDataAttributeBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataTaxonomyService.addResponse(resultOperation); + + DataAttributeBindingName name = + DataAttributeBindingName.of("[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]"); + + client.deleteDataAttributeBindingAsync(name).get(); + + List actualRequests = mockDataTaxonomyService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDataAttributeBindingRequest actualRequest = + ((DeleteDataAttributeBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDataAttributeBindingExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTaxonomyService.addException(exception); + + try { + DataAttributeBindingName name = + DataAttributeBindingName.of("[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]"); + client.deleteDataAttributeBindingAsync(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 deleteDataAttributeBindingTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDataAttributeBindingTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataTaxonomyService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteDataAttributeBindingAsync(name).get(); + + List actualRequests = mockDataTaxonomyService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDataAttributeBindingRequest actualRequest = + ((DeleteDataAttributeBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDataAttributeBindingExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTaxonomyService.addException(exception); + + try { + String name = "name3373707"; + client.deleteDataAttributeBindingAsync(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 listDataAttributeBindingsTest() throws Exception { + DataAttributeBinding responsesElement = DataAttributeBinding.newBuilder().build(); + ListDataAttributeBindingsResponse expectedResponse = + ListDataAttributeBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllDataAttributeBindings(Arrays.asList(responsesElement)) + .build(); + mockDataTaxonomyService.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListDataAttributeBindingsPagedResponse pagedListResponse = + client.listDataAttributeBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataAttributeBindingsList().get(0), resources.get(0)); + + List actualRequests = mockDataTaxonomyService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDataAttributeBindingsRequest actualRequest = + ((ListDataAttributeBindingsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDataAttributeBindingsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTaxonomyService.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + client.listDataAttributeBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDataAttributeBindingsTest2() throws Exception { + DataAttributeBinding responsesElement = DataAttributeBinding.newBuilder().build(); + ListDataAttributeBindingsResponse expectedResponse = + ListDataAttributeBindingsResponse.newBuilder() + .setNextPageToken("") + .addAllDataAttributeBindings(Arrays.asList(responsesElement)) + .build(); + mockDataTaxonomyService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListDataAttributeBindingsPagedResponse pagedListResponse = + client.listDataAttributeBindings(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataAttributeBindingsList().get(0), resources.get(0)); + + List actualRequests = mockDataTaxonomyService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDataAttributeBindingsRequest actualRequest = + ((ListDataAttributeBindingsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDataAttributeBindingsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTaxonomyService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listDataAttributeBindings(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataAttributeBindingTest() throws Exception { + DataAttributeBinding expectedResponse = + DataAttributeBinding.newBuilder() + .setName( + DataAttributeBindingName.of( + "[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]") + .toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .addAllAttributes(new ArrayList()) + .addAllPaths(new ArrayList()) + .build(); + mockDataTaxonomyService.addResponse(expectedResponse); + + DataAttributeBindingName name = + DataAttributeBindingName.of("[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]"); + + DataAttributeBinding actualResponse = client.getDataAttributeBinding(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTaxonomyService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDataAttributeBindingRequest actualRequest = + ((GetDataAttributeBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDataAttributeBindingExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTaxonomyService.addException(exception); + + try { + DataAttributeBindingName name = + DataAttributeBindingName.of("[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]"); + client.getDataAttributeBinding(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataAttributeBindingTest2() throws Exception { + DataAttributeBinding expectedResponse = + DataAttributeBinding.newBuilder() + .setName( + DataAttributeBindingName.of( + "[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]") + .toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setEtag("etag3123477") + .addAllAttributes(new ArrayList()) + .addAllPaths(new ArrayList()) + .build(); + mockDataTaxonomyService.addResponse(expectedResponse); + + String name = "name3373707"; + + DataAttributeBinding actualResponse = client.getDataAttributeBinding(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTaxonomyService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDataAttributeBindingRequest actualRequest = + ((GetDataAttributeBindingRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDataAttributeBindingExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTaxonomyService.addException(exception); + + try { + String name = "name3373707"; + client.getDataAttributeBinding(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createDataAttributeTest() throws Exception { + DataAttribute expectedResponse = + DataAttribute.newBuilder() + .setName( + DataAttributeName.of( + "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]") + .toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setParentId( + DataAttributeName.of( + "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]") + .toString()) + .setAttributeCount(-688916052) + .setEtag("etag3123477") + .setResourceAccessSpec(ResourceAccessSpec.newBuilder().build()) + .setDataAccessSpec(DataAccessSpec.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDataAttributeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataTaxonomyService.addResponse(resultOperation); + + DataTaxonomyName parent = DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]"); + DataAttribute dataAttribute = DataAttribute.newBuilder().build(); + String dataAttributeId = "dataAttributeId-44128563"; + + DataAttribute actualResponse = + client.createDataAttributeAsync(parent, dataAttribute, dataAttributeId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTaxonomyService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDataAttributeRequest actualRequest = ((CreateDataAttributeRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(dataAttribute, actualRequest.getDataAttribute()); + Assert.assertEquals(dataAttributeId, actualRequest.getDataAttributeId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDataAttributeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTaxonomyService.addException(exception); + + try { + DataTaxonomyName parent = + DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]"); + DataAttribute dataAttribute = DataAttribute.newBuilder().build(); + String dataAttributeId = "dataAttributeId-44128563"; + client.createDataAttributeAsync(parent, dataAttribute, dataAttributeId).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 createDataAttributeTest2() throws Exception { + DataAttribute expectedResponse = + DataAttribute.newBuilder() + .setName( + DataAttributeName.of( + "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]") + .toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setParentId( + DataAttributeName.of( + "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]") + .toString()) + .setAttributeCount(-688916052) + .setEtag("etag3123477") + .setResourceAccessSpec(ResourceAccessSpec.newBuilder().build()) + .setDataAccessSpec(DataAccessSpec.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createDataAttributeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataTaxonomyService.addResponse(resultOperation); + + String parent = "parent-995424086"; + DataAttribute dataAttribute = DataAttribute.newBuilder().build(); + String dataAttributeId = "dataAttributeId-44128563"; + + DataAttribute actualResponse = + client.createDataAttributeAsync(parent, dataAttribute, dataAttributeId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTaxonomyService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateDataAttributeRequest actualRequest = ((CreateDataAttributeRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(dataAttribute, actualRequest.getDataAttribute()); + Assert.assertEquals(dataAttributeId, actualRequest.getDataAttributeId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createDataAttributeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTaxonomyService.addException(exception); + + try { + String parent = "parent-995424086"; + DataAttribute dataAttribute = DataAttribute.newBuilder().build(); + String dataAttributeId = "dataAttributeId-44128563"; + client.createDataAttributeAsync(parent, dataAttribute, dataAttributeId).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 updateDataAttributeTest() throws Exception { + DataAttribute expectedResponse = + DataAttribute.newBuilder() + .setName( + DataAttributeName.of( + "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]") + .toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setParentId( + DataAttributeName.of( + "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]") + .toString()) + .setAttributeCount(-688916052) + .setEtag("etag3123477") + .setResourceAccessSpec(ResourceAccessSpec.newBuilder().build()) + .setDataAccessSpec(DataAccessSpec.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("updateDataAttributeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataTaxonomyService.addResponse(resultOperation); + + DataAttribute dataAttribute = DataAttribute.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + DataAttribute actualResponse = client.updateDataAttributeAsync(dataAttribute, updateMask).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTaxonomyService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateDataAttributeRequest actualRequest = ((UpdateDataAttributeRequest) actualRequests.get(0)); + + Assert.assertEquals(dataAttribute, actualRequest.getDataAttribute()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateDataAttributeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTaxonomyService.addException(exception); + + try { + DataAttribute dataAttribute = DataAttribute.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + client.updateDataAttributeAsync(dataAttribute, updateMask).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 deleteDataAttributeTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDataAttributeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataTaxonomyService.addResponse(resultOperation); + + DataAttributeName name = + DataAttributeName.of("[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]"); + + client.deleteDataAttributeAsync(name).get(); + + List actualRequests = mockDataTaxonomyService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDataAttributeRequest actualRequest = ((DeleteDataAttributeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDataAttributeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTaxonomyService.addException(exception); + + try { + DataAttributeName name = + DataAttributeName.of("[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]"); + client.deleteDataAttributeAsync(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 deleteDataAttributeTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteDataAttributeTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockDataTaxonomyService.addResponse(resultOperation); + + String name = "name3373707"; + + client.deleteDataAttributeAsync(name).get(); + + List actualRequests = mockDataTaxonomyService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteDataAttributeRequest actualRequest = ((DeleteDataAttributeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteDataAttributeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTaxonomyService.addException(exception); + + try { + String name = "name3373707"; + client.deleteDataAttributeAsync(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 listDataAttributesTest() throws Exception { + DataAttribute responsesElement = DataAttribute.newBuilder().build(); + ListDataAttributesResponse expectedResponse = + ListDataAttributesResponse.newBuilder() + .setNextPageToken("") + .addAllDataAttributes(Arrays.asList(responsesElement)) + .build(); + mockDataTaxonomyService.addResponse(expectedResponse); + + DataTaxonomyName parent = DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]"); + + ListDataAttributesPagedResponse pagedListResponse = client.listDataAttributes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataAttributesList().get(0), resources.get(0)); + + List actualRequests = mockDataTaxonomyService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDataAttributesRequest actualRequest = ((ListDataAttributesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDataAttributesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTaxonomyService.addException(exception); + + try { + DataTaxonomyName parent = + DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]"); + client.listDataAttributes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listDataAttributesTest2() throws Exception { + DataAttribute responsesElement = DataAttribute.newBuilder().build(); + ListDataAttributesResponse expectedResponse = + ListDataAttributesResponse.newBuilder() + .setNextPageToken("") + .addAllDataAttributes(Arrays.asList(responsesElement)) + .build(); + mockDataTaxonomyService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListDataAttributesPagedResponse pagedListResponse = client.listDataAttributes(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getDataAttributesList().get(0), resources.get(0)); + + List actualRequests = mockDataTaxonomyService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListDataAttributesRequest actualRequest = ((ListDataAttributesRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listDataAttributesExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTaxonomyService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listDataAttributes(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataAttributeTest() throws Exception { + DataAttribute expectedResponse = + DataAttribute.newBuilder() + .setName( + DataAttributeName.of( + "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]") + .toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setParentId( + DataAttributeName.of( + "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]") + .toString()) + .setAttributeCount(-688916052) + .setEtag("etag3123477") + .setResourceAccessSpec(ResourceAccessSpec.newBuilder().build()) + .setDataAccessSpec(DataAccessSpec.newBuilder().build()) + .build(); + mockDataTaxonomyService.addResponse(expectedResponse); + + DataAttributeName name = + DataAttributeName.of("[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]"); + + DataAttribute actualResponse = client.getDataAttribute(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTaxonomyService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDataAttributeRequest actualRequest = ((GetDataAttributeRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDataAttributeExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTaxonomyService.addException(exception); + + try { + DataAttributeName name = + DataAttributeName.of("[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]"); + client.getDataAttribute(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getDataAttributeTest2() throws Exception { + DataAttribute expectedResponse = + DataAttribute.newBuilder() + .setName( + DataAttributeName.of( + "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]") + .toString()) + .setUid("uid115792") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setDescription("description-1724546052") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setParentId( + DataAttributeName.of( + "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]") + .toString()) + .setAttributeCount(-688916052) + .setEtag("etag3123477") + .setResourceAccessSpec(ResourceAccessSpec.newBuilder().build()) + .setDataAccessSpec(DataAccessSpec.newBuilder().build()) + .build(); + mockDataTaxonomyService.addResponse(expectedResponse); + + String name = "name3373707"; + + DataAttribute actualResponse = client.getDataAttribute(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockDataTaxonomyService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetDataAttributeRequest actualRequest = ((GetDataAttributeRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getDataAttributeExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockDataTaxonomyService.addException(exception); + + try { + String name = "name3373707"; + client.getDataAttribute(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listLocationsTest() throws Exception { + Location responsesElement = Location.newBuilder().build(); + ListLocationsResponse expectedResponse = + ListLocationsResponse.newBuilder() + .setNextPageToken("") + .addAllLocations(Arrays.asList(responsesElement)) + .build(); + mockLocations.addResponse(expectedResponse); + + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListLocationsPagedResponse pagedListResponse = client.listLocations(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getLocationsList().get(0), resources.get(0)); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListLocationsRequest actualRequest = ((ListLocationsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listLocationsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listLocations(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getLocationTest() throws Exception { + Location expectedResponse = + Location.newBuilder() + .setName("name3373707") + .setLocationId("locationId1541836720") + .setDisplayName("displayName1714148973") + .putAllLabels(new HashMap()) + .setMetadata(Any.newBuilder().build()) + .build(); + mockLocations.addResponse(expectedResponse); + + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + + Location actualResponse = client.getLocation(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockLocations.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetLocationRequest actualRequest = ((GetLocationRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getLocationExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockLocations.addException(exception); + + try { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + client.getLocation(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-dataplex/google-cloud-dataplex/src/test/java/com/google/cloud/dataplex/v1/DataplexServiceClientHttpJsonTest.java b/java-dataplex/google-cloud-dataplex/src/test/java/com/google/cloud/dataplex/v1/DataplexServiceClientHttpJsonTest.java index 70a54f642fd1..4f93f1108f9f 100644 --- a/java-dataplex/google-cloud-dataplex/src/test/java/com/google/cloud/dataplex/v1/DataplexServiceClientHttpJsonTest.java +++ b/java-dataplex/google-cloud-dataplex/src/test/java/com/google/cloud/dataplex/v1/DataplexServiceClientHttpJsonTest.java @@ -2673,6 +2673,8 @@ public void getJobTest() throws Exception { .setRetryCount(-928040776) .setServiceJob("serviceJob-1724783416") .setMessage("message954925063") + .putAllLabels(new HashMap()) + .setExecutionSpec(Task.ExecutionSpec.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); @@ -2723,6 +2725,8 @@ public void getJobTest2() throws Exception { .setRetryCount(-928040776) .setServiceJob("serviceJob-1724783416") .setMessage("message954925063") + .putAllLabels(new HashMap()) + .setExecutionSpec(Task.ExecutionSpec.newBuilder().build()) .build(); mockService.addResponse(expectedResponse); diff --git a/java-dataplex/google-cloud-dataplex/src/test/java/com/google/cloud/dataplex/v1/DataplexServiceClientTest.java b/java-dataplex/google-cloud-dataplex/src/test/java/com/google/cloud/dataplex/v1/DataplexServiceClientTest.java index f2c418c2a2f3..ef4537dbdfcd 100644 --- a/java-dataplex/google-cloud-dataplex/src/test/java/com/google/cloud/dataplex/v1/DataplexServiceClientTest.java +++ b/java-dataplex/google-cloud-dataplex/src/test/java/com/google/cloud/dataplex/v1/DataplexServiceClientTest.java @@ -2364,6 +2364,8 @@ public void getJobTest() throws Exception { .setRetryCount(-928040776) .setServiceJob("serviceJob-1724783416") .setMessage("message954925063") + .putAllLabels(new HashMap()) + .setExecutionSpec(Task.ExecutionSpec.newBuilder().build()) .build(); mockDataplexService.addResponse(expectedResponse); @@ -2408,6 +2410,8 @@ public void getJobTest2() throws Exception { .setRetryCount(-928040776) .setServiceJob("serviceJob-1724783416") .setMessage("message954925063") + .putAllLabels(new HashMap()) + .setExecutionSpec(Task.ExecutionSpec.newBuilder().build()) .build(); mockDataplexService.addResponse(expectedResponse); diff --git a/java-dataplex/google-cloud-dataplex/src/test/java/com/google/cloud/dataplex/v1/MockDataTaxonomyService.java b/java-dataplex/google-cloud-dataplex/src/test/java/com/google/cloud/dataplex/v1/MockDataTaxonomyService.java new file mode 100644 index 000000000000..feed3a13daf7 --- /dev/null +++ b/java-dataplex/google-cloud-dataplex/src/test/java/com/google/cloud/dataplex/v1/MockDataTaxonomyService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2023 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.dataplex.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 MockDataTaxonomyService implements MockGrpcService { + private final MockDataTaxonomyServiceImpl serviceImpl; + + public MockDataTaxonomyService() { + serviceImpl = new MockDataTaxonomyServiceImpl(); + } + + @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-dataplex/google-cloud-dataplex/src/test/java/com/google/cloud/dataplex/v1/MockDataTaxonomyServiceImpl.java b/java-dataplex/google-cloud-dataplex/src/test/java/com/google/cloud/dataplex/v1/MockDataTaxonomyServiceImpl.java new file mode 100644 index 000000000000..22bf03c1a07b --- /dev/null +++ b/java-dataplex/google-cloud-dataplex/src/test/java/com/google/cloud/dataplex/v1/MockDataTaxonomyServiceImpl.java @@ -0,0 +1,380 @@ +/* + * Copyright 2023 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.dataplex.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceGrpc.DataTaxonomyServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +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 MockDataTaxonomyServiceImpl extends DataTaxonomyServiceImplBase { + private List requests; + private Queue responses; + + public MockDataTaxonomyServiceImpl() { + 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 createDataTaxonomy( + CreateDataTaxonomyRequest 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 CreateDataTaxonomy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateDataTaxonomy( + UpdateDataTaxonomyRequest 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 UpdateDataTaxonomy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteDataTaxonomy( + DeleteDataTaxonomyRequest 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 DeleteDataTaxonomy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listDataTaxonomies( + ListDataTaxonomiesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListDataTaxonomiesResponse) { + requests.add(request); + responseObserver.onNext(((ListDataTaxonomiesResponse) 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 ListDataTaxonomies, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListDataTaxonomiesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getDataTaxonomy( + GetDataTaxonomyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DataTaxonomy) { + requests.add(request); + responseObserver.onNext(((DataTaxonomy) 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 GetDataTaxonomy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DataTaxonomy.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createDataAttributeBinding( + CreateDataAttributeBindingRequest 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 CreateDataAttributeBinding, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateDataAttributeBinding( + UpdateDataAttributeBindingRequest 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 UpdateDataAttributeBinding, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteDataAttributeBinding( + DeleteDataAttributeBindingRequest 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 DeleteDataAttributeBinding, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listDataAttributeBindings( + ListDataAttributeBindingsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListDataAttributeBindingsResponse) { + requests.add(request); + responseObserver.onNext(((ListDataAttributeBindingsResponse) 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 ListDataAttributeBindings, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListDataAttributeBindingsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getDataAttributeBinding( + GetDataAttributeBindingRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DataAttributeBinding) { + requests.add(request); + responseObserver.onNext(((DataAttributeBinding) 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 GetDataAttributeBinding, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DataAttributeBinding.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createDataAttribute( + CreateDataAttributeRequest 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 CreateDataAttribute, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateDataAttribute( + UpdateDataAttributeRequest 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 UpdateDataAttribute, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteDataAttribute( + DeleteDataAttributeRequest 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 DeleteDataAttribute, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listDataAttributes( + ListDataAttributesRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListDataAttributesResponse) { + requests.add(request); + responseObserver.onNext(((ListDataAttributesResponse) 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 ListDataAttributes, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + ListDataAttributesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getDataAttribute( + GetDataAttributeRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof DataAttribute) { + requests.add(request); + responseObserver.onNext(((DataAttribute) 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 GetDataAttribute, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + DataAttribute.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-dataplex/grpc-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataTaxonomyServiceGrpc.java b/java-dataplex/grpc-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataTaxonomyServiceGrpc.java new file mode 100644 index 000000000000..190ab34ee608 --- /dev/null +++ b/java-dataplex/grpc-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataTaxonomyServiceGrpc.java @@ -0,0 +1,2080 @@ +/* + * Copyright 2023 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.dataplex.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * DataTaxonomyService enables attribute-based governance. The resources
+ * currently offered include DataTaxonomy and DataAttribute.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/dataplex/v1/data_taxonomy.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class DataTaxonomyServiceGrpc { + + private DataTaxonomyServiceGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.dataplex.v1.DataTaxonomyService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest, com.google.longrunning.Operation> + getCreateDataTaxonomyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateDataTaxonomy", + requestType = com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest, com.google.longrunning.Operation> + getCreateDataTaxonomyMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest, + com.google.longrunning.Operation> + getCreateDataTaxonomyMethod; + if ((getCreateDataTaxonomyMethod = DataTaxonomyServiceGrpc.getCreateDataTaxonomyMethod) + == null) { + synchronized (DataTaxonomyServiceGrpc.class) { + if ((getCreateDataTaxonomyMethod = DataTaxonomyServiceGrpc.getCreateDataTaxonomyMethod) + == null) { + DataTaxonomyServiceGrpc.getCreateDataTaxonomyMethod = + getCreateDataTaxonomyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateDataTaxonomy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataTaxonomyServiceMethodDescriptorSupplier("CreateDataTaxonomy")) + .build(); + } + } + } + return getCreateDataTaxonomyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest, com.google.longrunning.Operation> + getUpdateDataTaxonomyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateDataTaxonomy", + requestType = com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest, com.google.longrunning.Operation> + getUpdateDataTaxonomyMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest, + com.google.longrunning.Operation> + getUpdateDataTaxonomyMethod; + if ((getUpdateDataTaxonomyMethod = DataTaxonomyServiceGrpc.getUpdateDataTaxonomyMethod) + == null) { + synchronized (DataTaxonomyServiceGrpc.class) { + if ((getUpdateDataTaxonomyMethod = DataTaxonomyServiceGrpc.getUpdateDataTaxonomyMethod) + == null) { + DataTaxonomyServiceGrpc.getUpdateDataTaxonomyMethod = + getUpdateDataTaxonomyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateDataTaxonomy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataTaxonomyServiceMethodDescriptorSupplier("UpdateDataTaxonomy")) + .build(); + } + } + } + return getUpdateDataTaxonomyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest, com.google.longrunning.Operation> + getDeleteDataTaxonomyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteDataTaxonomy", + requestType = com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest, com.google.longrunning.Operation> + getDeleteDataTaxonomyMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest, + com.google.longrunning.Operation> + getDeleteDataTaxonomyMethod; + if ((getDeleteDataTaxonomyMethod = DataTaxonomyServiceGrpc.getDeleteDataTaxonomyMethod) + == null) { + synchronized (DataTaxonomyServiceGrpc.class) { + if ((getDeleteDataTaxonomyMethod = DataTaxonomyServiceGrpc.getDeleteDataTaxonomyMethod) + == null) { + DataTaxonomyServiceGrpc.getDeleteDataTaxonomyMethod = + getDeleteDataTaxonomyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteDataTaxonomy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataTaxonomyServiceMethodDescriptorSupplier("DeleteDataTaxonomy")) + .build(); + } + } + } + return getDeleteDataTaxonomyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest, + com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse> + getListDataTaxonomiesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListDataTaxonomies", + requestType = com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest.class, + responseType = com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest, + com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse> + getListDataTaxonomiesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest, + com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse> + getListDataTaxonomiesMethod; + if ((getListDataTaxonomiesMethod = DataTaxonomyServiceGrpc.getListDataTaxonomiesMethod) + == null) { + synchronized (DataTaxonomyServiceGrpc.class) { + if ((getListDataTaxonomiesMethod = DataTaxonomyServiceGrpc.getListDataTaxonomiesMethod) + == null) { + DataTaxonomyServiceGrpc.getListDataTaxonomiesMethod = + getListDataTaxonomiesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListDataTaxonomies")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DataTaxonomyServiceMethodDescriptorSupplier("ListDataTaxonomies")) + .build(); + } + } + } + return getListDataTaxonomiesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.GetDataTaxonomyRequest, + com.google.cloud.dataplex.v1.DataTaxonomy> + getGetDataTaxonomyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetDataTaxonomy", + requestType = com.google.cloud.dataplex.v1.GetDataTaxonomyRequest.class, + responseType = com.google.cloud.dataplex.v1.DataTaxonomy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.GetDataTaxonomyRequest, + com.google.cloud.dataplex.v1.DataTaxonomy> + getGetDataTaxonomyMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.GetDataTaxonomyRequest, + com.google.cloud.dataplex.v1.DataTaxonomy> + getGetDataTaxonomyMethod; + if ((getGetDataTaxonomyMethod = DataTaxonomyServiceGrpc.getGetDataTaxonomyMethod) == null) { + synchronized (DataTaxonomyServiceGrpc.class) { + if ((getGetDataTaxonomyMethod = DataTaxonomyServiceGrpc.getGetDataTaxonomyMethod) == null) { + DataTaxonomyServiceGrpc.getGetDataTaxonomyMethod = + getGetDataTaxonomyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDataTaxonomy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dataplex.v1.GetDataTaxonomyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dataplex.v1.DataTaxonomy.getDefaultInstance())) + .setSchemaDescriptor( + new DataTaxonomyServiceMethodDescriptorSupplier("GetDataTaxonomy")) + .build(); + } + } + } + return getGetDataTaxonomyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest, + com.google.longrunning.Operation> + getCreateDataAttributeBindingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateDataAttributeBinding", + requestType = com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest, + com.google.longrunning.Operation> + getCreateDataAttributeBindingMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest, + com.google.longrunning.Operation> + getCreateDataAttributeBindingMethod; + if ((getCreateDataAttributeBindingMethod = + DataTaxonomyServiceGrpc.getCreateDataAttributeBindingMethod) + == null) { + synchronized (DataTaxonomyServiceGrpc.class) { + if ((getCreateDataAttributeBindingMethod = + DataTaxonomyServiceGrpc.getCreateDataAttributeBindingMethod) + == null) { + DataTaxonomyServiceGrpc.getCreateDataAttributeBindingMethod = + getCreateDataAttributeBindingMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateDataAttributeBinding")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataTaxonomyServiceMethodDescriptorSupplier( + "CreateDataAttributeBinding")) + .build(); + } + } + } + return getCreateDataAttributeBindingMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest, + com.google.longrunning.Operation> + getUpdateDataAttributeBindingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateDataAttributeBinding", + requestType = com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest, + com.google.longrunning.Operation> + getUpdateDataAttributeBindingMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest, + com.google.longrunning.Operation> + getUpdateDataAttributeBindingMethod; + if ((getUpdateDataAttributeBindingMethod = + DataTaxonomyServiceGrpc.getUpdateDataAttributeBindingMethod) + == null) { + synchronized (DataTaxonomyServiceGrpc.class) { + if ((getUpdateDataAttributeBindingMethod = + DataTaxonomyServiceGrpc.getUpdateDataAttributeBindingMethod) + == null) { + DataTaxonomyServiceGrpc.getUpdateDataAttributeBindingMethod = + getUpdateDataAttributeBindingMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateDataAttributeBinding")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataTaxonomyServiceMethodDescriptorSupplier( + "UpdateDataAttributeBinding")) + .build(); + } + } + } + return getUpdateDataAttributeBindingMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest, + com.google.longrunning.Operation> + getDeleteDataAttributeBindingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteDataAttributeBinding", + requestType = com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest, + com.google.longrunning.Operation> + getDeleteDataAttributeBindingMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest, + com.google.longrunning.Operation> + getDeleteDataAttributeBindingMethod; + if ((getDeleteDataAttributeBindingMethod = + DataTaxonomyServiceGrpc.getDeleteDataAttributeBindingMethod) + == null) { + synchronized (DataTaxonomyServiceGrpc.class) { + if ((getDeleteDataAttributeBindingMethod = + DataTaxonomyServiceGrpc.getDeleteDataAttributeBindingMethod) + == null) { + DataTaxonomyServiceGrpc.getDeleteDataAttributeBindingMethod = + getDeleteDataAttributeBindingMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteDataAttributeBinding")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataTaxonomyServiceMethodDescriptorSupplier( + "DeleteDataAttributeBinding")) + .build(); + } + } + } + return getDeleteDataAttributeBindingMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest, + com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse> + getListDataAttributeBindingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListDataAttributeBindings", + requestType = com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest.class, + responseType = com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest, + com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse> + getListDataAttributeBindingsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest, + com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse> + getListDataAttributeBindingsMethod; + if ((getListDataAttributeBindingsMethod = + DataTaxonomyServiceGrpc.getListDataAttributeBindingsMethod) + == null) { + synchronized (DataTaxonomyServiceGrpc.class) { + if ((getListDataAttributeBindingsMethod = + DataTaxonomyServiceGrpc.getListDataAttributeBindingsMethod) + == null) { + DataTaxonomyServiceGrpc.getListDataAttributeBindingsMethod = + getListDataAttributeBindingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListDataAttributeBindings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DataTaxonomyServiceMethodDescriptorSupplier( + "ListDataAttributeBindings")) + .build(); + } + } + } + return getListDataAttributeBindingsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest, + com.google.cloud.dataplex.v1.DataAttributeBinding> + getGetDataAttributeBindingMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetDataAttributeBinding", + requestType = com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest.class, + responseType = com.google.cloud.dataplex.v1.DataAttributeBinding.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest, + com.google.cloud.dataplex.v1.DataAttributeBinding> + getGetDataAttributeBindingMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest, + com.google.cloud.dataplex.v1.DataAttributeBinding> + getGetDataAttributeBindingMethod; + if ((getGetDataAttributeBindingMethod = + DataTaxonomyServiceGrpc.getGetDataAttributeBindingMethod) + == null) { + synchronized (DataTaxonomyServiceGrpc.class) { + if ((getGetDataAttributeBindingMethod = + DataTaxonomyServiceGrpc.getGetDataAttributeBindingMethod) + == null) { + DataTaxonomyServiceGrpc.getGetDataAttributeBindingMethod = + getGetDataAttributeBindingMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetDataAttributeBinding")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dataplex.v1.DataAttributeBinding + .getDefaultInstance())) + .setSchemaDescriptor( + new DataTaxonomyServiceMethodDescriptorSupplier( + "GetDataAttributeBinding")) + .build(); + } + } + } + return getGetDataAttributeBindingMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.CreateDataAttributeRequest, com.google.longrunning.Operation> + getCreateDataAttributeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateDataAttribute", + requestType = com.google.cloud.dataplex.v1.CreateDataAttributeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.CreateDataAttributeRequest, com.google.longrunning.Operation> + getCreateDataAttributeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.CreateDataAttributeRequest, + com.google.longrunning.Operation> + getCreateDataAttributeMethod; + if ((getCreateDataAttributeMethod = DataTaxonomyServiceGrpc.getCreateDataAttributeMethod) + == null) { + synchronized (DataTaxonomyServiceGrpc.class) { + if ((getCreateDataAttributeMethod = DataTaxonomyServiceGrpc.getCreateDataAttributeMethod) + == null) { + DataTaxonomyServiceGrpc.getCreateDataAttributeMethod = + getCreateDataAttributeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateDataAttribute")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dataplex.v1.CreateDataAttributeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataTaxonomyServiceMethodDescriptorSupplier("CreateDataAttribute")) + .build(); + } + } + } + return getCreateDataAttributeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.UpdateDataAttributeRequest, com.google.longrunning.Operation> + getUpdateDataAttributeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateDataAttribute", + requestType = com.google.cloud.dataplex.v1.UpdateDataAttributeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.UpdateDataAttributeRequest, com.google.longrunning.Operation> + getUpdateDataAttributeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.UpdateDataAttributeRequest, + com.google.longrunning.Operation> + getUpdateDataAttributeMethod; + if ((getUpdateDataAttributeMethod = DataTaxonomyServiceGrpc.getUpdateDataAttributeMethod) + == null) { + synchronized (DataTaxonomyServiceGrpc.class) { + if ((getUpdateDataAttributeMethod = DataTaxonomyServiceGrpc.getUpdateDataAttributeMethod) + == null) { + DataTaxonomyServiceGrpc.getUpdateDataAttributeMethod = + getUpdateDataAttributeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateDataAttribute")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dataplex.v1.UpdateDataAttributeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataTaxonomyServiceMethodDescriptorSupplier("UpdateDataAttribute")) + .build(); + } + } + } + return getUpdateDataAttributeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.DeleteDataAttributeRequest, com.google.longrunning.Operation> + getDeleteDataAttributeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteDataAttribute", + requestType = com.google.cloud.dataplex.v1.DeleteDataAttributeRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.DeleteDataAttributeRequest, com.google.longrunning.Operation> + getDeleteDataAttributeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.DeleteDataAttributeRequest, + com.google.longrunning.Operation> + getDeleteDataAttributeMethod; + if ((getDeleteDataAttributeMethod = DataTaxonomyServiceGrpc.getDeleteDataAttributeMethod) + == null) { + synchronized (DataTaxonomyServiceGrpc.class) { + if ((getDeleteDataAttributeMethod = DataTaxonomyServiceGrpc.getDeleteDataAttributeMethod) + == null) { + DataTaxonomyServiceGrpc.getDeleteDataAttributeMethod = + getDeleteDataAttributeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "DeleteDataAttribute")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dataplex.v1.DeleteDataAttributeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new DataTaxonomyServiceMethodDescriptorSupplier("DeleteDataAttribute")) + .build(); + } + } + } + return getDeleteDataAttributeMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.ListDataAttributesRequest, + com.google.cloud.dataplex.v1.ListDataAttributesResponse> + getListDataAttributesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListDataAttributes", + requestType = com.google.cloud.dataplex.v1.ListDataAttributesRequest.class, + responseType = com.google.cloud.dataplex.v1.ListDataAttributesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.ListDataAttributesRequest, + com.google.cloud.dataplex.v1.ListDataAttributesResponse> + getListDataAttributesMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.ListDataAttributesRequest, + com.google.cloud.dataplex.v1.ListDataAttributesResponse> + getListDataAttributesMethod; + if ((getListDataAttributesMethod = DataTaxonomyServiceGrpc.getListDataAttributesMethod) + == null) { + synchronized (DataTaxonomyServiceGrpc.class) { + if ((getListDataAttributesMethod = DataTaxonomyServiceGrpc.getListDataAttributesMethod) + == null) { + DataTaxonomyServiceGrpc.getListDataAttributesMethod = + getListDataAttributesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListDataAttributes")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dataplex.v1.ListDataAttributesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dataplex.v1.ListDataAttributesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new DataTaxonomyServiceMethodDescriptorSupplier("ListDataAttributes")) + .build(); + } + } + } + return getListDataAttributesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.GetDataAttributeRequest, + com.google.cloud.dataplex.v1.DataAttribute> + getGetDataAttributeMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetDataAttribute", + requestType = com.google.cloud.dataplex.v1.GetDataAttributeRequest.class, + responseType = com.google.cloud.dataplex.v1.DataAttribute.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.GetDataAttributeRequest, + com.google.cloud.dataplex.v1.DataAttribute> + getGetDataAttributeMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.dataplex.v1.GetDataAttributeRequest, + com.google.cloud.dataplex.v1.DataAttribute> + getGetDataAttributeMethod; + if ((getGetDataAttributeMethod = DataTaxonomyServiceGrpc.getGetDataAttributeMethod) == null) { + synchronized (DataTaxonomyServiceGrpc.class) { + if ((getGetDataAttributeMethod = DataTaxonomyServiceGrpc.getGetDataAttributeMethod) + == null) { + DataTaxonomyServiceGrpc.getGetDataAttributeMethod = + getGetDataAttributeMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetDataAttribute")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dataplex.v1.GetDataAttributeRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.dataplex.v1.DataAttribute.getDefaultInstance())) + .setSchemaDescriptor( + new DataTaxonomyServiceMethodDescriptorSupplier("GetDataAttribute")) + .build(); + } + } + } + return getGetDataAttributeMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static DataTaxonomyServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataTaxonomyServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataTaxonomyServiceStub(channel, callOptions); + } + }; + return DataTaxonomyServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static DataTaxonomyServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataTaxonomyServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataTaxonomyServiceBlockingStub(channel, callOptions); + } + }; + return DataTaxonomyServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static DataTaxonomyServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public DataTaxonomyServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataTaxonomyServiceFutureStub(channel, callOptions); + } + }; + return DataTaxonomyServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * DataTaxonomyService enables attribute-based governance. The resources
+   * currently offered include DataTaxonomy and DataAttribute.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Create a DataTaxonomy resource.
+     * 
+ */ + default void createDataTaxonomy( + com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateDataTaxonomyMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a DataTaxonomy resource.
+     * 
+ */ + default void updateDataTaxonomy( + com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateDataTaxonomyMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy
+     * must be deleted before the DataTaxonomy can be deleted.
+     * 
+ */ + default void deleteDataTaxonomy( + com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteDataTaxonomyMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists DataTaxonomy resources in a project and location.
+     * 
+ */ + default void listDataTaxonomies( + com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListDataTaxonomiesMethod(), responseObserver); + } + + /** + * + * + *
+     * Retrieves a DataTaxonomy resource.
+     * 
+ */ + default void getDataTaxonomy( + com.google.cloud.dataplex.v1.GetDataTaxonomyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetDataTaxonomyMethod(), responseObserver); + } + + /** + * + * + *
+     * Create a DataAttributeBinding resource.
+     * 
+ */ + default void createDataAttributeBinding( + com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateDataAttributeBindingMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a DataAttributeBinding resource.
+     * 
+ */ + default void updateDataAttributeBinding( + com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateDataAttributeBindingMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a DataAttributeBinding resource. All attributes within the
+     * DataAttributeBinding must be deleted before the DataAttributeBinding can be
+     * deleted.
+     * 
+ */ + default void deleteDataAttributeBinding( + com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteDataAttributeBindingMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists DataAttributeBinding resources in a project and location.
+     * 
+ */ + default void listDataAttributeBindings( + com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListDataAttributeBindingsMethod(), responseObserver); + } + + /** + * + * + *
+     * Retrieves a DataAttributeBinding resource.
+     * 
+ */ + default void getDataAttributeBinding( + com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetDataAttributeBindingMethod(), responseObserver); + } + + /** + * + * + *
+     * Create a DataAttribute resource.
+     * 
+ */ + default void createDataAttribute( + com.google.cloud.dataplex.v1.CreateDataAttributeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateDataAttributeMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a DataAttribute resource.
+     * 
+ */ + default void updateDataAttribute( + com.google.cloud.dataplex.v1.UpdateDataAttributeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateDataAttributeMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a Data Attribute resource.
+     * 
+ */ + default void deleteDataAttribute( + com.google.cloud.dataplex.v1.DeleteDataAttributeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteDataAttributeMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists Data Attribute resources in a DataTaxonomy.
+     * 
+ */ + default void listDataAttributes( + com.google.cloud.dataplex.v1.ListDataAttributesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListDataAttributesMethod(), responseObserver); + } + + /** + * + * + *
+     * Retrieves a Data Attribute resource.
+     * 
+ */ + default void getDataAttribute( + com.google.cloud.dataplex.v1.GetDataAttributeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetDataAttributeMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service DataTaxonomyService. + * + *
+   * DataTaxonomyService enables attribute-based governance. The resources
+   * currently offered include DataTaxonomy and DataAttribute.
+   * 
+ */ + public abstract static class DataTaxonomyServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return DataTaxonomyServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service DataTaxonomyService. + * + *
+   * DataTaxonomyService enables attribute-based governance. The resources
+   * currently offered include DataTaxonomy and DataAttribute.
+   * 
+ */ + public static final class DataTaxonomyServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private DataTaxonomyServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataTaxonomyServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataTaxonomyServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Create a DataTaxonomy resource.
+     * 
+ */ + public void createDataTaxonomy( + com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateDataTaxonomyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a DataTaxonomy resource.
+     * 
+ */ + public void updateDataTaxonomy( + com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateDataTaxonomyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy
+     * must be deleted before the DataTaxonomy can be deleted.
+     * 
+ */ + public void deleteDataTaxonomy( + com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteDataTaxonomyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists DataTaxonomy resources in a project and location.
+     * 
+ */ + public void listDataTaxonomies( + com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListDataTaxonomiesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Retrieves a DataTaxonomy resource.
+     * 
+ */ + public void getDataTaxonomy( + com.google.cloud.dataplex.v1.GetDataTaxonomyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetDataTaxonomyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Create a DataAttributeBinding resource.
+     * 
+ */ + public void createDataAttributeBinding( + com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateDataAttributeBindingMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a DataAttributeBinding resource.
+     * 
+ */ + public void updateDataAttributeBinding( + com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateDataAttributeBindingMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a DataAttributeBinding resource. All attributes within the
+     * DataAttributeBinding must be deleted before the DataAttributeBinding can be
+     * deleted.
+     * 
+ */ + public void deleteDataAttributeBinding( + com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteDataAttributeBindingMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists DataAttributeBinding resources in a project and location.
+     * 
+ */ + public void listDataAttributeBindings( + com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListDataAttributeBindingsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Retrieves a DataAttributeBinding resource.
+     * 
+ */ + public void getDataAttributeBinding( + com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetDataAttributeBindingMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Create a DataAttribute resource.
+     * 
+ */ + public void createDataAttribute( + com.google.cloud.dataplex.v1.CreateDataAttributeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateDataAttributeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a DataAttribute resource.
+     * 
+ */ + public void updateDataAttribute( + com.google.cloud.dataplex.v1.UpdateDataAttributeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateDataAttributeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a Data Attribute resource.
+     * 
+ */ + public void deleteDataAttribute( + com.google.cloud.dataplex.v1.DeleteDataAttributeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteDataAttributeMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists Data Attribute resources in a DataTaxonomy.
+     * 
+ */ + public void listDataAttributes( + com.google.cloud.dataplex.v1.ListDataAttributesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListDataAttributesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Retrieves a Data Attribute resource.
+     * 
+ */ + public void getDataAttribute( + com.google.cloud.dataplex.v1.GetDataAttributeRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetDataAttributeMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service DataTaxonomyService. + * + *
+   * DataTaxonomyService enables attribute-based governance. The resources
+   * currently offered include DataTaxonomy and DataAttribute.
+   * 
+ */ + public static final class DataTaxonomyServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private DataTaxonomyServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataTaxonomyServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataTaxonomyServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Create a DataTaxonomy resource.
+     * 
+ */ + public com.google.longrunning.Operation createDataTaxonomy( + com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateDataTaxonomyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a DataTaxonomy resource.
+     * 
+ */ + public com.google.longrunning.Operation updateDataTaxonomy( + com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateDataTaxonomyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy
+     * must be deleted before the DataTaxonomy can be deleted.
+     * 
+ */ + public com.google.longrunning.Operation deleteDataTaxonomy( + com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteDataTaxonomyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists DataTaxonomy resources in a project and location.
+     * 
+ */ + public com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse listDataTaxonomies( + com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListDataTaxonomiesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieves a DataTaxonomy resource.
+     * 
+ */ + public com.google.cloud.dataplex.v1.DataTaxonomy getDataTaxonomy( + com.google.cloud.dataplex.v1.GetDataTaxonomyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetDataTaxonomyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Create a DataAttributeBinding resource.
+     * 
+ */ + public com.google.longrunning.Operation createDataAttributeBinding( + com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateDataAttributeBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a DataAttributeBinding resource.
+     * 
+ */ + public com.google.longrunning.Operation updateDataAttributeBinding( + com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateDataAttributeBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a DataAttributeBinding resource. All attributes within the
+     * DataAttributeBinding must be deleted before the DataAttributeBinding can be
+     * deleted.
+     * 
+ */ + public com.google.longrunning.Operation deleteDataAttributeBinding( + com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteDataAttributeBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists DataAttributeBinding resources in a project and location.
+     * 
+ */ + public com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse listDataAttributeBindings( + com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListDataAttributeBindingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieves a DataAttributeBinding resource.
+     * 
+ */ + public com.google.cloud.dataplex.v1.DataAttributeBinding getDataAttributeBinding( + com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetDataAttributeBindingMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Create a DataAttribute resource.
+     * 
+ */ + public com.google.longrunning.Operation createDataAttribute( + com.google.cloud.dataplex.v1.CreateDataAttributeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateDataAttributeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a DataAttribute resource.
+     * 
+ */ + public com.google.longrunning.Operation updateDataAttribute( + com.google.cloud.dataplex.v1.UpdateDataAttributeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateDataAttributeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a Data Attribute resource.
+     * 
+ */ + public com.google.longrunning.Operation deleteDataAttribute( + com.google.cloud.dataplex.v1.DeleteDataAttributeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteDataAttributeMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists Data Attribute resources in a DataTaxonomy.
+     * 
+ */ + public com.google.cloud.dataplex.v1.ListDataAttributesResponse listDataAttributes( + com.google.cloud.dataplex.v1.ListDataAttributesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListDataAttributesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Retrieves a Data Attribute resource.
+     * 
+ */ + public com.google.cloud.dataplex.v1.DataAttribute getDataAttribute( + com.google.cloud.dataplex.v1.GetDataAttributeRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetDataAttributeMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service DataTaxonomyService. + * + *
+   * DataTaxonomyService enables attribute-based governance. The resources
+   * currently offered include DataTaxonomy and DataAttribute.
+   * 
+ */ + public static final class DataTaxonomyServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private DataTaxonomyServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected DataTaxonomyServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new DataTaxonomyServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Create a DataTaxonomy resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createDataTaxonomy(com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateDataTaxonomyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a DataTaxonomy resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateDataTaxonomy(com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateDataTaxonomyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy
+     * must be deleted before the DataTaxonomy can be deleted.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteDataTaxonomy(com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteDataTaxonomyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists DataTaxonomy resources in a project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse> + listDataTaxonomies(com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListDataTaxonomiesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Retrieves a DataTaxonomy resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dataplex.v1.DataTaxonomy> + getDataTaxonomy(com.google.cloud.dataplex.v1.GetDataTaxonomyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetDataTaxonomyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Create a DataAttributeBinding resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createDataAttributeBinding( + com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateDataAttributeBindingMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a DataAttributeBinding resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateDataAttributeBinding( + com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateDataAttributeBindingMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a DataAttributeBinding resource. All attributes within the
+     * DataAttributeBinding must be deleted before the DataAttributeBinding can be
+     * deleted.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteDataAttributeBinding( + com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteDataAttributeBindingMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists DataAttributeBinding resources in a project and location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse> + listDataAttributeBindings( + com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListDataAttributeBindingsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Retrieves a DataAttributeBinding resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dataplex.v1.DataAttributeBinding> + getDataAttributeBinding( + com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetDataAttributeBindingMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Create a DataAttribute resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createDataAttribute(com.google.cloud.dataplex.v1.CreateDataAttributeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateDataAttributeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a DataAttribute resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateDataAttribute(com.google.cloud.dataplex.v1.UpdateDataAttributeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateDataAttributeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a Data Attribute resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteDataAttribute(com.google.cloud.dataplex.v1.DeleteDataAttributeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteDataAttributeMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists Data Attribute resources in a DataTaxonomy.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dataplex.v1.ListDataAttributesResponse> + listDataAttributes(com.google.cloud.dataplex.v1.ListDataAttributesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListDataAttributesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Retrieves a Data Attribute resource.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.dataplex.v1.DataAttribute> + getDataAttribute(com.google.cloud.dataplex.v1.GetDataAttributeRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetDataAttributeMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_DATA_TAXONOMY = 0; + private static final int METHODID_UPDATE_DATA_TAXONOMY = 1; + private static final int METHODID_DELETE_DATA_TAXONOMY = 2; + private static final int METHODID_LIST_DATA_TAXONOMIES = 3; + private static final int METHODID_GET_DATA_TAXONOMY = 4; + private static final int METHODID_CREATE_DATA_ATTRIBUTE_BINDING = 5; + private static final int METHODID_UPDATE_DATA_ATTRIBUTE_BINDING = 6; + private static final int METHODID_DELETE_DATA_ATTRIBUTE_BINDING = 7; + private static final int METHODID_LIST_DATA_ATTRIBUTE_BINDINGS = 8; + private static final int METHODID_GET_DATA_ATTRIBUTE_BINDING = 9; + private static final int METHODID_CREATE_DATA_ATTRIBUTE = 10; + private static final int METHODID_UPDATE_DATA_ATTRIBUTE = 11; + private static final int METHODID_DELETE_DATA_ATTRIBUTE = 12; + private static final int METHODID_LIST_DATA_ATTRIBUTES = 13; + private static final int METHODID_GET_DATA_ATTRIBUTE = 14; + + 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 AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService 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_DATA_TAXONOMY: + serviceImpl.createDataTaxonomy( + (com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_DATA_TAXONOMY: + serviceImpl.updateDataTaxonomy( + (com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_DATA_TAXONOMY: + serviceImpl.deleteDataTaxonomy( + (com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_DATA_TAXONOMIES: + serviceImpl.listDataTaxonomies( + (com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_DATA_TAXONOMY: + serviceImpl.getDataTaxonomy( + (com.google.cloud.dataplex.v1.GetDataTaxonomyRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_DATA_ATTRIBUTE_BINDING: + serviceImpl.createDataAttributeBinding( + (com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_DATA_ATTRIBUTE_BINDING: + serviceImpl.updateDataAttributeBinding( + (com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_DATA_ATTRIBUTE_BINDING: + serviceImpl.deleteDataAttributeBinding( + (com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_DATA_ATTRIBUTE_BINDINGS: + serviceImpl.listDataAttributeBindings( + (com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse>) + responseObserver); + break; + case METHODID_GET_DATA_ATTRIBUTE_BINDING: + serviceImpl.getDataAttributeBinding( + (com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_DATA_ATTRIBUTE: + serviceImpl.createDataAttribute( + (com.google.cloud.dataplex.v1.CreateDataAttributeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_DATA_ATTRIBUTE: + serviceImpl.updateDataAttribute( + (com.google.cloud.dataplex.v1.UpdateDataAttributeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_DATA_ATTRIBUTE: + serviceImpl.deleteDataAttribute( + (com.google.cloud.dataplex.v1.DeleteDataAttributeRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_DATA_ATTRIBUTES: + serviceImpl.listDataAttributes( + (com.google.cloud.dataplex.v1.ListDataAttributesRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_DATA_ATTRIBUTE: + serviceImpl.getDataAttribute( + (com.google.cloud.dataplex.v1.GetDataAttributeRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateDataTaxonomyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_DATA_TAXONOMY))) + .addMethod( + getUpdateDataTaxonomyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_DATA_TAXONOMY))) + .addMethod( + getDeleteDataTaxonomyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_DATA_TAXONOMY))) + .addMethod( + getListDataTaxonomiesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest, + com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse>( + service, METHODID_LIST_DATA_TAXONOMIES))) + .addMethod( + getGetDataTaxonomyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dataplex.v1.GetDataTaxonomyRequest, + com.google.cloud.dataplex.v1.DataTaxonomy>( + service, METHODID_GET_DATA_TAXONOMY))) + .addMethod( + getCreateDataAttributeBindingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest, + com.google.longrunning.Operation>( + service, METHODID_CREATE_DATA_ATTRIBUTE_BINDING))) + .addMethod( + getUpdateDataAttributeBindingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest, + com.google.longrunning.Operation>( + service, METHODID_UPDATE_DATA_ATTRIBUTE_BINDING))) + .addMethod( + getDeleteDataAttributeBindingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest, + com.google.longrunning.Operation>( + service, METHODID_DELETE_DATA_ATTRIBUTE_BINDING))) + .addMethod( + getListDataAttributeBindingsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest, + com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse>( + service, METHODID_LIST_DATA_ATTRIBUTE_BINDINGS))) + .addMethod( + getGetDataAttributeBindingMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest, + com.google.cloud.dataplex.v1.DataAttributeBinding>( + service, METHODID_GET_DATA_ATTRIBUTE_BINDING))) + .addMethod( + getCreateDataAttributeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dataplex.v1.CreateDataAttributeRequest, + com.google.longrunning.Operation>(service, METHODID_CREATE_DATA_ATTRIBUTE))) + .addMethod( + getUpdateDataAttributeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dataplex.v1.UpdateDataAttributeRequest, + com.google.longrunning.Operation>(service, METHODID_UPDATE_DATA_ATTRIBUTE))) + .addMethod( + getDeleteDataAttributeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dataplex.v1.DeleteDataAttributeRequest, + com.google.longrunning.Operation>(service, METHODID_DELETE_DATA_ATTRIBUTE))) + .addMethod( + getListDataAttributesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dataplex.v1.ListDataAttributesRequest, + com.google.cloud.dataplex.v1.ListDataAttributesResponse>( + service, METHODID_LIST_DATA_ATTRIBUTES))) + .addMethod( + getGetDataAttributeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.dataplex.v1.GetDataAttributeRequest, + com.google.cloud.dataplex.v1.DataAttribute>( + service, METHODID_GET_DATA_ATTRIBUTE))) + .build(); + } + + private abstract static class DataTaxonomyServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + DataTaxonomyServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("DataTaxonomyService"); + } + } + + private static final class DataTaxonomyServiceFileDescriptorSupplier + extends DataTaxonomyServiceBaseDescriptorSupplier { + DataTaxonomyServiceFileDescriptorSupplier() {} + } + + private static final class DataTaxonomyServiceMethodDescriptorSupplier + extends DataTaxonomyServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + DataTaxonomyServiceMethodDescriptorSupplier(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 (DataTaxonomyServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new DataTaxonomyServiceFileDescriptorSupplier()) + .addMethod(getCreateDataTaxonomyMethod()) + .addMethod(getUpdateDataTaxonomyMethod()) + .addMethod(getDeleteDataTaxonomyMethod()) + .addMethod(getListDataTaxonomiesMethod()) + .addMethod(getGetDataTaxonomyMethod()) + .addMethod(getCreateDataAttributeBindingMethod()) + .addMethod(getUpdateDataAttributeBindingMethod()) + .addMethod(getDeleteDataAttributeBindingMethod()) + .addMethod(getListDataAttributeBindingsMethod()) + .addMethod(getGetDataAttributeBindingMethod()) + .addMethod(getCreateDataAttributeMethod()) + .addMethod(getUpdateDataAttributeMethod()) + .addMethod(getDeleteDataAttributeMethod()) + .addMethod(getListDataAttributesMethod()) + .addMethod(getGetDataAttributeMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateDataAttributeBindingRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateDataAttributeBindingRequest.java new file mode 100644 index 000000000000..14863bea8167 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateDataAttributeBindingRequest.java @@ -0,0 +1,1267 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +/** + * + * + *
+ * Create DataAttributeBinding request.
+ * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.CreateDataAttributeBindingRequest} + */ +public final class CreateDataAttributeBindingRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.CreateDataAttributeBindingRequest) + CreateDataAttributeBindingRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateDataAttributeBindingRequest.newBuilder() to construct. + private CreateDataAttributeBindingRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateDataAttributeBindingRequest() { + parent_ = ""; + dataAttributeBindingId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateDataAttributeBindingRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_CreateDataAttributeBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_CreateDataAttributeBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest.class, + com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the parent data taxonomy
+   * projects/{project_number}/locations/{location_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the parent data taxonomy
+   * projects/{project_number}/locations/{location_id}
+   * 
+ * + * + * 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 DATA_ATTRIBUTE_BINDING_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataAttributeBindingId_ = ""; + /** + * + * + *
+   * Required. DataAttributeBinding identifier.
+   * * Must contain only lowercase letters, numbers and hyphens.
+   * * Must start with a letter.
+   * * Must be between 1-63 characters.
+   * * Must end with a number or a letter.
+   * * Must be unique within the Location.
+   * 
+ * + * string data_attribute_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The dataAttributeBindingId. + */ + @java.lang.Override + public java.lang.String getDataAttributeBindingId() { + java.lang.Object ref = dataAttributeBindingId_; + 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(); + dataAttributeBindingId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. DataAttributeBinding identifier.
+   * * Must contain only lowercase letters, numbers and hyphens.
+   * * Must start with a letter.
+   * * Must be between 1-63 characters.
+   * * Must end with a number or a letter.
+   * * Must be unique within the Location.
+   * 
+ * + * string data_attribute_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for dataAttributeBindingId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataAttributeBindingIdBytes() { + java.lang.Object ref = dataAttributeBindingId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataAttributeBindingId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_ATTRIBUTE_BINDING_FIELD_NUMBER = 3; + private com.google.cloud.dataplex.v1.DataAttributeBinding dataAttributeBinding_; + /** + * + * + *
+   * Required. DataAttributeBinding resource.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataAttributeBinding field is set. + */ + @java.lang.Override + public boolean hasDataAttributeBinding() { + return dataAttributeBinding_ != null; + } + /** + * + * + *
+   * Required. DataAttributeBinding resource.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataAttributeBinding. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataAttributeBinding getDataAttributeBinding() { + return dataAttributeBinding_ == null + ? com.google.cloud.dataplex.v1.DataAttributeBinding.getDefaultInstance() + : dataAttributeBinding_; + } + /** + * + * + *
+   * Required. DataAttributeBinding resource.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataAttributeBindingOrBuilder + getDataAttributeBindingOrBuilder() { + return dataAttributeBinding_ == null + ? com.google.cloud.dataplex.v1.DataAttributeBinding.getDefaultInstance() + : dataAttributeBinding_; + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 4; + private boolean validateOnly_ = false; + /** + * + * + *
+   * Optional. Only validate the request, but do not perform mutations.
+   * The default is false.
+   * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataAttributeBindingId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dataAttributeBindingId_); + } + if (dataAttributeBinding_ != null) { + output.writeMessage(3, getDataAttributeBinding()); + } + if (validateOnly_ != false) { + output.writeBool(4, validateOnly_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataAttributeBindingId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dataAttributeBindingId_); + } + if (dataAttributeBinding_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDataAttributeBinding()); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, validateOnly_); + } + 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.dataplex.v1.CreateDataAttributeBindingRequest)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest other = + (com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getDataAttributeBindingId().equals(other.getDataAttributeBindingId())) return false; + if (hasDataAttributeBinding() != other.hasDataAttributeBinding()) return false; + if (hasDataAttributeBinding()) { + if (!getDataAttributeBinding().equals(other.getDataAttributeBinding())) return false; + } + if (getValidateOnly() != other.getValidateOnly()) 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) + DATA_ATTRIBUTE_BINDING_ID_FIELD_NUMBER; + hash = (53 * hash) + getDataAttributeBindingId().hashCode(); + if (hasDataAttributeBinding()) { + hash = (37 * hash) + DATA_ATTRIBUTE_BINDING_FIELD_NUMBER; + hash = (53 * hash) + getDataAttributeBinding().hashCode(); + } + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest 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.dataplex.v1.CreateDataAttributeBindingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest 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.dataplex.v1.CreateDataAttributeBindingRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest 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.dataplex.v1.CreateDataAttributeBindingRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest 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.dataplex.v1.CreateDataAttributeBindingRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest 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.dataplex.v1.CreateDataAttributeBindingRequest 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; + } + /** + * + * + *
+   * Create DataAttributeBinding request.
+   * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.CreateDataAttributeBindingRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.CreateDataAttributeBindingRequest) + com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_CreateDataAttributeBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_CreateDataAttributeBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest.class, + com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest.Builder.class); + } + + // Construct using com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + dataAttributeBindingId_ = ""; + dataAttributeBinding_ = null; + if (dataAttributeBindingBuilder_ != null) { + dataAttributeBindingBuilder_.dispose(); + dataAttributeBindingBuilder_ = null; + } + validateOnly_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_CreateDataAttributeBindingRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest + getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest build() { + com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest buildPartial() { + com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest result = + new com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dataAttributeBindingId_ = dataAttributeBindingId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.dataAttributeBinding_ = + dataAttributeBindingBuilder_ == null + ? dataAttributeBinding_ + : dataAttributeBindingBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.validateOnly_ = validateOnly_; + } + } + + @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.dataplex.v1.CreateDataAttributeBindingRequest) { + return mergeFrom((com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest other) { + if (other + == com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDataAttributeBindingId().isEmpty()) { + dataAttributeBindingId_ = other.dataAttributeBindingId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasDataAttributeBinding()) { + mergeDataAttributeBinding(other.getDataAttributeBinding()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + 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(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + dataAttributeBindingId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage( + getDataAttributeBindingFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + 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 resource name of the parent data taxonomy
+     * projects/{project_number}/locations/{location_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the parent data taxonomy
+     * projects/{project_number}/locations/{location_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the parent data taxonomy
+     * projects/{project_number}/locations/{location_id}
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the parent data taxonomy
+     * projects/{project_number}/locations/{location_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the parent data taxonomy
+     * projects/{project_number}/locations/{location_id}
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object dataAttributeBindingId_ = ""; + /** + * + * + *
+     * Required. DataAttributeBinding identifier.
+     * * Must contain only lowercase letters, numbers and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-63 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the Location.
+     * 
+ * + * string data_attribute_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The dataAttributeBindingId. + */ + public java.lang.String getDataAttributeBindingId() { + java.lang.Object ref = dataAttributeBindingId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataAttributeBindingId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. DataAttributeBinding identifier.
+     * * Must contain only lowercase letters, numbers and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-63 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the Location.
+     * 
+ * + * string data_attribute_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for dataAttributeBindingId. + */ + public com.google.protobuf.ByteString getDataAttributeBindingIdBytes() { + java.lang.Object ref = dataAttributeBindingId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataAttributeBindingId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. DataAttributeBinding identifier.
+     * * Must contain only lowercase letters, numbers and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-63 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the Location.
+     * 
+ * + * string data_attribute_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The dataAttributeBindingId to set. + * @return This builder for chaining. + */ + public Builder setDataAttributeBindingId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataAttributeBindingId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. DataAttributeBinding identifier.
+     * * Must contain only lowercase letters, numbers and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-63 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the Location.
+     * 
+ * + * string data_attribute_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDataAttributeBindingId() { + dataAttributeBindingId_ = getDefaultInstance().getDataAttributeBindingId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. DataAttributeBinding identifier.
+     * * Must contain only lowercase letters, numbers and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-63 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the Location.
+     * 
+ * + * string data_attribute_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for dataAttributeBindingId to set. + * @return This builder for chaining. + */ + public Builder setDataAttributeBindingIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataAttributeBindingId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.dataplex.v1.DataAttributeBinding dataAttributeBinding_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataAttributeBinding, + com.google.cloud.dataplex.v1.DataAttributeBinding.Builder, + com.google.cloud.dataplex.v1.DataAttributeBindingOrBuilder> + dataAttributeBindingBuilder_; + /** + * + * + *
+     * Required. DataAttributeBinding resource.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataAttributeBinding field is set. + */ + public boolean hasDataAttributeBinding() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. DataAttributeBinding resource.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataAttributeBinding. + */ + public com.google.cloud.dataplex.v1.DataAttributeBinding getDataAttributeBinding() { + if (dataAttributeBindingBuilder_ == null) { + return dataAttributeBinding_ == null + ? com.google.cloud.dataplex.v1.DataAttributeBinding.getDefaultInstance() + : dataAttributeBinding_; + } else { + return dataAttributeBindingBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. DataAttributeBinding resource.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataAttributeBinding( + com.google.cloud.dataplex.v1.DataAttributeBinding value) { + if (dataAttributeBindingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataAttributeBinding_ = value; + } else { + dataAttributeBindingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. DataAttributeBinding resource.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataAttributeBinding( + com.google.cloud.dataplex.v1.DataAttributeBinding.Builder builderForValue) { + if (dataAttributeBindingBuilder_ == null) { + dataAttributeBinding_ = builderForValue.build(); + } else { + dataAttributeBindingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. DataAttributeBinding resource.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDataAttributeBinding( + com.google.cloud.dataplex.v1.DataAttributeBinding value) { + if (dataAttributeBindingBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && dataAttributeBinding_ != null + && dataAttributeBinding_ + != com.google.cloud.dataplex.v1.DataAttributeBinding.getDefaultInstance()) { + getDataAttributeBindingBuilder().mergeFrom(value); + } else { + dataAttributeBinding_ = value; + } + } else { + dataAttributeBindingBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. DataAttributeBinding resource.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDataAttributeBinding() { + bitField0_ = (bitField0_ & ~0x00000004); + dataAttributeBinding_ = null; + if (dataAttributeBindingBuilder_ != null) { + dataAttributeBindingBuilder_.dispose(); + dataAttributeBindingBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. DataAttributeBinding resource.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dataplex.v1.DataAttributeBinding.Builder + getDataAttributeBindingBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getDataAttributeBindingFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. DataAttributeBinding resource.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dataplex.v1.DataAttributeBindingOrBuilder + getDataAttributeBindingOrBuilder() { + if (dataAttributeBindingBuilder_ != null) { + return dataAttributeBindingBuilder_.getMessageOrBuilder(); + } else { + return dataAttributeBinding_ == null + ? com.google.cloud.dataplex.v1.DataAttributeBinding.getDefaultInstance() + : dataAttributeBinding_; + } + } + /** + * + * + *
+     * Required. DataAttributeBinding resource.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataAttributeBinding, + com.google.cloud.dataplex.v1.DataAttributeBinding.Builder, + com.google.cloud.dataplex.v1.DataAttributeBindingOrBuilder> + getDataAttributeBindingFieldBuilder() { + if (dataAttributeBindingBuilder_ == null) { + dataAttributeBindingBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataAttributeBinding, + com.google.cloud.dataplex.v1.DataAttributeBinding.Builder, + com.google.cloud.dataplex.v1.DataAttributeBindingOrBuilder>( + getDataAttributeBinding(), getParentForChildren(), isClean()); + dataAttributeBinding_ = null; + } + return dataAttributeBindingBuilder_; + } + + private boolean validateOnly_; + /** + * + * + *
+     * Optional. Only validate the request, but do not perform mutations.
+     * The default is false.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * Optional. Only validate the request, but do not perform mutations.
+     * The default is false.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Only validate the request, but do not perform mutations.
+     * The default is false.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000008); + validateOnly_ = 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.dataplex.v1.CreateDataAttributeBindingRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.CreateDataAttributeBindingRequest) + private static final com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest(); + } + + public static com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateDataAttributeBindingRequest 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.dataplex.v1.CreateDataAttributeBindingRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateDataAttributeBindingRequestOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateDataAttributeBindingRequestOrBuilder.java new file mode 100644 index 000000000000..f5206fa9a1f1 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateDataAttributeBindingRequestOrBuilder.java @@ -0,0 +1,146 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +public interface CreateDataAttributeBindingRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.CreateDataAttributeBindingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the parent data taxonomy
+   * projects/{project_number}/locations/{location_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the parent data taxonomy
+   * projects/{project_number}/locations/{location_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. DataAttributeBinding identifier.
+   * * Must contain only lowercase letters, numbers and hyphens.
+   * * Must start with a letter.
+   * * Must be between 1-63 characters.
+   * * Must end with a number or a letter.
+   * * Must be unique within the Location.
+   * 
+ * + * string data_attribute_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The dataAttributeBindingId. + */ + java.lang.String getDataAttributeBindingId(); + /** + * + * + *
+   * Required. DataAttributeBinding identifier.
+   * * Must contain only lowercase letters, numbers and hyphens.
+   * * Must start with a letter.
+   * * Must be between 1-63 characters.
+   * * Must end with a number or a letter.
+   * * Must be unique within the Location.
+   * 
+ * + * string data_attribute_binding_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for dataAttributeBindingId. + */ + com.google.protobuf.ByteString getDataAttributeBindingIdBytes(); + + /** + * + * + *
+   * Required. DataAttributeBinding resource.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataAttributeBinding field is set. + */ + boolean hasDataAttributeBinding(); + /** + * + * + *
+   * Required. DataAttributeBinding resource.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataAttributeBinding. + */ + com.google.cloud.dataplex.v1.DataAttributeBinding getDataAttributeBinding(); + /** + * + * + *
+   * Required. DataAttributeBinding resource.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dataplex.v1.DataAttributeBindingOrBuilder getDataAttributeBindingOrBuilder(); + + /** + * + * + *
+   * Optional. Only validate the request, but do not perform mutations.
+   * The default is false.
+   * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateDataAttributeRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateDataAttributeRequest.java new file mode 100644 index 000000000000..8920ff712ef4 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateDataAttributeRequest.java @@ -0,0 +1,1250 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +/** + * + * + *
+ * Create DataAttribute request.
+ * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.CreateDataAttributeRequest} + */ +public final class CreateDataAttributeRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.CreateDataAttributeRequest) + CreateDataAttributeRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateDataAttributeRequest.newBuilder() to construct. + private CreateDataAttributeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateDataAttributeRequest() { + parent_ = ""; + dataAttributeId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateDataAttributeRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_CreateDataAttributeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_CreateDataAttributeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.CreateDataAttributeRequest.class, + com.google.cloud.dataplex.v1.CreateDataAttributeRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the parent data taxonomy
+   * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the parent data taxonomy
+   * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+   * 
+ * + * + * 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 DATA_ATTRIBUTE_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataAttributeId_ = ""; + /** + * + * + *
+   * Required. DataAttribute identifier.
+   * * Must contain only lowercase letters, numbers and hyphens.
+   * * Must start with a letter.
+   * * Must be between 1-63 characters.
+   * * Must end with a number or a letter.
+   * * Must be unique within the DataTaxonomy.
+   * 
+ * + * string data_attribute_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The dataAttributeId. + */ + @java.lang.Override + public java.lang.String getDataAttributeId() { + java.lang.Object ref = dataAttributeId_; + 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(); + dataAttributeId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. DataAttribute identifier.
+   * * Must contain only lowercase letters, numbers and hyphens.
+   * * Must start with a letter.
+   * * Must be between 1-63 characters.
+   * * Must end with a number or a letter.
+   * * Must be unique within the DataTaxonomy.
+   * 
+ * + * string data_attribute_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for dataAttributeId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataAttributeIdBytes() { + java.lang.Object ref = dataAttributeId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataAttributeId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_ATTRIBUTE_FIELD_NUMBER = 3; + private com.google.cloud.dataplex.v1.DataAttribute dataAttribute_; + /** + * + * + *
+   * Required. DataAttribute resource.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataAttribute data_attribute = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataAttribute field is set. + */ + @java.lang.Override + public boolean hasDataAttribute() { + return dataAttribute_ != null; + } + /** + * + * + *
+   * Required. DataAttribute resource.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataAttribute data_attribute = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataAttribute. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataAttribute getDataAttribute() { + return dataAttribute_ == null + ? com.google.cloud.dataplex.v1.DataAttribute.getDefaultInstance() + : dataAttribute_; + } + /** + * + * + *
+   * Required. DataAttribute resource.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataAttribute data_attribute = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataAttributeOrBuilder getDataAttributeOrBuilder() { + return dataAttribute_ == null + ? com.google.cloud.dataplex.v1.DataAttribute.getDefaultInstance() + : dataAttribute_; + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 4; + private boolean validateOnly_ = false; + /** + * + * + *
+   * Optional. Only validate the request, but do not perform mutations.
+   * The default is false.
+   * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataAttributeId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dataAttributeId_); + } + if (dataAttribute_ != null) { + output.writeMessage(3, getDataAttribute()); + } + if (validateOnly_ != false) { + output.writeBool(4, validateOnly_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataAttributeId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dataAttributeId_); + } + if (dataAttribute_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDataAttribute()); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, validateOnly_); + } + 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.dataplex.v1.CreateDataAttributeRequest)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.CreateDataAttributeRequest other = + (com.google.cloud.dataplex.v1.CreateDataAttributeRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getDataAttributeId().equals(other.getDataAttributeId())) return false; + if (hasDataAttribute() != other.hasDataAttribute()) return false; + if (hasDataAttribute()) { + if (!getDataAttribute().equals(other.getDataAttribute())) return false; + } + if (getValidateOnly() != other.getValidateOnly()) 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) + DATA_ATTRIBUTE_ID_FIELD_NUMBER; + hash = (53 * hash) + getDataAttributeId().hashCode(); + if (hasDataAttribute()) { + hash = (37 * hash) + DATA_ATTRIBUTE_FIELD_NUMBER; + hash = (53 * hash) + getDataAttribute().hashCode(); + } + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.CreateDataAttributeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.CreateDataAttributeRequest 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.dataplex.v1.CreateDataAttributeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.CreateDataAttributeRequest 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.dataplex.v1.CreateDataAttributeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.CreateDataAttributeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.CreateDataAttributeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.CreateDataAttributeRequest 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.dataplex.v1.CreateDataAttributeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.CreateDataAttributeRequest 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.dataplex.v1.CreateDataAttributeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.CreateDataAttributeRequest 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.dataplex.v1.CreateDataAttributeRequest 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; + } + /** + * + * + *
+   * Create DataAttribute request.
+   * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.CreateDataAttributeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.CreateDataAttributeRequest) + com.google.cloud.dataplex.v1.CreateDataAttributeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_CreateDataAttributeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_CreateDataAttributeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.CreateDataAttributeRequest.class, + com.google.cloud.dataplex.v1.CreateDataAttributeRequest.Builder.class); + } + + // Construct using com.google.cloud.dataplex.v1.CreateDataAttributeRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + dataAttributeId_ = ""; + dataAttribute_ = null; + if (dataAttributeBuilder_ != null) { + dataAttributeBuilder_.dispose(); + dataAttributeBuilder_ = null; + } + validateOnly_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_CreateDataAttributeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.CreateDataAttributeRequest getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.CreateDataAttributeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.CreateDataAttributeRequest build() { + com.google.cloud.dataplex.v1.CreateDataAttributeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.CreateDataAttributeRequest buildPartial() { + com.google.cloud.dataplex.v1.CreateDataAttributeRequest result = + new com.google.cloud.dataplex.v1.CreateDataAttributeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dataplex.v1.CreateDataAttributeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dataAttributeId_ = dataAttributeId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.dataAttribute_ = + dataAttributeBuilder_ == null ? dataAttribute_ : dataAttributeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.validateOnly_ = validateOnly_; + } + } + + @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.dataplex.v1.CreateDataAttributeRequest) { + return mergeFrom((com.google.cloud.dataplex.v1.CreateDataAttributeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataplex.v1.CreateDataAttributeRequest other) { + if (other == com.google.cloud.dataplex.v1.CreateDataAttributeRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDataAttributeId().isEmpty()) { + dataAttributeId_ = other.dataAttributeId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasDataAttribute()) { + mergeDataAttribute(other.getDataAttribute()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + 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(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + dataAttributeId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getDataAttributeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + 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 resource name of the parent data taxonomy
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the parent data taxonomy
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the parent data taxonomy
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the parent data taxonomy
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the parent data taxonomy
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object dataAttributeId_ = ""; + /** + * + * + *
+     * Required. DataAttribute identifier.
+     * * Must contain only lowercase letters, numbers and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-63 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the DataTaxonomy.
+     * 
+ * + * string data_attribute_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The dataAttributeId. + */ + public java.lang.String getDataAttributeId() { + java.lang.Object ref = dataAttributeId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataAttributeId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. DataAttribute identifier.
+     * * Must contain only lowercase letters, numbers and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-63 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the DataTaxonomy.
+     * 
+ * + * string data_attribute_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for dataAttributeId. + */ + public com.google.protobuf.ByteString getDataAttributeIdBytes() { + java.lang.Object ref = dataAttributeId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataAttributeId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. DataAttribute identifier.
+     * * Must contain only lowercase letters, numbers and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-63 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the DataTaxonomy.
+     * 
+ * + * string data_attribute_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The dataAttributeId to set. + * @return This builder for chaining. + */ + public Builder setDataAttributeId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataAttributeId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. DataAttribute identifier.
+     * * Must contain only lowercase letters, numbers and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-63 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the DataTaxonomy.
+     * 
+ * + * string data_attribute_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDataAttributeId() { + dataAttributeId_ = getDefaultInstance().getDataAttributeId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. DataAttribute identifier.
+     * * Must contain only lowercase letters, numbers and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-63 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the DataTaxonomy.
+     * 
+ * + * string data_attribute_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for dataAttributeId to set. + * @return This builder for chaining. + */ + public Builder setDataAttributeIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataAttributeId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.dataplex.v1.DataAttribute dataAttribute_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataAttribute, + com.google.cloud.dataplex.v1.DataAttribute.Builder, + com.google.cloud.dataplex.v1.DataAttributeOrBuilder> + dataAttributeBuilder_; + /** + * + * + *
+     * Required. DataAttribute resource.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttribute data_attribute = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataAttribute field is set. + */ + public boolean hasDataAttribute() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. DataAttribute resource.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttribute data_attribute = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataAttribute. + */ + public com.google.cloud.dataplex.v1.DataAttribute getDataAttribute() { + if (dataAttributeBuilder_ == null) { + return dataAttribute_ == null + ? com.google.cloud.dataplex.v1.DataAttribute.getDefaultInstance() + : dataAttribute_; + } else { + return dataAttributeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. DataAttribute resource.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttribute data_attribute = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataAttribute(com.google.cloud.dataplex.v1.DataAttribute value) { + if (dataAttributeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataAttribute_ = value; + } else { + dataAttributeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. DataAttribute resource.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttribute data_attribute = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataAttribute( + com.google.cloud.dataplex.v1.DataAttribute.Builder builderForValue) { + if (dataAttributeBuilder_ == null) { + dataAttribute_ = builderForValue.build(); + } else { + dataAttributeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. DataAttribute resource.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttribute data_attribute = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDataAttribute(com.google.cloud.dataplex.v1.DataAttribute value) { + if (dataAttributeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && dataAttribute_ != null + && dataAttribute_ != com.google.cloud.dataplex.v1.DataAttribute.getDefaultInstance()) { + getDataAttributeBuilder().mergeFrom(value); + } else { + dataAttribute_ = value; + } + } else { + dataAttributeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. DataAttribute resource.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttribute data_attribute = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDataAttribute() { + bitField0_ = (bitField0_ & ~0x00000004); + dataAttribute_ = null; + if (dataAttributeBuilder_ != null) { + dataAttributeBuilder_.dispose(); + dataAttributeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. DataAttribute resource.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttribute data_attribute = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dataplex.v1.DataAttribute.Builder getDataAttributeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getDataAttributeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. DataAttribute resource.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttribute data_attribute = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dataplex.v1.DataAttributeOrBuilder getDataAttributeOrBuilder() { + if (dataAttributeBuilder_ != null) { + return dataAttributeBuilder_.getMessageOrBuilder(); + } else { + return dataAttribute_ == null + ? com.google.cloud.dataplex.v1.DataAttribute.getDefaultInstance() + : dataAttribute_; + } + } + /** + * + * + *
+     * Required. DataAttribute resource.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttribute data_attribute = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataAttribute, + com.google.cloud.dataplex.v1.DataAttribute.Builder, + com.google.cloud.dataplex.v1.DataAttributeOrBuilder> + getDataAttributeFieldBuilder() { + if (dataAttributeBuilder_ == null) { + dataAttributeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataAttribute, + com.google.cloud.dataplex.v1.DataAttribute.Builder, + com.google.cloud.dataplex.v1.DataAttributeOrBuilder>( + getDataAttribute(), getParentForChildren(), isClean()); + dataAttribute_ = null; + } + return dataAttributeBuilder_; + } + + private boolean validateOnly_; + /** + * + * + *
+     * Optional. Only validate the request, but do not perform mutations.
+     * The default is false.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * Optional. Only validate the request, but do not perform mutations.
+     * The default is false.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Only validate the request, but do not perform mutations.
+     * The default is false.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000008); + validateOnly_ = 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.dataplex.v1.CreateDataAttributeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.CreateDataAttributeRequest) + private static final com.google.cloud.dataplex.v1.CreateDataAttributeRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.CreateDataAttributeRequest(); + } + + public static com.google.cloud.dataplex.v1.CreateDataAttributeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateDataAttributeRequest 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.dataplex.v1.CreateDataAttributeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateDataAttributeRequestOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateDataAttributeRequestOrBuilder.java new file mode 100644 index 000000000000..62a24b85de5f --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateDataAttributeRequestOrBuilder.java @@ -0,0 +1,146 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +public interface CreateDataAttributeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.CreateDataAttributeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the parent data taxonomy
+   * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the parent data taxonomy
+   * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. DataAttribute identifier.
+   * * Must contain only lowercase letters, numbers and hyphens.
+   * * Must start with a letter.
+   * * Must be between 1-63 characters.
+   * * Must end with a number or a letter.
+   * * Must be unique within the DataTaxonomy.
+   * 
+ * + * string data_attribute_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The dataAttributeId. + */ + java.lang.String getDataAttributeId(); + /** + * + * + *
+   * Required. DataAttribute identifier.
+   * * Must contain only lowercase letters, numbers and hyphens.
+   * * Must start with a letter.
+   * * Must be between 1-63 characters.
+   * * Must end with a number or a letter.
+   * * Must be unique within the DataTaxonomy.
+   * 
+ * + * string data_attribute_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for dataAttributeId. + */ + com.google.protobuf.ByteString getDataAttributeIdBytes(); + + /** + * + * + *
+   * Required. DataAttribute resource.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataAttribute data_attribute = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataAttribute field is set. + */ + boolean hasDataAttribute(); + /** + * + * + *
+   * Required. DataAttribute resource.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataAttribute data_attribute = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataAttribute. + */ + com.google.cloud.dataplex.v1.DataAttribute getDataAttribute(); + /** + * + * + *
+   * Required. DataAttribute resource.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataAttribute data_attribute = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dataplex.v1.DataAttributeOrBuilder getDataAttributeOrBuilder(); + + /** + * + * + *
+   * Optional. Only validate the request, but do not perform mutations.
+   * The default is false.
+   * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateDataTaxonomyRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateDataTaxonomyRequest.java new file mode 100644 index 000000000000..f3ac00528d70 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateDataTaxonomyRequest.java @@ -0,0 +1,1257 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +/** + * + * + *
+ * Create DataTaxonomy request.
+ * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.CreateDataTaxonomyRequest} + */ +public final class CreateDataTaxonomyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.CreateDataTaxonomyRequest) + CreateDataTaxonomyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateDataTaxonomyRequest.newBuilder() to construct. + private CreateDataTaxonomyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateDataTaxonomyRequest() { + parent_ = ""; + dataTaxonomyId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateDataTaxonomyRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_CreateDataTaxonomyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_CreateDataTaxonomyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest.class, + com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the data taxonomy location, of the form:
+   * projects/{project_number}/locations/{location_id}
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the data taxonomy location, of the form:
+   * projects/{project_number}/locations/{location_id}
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * 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 DATA_TAXONOMY_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataTaxonomyId_ = ""; + /** + * + * + *
+   * Required. DataTaxonomy identifier.
+   * * Must contain only lowercase letters, numbers and hyphens.
+   * * Must start with a letter.
+   * * Must be between 1-63 characters.
+   * * Must end with a number or a letter.
+   * * Must be unique within the Project.
+   * 
+ * + * string data_taxonomy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The dataTaxonomyId. + */ + @java.lang.Override + public java.lang.String getDataTaxonomyId() { + java.lang.Object ref = dataTaxonomyId_; + 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(); + dataTaxonomyId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. DataTaxonomy identifier.
+   * * Must contain only lowercase letters, numbers and hyphens.
+   * * Must start with a letter.
+   * * Must be between 1-63 characters.
+   * * Must end with a number or a letter.
+   * * Must be unique within the Project.
+   * 
+ * + * string data_taxonomy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for dataTaxonomyId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataTaxonomyIdBytes() { + java.lang.Object ref = dataTaxonomyId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataTaxonomyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_TAXONOMY_FIELD_NUMBER = 3; + private com.google.cloud.dataplex.v1.DataTaxonomy dataTaxonomy_; + /** + * + * + *
+   * Required. DataTaxonomy resource.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataTaxonomy field is set. + */ + @java.lang.Override + public boolean hasDataTaxonomy() { + return dataTaxonomy_ != null; + } + /** + * + * + *
+   * Required. DataTaxonomy resource.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataTaxonomy. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataTaxonomy getDataTaxonomy() { + return dataTaxonomy_ == null + ? com.google.cloud.dataplex.v1.DataTaxonomy.getDefaultInstance() + : dataTaxonomy_; + } + /** + * + * + *
+   * Required. DataTaxonomy resource.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataTaxonomyOrBuilder getDataTaxonomyOrBuilder() { + return dataTaxonomy_ == null + ? com.google.cloud.dataplex.v1.DataTaxonomy.getDefaultInstance() + : dataTaxonomy_; + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 4; + private boolean validateOnly_ = false; + /** + * + * + *
+   * Optional. Only validate the request, but do not perform mutations.
+   * The default is false.
+   * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataTaxonomyId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dataTaxonomyId_); + } + if (dataTaxonomy_ != null) { + output.writeMessage(3, getDataTaxonomy()); + } + if (validateOnly_ != false) { + output.writeBool(4, validateOnly_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataTaxonomyId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dataTaxonomyId_); + } + if (dataTaxonomy_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDataTaxonomy()); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, validateOnly_); + } + 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.dataplex.v1.CreateDataTaxonomyRequest)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest other = + (com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getDataTaxonomyId().equals(other.getDataTaxonomyId())) return false; + if (hasDataTaxonomy() != other.hasDataTaxonomy()) return false; + if (hasDataTaxonomy()) { + if (!getDataTaxonomy().equals(other.getDataTaxonomy())) return false; + } + if (getValidateOnly() != other.getValidateOnly()) 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) + DATA_TAXONOMY_ID_FIELD_NUMBER; + hash = (53 * hash) + getDataTaxonomyId().hashCode(); + if (hasDataTaxonomy()) { + hash = (37 * hash) + DATA_TAXONOMY_FIELD_NUMBER; + hash = (53 * hash) + getDataTaxonomy().hashCode(); + } + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest 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.dataplex.v1.CreateDataTaxonomyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest 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.dataplex.v1.CreateDataTaxonomyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest 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.dataplex.v1.CreateDataTaxonomyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest 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.dataplex.v1.CreateDataTaxonomyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest 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.dataplex.v1.CreateDataTaxonomyRequest 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; + } + /** + * + * + *
+   * Create DataTaxonomy request.
+   * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.CreateDataTaxonomyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.CreateDataTaxonomyRequest) + com.google.cloud.dataplex.v1.CreateDataTaxonomyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_CreateDataTaxonomyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_CreateDataTaxonomyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest.class, + com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest.Builder.class); + } + + // Construct using com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + dataTaxonomyId_ = ""; + dataTaxonomy_ = null; + if (dataTaxonomyBuilder_ != null) { + dataTaxonomyBuilder_.dispose(); + dataTaxonomyBuilder_ = null; + } + validateOnly_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_CreateDataTaxonomyRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest build() { + com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest buildPartial() { + com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest result = + new com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dataTaxonomyId_ = dataTaxonomyId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.dataTaxonomy_ = + dataTaxonomyBuilder_ == null ? dataTaxonomy_ : dataTaxonomyBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.validateOnly_ = validateOnly_; + } + } + + @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.dataplex.v1.CreateDataTaxonomyRequest) { + return mergeFrom((com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest other) { + if (other == com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDataTaxonomyId().isEmpty()) { + dataTaxonomyId_ = other.dataTaxonomyId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasDataTaxonomy()) { + mergeDataTaxonomy(other.getDataTaxonomy()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + 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(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + dataTaxonomyId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getDataTaxonomyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + 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 resource name of the data taxonomy location, of the form:
+     * projects/{project_number}/locations/{location_id}
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the data taxonomy location, of the form:
+     * projects/{project_number}/locations/{location_id}
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the data taxonomy location, of the form:
+     * projects/{project_number}/locations/{location_id}
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the data taxonomy location, of the form:
+     * projects/{project_number}/locations/{location_id}
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the data taxonomy location, of the form:
+     * projects/{project_number}/locations/{location_id}
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object dataTaxonomyId_ = ""; + /** + * + * + *
+     * Required. DataTaxonomy identifier.
+     * * Must contain only lowercase letters, numbers and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-63 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the Project.
+     * 
+ * + * string data_taxonomy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The dataTaxonomyId. + */ + public java.lang.String getDataTaxonomyId() { + java.lang.Object ref = dataTaxonomyId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataTaxonomyId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. DataTaxonomy identifier.
+     * * Must contain only lowercase letters, numbers and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-63 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the Project.
+     * 
+ * + * string data_taxonomy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for dataTaxonomyId. + */ + public com.google.protobuf.ByteString getDataTaxonomyIdBytes() { + java.lang.Object ref = dataTaxonomyId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataTaxonomyId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. DataTaxonomy identifier.
+     * * Must contain only lowercase letters, numbers and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-63 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the Project.
+     * 
+ * + * string data_taxonomy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The dataTaxonomyId to set. + * @return This builder for chaining. + */ + public Builder setDataTaxonomyId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataTaxonomyId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. DataTaxonomy identifier.
+     * * Must contain only lowercase letters, numbers and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-63 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the Project.
+     * 
+ * + * string data_taxonomy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDataTaxonomyId() { + dataTaxonomyId_ = getDefaultInstance().getDataTaxonomyId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. DataTaxonomy identifier.
+     * * Must contain only lowercase letters, numbers and hyphens.
+     * * Must start with a letter.
+     * * Must be between 1-63 characters.
+     * * Must end with a number or a letter.
+     * * Must be unique within the Project.
+     * 
+ * + * string data_taxonomy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for dataTaxonomyId to set. + * @return This builder for chaining. + */ + public Builder setDataTaxonomyIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataTaxonomyId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.dataplex.v1.DataTaxonomy dataTaxonomy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataTaxonomy, + com.google.cloud.dataplex.v1.DataTaxonomy.Builder, + com.google.cloud.dataplex.v1.DataTaxonomyOrBuilder> + dataTaxonomyBuilder_; + /** + * + * + *
+     * Required. DataTaxonomy resource.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataTaxonomy field is set. + */ + public boolean hasDataTaxonomy() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Required. DataTaxonomy resource.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataTaxonomy. + */ + public com.google.cloud.dataplex.v1.DataTaxonomy getDataTaxonomy() { + if (dataTaxonomyBuilder_ == null) { + return dataTaxonomy_ == null + ? com.google.cloud.dataplex.v1.DataTaxonomy.getDefaultInstance() + : dataTaxonomy_; + } else { + return dataTaxonomyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. DataTaxonomy resource.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataTaxonomy(com.google.cloud.dataplex.v1.DataTaxonomy value) { + if (dataTaxonomyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataTaxonomy_ = value; + } else { + dataTaxonomyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. DataTaxonomy resource.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataTaxonomy( + com.google.cloud.dataplex.v1.DataTaxonomy.Builder builderForValue) { + if (dataTaxonomyBuilder_ == null) { + dataTaxonomy_ = builderForValue.build(); + } else { + dataTaxonomyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. DataTaxonomy resource.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDataTaxonomy(com.google.cloud.dataplex.v1.DataTaxonomy value) { + if (dataTaxonomyBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && dataTaxonomy_ != null + && dataTaxonomy_ != com.google.cloud.dataplex.v1.DataTaxonomy.getDefaultInstance()) { + getDataTaxonomyBuilder().mergeFrom(value); + } else { + dataTaxonomy_ = value; + } + } else { + dataTaxonomyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. DataTaxonomy resource.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDataTaxonomy() { + bitField0_ = (bitField0_ & ~0x00000004); + dataTaxonomy_ = null; + if (dataTaxonomyBuilder_ != null) { + dataTaxonomyBuilder_.dispose(); + dataTaxonomyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. DataTaxonomy resource.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dataplex.v1.DataTaxonomy.Builder getDataTaxonomyBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getDataTaxonomyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. DataTaxonomy resource.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dataplex.v1.DataTaxonomyOrBuilder getDataTaxonomyOrBuilder() { + if (dataTaxonomyBuilder_ != null) { + return dataTaxonomyBuilder_.getMessageOrBuilder(); + } else { + return dataTaxonomy_ == null + ? com.google.cloud.dataplex.v1.DataTaxonomy.getDefaultInstance() + : dataTaxonomy_; + } + } + /** + * + * + *
+     * Required. DataTaxonomy resource.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataTaxonomy, + com.google.cloud.dataplex.v1.DataTaxonomy.Builder, + com.google.cloud.dataplex.v1.DataTaxonomyOrBuilder> + getDataTaxonomyFieldBuilder() { + if (dataTaxonomyBuilder_ == null) { + dataTaxonomyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataTaxonomy, + com.google.cloud.dataplex.v1.DataTaxonomy.Builder, + com.google.cloud.dataplex.v1.DataTaxonomyOrBuilder>( + getDataTaxonomy(), getParentForChildren(), isClean()); + dataTaxonomy_ = null; + } + return dataTaxonomyBuilder_; + } + + private boolean validateOnly_; + /** + * + * + *
+     * Optional. Only validate the request, but do not perform mutations.
+     * The default is false.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * Optional. Only validate the request, but do not perform mutations.
+     * The default is false.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Only validate the request, but do not perform mutations.
+     * The default is false.
+     * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000008); + validateOnly_ = 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.dataplex.v1.CreateDataTaxonomyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.CreateDataTaxonomyRequest) + private static final com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest(); + } + + public static com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateDataTaxonomyRequest 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.dataplex.v1.CreateDataTaxonomyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateDataTaxonomyRequestOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateDataTaxonomyRequestOrBuilder.java new file mode 100644 index 000000000000..b269faefcddd --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateDataTaxonomyRequestOrBuilder.java @@ -0,0 +1,148 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +public interface CreateDataTaxonomyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.CreateDataTaxonomyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the data taxonomy location, of the form:
+   * projects/{project_number}/locations/{location_id}
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the data taxonomy location, of the form:
+   * projects/{project_number}/locations/{location_id}
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. DataTaxonomy identifier.
+   * * Must contain only lowercase letters, numbers and hyphens.
+   * * Must start with a letter.
+   * * Must be between 1-63 characters.
+   * * Must end with a number or a letter.
+   * * Must be unique within the Project.
+   * 
+ * + * string data_taxonomy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The dataTaxonomyId. + */ + java.lang.String getDataTaxonomyId(); + /** + * + * + *
+   * Required. DataTaxonomy identifier.
+   * * Must contain only lowercase letters, numbers and hyphens.
+   * * Must start with a letter.
+   * * Must be between 1-63 characters.
+   * * Must end with a number or a letter.
+   * * Must be unique within the Project.
+   * 
+ * + * string data_taxonomy_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for dataTaxonomyId. + */ + com.google.protobuf.ByteString getDataTaxonomyIdBytes(); + + /** + * + * + *
+   * Required. DataTaxonomy resource.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataTaxonomy field is set. + */ + boolean hasDataTaxonomy(); + /** + * + * + *
+   * Required. DataTaxonomy resource.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataTaxonomy. + */ + com.google.cloud.dataplex.v1.DataTaxonomy getDataTaxonomy(); + /** + * + * + *
+   * Required. DataTaxonomy resource.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dataplex.v1.DataTaxonomyOrBuilder getDataTaxonomyOrBuilder(); + + /** + * + * + *
+   * Optional. Only validate the request, but do not perform mutations.
+   * The default is false.
+   * 
+ * + * bool validate_only = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataAccessSpec.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataAccessSpec.java new file mode 100644 index 000000000000..88b53944fb32 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataAccessSpec.java @@ -0,0 +1,765 @@ +/* + * Copyright 2023 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/dataplex/v1/security.proto + +package com.google.cloud.dataplex.v1; + +/** + * + * + *
+ * DataAccessSpec holds the access control configuration to be enforced on data
+ * stored within resources (eg: rows, columns in BigQuery Tables). When
+ * associated with data, the data is only accessible to
+ * principals explicitly granted access through the DataAccessSpec. Principals
+ * with access to the containing resource are not implicitly granted access.
+ * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DataAccessSpec} + */ +public final class DataAccessSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.DataAccessSpec) + DataAccessSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use DataAccessSpec.newBuilder() to construct. + private DataAccessSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DataAccessSpec() { + readers_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DataAccessSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.SecurityProto + .internal_static_google_cloud_dataplex_v1_DataAccessSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.SecurityProto + .internal_static_google_cloud_dataplex_v1_DataAccessSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataAccessSpec.class, + com.google.cloud.dataplex.v1.DataAccessSpec.Builder.class); + } + + public static final int READERS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList readers_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Optional. The format of strings follows the pattern followed by IAM in the
+   * bindings. user:{email}, serviceAccount:{email} group:{email}.
+   * The set of principals to be granted reader role on data
+   * stored within resources.
+   * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the readers. + */ + public com.google.protobuf.ProtocolStringList getReadersList() { + return readers_; + } + /** + * + * + *
+   * Optional. The format of strings follows the pattern followed by IAM in the
+   * bindings. user:{email}, serviceAccount:{email} group:{email}.
+   * The set of principals to be granted reader role on data
+   * stored within resources.
+   * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of readers. + */ + public int getReadersCount() { + return readers_.size(); + } + /** + * + * + *
+   * Optional. The format of strings follows the pattern followed by IAM in the
+   * bindings. user:{email}, serviceAccount:{email} group:{email}.
+   * The set of principals to be granted reader role on data
+   * stored within resources.
+   * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The readers at the given index. + */ + public java.lang.String getReaders(int index) { + return readers_.get(index); + } + /** + * + * + *
+   * Optional. The format of strings follows the pattern followed by IAM in the
+   * bindings. user:{email}, serviceAccount:{email} group:{email}.
+   * The set of principals to be granted reader role on data
+   * stored within resources.
+   * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the readers at the given index. + */ + public com.google.protobuf.ByteString getReadersBytes(int index) { + return readers_.getByteString(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 { + for (int i = 0; i < readers_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, readers_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < readers_.size(); i++) { + dataSize += computeStringSizeNoTag(readers_.getRaw(i)); + } + size += dataSize; + size += 1 * getReadersList().size(); + } + 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.dataplex.v1.DataAccessSpec)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.DataAccessSpec other = + (com.google.cloud.dataplex.v1.DataAccessSpec) obj; + + if (!getReadersList().equals(other.getReadersList())) 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 (getReadersCount() > 0) { + hash = (37 * hash) + READERS_FIELD_NUMBER; + hash = (53 * hash) + getReadersList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.DataAccessSpec parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataAccessSpec 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.dataplex.v1.DataAccessSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataAccessSpec 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.dataplex.v1.DataAccessSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataAccessSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.DataAccessSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataAccessSpec 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.dataplex.v1.DataAccessSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataAccessSpec 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.dataplex.v1.DataAccessSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataAccessSpec 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.dataplex.v1.DataAccessSpec 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; + } + /** + * + * + *
+   * DataAccessSpec holds the access control configuration to be enforced on data
+   * stored within resources (eg: rows, columns in BigQuery Tables). When
+   * associated with data, the data is only accessible to
+   * principals explicitly granted access through the DataAccessSpec. Principals
+   * with access to the containing resource are not implicitly granted access.
+   * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DataAccessSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.DataAccessSpec) + com.google.cloud.dataplex.v1.DataAccessSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.SecurityProto + .internal_static_google_cloud_dataplex_v1_DataAccessSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.SecurityProto + .internal_static_google_cloud_dataplex_v1_DataAccessSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataAccessSpec.class, + com.google.cloud.dataplex.v1.DataAccessSpec.Builder.class); + } + + // Construct using com.google.cloud.dataplex.v1.DataAccessSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + readers_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.SecurityProto + .internal_static_google_cloud_dataplex_v1_DataAccessSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataAccessSpec getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.DataAccessSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataAccessSpec build() { + com.google.cloud.dataplex.v1.DataAccessSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataAccessSpec buildPartial() { + com.google.cloud.dataplex.v1.DataAccessSpec result = + new com.google.cloud.dataplex.v1.DataAccessSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dataplex.v1.DataAccessSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + readers_.makeImmutable(); + result.readers_ = readers_; + } + } + + @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.dataplex.v1.DataAccessSpec) { + return mergeFrom((com.google.cloud.dataplex.v1.DataAccessSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataplex.v1.DataAccessSpec other) { + if (other == com.google.cloud.dataplex.v1.DataAccessSpec.getDefaultInstance()) return this; + if (!other.readers_.isEmpty()) { + if (readers_.isEmpty()) { + readers_ = other.readers_; + bitField0_ |= 0x00000001; + } else { + ensureReadersIsMutable(); + readers_.addAll(other.readers_); + } + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureReadersIsMutable(); + readers_.add(s); + 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 int bitField0_; + + private com.google.protobuf.LazyStringArrayList readers_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureReadersIsMutable() { + if (!readers_.isModifiable()) { + readers_ = new com.google.protobuf.LazyStringArrayList(readers_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+     * Optional. The format of strings follows the pattern followed by IAM in the
+     * bindings. user:{email}, serviceAccount:{email} group:{email}.
+     * The set of principals to be granted reader role on data
+     * stored within resources.
+     * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the readers. + */ + public com.google.protobuf.ProtocolStringList getReadersList() { + readers_.makeImmutable(); + return readers_; + } + /** + * + * + *
+     * Optional. The format of strings follows the pattern followed by IAM in the
+     * bindings. user:{email}, serviceAccount:{email} group:{email}.
+     * The set of principals to be granted reader role on data
+     * stored within resources.
+     * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of readers. + */ + public int getReadersCount() { + return readers_.size(); + } + /** + * + * + *
+     * Optional. The format of strings follows the pattern followed by IAM in the
+     * bindings. user:{email}, serviceAccount:{email} group:{email}.
+     * The set of principals to be granted reader role on data
+     * stored within resources.
+     * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The readers at the given index. + */ + public java.lang.String getReaders(int index) { + return readers_.get(index); + } + /** + * + * + *
+     * Optional. The format of strings follows the pattern followed by IAM in the
+     * bindings. user:{email}, serviceAccount:{email} group:{email}.
+     * The set of principals to be granted reader role on data
+     * stored within resources.
+     * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the readers at the given index. + */ + public com.google.protobuf.ByteString getReadersBytes(int index) { + return readers_.getByteString(index); + } + /** + * + * + *
+     * Optional. The format of strings follows the pattern followed by IAM in the
+     * bindings. user:{email}, serviceAccount:{email} group:{email}.
+     * The set of principals to be granted reader role on data
+     * stored within resources.
+     * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The readers to set. + * @return This builder for chaining. + */ + public Builder setReaders(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReadersIsMutable(); + readers_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The format of strings follows the pattern followed by IAM in the
+     * bindings. user:{email}, serviceAccount:{email} group:{email}.
+     * The set of principals to be granted reader role on data
+     * stored within resources.
+     * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The readers to add. + * @return This builder for chaining. + */ + public Builder addReaders(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReadersIsMutable(); + readers_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The format of strings follows the pattern followed by IAM in the
+     * bindings. user:{email}, serviceAccount:{email} group:{email}.
+     * The set of principals to be granted reader role on data
+     * stored within resources.
+     * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The readers to add. + * @return This builder for chaining. + */ + public Builder addAllReaders(java.lang.Iterable values) { + ensureReadersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, readers_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The format of strings follows the pattern followed by IAM in the
+     * bindings. user:{email}, serviceAccount:{email} group:{email}.
+     * The set of principals to be granted reader role on data
+     * stored within resources.
+     * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearReaders() { + readers_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The format of strings follows the pattern followed by IAM in the
+     * bindings. user:{email}, serviceAccount:{email} group:{email}.
+     * The set of principals to be granted reader role on data
+     * stored within resources.
+     * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the readers to add. + * @return This builder for chaining. + */ + public Builder addReadersBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureReadersIsMutable(); + readers_.add(value); + bitField0_ |= 0x00000001; + 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.dataplex.v1.DataAccessSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.DataAccessSpec) + private static final com.google.cloud.dataplex.v1.DataAccessSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.DataAccessSpec(); + } + + public static com.google.cloud.dataplex.v1.DataAccessSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataAccessSpec 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.dataplex.v1.DataAccessSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataAccessSpecOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataAccessSpecOrBuilder.java new file mode 100644 index 000000000000..0227c8ee3ff7 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataAccessSpecOrBuilder.java @@ -0,0 +1,88 @@ +/* + * Copyright 2023 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/dataplex/v1/security.proto + +package com.google.cloud.dataplex.v1; + +public interface DataAccessSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.DataAccessSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The format of strings follows the pattern followed by IAM in the
+   * bindings. user:{email}, serviceAccount:{email} group:{email}.
+   * The set of principals to be granted reader role on data
+   * stored within resources.
+   * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the readers. + */ + java.util.List getReadersList(); + /** + * + * + *
+   * Optional. The format of strings follows the pattern followed by IAM in the
+   * bindings. user:{email}, serviceAccount:{email} group:{email}.
+   * The set of principals to be granted reader role on data
+   * stored within resources.
+   * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of readers. + */ + int getReadersCount(); + /** + * + * + *
+   * Optional. The format of strings follows the pattern followed by IAM in the
+   * bindings. user:{email}, serviceAccount:{email} group:{email}.
+   * The set of principals to be granted reader role on data
+   * stored within resources.
+   * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The readers at the given index. + */ + java.lang.String getReaders(int index); + /** + * + * + *
+   * Optional. The format of strings follows the pattern followed by IAM in the
+   * bindings. user:{email}, serviceAccount:{email} group:{email}.
+   * The set of principals to be granted reader role on data
+   * stored within resources.
+   * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the readers at the given index. + */ + com.google.protobuf.ByteString getReadersBytes(int index); +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataAttribute.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataAttribute.java new file mode 100644 index 000000000000..5f3e4a2605c3 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataAttribute.java @@ -0,0 +1,3235 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +/** + * + * + *
+ * Denotes one dataAttribute in a dataTaxonomy, for example, PII.
+ * DataAttribute resources can be defined in a hierarchy.
+ * A single dataAttribute resource can contain specs of multiple types
+ *
+ * ```
+ * PII
+ *   - ResourceAccessSpec :
+ *                 - readers :foo@bar.com
+ *   - DataAccessSpec :
+ *                 - readers :bar@foo.com
+ * ```
+ * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DataAttribute} + */ +public final class DataAttribute extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.DataAttribute) + DataAttributeOrBuilder { + private static final long serialVersionUID = 0L; + // Use DataAttribute.newBuilder() to construct. + private DataAttribute(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DataAttribute() { + name_ = ""; + uid_ = ""; + description_ = ""; + displayName_ = ""; + parentId_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DataAttribute(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DataAttribute_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 7: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DataAttribute_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataAttribute.class, + com.google.cloud.dataplex.v1.DataAttribute.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. The relative resource name of the dataAttribute, of the form:
+   * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + /** + * + * + *
+   * Output only. The relative resource name of the dataAttribute, of the form:
+   * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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 UID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + /** + * + * + *
+   * Output only. System generated globally unique ID for the DataAttribute.
+   * This ID will be different if the DataAttribute is deleted and re-created
+   * with the same name.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + 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(); + uid_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. System generated globally unique ID for the DataAttribute.
+   * This ID will be different if the DataAttribute is deleted and re-created
+   * with the same name.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time when the DataAttribute was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.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 time when the DataAttribute was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.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 time when the DataAttribute was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The time when the DataAttribute was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The time when the DataAttribute was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The time when the DataAttribute was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Optional. Description of the DataAttribute.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Description of the DataAttribute.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Optional. User friendly display name.
+   * 
+ * + * string display_name = 6 [(.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. User friendly display name.
+   * 
+ * + * string display_name = 6 [(.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 LABELS_FIELD_NUMBER = 7; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DataAttribute_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Optional. User-defined labels for the DataAttribute.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Optional. User-defined labels for the DataAttribute.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. User-defined labels for the DataAttribute.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. User-defined labels for the DataAttribute.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int PARENT_ID_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object parentId_ = ""; + /** + * + * + *
+   * Optional. The ID of the parent DataAttribute resource, should belong to the
+   * same data taxonomy. Circular dependency in parent chain is not valid.
+   * Maximum depth of the hierarchy allowed is 4.
+   * [a -> b -> c -> d -> e, depth = 4]
+   * 
+ * + * + * string parent_id = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The parentId. + */ + @java.lang.Override + public java.lang.String getParentId() { + java.lang.Object ref = parentId_; + 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(); + parentId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The ID of the parent DataAttribute resource, should belong to the
+   * same data taxonomy. Circular dependency in parent chain is not valid.
+   * Maximum depth of the hierarchy allowed is 4.
+   * [a -> b -> c -> d -> e, depth = 4]
+   * 
+ * + * + * string parent_id = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parentId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentIdBytes() { + java.lang.Object ref = parentId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ATTRIBUTE_COUNT_FIELD_NUMBER = 9; + private int attributeCount_ = 0; + /** + * + * + *
+   * Output only. The number of child attributes present for this attribute.
+   * 
+ * + * int32 attribute_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The attributeCount. + */ + @java.lang.Override + public int getAttributeCount() { + return attributeCount_; + } + + public static final int ETAG_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + /** + * + * + *
+   * This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 10; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 10; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_ACCESS_SPEC_FIELD_NUMBER = 100; + private com.google.cloud.dataplex.v1.ResourceAccessSpec resourceAccessSpec_; + /** + * + * + *
+   * Optional. Specified when applied to a resource (eg: Cloud Storage bucket,
+   * BigQuery dataset, BigQuery table).
+   * 
+ * + * + * .google.cloud.dataplex.v1.ResourceAccessSpec resource_access_spec = 100 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the resourceAccessSpec field is set. + */ + @java.lang.Override + public boolean hasResourceAccessSpec() { + return resourceAccessSpec_ != null; + } + /** + * + * + *
+   * Optional. Specified when applied to a resource (eg: Cloud Storage bucket,
+   * BigQuery dataset, BigQuery table).
+   * 
+ * + * + * .google.cloud.dataplex.v1.ResourceAccessSpec resource_access_spec = 100 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The resourceAccessSpec. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.ResourceAccessSpec getResourceAccessSpec() { + return resourceAccessSpec_ == null + ? com.google.cloud.dataplex.v1.ResourceAccessSpec.getDefaultInstance() + : resourceAccessSpec_; + } + /** + * + * + *
+   * Optional. Specified when applied to a resource (eg: Cloud Storage bucket,
+   * BigQuery dataset, BigQuery table).
+   * 
+ * + * + * .google.cloud.dataplex.v1.ResourceAccessSpec resource_access_spec = 100 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.ResourceAccessSpecOrBuilder getResourceAccessSpecOrBuilder() { + return resourceAccessSpec_ == null + ? com.google.cloud.dataplex.v1.ResourceAccessSpec.getDefaultInstance() + : resourceAccessSpec_; + } + + public static final int DATA_ACCESS_SPEC_FIELD_NUMBER = 101; + private com.google.cloud.dataplex.v1.DataAccessSpec dataAccessSpec_; + /** + * + * + *
+   * Optional. Specified when applied to data stored on the resource (eg: rows,
+   * columns in BigQuery Tables).
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataAccessSpec data_access_spec = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dataAccessSpec field is set. + */ + @java.lang.Override + public boolean hasDataAccessSpec() { + return dataAccessSpec_ != null; + } + /** + * + * + *
+   * Optional. Specified when applied to data stored on the resource (eg: rows,
+   * columns in BigQuery Tables).
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataAccessSpec data_access_spec = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataAccessSpec. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataAccessSpec getDataAccessSpec() { + return dataAccessSpec_ == null + ? com.google.cloud.dataplex.v1.DataAccessSpec.getDefaultInstance() + : dataAccessSpec_; + } + /** + * + * + *
+   * Optional. Specified when applied to data stored on the resource (eg: rows,
+   * columns in BigQuery Tables).
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataAccessSpec data_access_spec = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataAccessSpecOrBuilder getDataAccessSpecOrBuilder() { + return dataAccessSpec_ == null + ? com.google.cloud.dataplex.v1.DataAccessSpec.getDefaultInstance() + : dataAccessSpec_; + } + + 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(uid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uid_); + } + if (createTime_ != null) { + output.writeMessage(3, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(4, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, displayName_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 7); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, parentId_); + } + if (attributeCount_ != 0) { + output.writeInt32(9, attributeCount_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, etag_); + } + if (resourceAccessSpec_ != null) { + output.writeMessage(100, getResourceAccessSpec()); + } + if (dataAccessSpec_ != null) { + output.writeMessage(101, getDataAccessSpec()); + } + 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(uid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uid_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, displayName_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parentId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, parentId_); + } + if (attributeCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(9, attributeCount_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, etag_); + } + if (resourceAccessSpec_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(100, getResourceAccessSpec()); + } + if (dataAccessSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(101, getDataAccessSpec()); + } + 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.dataplex.v1.DataAttribute)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.DataAttribute other = + (com.google.cloud.dataplex.v1.DataAttribute) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUid().equals(other.getUid())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getDescription().equals(other.getDescription())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getParentId().equals(other.getParentId())) return false; + if (getAttributeCount() != other.getAttributeCount()) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (hasResourceAccessSpec() != other.hasResourceAccessSpec()) return false; + if (hasResourceAccessSpec()) { + if (!getResourceAccessSpec().equals(other.getResourceAccessSpec())) return false; + } + if (hasDataAccessSpec() != other.hasDataAccessSpec()) return false; + if (hasDataAccessSpec()) { + if (!getDataAccessSpec().equals(other.getDataAccessSpec())) 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) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + PARENT_ID_FIELD_NUMBER; + hash = (53 * hash) + getParentId().hashCode(); + hash = (37 * hash) + ATTRIBUTE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getAttributeCount(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + if (hasResourceAccessSpec()) { + hash = (37 * hash) + RESOURCE_ACCESS_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getResourceAccessSpec().hashCode(); + } + if (hasDataAccessSpec()) { + hash = (37 * hash) + DATA_ACCESS_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getDataAccessSpec().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.DataAttribute parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataAttribute 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.dataplex.v1.DataAttribute parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataAttribute 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.dataplex.v1.DataAttribute parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataAttribute parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.DataAttribute parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataAttribute 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.dataplex.v1.DataAttribute parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataAttribute 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.dataplex.v1.DataAttribute parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataAttribute 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.dataplex.v1.DataAttribute 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; + } + /** + * + * + *
+   * Denotes one dataAttribute in a dataTaxonomy, for example, PII.
+   * DataAttribute resources can be defined in a hierarchy.
+   * A single dataAttribute resource can contain specs of multiple types
+   *
+   * ```
+   * PII
+   *   - ResourceAccessSpec :
+   *                 - readers :foo@bar.com
+   *   - DataAccessSpec :
+   *                 - readers :bar@foo.com
+   * ```
+   * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DataAttribute} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.DataAttribute) + com.google.cloud.dataplex.v1.DataAttributeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DataAttribute_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 7: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 7: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DataAttribute_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataAttribute.class, + com.google.cloud.dataplex.v1.DataAttribute.Builder.class); + } + + // Construct using com.google.cloud.dataplex.v1.DataAttribute.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + uid_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + description_ = ""; + displayName_ = ""; + internalGetMutableLabels().clear(); + parentId_ = ""; + attributeCount_ = 0; + etag_ = ""; + resourceAccessSpec_ = null; + if (resourceAccessSpecBuilder_ != null) { + resourceAccessSpecBuilder_.dispose(); + resourceAccessSpecBuilder_ = null; + } + dataAccessSpec_ = null; + if (dataAccessSpecBuilder_ != null) { + dataAccessSpecBuilder_.dispose(); + dataAccessSpecBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DataAttribute_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataAttribute getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.DataAttribute.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataAttribute build() { + com.google.cloud.dataplex.v1.DataAttribute result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataAttribute buildPartial() { + com.google.cloud.dataplex.v1.DataAttribute result = + new com.google.cloud.dataplex.v1.DataAttribute(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dataplex.v1.DataAttribute result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uid_ = uid_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.parentId_ = parentId_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.attributeCount_ = attributeCount_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.resourceAccessSpec_ = + resourceAccessSpecBuilder_ == null + ? resourceAccessSpec_ + : resourceAccessSpecBuilder_.build(); + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.dataAccessSpec_ = + dataAccessSpecBuilder_ == null ? dataAccessSpec_ : dataAccessSpecBuilder_.build(); + } + } + + @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.dataplex.v1.DataAttribute) { + return mergeFrom((com.google.cloud.dataplex.v1.DataAttribute) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataplex.v1.DataAttribute other) { + if (other == com.google.cloud.dataplex.v1.DataAttribute.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000020; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000040; + if (!other.getParentId().isEmpty()) { + parentId_ = other.parentId_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (other.getAttributeCount() != 0) { + setAttributeCount(other.getAttributeCount()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000200; + onChanged(); + } + if (other.hasResourceAccessSpec()) { + mergeResourceAccessSpec(other.getResourceAccessSpec()); + } + if (other.hasDataAccessSpec()) { + mergeDataAccessSpec(other.getDataAccessSpec()); + } + 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(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + parentId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 72: + { + attributeCount_ = input.readInt32(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 82: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 802: + { + input.readMessage( + getResourceAccessSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 802 + case 810: + { + input.readMessage(getDataAccessSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 810 + 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_ = ""; + /** + * + * + *
+     * Output only. The relative resource name of the dataAttribute, of the form:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + /** + * + * + *
+     * Output only. The relative resource name of the dataAttribute, of the form:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + /** + * + * + *
+     * Output only. The relative resource name of the dataAttribute, of the form:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The relative resource name of the dataAttribute, of the form:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The relative resource name of the dataAttribute, of the form:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + /** + * + * + *
+     * Output only. System generated globally unique ID for the DataAttribute.
+     * This ID will be different if the DataAttribute is deleted and re-created
+     * with the same name.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. System generated globally unique ID for the DataAttribute.
+     * This ID will be different if the DataAttribute is deleted and re-created
+     * with the same name.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. System generated globally unique ID for the DataAttribute.
+     * This ID will be different if the DataAttribute is deleted and re-created
+     * with the same name.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uid_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. System generated globally unique ID for the DataAttribute.
+     * This ID will be different if the DataAttribute is deleted and re-created
+     * with the same name.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. System generated globally unique ID for the DataAttribute.
+     * This ID will be different if the DataAttribute is deleted and re-created
+     * with the same name.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uid_ = value; + bitField0_ |= 0x00000002; + 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 time when the DataAttribute was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. The time when the DataAttribute was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.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 time when the DataAttribute was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.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; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the DataAttribute was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the DataAttribute was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the DataAttribute was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the DataAttribute was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time when the DataAttribute was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.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 time when the DataAttribute was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.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 updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The time when the DataAttribute was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Output only. The time when the DataAttribute was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time when the DataAttribute was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the DataAttribute was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the DataAttribute was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the DataAttribute was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the DataAttribute was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time when the DataAttribute was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The time when the DataAttribute was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. Description of the DataAttribute.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Description of the DataAttribute.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Description of the DataAttribute.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Description of the DataAttribute.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Description of the DataAttribute.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Optional. User friendly display name.
+     * 
+ * + * string display_name = 6 [(.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. User friendly display name.
+     * 
+ * + * string display_name = 6 [(.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. User friendly display name.
+     * 
+ * + * string display_name = 6 [(.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; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User friendly display name.
+     * 
+ * + * string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User friendly display name.
+     * 
+ * + * string display_name = 6 [(.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; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000040; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional. User-defined labels for the DataAttribute.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Optional. User-defined labels for the DataAttribute.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. User-defined labels for the DataAttribute.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. User-defined labels for the DataAttribute.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000040); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. User-defined labels for the DataAttribute.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000040; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional. User-defined labels for the DataAttribute.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000040; + return this; + } + /** + * + * + *
+     * Optional. User-defined labels for the DataAttribute.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000040; + return this; + } + + private java.lang.Object parentId_ = ""; + /** + * + * + *
+     * Optional. The ID of the parent DataAttribute resource, should belong to the
+     * same data taxonomy. Circular dependency in parent chain is not valid.
+     * Maximum depth of the hierarchy allowed is 4.
+     * [a -> b -> c -> d -> e, depth = 4]
+     * 
+ * + * + * string parent_id = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The parentId. + */ + public java.lang.String getParentId() { + java.lang.Object ref = parentId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parentId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The ID of the parent DataAttribute resource, should belong to the
+     * same data taxonomy. Circular dependency in parent chain is not valid.
+     * Maximum depth of the hierarchy allowed is 4.
+     * [a -> b -> c -> d -> e, depth = 4]
+     * 
+ * + * + * string parent_id = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parentId. + */ + public com.google.protobuf.ByteString getParentIdBytes() { + java.lang.Object ref = parentId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parentId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The ID of the parent DataAttribute resource, should belong to the
+     * same data taxonomy. Circular dependency in parent chain is not valid.
+     * Maximum depth of the hierarchy allowed is 4.
+     * [a -> b -> c -> d -> e, depth = 4]
+     * 
+ * + * + * string parent_id = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The parentId to set. + * @return This builder for chaining. + */ + public Builder setParentId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parentId_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The ID of the parent DataAttribute resource, should belong to the
+     * same data taxonomy. Circular dependency in parent chain is not valid.
+     * Maximum depth of the hierarchy allowed is 4.
+     * [a -> b -> c -> d -> e, depth = 4]
+     * 
+ * + * + * string parent_id = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParentId() { + parentId_ = getDefaultInstance().getParentId(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The ID of the parent DataAttribute resource, should belong to the
+     * same data taxonomy. Circular dependency in parent chain is not valid.
+     * Maximum depth of the hierarchy allowed is 4.
+     * [a -> b -> c -> d -> e, depth = 4]
+     * 
+ * + * + * string parent_id = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parentId to set. + * @return This builder for chaining. + */ + public Builder setParentIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parentId_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + private int attributeCount_; + /** + * + * + *
+     * Output only. The number of child attributes present for this attribute.
+     * 
+ * + * int32 attribute_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The attributeCount. + */ + @java.lang.Override + public int getAttributeCount() { + return attributeCount_; + } + /** + * + * + *
+     * Output only. The number of child attributes present for this attribute.
+     * 
+ * + * int32 attribute_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The attributeCount to set. + * @return This builder for chaining. + */ + public Builder setAttributeCount(int value) { + + attributeCount_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The number of child attributes present for this attribute.
+     * 
+ * + * int32 attribute_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearAttributeCount() { + bitField0_ = (bitField0_ & ~0x00000100); + attributeCount_ = 0; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 10; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 10; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 10; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 10; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + return this; + } + /** + * + * + *
+     * This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 10; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private com.google.cloud.dataplex.v1.ResourceAccessSpec resourceAccessSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.ResourceAccessSpec, + com.google.cloud.dataplex.v1.ResourceAccessSpec.Builder, + com.google.cloud.dataplex.v1.ResourceAccessSpecOrBuilder> + resourceAccessSpecBuilder_; + /** + * + * + *
+     * Optional. Specified when applied to a resource (eg: Cloud Storage bucket,
+     * BigQuery dataset, BigQuery table).
+     * 
+ * + * + * .google.cloud.dataplex.v1.ResourceAccessSpec resource_access_spec = 100 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the resourceAccessSpec field is set. + */ + public boolean hasResourceAccessSpec() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * + * + *
+     * Optional. Specified when applied to a resource (eg: Cloud Storage bucket,
+     * BigQuery dataset, BigQuery table).
+     * 
+ * + * + * .google.cloud.dataplex.v1.ResourceAccessSpec resource_access_spec = 100 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The resourceAccessSpec. + */ + public com.google.cloud.dataplex.v1.ResourceAccessSpec getResourceAccessSpec() { + if (resourceAccessSpecBuilder_ == null) { + return resourceAccessSpec_ == null + ? com.google.cloud.dataplex.v1.ResourceAccessSpec.getDefaultInstance() + : resourceAccessSpec_; + } else { + return resourceAccessSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Specified when applied to a resource (eg: Cloud Storage bucket,
+     * BigQuery dataset, BigQuery table).
+     * 
+ * + * + * .google.cloud.dataplex.v1.ResourceAccessSpec resource_access_spec = 100 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setResourceAccessSpec(com.google.cloud.dataplex.v1.ResourceAccessSpec value) { + if (resourceAccessSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + resourceAccessSpec_ = value; + } else { + resourceAccessSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specified when applied to a resource (eg: Cloud Storage bucket,
+     * BigQuery dataset, BigQuery table).
+     * 
+ * + * + * .google.cloud.dataplex.v1.ResourceAccessSpec resource_access_spec = 100 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setResourceAccessSpec( + com.google.cloud.dataplex.v1.ResourceAccessSpec.Builder builderForValue) { + if (resourceAccessSpecBuilder_ == null) { + resourceAccessSpec_ = builderForValue.build(); + } else { + resourceAccessSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specified when applied to a resource (eg: Cloud Storage bucket,
+     * BigQuery dataset, BigQuery table).
+     * 
+ * + * + * .google.cloud.dataplex.v1.ResourceAccessSpec resource_access_spec = 100 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeResourceAccessSpec(com.google.cloud.dataplex.v1.ResourceAccessSpec value) { + if (resourceAccessSpecBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) + && resourceAccessSpec_ != null + && resourceAccessSpec_ + != com.google.cloud.dataplex.v1.ResourceAccessSpec.getDefaultInstance()) { + getResourceAccessSpecBuilder().mergeFrom(value); + } else { + resourceAccessSpec_ = value; + } + } else { + resourceAccessSpecBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specified when applied to a resource (eg: Cloud Storage bucket,
+     * BigQuery dataset, BigQuery table).
+     * 
+ * + * + * .google.cloud.dataplex.v1.ResourceAccessSpec resource_access_spec = 100 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearResourceAccessSpec() { + bitField0_ = (bitField0_ & ~0x00000400); + resourceAccessSpec_ = null; + if (resourceAccessSpecBuilder_ != null) { + resourceAccessSpecBuilder_.dispose(); + resourceAccessSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specified when applied to a resource (eg: Cloud Storage bucket,
+     * BigQuery dataset, BigQuery table).
+     * 
+ * + * + * .google.cloud.dataplex.v1.ResourceAccessSpec resource_access_spec = 100 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dataplex.v1.ResourceAccessSpec.Builder getResourceAccessSpecBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return getResourceAccessSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Specified when applied to a resource (eg: Cloud Storage bucket,
+     * BigQuery dataset, BigQuery table).
+     * 
+ * + * + * .google.cloud.dataplex.v1.ResourceAccessSpec resource_access_spec = 100 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dataplex.v1.ResourceAccessSpecOrBuilder + getResourceAccessSpecOrBuilder() { + if (resourceAccessSpecBuilder_ != null) { + return resourceAccessSpecBuilder_.getMessageOrBuilder(); + } else { + return resourceAccessSpec_ == null + ? com.google.cloud.dataplex.v1.ResourceAccessSpec.getDefaultInstance() + : resourceAccessSpec_; + } + } + /** + * + * + *
+     * Optional. Specified when applied to a resource (eg: Cloud Storage bucket,
+     * BigQuery dataset, BigQuery table).
+     * 
+ * + * + * .google.cloud.dataplex.v1.ResourceAccessSpec resource_access_spec = 100 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.ResourceAccessSpec, + com.google.cloud.dataplex.v1.ResourceAccessSpec.Builder, + com.google.cloud.dataplex.v1.ResourceAccessSpecOrBuilder> + getResourceAccessSpecFieldBuilder() { + if (resourceAccessSpecBuilder_ == null) { + resourceAccessSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.ResourceAccessSpec, + com.google.cloud.dataplex.v1.ResourceAccessSpec.Builder, + com.google.cloud.dataplex.v1.ResourceAccessSpecOrBuilder>( + getResourceAccessSpec(), getParentForChildren(), isClean()); + resourceAccessSpec_ = null; + } + return resourceAccessSpecBuilder_; + } + + private com.google.cloud.dataplex.v1.DataAccessSpec dataAccessSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataAccessSpec, + com.google.cloud.dataplex.v1.DataAccessSpec.Builder, + com.google.cloud.dataplex.v1.DataAccessSpecOrBuilder> + dataAccessSpecBuilder_; + /** + * + * + *
+     * Optional. Specified when applied to data stored on the resource (eg: rows,
+     * columns in BigQuery Tables).
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAccessSpec data_access_spec = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dataAccessSpec field is set. + */ + public boolean hasDataAccessSpec() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + * + * + *
+     * Optional. Specified when applied to data stored on the resource (eg: rows,
+     * columns in BigQuery Tables).
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAccessSpec data_access_spec = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataAccessSpec. + */ + public com.google.cloud.dataplex.v1.DataAccessSpec getDataAccessSpec() { + if (dataAccessSpecBuilder_ == null) { + return dataAccessSpec_ == null + ? com.google.cloud.dataplex.v1.DataAccessSpec.getDefaultInstance() + : dataAccessSpec_; + } else { + return dataAccessSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Specified when applied to data stored on the resource (eg: rows,
+     * columns in BigQuery Tables).
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAccessSpec data_access_spec = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDataAccessSpec(com.google.cloud.dataplex.v1.DataAccessSpec value) { + if (dataAccessSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataAccessSpec_ = value; + } else { + dataAccessSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specified when applied to data stored on the resource (eg: rows,
+     * columns in BigQuery Tables).
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAccessSpec data_access_spec = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setDataAccessSpec( + com.google.cloud.dataplex.v1.DataAccessSpec.Builder builderForValue) { + if (dataAccessSpecBuilder_ == null) { + dataAccessSpec_ = builderForValue.build(); + } else { + dataAccessSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specified when applied to data stored on the resource (eg: rows,
+     * columns in BigQuery Tables).
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAccessSpec data_access_spec = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeDataAccessSpec(com.google.cloud.dataplex.v1.DataAccessSpec value) { + if (dataAccessSpecBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && dataAccessSpec_ != null + && dataAccessSpec_ + != com.google.cloud.dataplex.v1.DataAccessSpec.getDefaultInstance()) { + getDataAccessSpecBuilder().mergeFrom(value); + } else { + dataAccessSpec_ = value; + } + } else { + dataAccessSpecBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specified when applied to data stored on the resource (eg: rows,
+     * columns in BigQuery Tables).
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAccessSpec data_access_spec = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearDataAccessSpec() { + bitField0_ = (bitField0_ & ~0x00000800); + dataAccessSpec_ = null; + if (dataAccessSpecBuilder_ != null) { + dataAccessSpecBuilder_.dispose(); + dataAccessSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Specified when applied to data stored on the resource (eg: rows,
+     * columns in BigQuery Tables).
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAccessSpec data_access_spec = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dataplex.v1.DataAccessSpec.Builder getDataAccessSpecBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return getDataAccessSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Specified when applied to data stored on the resource (eg: rows,
+     * columns in BigQuery Tables).
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAccessSpec data_access_spec = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dataplex.v1.DataAccessSpecOrBuilder getDataAccessSpecOrBuilder() { + if (dataAccessSpecBuilder_ != null) { + return dataAccessSpecBuilder_.getMessageOrBuilder(); + } else { + return dataAccessSpec_ == null + ? com.google.cloud.dataplex.v1.DataAccessSpec.getDefaultInstance() + : dataAccessSpec_; + } + } + /** + * + * + *
+     * Optional. Specified when applied to data stored on the resource (eg: rows,
+     * columns in BigQuery Tables).
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAccessSpec data_access_spec = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataAccessSpec, + com.google.cloud.dataplex.v1.DataAccessSpec.Builder, + com.google.cloud.dataplex.v1.DataAccessSpecOrBuilder> + getDataAccessSpecFieldBuilder() { + if (dataAccessSpecBuilder_ == null) { + dataAccessSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataAccessSpec, + com.google.cloud.dataplex.v1.DataAccessSpec.Builder, + com.google.cloud.dataplex.v1.DataAccessSpecOrBuilder>( + getDataAccessSpec(), getParentForChildren(), isClean()); + dataAccessSpec_ = null; + } + return dataAccessSpecBuilder_; + } + + @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.dataplex.v1.DataAttribute) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.DataAttribute) + private static final com.google.cloud.dataplex.v1.DataAttribute DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.DataAttribute(); + } + + public static com.google.cloud.dataplex.v1.DataAttribute getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataAttribute 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.dataplex.v1.DataAttribute getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataAttributeBinding.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataAttributeBinding.java new file mode 100644 index 000000000000..99bd587bab4d --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataAttributeBinding.java @@ -0,0 +1,4639 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +/** + * + * + *
+ * DataAttributeBinding represents binding of attributes to resources. Eg: Bind
+ * 'CustomerInfo' entity with 'PII' attribute.
+ * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DataAttributeBinding} + */ +public final class DataAttributeBinding extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.DataAttributeBinding) + DataAttributeBindingOrBuilder { + private static final long serialVersionUID = 0L; + // Use DataAttributeBinding.newBuilder() to construct. + private DataAttributeBinding(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DataAttributeBinding() { + name_ = ""; + uid_ = ""; + description_ = ""; + displayName_ = ""; + etag_ = ""; + attributes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + paths_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DataAttributeBinding(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DataAttributeBinding_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 7: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DataAttributeBinding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataAttributeBinding.class, + com.google.cloud.dataplex.v1.DataAttributeBinding.Builder.class); + } + + public interface PathOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.DataAttributeBinding.Path) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The name identifier of the path.
+     * Nested columns should be of the form: 'address.city'.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Required. The name identifier of the path.
+     * Nested columns should be of the form: 'address.city'.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+     * Optional. List of attributes to be associated with the path of the
+     * resource, provided in the form:
+     * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+     * 
+ * + * + * repeated string attributes = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the attributes. + */ + java.util.List getAttributesList(); + /** + * + * + *
+     * Optional. List of attributes to be associated with the path of the
+     * resource, provided in the form:
+     * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+     * 
+ * + * + * repeated string attributes = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The count of attributes. + */ + int getAttributesCount(); + /** + * + * + *
+     * Optional. List of attributes to be associated with the path of the
+     * resource, provided in the form:
+     * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+     * 
+ * + * + * repeated string attributes = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The attributes at the given index. + */ + java.lang.String getAttributes(int index); + /** + * + * + *
+     * Optional. List of attributes to be associated with the path of the
+     * resource, provided in the form:
+     * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+     * 
+ * + * + * repeated string attributes = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the attributes at the given index. + */ + com.google.protobuf.ByteString getAttributesBytes(int index); + } + /** + * + * + *
+   * Represents a subresource of the given resource, and associated bindings
+   * with it. Currently supported subresources are column and partition schema
+   * fields within a table.
+   * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DataAttributeBinding.Path} + */ + public static final class Path extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.DataAttributeBinding.Path) + PathOrBuilder { + private static final long serialVersionUID = 0L; + // Use Path.newBuilder() to construct. + private Path(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Path() { + name_ = ""; + attributes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Path(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DataAttributeBinding_Path_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DataAttributeBinding_Path_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataAttributeBinding.Path.class, + com.google.cloud.dataplex.v1.DataAttributeBinding.Path.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name identifier of the path.
+     * Nested columns should be of the form: 'address.city'.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 identifier of the path.
+     * Nested columns should be of the form: 'address.city'.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 ATTRIBUTES_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList attributes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * Optional. List of attributes to be associated with the path of the
+     * resource, provided in the form:
+     * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+     * 
+ * + * + * repeated string attributes = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the attributes. + */ + public com.google.protobuf.ProtocolStringList getAttributesList() { + return attributes_; + } + /** + * + * + *
+     * Optional. List of attributes to be associated with the path of the
+     * resource, provided in the form:
+     * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+     * 
+ * + * + * repeated string attributes = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The count of attributes. + */ + public int getAttributesCount() { + return attributes_.size(); + } + /** + * + * + *
+     * Optional. List of attributes to be associated with the path of the
+     * resource, provided in the form:
+     * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+     * 
+ * + * + * repeated string attributes = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The attributes at the given index. + */ + public java.lang.String getAttributes(int index) { + return attributes_.get(index); + } + /** + * + * + *
+     * Optional. List of attributes to be associated with the path of the
+     * resource, provided in the form:
+     * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+     * 
+ * + * + * repeated string attributes = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the attributes at the given index. + */ + public com.google.protobuf.ByteString getAttributesBytes(int index) { + return attributes_.getByteString(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(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < attributes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, attributes_.getRaw(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_); + } + { + int dataSize = 0; + for (int i = 0; i < attributes_.size(); i++) { + dataSize += computeStringSizeNoTag(attributes_.getRaw(i)); + } + size += dataSize; + size += 1 * getAttributesList().size(); + } + 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.dataplex.v1.DataAttributeBinding.Path)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.DataAttributeBinding.Path other = + (com.google.cloud.dataplex.v1.DataAttributeBinding.Path) obj; + + if (!getName().equals(other.getName())) return false; + if (!getAttributesList().equals(other.getAttributesList())) 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 (getAttributesCount() > 0) { + hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getAttributesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.DataAttributeBinding.Path parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataAttributeBinding.Path 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.dataplex.v1.DataAttributeBinding.Path parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataAttributeBinding.Path 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.dataplex.v1.DataAttributeBinding.Path parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataAttributeBinding.Path parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.DataAttributeBinding.Path parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataAttributeBinding.Path 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.dataplex.v1.DataAttributeBinding.Path parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataAttributeBinding.Path 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.dataplex.v1.DataAttributeBinding.Path parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataAttributeBinding.Path 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.dataplex.v1.DataAttributeBinding.Path 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; + } + /** + * + * + *
+     * Represents a subresource of the given resource, and associated bindings
+     * with it. Currently supported subresources are column and partition schema
+     * fields within a table.
+     * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DataAttributeBinding.Path} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.DataAttributeBinding.Path) + com.google.cloud.dataplex.v1.DataAttributeBinding.PathOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DataAttributeBinding_Path_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DataAttributeBinding_Path_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataAttributeBinding.Path.class, + com.google.cloud.dataplex.v1.DataAttributeBinding.Path.Builder.class); + } + + // Construct using com.google.cloud.dataplex.v1.DataAttributeBinding.Path.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + attributes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DataAttributeBinding_Path_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataAttributeBinding.Path getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.DataAttributeBinding.Path.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataAttributeBinding.Path build() { + com.google.cloud.dataplex.v1.DataAttributeBinding.Path result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataAttributeBinding.Path buildPartial() { + com.google.cloud.dataplex.v1.DataAttributeBinding.Path result = + new com.google.cloud.dataplex.v1.DataAttributeBinding.Path(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dataplex.v1.DataAttributeBinding.Path result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + attributes_.makeImmutable(); + result.attributes_ = attributes_; + } + } + + @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.dataplex.v1.DataAttributeBinding.Path) { + return mergeFrom((com.google.cloud.dataplex.v1.DataAttributeBinding.Path) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataplex.v1.DataAttributeBinding.Path other) { + if (other == com.google.cloud.dataplex.v1.DataAttributeBinding.Path.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.attributes_.isEmpty()) { + if (attributes_.isEmpty()) { + attributes_ = other.attributes_; + bitField0_ |= 0x00000002; + } else { + ensureAttributesIsMutable(); + attributes_.addAll(other.attributes_); + } + 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(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAttributesIsMutable(); + attributes_.add(s); + 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 name_ = ""; + /** + * + * + *
+       * Required. The name identifier of the path.
+       * Nested columns should be of the form: 'address.city'.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 identifier of the path.
+       * Nested columns should be of the form: 'address.city'.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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 identifier of the path.
+       * Nested columns should be of the form: 'address.city'.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The name identifier of the path.
+       * Nested columns should be of the form: 'address.city'.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The name identifier of the path.
+       * Nested columns should be of the form: 'address.city'.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList attributes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureAttributesIsMutable() { + if (!attributes_.isModifiable()) { + attributes_ = new com.google.protobuf.LazyStringArrayList(attributes_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+       * Optional. List of attributes to be associated with the path of the
+       * resource, provided in the form:
+       * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+       * 
+ * + * + * repeated string attributes = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the attributes. + */ + public com.google.protobuf.ProtocolStringList getAttributesList() { + attributes_.makeImmutable(); + return attributes_; + } + /** + * + * + *
+       * Optional. List of attributes to be associated with the path of the
+       * resource, provided in the form:
+       * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+       * 
+ * + * + * repeated string attributes = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The count of attributes. + */ + public int getAttributesCount() { + return attributes_.size(); + } + /** + * + * + *
+       * Optional. List of attributes to be associated with the path of the
+       * resource, provided in the form:
+       * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+       * 
+ * + * + * repeated string attributes = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The attributes at the given index. + */ + public java.lang.String getAttributes(int index) { + return attributes_.get(index); + } + /** + * + * + *
+       * Optional. List of attributes to be associated with the path of the
+       * resource, provided in the form:
+       * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+       * 
+ * + * + * repeated string attributes = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the attributes at the given index. + */ + public com.google.protobuf.ByteString getAttributesBytes(int index) { + return attributes_.getByteString(index); + } + /** + * + * + *
+       * Optional. List of attributes to be associated with the path of the
+       * resource, provided in the form:
+       * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+       * 
+ * + * + * repeated string attributes = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The attributes to set. + * @return This builder for chaining. + */ + public Builder setAttributes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributesIsMutable(); + attributes_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. List of attributes to be associated with the path of the
+       * resource, provided in the form:
+       * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+       * 
+ * + * + * repeated string attributes = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The attributes to add. + * @return This builder for chaining. + */ + public Builder addAttributes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributesIsMutable(); + attributes_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. List of attributes to be associated with the path of the
+       * resource, provided in the form:
+       * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+       * 
+ * + * + * repeated string attributes = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param values The attributes to add. + * @return This builder for chaining. + */ + public Builder addAllAttributes(java.lang.Iterable values) { + ensureAttributesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, attributes_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. List of attributes to be associated with the path of the
+       * resource, provided in the form:
+       * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+       * 
+ * + * + * repeated string attributes = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearAttributes() { + attributes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. List of attributes to be associated with the path of the
+       * resource, provided in the form:
+       * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+       * 
+ * + * + * repeated string attributes = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the attributes to add. + * @return This builder for chaining. + */ + public Builder addAttributesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAttributesIsMutable(); + attributes_.add(value); + bitField0_ |= 0x00000002; + 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.dataplex.v1.DataAttributeBinding.Path) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.DataAttributeBinding.Path) + private static final com.google.cloud.dataplex.v1.DataAttributeBinding.Path DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.DataAttributeBinding.Path(); + } + + public static com.google.cloud.dataplex.v1.DataAttributeBinding.Path getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Path 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.dataplex.v1.DataAttributeBinding.Path getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int resourceReferenceCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object resourceReference_; + + public enum ResourceReferenceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + RESOURCE(100), + RESOURCEREFERENCE_NOT_SET(0); + private final int value; + + private ResourceReferenceCase(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 ResourceReferenceCase valueOf(int value) { + return forNumber(value); + } + + public static ResourceReferenceCase forNumber(int value) { + switch (value) { + case 100: + return RESOURCE; + case 0: + return RESOURCEREFERENCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ResourceReferenceCase getResourceReferenceCase() { + return ResourceReferenceCase.forNumber(resourceReferenceCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. The relative resource name of the Data Attribute Binding, of
+   * the form:
+   * projects/{project_number}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + /** + * + * + *
+   * Output only. The relative resource name of the Data Attribute Binding, of
+   * the form:
+   * projects/{project_number}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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 UID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + /** + * + * + *
+   * Output only. System generated globally unique ID for the
+   * DataAttributeBinding. This ID will be different if the DataAttributeBinding
+   * is deleted and re-created with the same name.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + 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(); + uid_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. System generated globally unique ID for the
+   * DataAttributeBinding. This ID will be different if the DataAttributeBinding
+   * is deleted and re-created with the same name.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time when the DataAttributeBinding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.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 time when the DataAttributeBinding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.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 time when the DataAttributeBinding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The time when the DataAttributeBinding was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The time when the DataAttributeBinding was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The time when the DataAttributeBinding was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Optional. Description of the DataAttributeBinding.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Description of the DataAttributeBinding.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Optional. User friendly display name.
+   * 
+ * + * string display_name = 6 [(.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. User friendly display name.
+   * 
+ * + * string display_name = 6 [(.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 LABELS_FIELD_NUMBER = 7; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DataAttributeBinding_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Optional. User-defined labels for the DataAttributeBinding.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Optional. User-defined labels for the DataAttributeBinding.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. User-defined labels for the DataAttributeBinding.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. User-defined labels for the DataAttributeBinding.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ETAG_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + /** + * + * + *
+   * This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * Etags must be used when calling the DeleteDataAttributeBinding and the
+   * UpdateDataAttributeBinding method.
+   * 
+ * + * string etag = 8; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * Etags must be used when calling the DeleteDataAttributeBinding and the
+   * UpdateDataAttributeBinding method.
+   * 
+ * + * string etag = 8; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOURCE_FIELD_NUMBER = 100; + /** + * + * + *
+   * Optional. Immutable. The resource name of the resource that is associated
+   * to attributes. Presently, only entity resource is supported in the form:
+   * projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity_id}
+   * Must belong in the same project and region as the attribute binding, and
+   * there can only exist one active binding for a resource.
+   * 
+ * + * + * string resource = 100 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the resource field is set. + */ + public boolean hasResource() { + return resourceReferenceCase_ == 100; + } + /** + * + * + *
+   * Optional. Immutable. The resource name of the resource that is associated
+   * to attributes. Presently, only entity resource is supported in the form:
+   * projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity_id}
+   * Must belong in the same project and region as the attribute binding, and
+   * there can only exist one active binding for a resource.
+   * 
+ * + * + * string resource = 100 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The resource. + */ + public java.lang.String getResource() { + java.lang.Object ref = ""; + if (resourceReferenceCase_ == 100) { + ref = resourceReference_; + } + 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(); + if (resourceReferenceCase_ == 100) { + resourceReference_ = s; + } + return s; + } + } + /** + * + * + *
+   * Optional. Immutable. The resource name of the resource that is associated
+   * to attributes. Presently, only entity resource is supported in the form:
+   * projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity_id}
+   * Must belong in the same project and region as the attribute binding, and
+   * there can only exist one active binding for a resource.
+   * 
+ * + * + * string resource = 100 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for resource. + */ + public com.google.protobuf.ByteString getResourceBytes() { + java.lang.Object ref = ""; + if (resourceReferenceCase_ == 100) { + ref = resourceReference_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (resourceReferenceCase_ == 100) { + resourceReference_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ATTRIBUTES_FIELD_NUMBER = 110; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList attributes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Optional. List of attributes to be associated with the resource, provided
+   * in the form:
+   * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+   * 
+ * + * + * repeated string attributes = 110 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the attributes. + */ + public com.google.protobuf.ProtocolStringList getAttributesList() { + return attributes_; + } + /** + * + * + *
+   * Optional. List of attributes to be associated with the resource, provided
+   * in the form:
+   * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+   * 
+ * + * + * repeated string attributes = 110 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The count of attributes. + */ + public int getAttributesCount() { + return attributes_.size(); + } + /** + * + * + *
+   * Optional. List of attributes to be associated with the resource, provided
+   * in the form:
+   * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+   * 
+ * + * + * repeated string attributes = 110 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The attributes at the given index. + */ + public java.lang.String getAttributes(int index) { + return attributes_.get(index); + } + /** + * + * + *
+   * Optional. List of attributes to be associated with the resource, provided
+   * in the form:
+   * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+   * 
+ * + * + * repeated string attributes = 110 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the attributes at the given index. + */ + public com.google.protobuf.ByteString getAttributesBytes(int index) { + return attributes_.getByteString(index); + } + + public static final int PATHS_FIELD_NUMBER = 120; + + @SuppressWarnings("serial") + private java.util.List paths_; + /** + * + * + *
+   * Optional. The list of paths for items within the associated resource (eg.
+   * columns and partitions within a table) along with attribute bindings.
+   * 
+ * + * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getPathsList() { + return paths_; + } + /** + * + * + *
+   * Optional. The list of paths for items within the associated resource (eg.
+   * columns and partitions within a table) along with attribute bindings.
+   * 
+ * + * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getPathsOrBuilderList() { + return paths_; + } + /** + * + * + *
+   * Optional. The list of paths for items within the associated resource (eg.
+   * columns and partitions within a table) along with attribute bindings.
+   * 
+ * + * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getPathsCount() { + return paths_.size(); + } + /** + * + * + *
+   * Optional. The list of paths for items within the associated resource (eg.
+   * columns and partitions within a table) along with attribute bindings.
+   * 
+ * + * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataAttributeBinding.Path getPaths(int index) { + return paths_.get(index); + } + /** + * + * + *
+   * Optional. The list of paths for items within the associated resource (eg.
+   * columns and partitions within a table) along with attribute bindings.
+   * 
+ * + * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataAttributeBinding.PathOrBuilder getPathsOrBuilder( + int index) { + return paths_.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(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uid_); + } + if (createTime_ != null) { + output.writeMessage(3, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(4, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, displayName_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 7); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, etag_); + } + if (resourceReferenceCase_ == 100) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 100, resourceReference_); + } + for (int i = 0; i < attributes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 110, attributes_.getRaw(i)); + } + for (int i = 0; i < paths_.size(); i++) { + output.writeMessage(120, paths_.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uid_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, displayName_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, labels__); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, etag_); + } + if (resourceReferenceCase_ == 100) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(100, resourceReference_); + } + { + int dataSize = 0; + for (int i = 0; i < attributes_.size(); i++) { + dataSize += computeStringSizeNoTag(attributes_.getRaw(i)); + } + size += dataSize; + size += 2 * getAttributesList().size(); + } + for (int i = 0; i < paths_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(120, paths_.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.dataplex.v1.DataAttributeBinding)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.DataAttributeBinding other = + (com.google.cloud.dataplex.v1.DataAttributeBinding) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUid().equals(other.getUid())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getDescription().equals(other.getDescription())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (!getAttributesList().equals(other.getAttributesList())) return false; + if (!getPathsList().equals(other.getPathsList())) return false; + if (!getResourceReferenceCase().equals(other.getResourceReferenceCase())) return false; + switch (resourceReferenceCase_) { + case 100: + if (!getResource().equals(other.getResource())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + if (getAttributesCount() > 0) { + hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getAttributesList().hashCode(); + } + if (getPathsCount() > 0) { + hash = (37 * hash) + PATHS_FIELD_NUMBER; + hash = (53 * hash) + getPathsList().hashCode(); + } + switch (resourceReferenceCase_) { + case 100: + hash = (37 * hash) + RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getResource().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.DataAttributeBinding parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataAttributeBinding 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.dataplex.v1.DataAttributeBinding parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataAttributeBinding 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.dataplex.v1.DataAttributeBinding parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataAttributeBinding parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.DataAttributeBinding parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataAttributeBinding 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.dataplex.v1.DataAttributeBinding parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataAttributeBinding 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.dataplex.v1.DataAttributeBinding parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataAttributeBinding 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.dataplex.v1.DataAttributeBinding 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; + } + /** + * + * + *
+   * DataAttributeBinding represents binding of attributes to resources. Eg: Bind
+   * 'CustomerInfo' entity with 'PII' attribute.
+   * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DataAttributeBinding} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.DataAttributeBinding) + com.google.cloud.dataplex.v1.DataAttributeBindingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DataAttributeBinding_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 7: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 7: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DataAttributeBinding_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataAttributeBinding.class, + com.google.cloud.dataplex.v1.DataAttributeBinding.Builder.class); + } + + // Construct using com.google.cloud.dataplex.v1.DataAttributeBinding.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + uid_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + description_ = ""; + displayName_ = ""; + internalGetMutableLabels().clear(); + etag_ = ""; + attributes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + if (pathsBuilder_ == null) { + paths_ = java.util.Collections.emptyList(); + } else { + paths_ = null; + pathsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000400); + resourceReferenceCase_ = 0; + resourceReference_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DataAttributeBinding_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataAttributeBinding getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.DataAttributeBinding.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataAttributeBinding build() { + com.google.cloud.dataplex.v1.DataAttributeBinding result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataAttributeBinding buildPartial() { + com.google.cloud.dataplex.v1.DataAttributeBinding result = + new com.google.cloud.dataplex.v1.DataAttributeBinding(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dataplex.v1.DataAttributeBinding result) { + if (pathsBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0)) { + paths_ = java.util.Collections.unmodifiableList(paths_); + bitField0_ = (bitField0_ & ~0x00000400); + } + result.paths_ = paths_; + } else { + result.paths_ = pathsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dataplex.v1.DataAttributeBinding result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uid_ = uid_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + attributes_.makeImmutable(); + result.attributes_ = attributes_; + } + } + + private void buildPartialOneofs(com.google.cloud.dataplex.v1.DataAttributeBinding result) { + result.resourceReferenceCase_ = resourceReferenceCase_; + result.resourceReference_ = this.resourceReference_; + } + + @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.dataplex.v1.DataAttributeBinding) { + return mergeFrom((com.google.cloud.dataplex.v1.DataAttributeBinding) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataplex.v1.DataAttributeBinding other) { + if (other == com.google.cloud.dataplex.v1.DataAttributeBinding.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000020; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000040; + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.attributes_.isEmpty()) { + if (attributes_.isEmpty()) { + attributes_ = other.attributes_; + bitField0_ |= 0x00000200; + } else { + ensureAttributesIsMutable(); + attributes_.addAll(other.attributes_); + } + onChanged(); + } + if (pathsBuilder_ == null) { + if (!other.paths_.isEmpty()) { + if (paths_.isEmpty()) { + paths_ = other.paths_; + bitField0_ = (bitField0_ & ~0x00000400); + } else { + ensurePathsIsMutable(); + paths_.addAll(other.paths_); + } + onChanged(); + } + } else { + if (!other.paths_.isEmpty()) { + if (pathsBuilder_.isEmpty()) { + pathsBuilder_.dispose(); + pathsBuilder_ = null; + paths_ = other.paths_; + bitField0_ = (bitField0_ & ~0x00000400); + pathsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPathsFieldBuilder() + : null; + } else { + pathsBuilder_.addAllMessages(other.paths_); + } + } + } + switch (other.getResourceReferenceCase()) { + case RESOURCE: + { + resourceReferenceCase_ = 100; + resourceReference_ = other.resourceReference_; + onChanged(); + break; + } + case RESOURCEREFERENCE_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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 66: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 66 + case 802: + { + java.lang.String s = input.readStringRequireUtf8(); + resourceReferenceCase_ = 100; + resourceReference_ = s; + break; + } // case 802 + case 882: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAttributesIsMutable(); + attributes_.add(s); + break; + } // case 882 + case 962: + { + com.google.cloud.dataplex.v1.DataAttributeBinding.Path m = + input.readMessage( + com.google.cloud.dataplex.v1.DataAttributeBinding.Path.parser(), + extensionRegistry); + if (pathsBuilder_ == null) { + ensurePathsIsMutable(); + paths_.add(m); + } else { + pathsBuilder_.addMessage(m); + } + break; + } // case 962 + 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 resourceReferenceCase_ = 0; + private java.lang.Object resourceReference_; + + public ResourceReferenceCase getResourceReferenceCase() { + return ResourceReferenceCase.forNumber(resourceReferenceCase_); + } + + public Builder clearResourceReference() { + resourceReferenceCase_ = 0; + resourceReference_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The relative resource name of the Data Attribute Binding, of
+     * the form:
+     * projects/{project_number}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + /** + * + * + *
+     * Output only. The relative resource name of the Data Attribute Binding, of
+     * the form:
+     * projects/{project_number}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + /** + * + * + *
+     * Output only. The relative resource name of the Data Attribute Binding, of
+     * the form:
+     * projects/{project_number}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The relative resource name of the Data Attribute Binding, of
+     * the form:
+     * projects/{project_number}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The relative resource name of the Data Attribute Binding, of
+     * the form:
+     * projects/{project_number}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + /** + * + * + *
+     * Output only. System generated globally unique ID for the
+     * DataAttributeBinding. This ID will be different if the DataAttributeBinding
+     * is deleted and re-created with the same name.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. System generated globally unique ID for the
+     * DataAttributeBinding. This ID will be different if the DataAttributeBinding
+     * is deleted and re-created with the same name.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. System generated globally unique ID for the
+     * DataAttributeBinding. This ID will be different if the DataAttributeBinding
+     * is deleted and re-created with the same name.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uid_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. System generated globally unique ID for the
+     * DataAttributeBinding. This ID will be different if the DataAttributeBinding
+     * is deleted and re-created with the same name.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. System generated globally unique ID for the
+     * DataAttributeBinding. This ID will be different if the DataAttributeBinding
+     * is deleted and re-created with the same name.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uid_ = value; + bitField0_ |= 0x00000002; + 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 time when the DataAttributeBinding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. The time when the DataAttributeBinding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.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 time when the DataAttributeBinding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.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; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the DataAttributeBinding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the DataAttributeBinding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the DataAttributeBinding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the DataAttributeBinding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time when the DataAttributeBinding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.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 time when the DataAttributeBinding was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.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 updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The time when the DataAttributeBinding was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Output only. The time when the DataAttributeBinding was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time when the DataAttributeBinding was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the DataAttributeBinding was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the DataAttributeBinding was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the DataAttributeBinding was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the DataAttributeBinding was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time when the DataAttributeBinding was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The time when the DataAttributeBinding was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. Description of the DataAttributeBinding.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Description of the DataAttributeBinding.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Description of the DataAttributeBinding.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Description of the DataAttributeBinding.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Description of the DataAttributeBinding.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Optional. User friendly display name.
+     * 
+ * + * string display_name = 6 [(.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. User friendly display name.
+     * 
+ * + * string display_name = 6 [(.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. User friendly display name.
+     * 
+ * + * string display_name = 6 [(.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; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User friendly display name.
+     * 
+ * + * string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User friendly display name.
+     * 
+ * + * string display_name = 6 [(.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; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000040; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional. User-defined labels for the DataAttributeBinding.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Optional. User-defined labels for the DataAttributeBinding.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. User-defined labels for the DataAttributeBinding.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. User-defined labels for the DataAttributeBinding.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000040); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. User-defined labels for the DataAttributeBinding.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000040; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional. User-defined labels for the DataAttributeBinding.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000040; + return this; + } + /** + * + * + *
+     * Optional. User-defined labels for the DataAttributeBinding.
+     * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000040; + return this; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * Etags must be used when calling the DeleteDataAttributeBinding and the
+     * UpdateDataAttributeBinding method.
+     * 
+ * + * string etag = 8; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * Etags must be used when calling the DeleteDataAttributeBinding and the
+     * UpdateDataAttributeBinding method.
+     * 
+ * + * string etag = 8; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * Etags must be used when calling the DeleteDataAttributeBinding and the
+     * UpdateDataAttributeBinding method.
+     * 
+ * + * string etag = 8; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * Etags must be used when calling the DeleteDataAttributeBinding and the
+     * UpdateDataAttributeBinding method.
+     * 
+ * + * string etag = 8; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + return this; + } + /** + * + * + *
+     * This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * Etags must be used when calling the DeleteDataAttributeBinding and the
+     * UpdateDataAttributeBinding method.
+     * 
+ * + * string etag = 8; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + + /** + * + * + *
+     * Optional. Immutable. The resource name of the resource that is associated
+     * to attributes. Presently, only entity resource is supported in the form:
+     * projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity_id}
+     * Must belong in the same project and region as the attribute binding, and
+     * there can only exist one active binding for a resource.
+     * 
+ * + * + * string resource = 100 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the resource field is set. + */ + @java.lang.Override + public boolean hasResource() { + return resourceReferenceCase_ == 100; + } + /** + * + * + *
+     * Optional. Immutable. The resource name of the resource that is associated
+     * to attributes. Presently, only entity resource is supported in the form:
+     * projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity_id}
+     * Must belong in the same project and region as the attribute binding, and
+     * there can only exist one active binding for a resource.
+     * 
+ * + * + * string resource = 100 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The resource. + */ + @java.lang.Override + public java.lang.String getResource() { + java.lang.Object ref = ""; + if (resourceReferenceCase_ == 100) { + ref = resourceReference_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (resourceReferenceCase_ == 100) { + resourceReference_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Immutable. The resource name of the resource that is associated
+     * to attributes. Presently, only entity resource is supported in the form:
+     * projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity_id}
+     * Must belong in the same project and region as the attribute binding, and
+     * there can only exist one active binding for a resource.
+     * 
+ * + * + * string resource = 100 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for resource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResourceBytes() { + java.lang.Object ref = ""; + if (resourceReferenceCase_ == 100) { + ref = resourceReference_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (resourceReferenceCase_ == 100) { + resourceReference_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Immutable. The resource name of the resource that is associated
+     * to attributes. Presently, only entity resource is supported in the form:
+     * projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity_id}
+     * Must belong in the same project and region as the attribute binding, and
+     * there can only exist one active binding for a resource.
+     * 
+ * + * + * string resource = 100 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @param value The resource to set. + * @return This builder for chaining. + */ + public Builder setResource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resourceReferenceCase_ = 100; + resourceReference_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Immutable. The resource name of the resource that is associated
+     * to attributes. Presently, only entity resource is supported in the form:
+     * projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity_id}
+     * Must belong in the same project and region as the attribute binding, and
+     * there can only exist one active binding for a resource.
+     * 
+ * + * + * string resource = 100 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return This builder for chaining. + */ + public Builder clearResource() { + if (resourceReferenceCase_ == 100) { + resourceReferenceCase_ = 0; + resourceReference_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Optional. Immutable. The resource name of the resource that is associated
+     * to attributes. Presently, only entity resource is supported in the form:
+     * projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity_id}
+     * Must belong in the same project and region as the attribute binding, and
+     * there can only exist one active binding for a resource.
+     * 
+ * + * + * string resource = 100 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @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); + resourceReferenceCase_ = 100; + resourceReference_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList attributes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureAttributesIsMutable() { + if (!attributes_.isModifiable()) { + attributes_ = new com.google.protobuf.LazyStringArrayList(attributes_); + } + bitField0_ |= 0x00000200; + } + /** + * + * + *
+     * Optional. List of attributes to be associated with the resource, provided
+     * in the form:
+     * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+     * 
+ * + * + * repeated string attributes = 110 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the attributes. + */ + public com.google.protobuf.ProtocolStringList getAttributesList() { + attributes_.makeImmutable(); + return attributes_; + } + /** + * + * + *
+     * Optional. List of attributes to be associated with the resource, provided
+     * in the form:
+     * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+     * 
+ * + * + * repeated string attributes = 110 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The count of attributes. + */ + public int getAttributesCount() { + return attributes_.size(); + } + /** + * + * + *
+     * Optional. List of attributes to be associated with the resource, provided
+     * in the form:
+     * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+     * 
+ * + * + * repeated string attributes = 110 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The attributes at the given index. + */ + public java.lang.String getAttributes(int index) { + return attributes_.get(index); + } + /** + * + * + *
+     * Optional. List of attributes to be associated with the resource, provided
+     * in the form:
+     * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+     * 
+ * + * + * repeated string attributes = 110 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the attributes at the given index. + */ + public com.google.protobuf.ByteString getAttributesBytes(int index) { + return attributes_.getByteString(index); + } + /** + * + * + *
+     * Optional. List of attributes to be associated with the resource, provided
+     * in the form:
+     * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+     * 
+ * + * + * repeated string attributes = 110 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index to set the value at. + * @param value The attributes to set. + * @return This builder for chaining. + */ + public Builder setAttributes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributesIsMutable(); + attributes_.set(index, value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. List of attributes to be associated with the resource, provided
+     * in the form:
+     * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+     * 
+ * + * + * repeated string attributes = 110 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The attributes to add. + * @return This builder for chaining. + */ + public Builder addAttributes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributesIsMutable(); + attributes_.add(value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. List of attributes to be associated with the resource, provided
+     * in the form:
+     * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+     * 
+ * + * + * repeated string attributes = 110 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param values The attributes to add. + * @return This builder for chaining. + */ + public Builder addAllAttributes(java.lang.Iterable values) { + ensureAttributesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, attributes_); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. List of attributes to be associated with the resource, provided
+     * in the form:
+     * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+     * 
+ * + * + * repeated string attributes = 110 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearAttributes() { + attributes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. List of attributes to be associated with the resource, provided
+     * in the form:
+     * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+     * 
+ * + * + * repeated string attributes = 110 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes of the attributes to add. + * @return This builder for chaining. + */ + public Builder addAttributesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAttributesIsMutable(); + attributes_.add(value); + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + + private java.util.List paths_ = + java.util.Collections.emptyList(); + + private void ensurePathsIsMutable() { + if (!((bitField0_ & 0x00000400) != 0)) { + paths_ = + new java.util.ArrayList(paths_); + bitField0_ |= 0x00000400; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dataplex.v1.DataAttributeBinding.Path, + com.google.cloud.dataplex.v1.DataAttributeBinding.Path.Builder, + com.google.cloud.dataplex.v1.DataAttributeBinding.PathOrBuilder> + pathsBuilder_; + + /** + * + * + *
+     * Optional. The list of paths for items within the associated resource (eg.
+     * columns and partitions within a table) along with attribute bindings.
+     * 
+ * + * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getPathsList() { + if (pathsBuilder_ == null) { + return java.util.Collections.unmodifiableList(paths_); + } else { + return pathsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. The list of paths for items within the associated resource (eg.
+     * columns and partitions within a table) along with attribute bindings.
+     * 
+ * + * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getPathsCount() { + if (pathsBuilder_ == null) { + return paths_.size(); + } else { + return pathsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. The list of paths for items within the associated resource (eg.
+     * columns and partitions within a table) along with attribute bindings.
+     * 
+ * + * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dataplex.v1.DataAttributeBinding.Path getPaths(int index) { + if (pathsBuilder_ == null) { + return paths_.get(index); + } else { + return pathsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. The list of paths for items within the associated resource (eg.
+     * columns and partitions within a table) along with attribute bindings.
+     * 
+ * + * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPaths( + int index, com.google.cloud.dataplex.v1.DataAttributeBinding.Path value) { + if (pathsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePathsIsMutable(); + paths_.set(index, value); + onChanged(); + } else { + pathsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. The list of paths for items within the associated resource (eg.
+     * columns and partitions within a table) along with attribute bindings.
+     * 
+ * + * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPaths( + int index, com.google.cloud.dataplex.v1.DataAttributeBinding.Path.Builder builderForValue) { + if (pathsBuilder_ == null) { + ensurePathsIsMutable(); + paths_.set(index, builderForValue.build()); + onChanged(); + } else { + pathsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. The list of paths for items within the associated resource (eg.
+     * columns and partitions within a table) along with attribute bindings.
+     * 
+ * + * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addPaths(com.google.cloud.dataplex.v1.DataAttributeBinding.Path value) { + if (pathsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePathsIsMutable(); + paths_.add(value); + onChanged(); + } else { + pathsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. The list of paths for items within the associated resource (eg.
+     * columns and partitions within a table) along with attribute bindings.
+     * 
+ * + * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addPaths( + int index, com.google.cloud.dataplex.v1.DataAttributeBinding.Path value) { + if (pathsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePathsIsMutable(); + paths_.add(index, value); + onChanged(); + } else { + pathsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. The list of paths for items within the associated resource (eg.
+     * columns and partitions within a table) along with attribute bindings.
+     * 
+ * + * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addPaths( + com.google.cloud.dataplex.v1.DataAttributeBinding.Path.Builder builderForValue) { + if (pathsBuilder_ == null) { + ensurePathsIsMutable(); + paths_.add(builderForValue.build()); + onChanged(); + } else { + pathsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. The list of paths for items within the associated resource (eg.
+     * columns and partitions within a table) along with attribute bindings.
+     * 
+ * + * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addPaths( + int index, com.google.cloud.dataplex.v1.DataAttributeBinding.Path.Builder builderForValue) { + if (pathsBuilder_ == null) { + ensurePathsIsMutable(); + paths_.add(index, builderForValue.build()); + onChanged(); + } else { + pathsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. The list of paths for items within the associated resource (eg.
+     * columns and partitions within a table) along with attribute bindings.
+     * 
+ * + * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllPaths( + java.lang.Iterable + values) { + if (pathsBuilder_ == null) { + ensurePathsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, paths_); + onChanged(); + } else { + pathsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. The list of paths for items within the associated resource (eg.
+     * columns and partitions within a table) along with attribute bindings.
+     * 
+ * + * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPaths() { + if (pathsBuilder_ == null) { + paths_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + } else { + pathsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. The list of paths for items within the associated resource (eg.
+     * columns and partitions within a table) along with attribute bindings.
+     * 
+ * + * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removePaths(int index) { + if (pathsBuilder_ == null) { + ensurePathsIsMutable(); + paths_.remove(index); + onChanged(); + } else { + pathsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. The list of paths for items within the associated resource (eg.
+     * columns and partitions within a table) along with attribute bindings.
+     * 
+ * + * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dataplex.v1.DataAttributeBinding.Path.Builder getPathsBuilder( + int index) { + return getPathsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. The list of paths for items within the associated resource (eg.
+     * columns and partitions within a table) along with attribute bindings.
+     * 
+ * + * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dataplex.v1.DataAttributeBinding.PathOrBuilder getPathsOrBuilder( + int index) { + if (pathsBuilder_ == null) { + return paths_.get(index); + } else { + return pathsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. The list of paths for items within the associated resource (eg.
+     * columns and partitions within a table) along with attribute bindings.
+     * 
+ * + * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getPathsOrBuilderList() { + if (pathsBuilder_ != null) { + return pathsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(paths_); + } + } + /** + * + * + *
+     * Optional. The list of paths for items within the associated resource (eg.
+     * columns and partitions within a table) along with attribute bindings.
+     * 
+ * + * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dataplex.v1.DataAttributeBinding.Path.Builder addPathsBuilder() { + return getPathsFieldBuilder() + .addBuilder(com.google.cloud.dataplex.v1.DataAttributeBinding.Path.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. The list of paths for items within the associated resource (eg.
+     * columns and partitions within a table) along with attribute bindings.
+     * 
+ * + * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dataplex.v1.DataAttributeBinding.Path.Builder addPathsBuilder( + int index) { + return getPathsFieldBuilder() + .addBuilder( + index, com.google.cloud.dataplex.v1.DataAttributeBinding.Path.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. The list of paths for items within the associated resource (eg.
+     * columns and partitions within a table) along with attribute bindings.
+     * 
+ * + * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getPathsBuilderList() { + return getPathsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dataplex.v1.DataAttributeBinding.Path, + com.google.cloud.dataplex.v1.DataAttributeBinding.Path.Builder, + com.google.cloud.dataplex.v1.DataAttributeBinding.PathOrBuilder> + getPathsFieldBuilder() { + if (pathsBuilder_ == null) { + pathsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dataplex.v1.DataAttributeBinding.Path, + com.google.cloud.dataplex.v1.DataAttributeBinding.Path.Builder, + com.google.cloud.dataplex.v1.DataAttributeBinding.PathOrBuilder>( + paths_, ((bitField0_ & 0x00000400) != 0), getParentForChildren(), isClean()); + paths_ = null; + } + return pathsBuilder_; + } + + @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.dataplex.v1.DataAttributeBinding) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.DataAttributeBinding) + private static final com.google.cloud.dataplex.v1.DataAttributeBinding DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.DataAttributeBinding(); + } + + public static com.google.cloud.dataplex.v1.DataAttributeBinding getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataAttributeBinding 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.dataplex.v1.DataAttributeBinding getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataAttributeBindingName.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataAttributeBindingName.java new file mode 100644 index 000000000000..025eb235fe49 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataAttributeBindingName.java @@ -0,0 +1,239 @@ +/* + * Copyright 2023 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.dataplex.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 DataAttributeBindingName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_DATA_ATTRIBUTE_BINDING_ID = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String dataAttributeBindingId; + + @Deprecated + protected DataAttributeBindingName() { + project = null; + location = null; + dataAttributeBindingId = null; + } + + private DataAttributeBindingName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + dataAttributeBindingId = Preconditions.checkNotNull(builder.getDataAttributeBindingId()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDataAttributeBindingId() { + return dataAttributeBindingId; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static DataAttributeBindingName of( + String project, String location, String dataAttributeBindingId) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataAttributeBindingId(dataAttributeBindingId) + .build(); + } + + public static String format(String project, String location, String dataAttributeBindingId) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataAttributeBindingId(dataAttributeBindingId) + .build() + .toString(); + } + + public static DataAttributeBindingName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_DATA_ATTRIBUTE_BINDING_ID.validatedMatch( + formattedString, "DataAttributeBindingName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("data_attribute_binding_id")); + } + + 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 (DataAttributeBindingName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_DATA_ATTRIBUTE_BINDING_ID.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 (dataAttributeBindingId != null) { + fieldMapBuilder.put("data_attribute_binding_id", dataAttributeBindingId); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_DATA_ATTRIBUTE_BINDING_ID.instantiate( + "project", + project, + "location", + location, + "data_attribute_binding_id", + dataAttributeBindingId); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + DataAttributeBindingName that = ((DataAttributeBindingName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.dataAttributeBindingId, that.dataAttributeBindingId); + } + 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(dataAttributeBindingId); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}. + */ + public static class Builder { + private String project; + private String location; + private String dataAttributeBindingId; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDataAttributeBindingId() { + return dataAttributeBindingId; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setDataAttributeBindingId(String dataAttributeBindingId) { + this.dataAttributeBindingId = dataAttributeBindingId; + return this; + } + + private Builder(DataAttributeBindingName dataAttributeBindingName) { + this.project = dataAttributeBindingName.project; + this.location = dataAttributeBindingName.location; + this.dataAttributeBindingId = dataAttributeBindingName.dataAttributeBindingId; + } + + public DataAttributeBindingName build() { + return new DataAttributeBindingName(this); + } + } +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataAttributeBindingOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataAttributeBindingOrBuilder.java new file mode 100644 index 000000000000..1345c675ad38 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataAttributeBindingOrBuilder.java @@ -0,0 +1,496 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +public interface DataAttributeBindingOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.DataAttributeBinding) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The relative resource name of the Data Attribute Binding, of
+   * the form:
+   * projects/{project_number}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The relative resource name of the Data Attribute Binding, of
+   * the form:
+   * projects/{project_number}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. System generated globally unique ID for the
+   * DataAttributeBinding. This ID will be different if the DataAttributeBinding
+   * is deleted and re-created with the same name.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + java.lang.String getUid(); + /** + * + * + *
+   * Output only. System generated globally unique ID for the
+   * DataAttributeBinding. This ID will be different if the DataAttributeBinding
+   * is deleted and re-created with the same name.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Output only. The time when the DataAttributeBinding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time when the DataAttributeBinding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time when the DataAttributeBinding was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the DataAttributeBinding was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The time when the DataAttributeBinding was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The time when the DataAttributeBinding was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Description of the DataAttributeBinding.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. Description of the DataAttributeBinding.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Optional. User friendly display name.
+   * 
+ * + * string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Optional. User friendly display name.
+   * 
+ * + * string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. User-defined labels for the DataAttributeBinding.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. User-defined labels for the DataAttributeBinding.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional. User-defined labels for the DataAttributeBinding.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. User-defined labels for the DataAttributeBinding.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. User-defined labels for the DataAttributeBinding.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * Etags must be used when calling the DeleteDataAttributeBinding and the
+   * UpdateDataAttributeBinding method.
+   * 
+ * + * string etag = 8; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * Etags must be used when calling the DeleteDataAttributeBinding and the
+   * UpdateDataAttributeBinding method.
+   * 
+ * + * string etag = 8; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Optional. Immutable. The resource name of the resource that is associated
+   * to attributes. Presently, only entity resource is supported in the form:
+   * projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity_id}
+   * Must belong in the same project and region as the attribute binding, and
+   * there can only exist one active binding for a resource.
+   * 
+ * + * + * string resource = 100 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return Whether the resource field is set. + */ + boolean hasResource(); + /** + * + * + *
+   * Optional. Immutable. The resource name of the resource that is associated
+   * to attributes. Presently, only entity resource is supported in the form:
+   * projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity_id}
+   * Must belong in the same project and region as the attribute binding, and
+   * there can only exist one active binding for a resource.
+   * 
+ * + * + * string resource = 100 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The resource. + */ + java.lang.String getResource(); + /** + * + * + *
+   * Optional. Immutable. The resource name of the resource that is associated
+   * to attributes. Presently, only entity resource is supported in the form:
+   * projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity_id}
+   * Must belong in the same project and region as the attribute binding, and
+   * there can only exist one active binding for a resource.
+   * 
+ * + * + * string resource = 100 [(.google.api.field_behavior) = OPTIONAL, (.google.api.field_behavior) = IMMUTABLE]; + * + * + * @return The bytes for resource. + */ + com.google.protobuf.ByteString getResourceBytes(); + + /** + * + * + *
+   * Optional. List of attributes to be associated with the resource, provided
+   * in the form:
+   * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+   * 
+ * + * + * repeated string attributes = 110 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return A list containing the attributes. + */ + java.util.List getAttributesList(); + /** + * + * + *
+   * Optional. List of attributes to be associated with the resource, provided
+   * in the form:
+   * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+   * 
+ * + * + * repeated string attributes = 110 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The count of attributes. + */ + int getAttributesCount(); + /** + * + * + *
+   * Optional. List of attributes to be associated with the resource, provided
+   * in the form:
+   * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+   * 
+ * + * + * repeated string attributes = 110 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the element to return. + * @return The attributes at the given index. + */ + java.lang.String getAttributes(int index); + /** + * + * + *
+   * Optional. List of attributes to be associated with the resource, provided
+   * in the form:
+   * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+   * 
+ * + * + * repeated string attributes = 110 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param index The index of the value to return. + * @return The bytes of the attributes at the given index. + */ + com.google.protobuf.ByteString getAttributesBytes(int index); + + /** + * + * + *
+   * Optional. The list of paths for items within the associated resource (eg.
+   * columns and partitions within a table) along with attribute bindings.
+   * 
+ * + * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getPathsList(); + /** + * + * + *
+   * Optional. The list of paths for items within the associated resource (eg.
+   * columns and partitions within a table) along with attribute bindings.
+   * 
+ * + * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dataplex.v1.DataAttributeBinding.Path getPaths(int index); + /** + * + * + *
+   * Optional. The list of paths for items within the associated resource (eg.
+   * columns and partitions within a table) along with attribute bindings.
+   * 
+ * + * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getPathsCount(); + /** + * + * + *
+   * Optional. The list of paths for items within the associated resource (eg.
+   * columns and partitions within a table) along with attribute bindings.
+   * 
+ * + * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getPathsOrBuilderList(); + /** + * + * + *
+   * Optional. The list of paths for items within the associated resource (eg.
+   * columns and partitions within a table) along with attribute bindings.
+   * 
+ * + * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding.Path paths = 120 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dataplex.v1.DataAttributeBinding.PathOrBuilder getPathsOrBuilder(int index); + + com.google.cloud.dataplex.v1.DataAttributeBinding.ResourceReferenceCase + getResourceReferenceCase(); +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataAttributeName.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataAttributeName.java new file mode 100644 index 000000000000..3414682da5dd --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataAttributeName.java @@ -0,0 +1,269 @@ +/* + * Copyright 2023 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.dataplex.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 DataAttributeName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_DATATAXONOMY_DATA_ATTRIBUTE_ID = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String dataTaxonomy; + private final String dataAttributeId; + + @Deprecated + protected DataAttributeName() { + project = null; + location = null; + dataTaxonomy = null; + dataAttributeId = null; + } + + private DataAttributeName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + dataTaxonomy = Preconditions.checkNotNull(builder.getDataTaxonomy()); + dataAttributeId = Preconditions.checkNotNull(builder.getDataAttributeId()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDataTaxonomy() { + return dataTaxonomy; + } + + public String getDataAttributeId() { + return dataAttributeId; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static DataAttributeName of( + String project, String location, String dataTaxonomy, String dataAttributeId) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataTaxonomy(dataTaxonomy) + .setDataAttributeId(dataAttributeId) + .build(); + } + + public static String format( + String project, String location, String dataTaxonomy, String dataAttributeId) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataTaxonomy(dataTaxonomy) + .setDataAttributeId(dataAttributeId) + .build() + .toString(); + } + + public static DataAttributeName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_DATATAXONOMY_DATA_ATTRIBUTE_ID.validatedMatch( + formattedString, "DataAttributeName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("dataTaxonomy"), + matchMap.get("data_attribute_id")); + } + + 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 (DataAttributeName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_DATATAXONOMY_DATA_ATTRIBUTE_ID.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 (dataTaxonomy != null) { + fieldMapBuilder.put("dataTaxonomy", dataTaxonomy); + } + if (dataAttributeId != null) { + fieldMapBuilder.put("data_attribute_id", dataAttributeId); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_DATATAXONOMY_DATA_ATTRIBUTE_ID.instantiate( + "project", + project, + "location", + location, + "dataTaxonomy", + dataTaxonomy, + "data_attribute_id", + dataAttributeId); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + DataAttributeName that = ((DataAttributeName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.dataTaxonomy, that.dataTaxonomy) + && Objects.equals(this.dataAttributeId, that.dataAttributeId); + } + 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(dataTaxonomy); + h *= 1000003; + h ^= Objects.hashCode(dataAttributeId); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}. + */ + public static class Builder { + private String project; + private String location; + private String dataTaxonomy; + private String dataAttributeId; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDataTaxonomy() { + return dataTaxonomy; + } + + public String getDataAttributeId() { + return dataAttributeId; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setDataTaxonomy(String dataTaxonomy) { + this.dataTaxonomy = dataTaxonomy; + return this; + } + + public Builder setDataAttributeId(String dataAttributeId) { + this.dataAttributeId = dataAttributeId; + return this; + } + + private Builder(DataAttributeName dataAttributeName) { + this.project = dataAttributeName.project; + this.location = dataAttributeName.location; + this.dataTaxonomy = dataAttributeName.dataTaxonomy; + this.dataAttributeId = dataAttributeName.dataAttributeId; + } + + public DataAttributeName build() { + return new DataAttributeName(this); + } + } +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataAttributeOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataAttributeOrBuilder.java new file mode 100644 index 000000000000..dd56e398b5f1 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataAttributeOrBuilder.java @@ -0,0 +1,434 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +public interface DataAttributeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.DataAttribute) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The relative resource name of the dataAttribute, of the form:
+   * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The relative resource name of the dataAttribute, of the form:
+   * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. System generated globally unique ID for the DataAttribute.
+   * This ID will be different if the DataAttribute is deleted and re-created
+   * with the same name.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + java.lang.String getUid(); + /** + * + * + *
+   * Output only. System generated globally unique ID for the DataAttribute.
+   * This ID will be different if the DataAttribute is deleted and re-created
+   * with the same name.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Output only. The time when the DataAttribute was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time when the DataAttribute was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time when the DataAttribute was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the DataAttribute was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The time when the DataAttribute was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The time when the DataAttribute was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Description of the DataAttribute.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. Description of the DataAttribute.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Optional. User friendly display name.
+   * 
+ * + * string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Optional. User friendly display name.
+   * 
+ * + * string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. User-defined labels for the DataAttribute.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. User-defined labels for the DataAttribute.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional. User-defined labels for the DataAttribute.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. User-defined labels for the DataAttribute.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. User-defined labels for the DataAttribute.
+   * 
+ * + * map<string, string> labels = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. The ID of the parent DataAttribute resource, should belong to the
+   * same data taxonomy. Circular dependency in parent chain is not valid.
+   * Maximum depth of the hierarchy allowed is 4.
+   * [a -> b -> c -> d -> e, depth = 4]
+   * 
+ * + * + * string parent_id = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The parentId. + */ + java.lang.String getParentId(); + /** + * + * + *
+   * Optional. The ID of the parent DataAttribute resource, should belong to the
+   * same data taxonomy. Circular dependency in parent chain is not valid.
+   * Maximum depth of the hierarchy allowed is 4.
+   * [a -> b -> c -> d -> e, depth = 4]
+   * 
+ * + * + * string parent_id = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parentId. + */ + com.google.protobuf.ByteString getParentIdBytes(); + + /** + * + * + *
+   * Output only. The number of child attributes present for this attribute.
+   * 
+ * + * int32 attribute_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The attributeCount. + */ + int getAttributeCount(); + + /** + * + * + *
+   * This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 10; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 10; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Optional. Specified when applied to a resource (eg: Cloud Storage bucket,
+   * BigQuery dataset, BigQuery table).
+   * 
+ * + * + * .google.cloud.dataplex.v1.ResourceAccessSpec resource_access_spec = 100 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the resourceAccessSpec field is set. + */ + boolean hasResourceAccessSpec(); + /** + * + * + *
+   * Optional. Specified when applied to a resource (eg: Cloud Storage bucket,
+   * BigQuery dataset, BigQuery table).
+   * 
+ * + * + * .google.cloud.dataplex.v1.ResourceAccessSpec resource_access_spec = 100 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The resourceAccessSpec. + */ + com.google.cloud.dataplex.v1.ResourceAccessSpec getResourceAccessSpec(); + /** + * + * + *
+   * Optional. Specified when applied to a resource (eg: Cloud Storage bucket,
+   * BigQuery dataset, BigQuery table).
+   * 
+ * + * + * .google.cloud.dataplex.v1.ResourceAccessSpec resource_access_spec = 100 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dataplex.v1.ResourceAccessSpecOrBuilder getResourceAccessSpecOrBuilder(); + + /** + * + * + *
+   * Optional. Specified when applied to data stored on the resource (eg: rows,
+   * columns in BigQuery Tables).
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataAccessSpec data_access_spec = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the dataAccessSpec field is set. + */ + boolean hasDataAccessSpec(); + /** + * + * + *
+   * Optional. Specified when applied to data stored on the resource (eg: rows,
+   * columns in BigQuery Tables).
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataAccessSpec data_access_spec = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The dataAccessSpec. + */ + com.google.cloud.dataplex.v1.DataAccessSpec getDataAccessSpec(); + /** + * + * + *
+   * Optional. Specified when applied to data stored on the resource (eg: rows,
+   * columns in BigQuery Tables).
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataAccessSpec data_access_spec = 101 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dataplex.v1.DataAccessSpecOrBuilder getDataAccessSpecOrBuilder(); +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataProfileProto.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataProfileProto.java index 88deb0ddfc93..f0087c5af4f5 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataProfileProto.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataProfileProto.java @@ -31,6 +31,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dataplex_v1_DataProfileSpec_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dataplex_v1_DataProfileSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_DataProfileSpec_PostScanActions_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_DataProfileSpec_PostScanActions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_DataProfileSpec_PostScanActions_BigQueryExport_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_DataProfileSpec_PostScanActions_BigQueryExport_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_DataProfileSpec_SelectedFields_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_DataProfileSpec_SelectedFields_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dataplex_v1_DataProfileResult_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -63,6 +75,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dataplex_v1_DataProfileResult_Profile_Field_ProfileInfo_TopNValue_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dataplex_v1_DataProfileResult_Profile_Field_ProfileInfo_TopNValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_DataProfileResult_PostScanActionsResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_DataProfileResult_PostScanActionsResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_DataProfileResult_PostScanActionsResult_BigQueryExportResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_DataProfileResult_PostScanActionsResult_BigQueryExportResult_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -74,49 +94,78 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n+google/cloud/dataplex/v1/data_profile." + "proto\022\030google.cloud.dataplex.v1\032\037google/" - + "api/field_behavior.proto\032)google/cloud/d" - + "ataplex/v1/processing.proto\"\021\n\017DataProfi" - + "leSpec\"\353\t\n\021DataProfileResult\022\021\n\trow_coun" - + "t\030\003 \001(\003\022D\n\007profile\030\004 \001(\01323.google.cloud." - + "dataplex.v1.DataProfileResult.Profile\022;\n" - + "\014scanned_data\030\005 \001(\0132%.google.cloud.datap" - + "lex.v1.ScannedData\032\277\010\n\007Profile\022I\n\006fields" - + "\030\002 \003(\01329.google.cloud.dataplex.v1.DataPr" - + "ofileResult.Profile.Field\032\350\007\n\005Field\022\014\n\004n" - + "ame\030\001 \001(\t\022\014\n\004type\030\002 \001(\t\022\014\n\004mode\030\003 \001(\t\022V\n" - + "\007profile\030\004 \001(\0132E.google.cloud.dataplex.v" - + "1.DataProfileResult.Profile.Field.Profil" - + "eInfo\032\334\006\n\013ProfileInfo\022\022\n\nnull_ratio\030\002 \001(" - + "\001\022\026\n\016distinct_ratio\030\003 \001(\001\022e\n\014top_n_value" - + "s\030\004 \003(\0132O.google.cloud.dataplex.v1.DataP" - + "rofileResult.Profile.Field.ProfileInfo.T" - + "opNValue\022o\n\016string_profile\030e \001(\0132U.googl" - + "e.cloud.dataplex.v1.DataProfileResult.Pr" - + "ofile.Field.ProfileInfo.StringFieldInfoH" - + "\000\022q\n\017integer_profile\030f \001(\0132V.google.clou" - + "d.dataplex.v1.DataProfileResult.Profile." - + "Field.ProfileInfo.IntegerFieldInfoH\000\022o\n\016" - + "double_profile\030g \001(\0132U.google.cloud.data" - + "plex.v1.DataProfileResult.Profile.Field." - + "ProfileInfo.DoubleFieldInfoH\000\032Q\n\017StringF" - + "ieldInfo\022\022\n\nmin_length\030\001 \001(\003\022\022\n\nmax_leng" - + "th\030\002 \001(\003\022\026\n\016average_length\030\003 \001(\001\032l\n\020Inte" - + "gerFieldInfo\022\017\n\007average\030\001 \001(\001\022\032\n\022standar" - + "d_deviation\030\003 \001(\001\022\013\n\003min\030\004 \001(\003\022\021\n\tquarti" - + "les\030\006 \003(\003\022\013\n\003max\030\005 \001(\003\032k\n\017DoubleFieldInf" - + "o\022\017\n\007average\030\001 \001(\001\022\032\n\022standard_deviation" - + "\030\003 \001(\001\022\013\n\003min\030\004 \001(\001\022\021\n\tquartiles\030\006 \003(\001\022\013" - + "\n\003max\030\005 \001(\001\032)\n\tTopNValue\022\r\n\005value\030\001 \001(\t\022" - + "\r\n\005count\030\002 \001(\003B\014\n\nfield_infoBl\n\034com.goog" - + "le.cloud.dataplex.v1B\020DataProfileProtoP\001" - + "Z8cloud.google.com/go/dataplex/apiv1/dat" - + "aplexpb;dataplexpbb\006proto3" + + "api/field_behavior.proto\032\031google/api/res" + + "ource.proto\032)google/cloud/dataplex/v1/pr" + + "ocessing.proto\"\322\004\n\017DataProfileSpec\022\036\n\020sa" + + "mpling_percent\030\002 \001(\002B\004\342A\001\001\022\030\n\nrow_filter" + + "\030\003 \001(\tB\004\342A\001\001\022Z\n\021post_scan_actions\030\004 \001(\0132" + + "9.google.cloud.dataplex.v1.DataProfileSp" + + "ec.PostScanActionsB\004\342A\001\001\022V\n\016include_fiel" + + "ds\030\005 \001(\01328.google.cloud.dataplex.v1.Data" + + "ProfileSpec.SelectedFieldsB\004\342A\001\001\022V\n\016excl" + + "ude_fields\030\006 \001(\01328.google.cloud.dataplex" + + ".v1.DataProfileSpec.SelectedFieldsB\004\342A\001\001" + + "\032\313\001\n\017PostScanActions\022g\n\017bigquery_export\030" + + "\001 \001(\0132H.google.cloud.dataplex.v1.DataPro" + + "fileSpec.PostScanActions.BigQueryExportB" + + "\004\342A\001\001\032O\n\016BigQueryExport\022=\n\rresults_table" + + "\030\001 \001(\tB&\342A\001\001\372A\037\n\035bigquery.googleapis.com" + + "/Table\032+\n\016SelectedFields\022\031\n\013field_names\030" + + "\001 \003(\tB\004\342A\001\001\"\350\r\n\021DataProfileResult\022\021\n\trow" + + "_count\030\003 \001(\003\022D\n\007profile\030\004 \001(\01323.google.c" + + "loud.dataplex.v1.DataProfileResult.Profi" + + "le\022;\n\014scanned_data\030\005 \001(\0132%.google.cloud." + + "dataplex.v1.ScannedData\022i\n\030post_scan_act" + + "ions_result\030\006 \001(\0132A.google.cloud.dataple" + + "x.v1.DataProfileResult.PostScanActionsRe" + + "sultB\004\342A\001\003\032\316\010\n\007Profile\022I\n\006fields\030\002 \003(\01329" + + ".google.cloud.dataplex.v1.DataProfileRes" + + "ult.Profile.Field\032\367\007\n\005Field\022\014\n\004name\030\001 \001(" + + "\t\022\014\n\004type\030\002 \001(\t\022\014\n\004mode\030\003 \001(\t\022V\n\007profile" + + "\030\004 \001(\0132E.google.cloud.dataplex.v1.DataPr" + + "ofileResult.Profile.Field.ProfileInfo\032\353\006" + + "\n\013ProfileInfo\022\022\n\nnull_ratio\030\002 \001(\001\022\026\n\016dis" + + "tinct_ratio\030\003 \001(\001\022e\n\014top_n_values\030\004 \003(\0132" + + "O.google.cloud.dataplex.v1.DataProfileRe" + + "sult.Profile.Field.ProfileInfo.TopNValue" + + "\022o\n\016string_profile\030e \001(\0132U.google.cloud." + + "dataplex.v1.DataProfileResult.Profile.Fi" + + "eld.ProfileInfo.StringFieldInfoH\000\022q\n\017int" + + "eger_profile\030f \001(\0132V.google.cloud.datapl" + + "ex.v1.DataProfileResult.Profile.Field.Pr" + + "ofileInfo.IntegerFieldInfoH\000\022o\n\016double_p" + + "rofile\030g \001(\0132U.google.cloud.dataplex.v1." + + "DataProfileResult.Profile.Field.ProfileI" + + "nfo.DoubleFieldInfoH\000\032Q\n\017StringFieldInfo" + + "\022\022\n\nmin_length\030\001 \001(\003\022\022\n\nmax_length\030\002 \001(\003" + + "\022\026\n\016average_length\030\003 \001(\001\032l\n\020IntegerField" + + "Info\022\017\n\007average\030\001 \001(\001\022\032\n\022standard_deviat" + + "ion\030\003 \001(\001\022\013\n\003min\030\004 \001(\003\022\021\n\tquartiles\030\006 \003(" + + "\003\022\013\n\003max\030\005 \001(\003\032k\n\017DoubleFieldInfo\022\017\n\007ave" + + "rage\030\001 \001(\001\022\032\n\022standard_deviation\030\003 \001(\001\022\013" + + "\n\003min\030\004 \001(\001\022\021\n\tquartiles\030\006 \003(\001\022\013\n\003max\030\005 " + + "\001(\001\0328\n\tTopNValue\022\r\n\005value\030\001 \001(\t\022\r\n\005count" + + "\030\002 \001(\003\022\r\n\005ratio\030\003 \001(\001B\014\n\nfield_info\032\200\003\n\025" + + "PostScanActionsResult\022|\n\026bigquery_export" + + "_result\030\001 \001(\0132V.google.cloud.dataplex.v1" + + ".DataProfileResult.PostScanActionsResult" + + ".BigQueryExportResultB\004\342A\001\003\032\350\001\n\024BigQuery" + + "ExportResult\022q\n\005state\030\001 \001(\0162\\.google.clo" + + "ud.dataplex.v1.DataProfileResult.PostSca" + + "nActionsResult.BigQueryExportResult.Stat" + + "eB\004\342A\001\003\022\025\n\007message\030\002 \001(\tB\004\342A\001\003\"F\n\005State\022" + + "\025\n\021STATE_UNSPECIFIED\020\000\022\r\n\tSUCCEEDED\020\001\022\n\n" + + "\006FAILED\020\002\022\013\n\007SKIPPED\020\003Bl\n\034com.google.clo" + + "ud.dataplex.v1B\020DataProfileProtoP\001Z8clou" + + "d.google.com/go/dataplex/apiv1/dataplexp" + + "b;dataplexpbb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), com.google.cloud.dataplex.v1.ProcessingProto.getDescriptor(), }); internal_static_google_cloud_dataplex_v1_DataProfileSpec_descriptor = @@ -124,14 +173,42 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { internal_static_google_cloud_dataplex_v1_DataProfileSpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataplex_v1_DataProfileSpec_descriptor, - new java.lang.String[] {}); + new java.lang.String[] { + "SamplingPercent", "RowFilter", "PostScanActions", "IncludeFields", "ExcludeFields", + }); + internal_static_google_cloud_dataplex_v1_DataProfileSpec_PostScanActions_descriptor = + internal_static_google_cloud_dataplex_v1_DataProfileSpec_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_dataplex_v1_DataProfileSpec_PostScanActions_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_DataProfileSpec_PostScanActions_descriptor, + new java.lang.String[] { + "BigqueryExport", + }); + internal_static_google_cloud_dataplex_v1_DataProfileSpec_PostScanActions_BigQueryExport_descriptor = + internal_static_google_cloud_dataplex_v1_DataProfileSpec_PostScanActions_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dataplex_v1_DataProfileSpec_PostScanActions_BigQueryExport_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_DataProfileSpec_PostScanActions_BigQueryExport_descriptor, + new java.lang.String[] { + "ResultsTable", + }); + internal_static_google_cloud_dataplex_v1_DataProfileSpec_SelectedFields_descriptor = + internal_static_google_cloud_dataplex_v1_DataProfileSpec_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_dataplex_v1_DataProfileSpec_SelectedFields_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_DataProfileSpec_SelectedFields_descriptor, + new java.lang.String[] { + "FieldNames", + }); internal_static_google_cloud_dataplex_v1_DataProfileResult_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_google_cloud_dataplex_v1_DataProfileResult_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataplex_v1_DataProfileResult_descriptor, new java.lang.String[] { - "RowCount", "Profile", "ScannedData", + "RowCount", "Profile", "ScannedData", "PostScanActionsResult", }); internal_static_google_cloud_dataplex_v1_DataProfileResult_Profile_descriptor = internal_static_google_cloud_dataplex_v1_DataProfileResult_descriptor @@ -207,9 +284,36 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataplex_v1_DataProfileResult_Profile_Field_ProfileInfo_TopNValue_descriptor, new java.lang.String[] { - "Value", "Count", + "Value", "Count", "Ratio", + }); + internal_static_google_cloud_dataplex_v1_DataProfileResult_PostScanActionsResult_descriptor = + internal_static_google_cloud_dataplex_v1_DataProfileResult_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_dataplex_v1_DataProfileResult_PostScanActionsResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_DataProfileResult_PostScanActionsResult_descriptor, + new java.lang.String[] { + "BigqueryExportResult", + }); + internal_static_google_cloud_dataplex_v1_DataProfileResult_PostScanActionsResult_BigQueryExportResult_descriptor = + internal_static_google_cloud_dataplex_v1_DataProfileResult_PostScanActionsResult_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dataplex_v1_DataProfileResult_PostScanActionsResult_BigQueryExportResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_DataProfileResult_PostScanActionsResult_BigQueryExportResult_descriptor, + new java.lang.String[] { + "State", "Message", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); com.google.cloud.dataplex.v1.ProcessingProto.getDescriptor(); } diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataProfileResult.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataProfileResult.java index f17565d0f541..1da01e63cbb7 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataProfileResult.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataProfileResult.java @@ -381,10 +381,11 @@ public interface ProfileInfoOrBuilder * * *
-         * The list of top N non-null values and number of times they occur in
-         * the scanned data. N is 10 or equal to the number of distinct values
-         * in the field, whichever is smaller. Not available for complex
-         * non-groupable field type RECORD and fields with REPEATABLE mode.
+         * The list of top N non-null values, frequency and ratio with which
+         * they occur in the scanned data. N is 10 or equal to the number of
+         * distinct values in the field, whichever is smaller. Not available for
+         * complex non-groupable field type RECORD and fields with REPEATABLE
+         * mode.
          * 
* * @@ -398,10 +399,11 @@ public interface ProfileInfoOrBuilder * * *
-         * The list of top N non-null values and number of times they occur in
-         * the scanned data. N is 10 or equal to the number of distinct values
-         * in the field, whichever is smaller. Not available for complex
-         * non-groupable field type RECORD and fields with REPEATABLE mode.
+         * The list of top N non-null values, frequency and ratio with which
+         * they occur in the scanned data. N is 10 or equal to the number of
+         * distinct values in the field, whichever is smaller. Not available for
+         * complex non-groupable field type RECORD and fields with REPEATABLE
+         * mode.
          * 
* * @@ -414,10 +416,11 @@ public interface ProfileInfoOrBuilder * * *
-         * The list of top N non-null values and number of times they occur in
-         * the scanned data. N is 10 or equal to the number of distinct values
-         * in the field, whichever is smaller. Not available for complex
-         * non-groupable field type RECORD and fields with REPEATABLE mode.
+         * The list of top N non-null values, frequency and ratio with which
+         * they occur in the scanned data. N is 10 or equal to the number of
+         * distinct values in the field, whichever is smaller. Not available for
+         * complex non-groupable field type RECORD and fields with REPEATABLE
+         * mode.
          * 
* * @@ -429,10 +432,11 @@ public interface ProfileInfoOrBuilder * * *
-         * The list of top N non-null values and number of times they occur in
-         * the scanned data. N is 10 or equal to the number of distinct values
-         * in the field, whichever is smaller. Not available for complex
-         * non-groupable field type RECORD and fields with REPEATABLE mode.
+         * The list of top N non-null values, frequency and ratio with which
+         * they occur in the scanned data. N is 10 or equal to the number of
+         * distinct values in the field, whichever is smaller. Not available for
+         * complex non-groupable field type RECORD and fields with REPEATABLE
+         * mode.
          * 
* * @@ -448,10 +452,11 @@ public interface ProfileInfoOrBuilder * * *
-         * The list of top N non-null values and number of times they occur in
-         * the scanned data. N is 10 or equal to the number of distinct values
-         * in the field, whichever is smaller. Not available for complex
-         * non-groupable field type RECORD and fields with REPEATABLE mode.
+         * The list of top N non-null values, frequency and ratio with which
+         * they occur in the scanned data. N is 10 or equal to the number of
+         * distinct values in the field, whichever is smaller. Not available for
+         * complex non-groupable field type RECORD and fields with REPEATABLE
+         * mode.
          * 
* * @@ -1529,8 +1534,9 @@ public interface IntegerFieldInfoOrBuilder * below this point. The third quartile (Q3) splits off the highest * 25% of data from the lowest 75%. It is known as the upper or 75th * empirical quartile, as 75% of the data lies below this point. - * Here, the quartiles is provided as an ordered list of quartile - * values for the scanned data, occurring in order Q1, median, Q3. + * Here, the quartiles is provided as an ordered list of approximate + * quartile values for the scanned data, occurring in order Q1, + * median, Q3. * * * repeated int64 quartiles = 6; @@ -1551,8 +1557,9 @@ public interface IntegerFieldInfoOrBuilder * below this point. The third quartile (Q3) splits off the highest * 25% of data from the lowest 75%. It is known as the upper or 75th * empirical quartile, as 75% of the data lies below this point. - * Here, the quartiles is provided as an ordered list of quartile - * values for the scanned data, occurring in order Q1, median, Q3. + * Here, the quartiles is provided as an ordered list of approximate + * quartile values for the scanned data, occurring in order Q1, + * median, Q3. * * * repeated int64 quartiles = 6; @@ -1573,8 +1580,9 @@ public interface IntegerFieldInfoOrBuilder * below this point. The third quartile (Q3) splits off the highest * 25% of data from the lowest 75%. It is known as the upper or 75th * empirical quartile, as 75% of the data lies below this point. - * Here, the quartiles is provided as an ordered list of quartile - * values for the scanned data, occurring in order Q1, median, Q3. + * Here, the quartiles is provided as an ordered list of approximate + * quartile values for the scanned data, occurring in order Q1, + * median, Q3. * * * repeated int64 quartiles = 6; @@ -1719,8 +1727,9 @@ public long getMin() { * below this point. The third quartile (Q3) splits off the highest * 25% of data from the lowest 75%. It is known as the upper or 75th * empirical quartile, as 75% of the data lies below this point. - * Here, the quartiles is provided as an ordered list of quartile - * values for the scanned data, occurring in order Q1, median, Q3. + * Here, the quartiles is provided as an ordered list of approximate + * quartile values for the scanned data, occurring in order Q1, + * median, Q3. * * * repeated int64 quartiles = 6; @@ -1744,8 +1753,9 @@ public java.util.List getQuartilesList() { * below this point. The third quartile (Q3) splits off the highest * 25% of data from the lowest 75%. It is known as the upper or 75th * empirical quartile, as 75% of the data lies below this point. - * Here, the quartiles is provided as an ordered list of quartile - * values for the scanned data, occurring in order Q1, median, Q3. + * Here, the quartiles is provided as an ordered list of approximate + * quartile values for the scanned data, occurring in order Q1, + * median, Q3. * * * repeated int64 quartiles = 6; @@ -1768,8 +1778,9 @@ public int getQuartilesCount() { * below this point. The third quartile (Q3) splits off the highest * 25% of data from the lowest 75%. It is known as the upper or 75th * empirical quartile, as 75% of the data lies below this point. - * Here, the quartiles is provided as an ordered list of quartile - * values for the scanned data, occurring in order Q1, median, Q3. + * Here, the quartiles is provided as an ordered list of approximate + * quartile values for the scanned data, occurring in order Q1, + * median, Q3. * * * repeated int64 quartiles = 6; @@ -2541,8 +2552,9 @@ private void ensureQuartilesIsMutable() { * below this point. The third quartile (Q3) splits off the highest * 25% of data from the lowest 75%. It is known as the upper or 75th * empirical quartile, as 75% of the data lies below this point. - * Here, the quartiles is provided as an ordered list of quartile - * values for the scanned data, occurring in order Q1, median, Q3. + * Here, the quartiles is provided as an ordered list of approximate + * quartile values for the scanned data, occurring in order Q1, + * median, Q3. * * * repeated int64 quartiles = 6; @@ -2567,8 +2579,9 @@ public java.util.List getQuartilesList() { * below this point. The third quartile (Q3) splits off the highest * 25% of data from the lowest 75%. It is known as the upper or 75th * empirical quartile, as 75% of the data lies below this point. - * Here, the quartiles is provided as an ordered list of quartile - * values for the scanned data, occurring in order Q1, median, Q3. + * Here, the quartiles is provided as an ordered list of approximate + * quartile values for the scanned data, occurring in order Q1, + * median, Q3. * * * repeated int64 quartiles = 6; @@ -2591,8 +2604,9 @@ public int getQuartilesCount() { * below this point. The third quartile (Q3) splits off the highest * 25% of data from the lowest 75%. It is known as the upper or 75th * empirical quartile, as 75% of the data lies below this point. - * Here, the quartiles is provided as an ordered list of quartile - * values for the scanned data, occurring in order Q1, median, Q3. + * Here, the quartiles is provided as an ordered list of approximate + * quartile values for the scanned data, occurring in order Q1, + * median, Q3. * * * repeated int64 quartiles = 6; @@ -2616,8 +2630,9 @@ public long getQuartiles(int index) { * below this point. The third quartile (Q3) splits off the highest * 25% of data from the lowest 75%. It is known as the upper or 75th * empirical quartile, as 75% of the data lies below this point. - * Here, the quartiles is provided as an ordered list of quartile - * values for the scanned data, occurring in order Q1, median, Q3. + * Here, the quartiles is provided as an ordered list of approximate + * quartile values for the scanned data, occurring in order Q1, + * median, Q3. * * * repeated int64 quartiles = 6; @@ -2646,8 +2661,9 @@ public Builder setQuartiles(int index, long value) { * below this point. The third quartile (Q3) splits off the highest * 25% of data from the lowest 75%. It is known as the upper or 75th * empirical quartile, as 75% of the data lies below this point. - * Here, the quartiles is provided as an ordered list of quartile - * values for the scanned data, occurring in order Q1, median, Q3. + * Here, the quartiles is provided as an ordered list of approximate + * quartile values for the scanned data, occurring in order Q1, + * median, Q3. * * * repeated int64 quartiles = 6; @@ -2675,8 +2691,9 @@ public Builder addQuartiles(long value) { * below this point. The third quartile (Q3) splits off the highest * 25% of data from the lowest 75%. It is known as the upper or 75th * empirical quartile, as 75% of the data lies below this point. - * Here, the quartiles is provided as an ordered list of quartile - * values for the scanned data, occurring in order Q1, median, Q3. + * Here, the quartiles is provided as an ordered list of approximate + * quartile values for the scanned data, occurring in order Q1, + * median, Q3. * * * repeated int64 quartiles = 6; @@ -2703,8 +2720,9 @@ public Builder addAllQuartiles(java.lang.Iterable valu * below this point. The third quartile (Q3) splits off the highest * 25% of data from the lowest 75%. It is known as the upper or 75th * empirical quartile, as 75% of the data lies below this point. - * Here, the quartiles is provided as an ordered list of quartile - * values for the scanned data, occurring in order Q1, median, Q3. + * Here, the quartiles is provided as an ordered list of approximate + * quartile values for the scanned data, occurring in order Q1, + * median, Q3. * * * repeated int64 quartiles = 6; @@ -4268,6 +4286,20 @@ public interface TopNValueOrBuilder * @return The count. */ long getCount(); + + /** + * + * + *
+           * Ratio of the corresponding value in the field against the total
+           * number of rows in the scanned data.
+           * 
+ * + * double ratio = 3; + * + * @return The ratio. + */ + double getRatio(); } /** * @@ -4385,6 +4417,25 @@ public long getCount() { return count_; } + public static final int RATIO_FIELD_NUMBER = 3; + private double ratio_ = 0D; + /** + * + * + *
+           * Ratio of the corresponding value in the field against the total
+           * number of rows in the scanned data.
+           * 
+ * + * double ratio = 3; + * + * @return The ratio. + */ + @java.lang.Override + public double getRatio() { + return ratio_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -4406,6 +4457,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (count_ != 0L) { output.writeInt64(2, count_); } + if (java.lang.Double.doubleToRawLongBits(ratio_) != 0) { + output.writeDouble(3, ratio_); + } getUnknownFields().writeTo(output); } @@ -4421,6 +4475,9 @@ public int getSerializedSize() { if (count_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, count_); } + if (java.lang.Double.doubleToRawLongBits(ratio_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, ratio_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -4445,6 +4502,8 @@ public boolean equals(final java.lang.Object obj) { if (!getValue().equals(other.getValue())) return false; if (getCount() != other.getCount()) return false; + if (java.lang.Double.doubleToLongBits(getRatio()) + != java.lang.Double.doubleToLongBits(other.getRatio())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4460,6 +4519,11 @@ public int hashCode() { hash = (53 * hash) + getValue().hashCode(); hash = (37 * hash) + COUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCount()); + hash = (37 * hash) + RATIO_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getRatio())); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -4632,6 +4696,7 @@ public Builder clear() { bitField0_ = 0; value_ = ""; count_ = 0L; + ratio_ = 0D; return this; } @@ -4686,6 +4751,9 @@ private void buildPartial0( if (((from_bitField0_ & 0x00000002) != 0)) { result.count_ = count_; } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.ratio_ = ratio_; + } } @java.lang.Override @@ -4753,6 +4821,9 @@ public Builder mergeFrom( if (other.getCount() != 0L) { setCount(other.getCount()); } + if (other.getRatio() != 0D) { + setRatio(other.getRatio()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -4791,6 +4862,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000002; break; } // case 16 + case 25: + { + ratio_ = input.readDouble(); + bitField0_ |= 0x00000004; + break; + } // case 25 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -4969,6 +5046,62 @@ public Builder clearCount() { return this; } + private double ratio_; + /** + * + * + *
+             * Ratio of the corresponding value in the field against the total
+             * number of rows in the scanned data.
+             * 
+ * + * double ratio = 3; + * + * @return The ratio. + */ + @java.lang.Override + public double getRatio() { + return ratio_; + } + /** + * + * + *
+             * Ratio of the corresponding value in the field against the total
+             * number of rows in the scanned data.
+             * 
+ * + * double ratio = 3; + * + * @param value The ratio to set. + * @return This builder for chaining. + */ + public Builder setRatio(double value) { + + ratio_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+             * Ratio of the corresponding value in the field against the total
+             * number of rows in the scanned data.
+             * 
+ * + * double ratio = 3; + * + * @return This builder for chaining. + */ + public Builder clearRatio() { + bitField0_ = (bitField0_ & ~0x00000004); + ratio_ = 0D; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -5140,10 +5273,11 @@ public double getDistinctRatio() { * * *
-         * The list of top N non-null values and number of times they occur in
-         * the scanned data. N is 10 or equal to the number of distinct values
-         * in the field, whichever is smaller. Not available for complex
-         * non-groupable field type RECORD and fields with REPEATABLE mode.
+         * The list of top N non-null values, frequency and ratio with which
+         * they occur in the scanned data. N is 10 or equal to the number of
+         * distinct values in the field, whichever is smaller. Not available for
+         * complex non-groupable field type RECORD and fields with REPEATABLE
+         * mode.
          * 
* * @@ -5160,10 +5294,11 @@ public double getDistinctRatio() { * * *
-         * The list of top N non-null values and number of times they occur in
-         * the scanned data. N is 10 or equal to the number of distinct values
-         * in the field, whichever is smaller. Not available for complex
-         * non-groupable field type RECORD and fields with REPEATABLE mode.
+         * The list of top N non-null values, frequency and ratio with which
+         * they occur in the scanned data. N is 10 or equal to the number of
+         * distinct values in the field, whichever is smaller. Not available for
+         * complex non-groupable field type RECORD and fields with REPEATABLE
+         * mode.
          * 
* * @@ -5182,10 +5317,11 @@ public double getDistinctRatio() { * * *
-         * The list of top N non-null values and number of times they occur in
-         * the scanned data. N is 10 or equal to the number of distinct values
-         * in the field, whichever is smaller. Not available for complex
-         * non-groupable field type RECORD and fields with REPEATABLE mode.
+         * The list of top N non-null values, frequency and ratio with which
+         * they occur in the scanned data. N is 10 or equal to the number of
+         * distinct values in the field, whichever is smaller. Not available for
+         * complex non-groupable field type RECORD and fields with REPEATABLE
+         * mode.
          * 
* * @@ -5200,10 +5336,11 @@ public int getTopNValuesCount() { * * *
-         * The list of top N non-null values and number of times they occur in
-         * the scanned data. N is 10 or equal to the number of distinct values
-         * in the field, whichever is smaller. Not available for complex
-         * non-groupable field type RECORD and fields with REPEATABLE mode.
+         * The list of top N non-null values, frequency and ratio with which
+         * they occur in the scanned data. N is 10 or equal to the number of
+         * distinct values in the field, whichever is smaller. Not available for
+         * complex non-groupable field type RECORD and fields with REPEATABLE
+         * mode.
          * 
* * @@ -5219,10 +5356,11 @@ public int getTopNValuesCount() { * * *
-         * The list of top N non-null values and number of times they occur in
-         * the scanned data. N is 10 or equal to the number of distinct values
-         * in the field, whichever is smaller. Not available for complex
-         * non-groupable field type RECORD and fields with REPEATABLE mode.
+         * The list of top N non-null values, frequency and ratio with which
+         * they occur in the scanned data. N is 10 or equal to the number of
+         * distinct values in the field, whichever is smaller. Not available for
+         * complex non-groupable field type RECORD and fields with REPEATABLE
+         * mode.
          * 
* * @@ -6212,10 +6350,11 @@ private void ensureTopNValuesIsMutable() { * * *
-           * The list of top N non-null values and number of times they occur in
-           * the scanned data. N is 10 or equal to the number of distinct values
-           * in the field, whichever is smaller. Not available for complex
-           * non-groupable field type RECORD and fields with REPEATABLE mode.
+           * The list of top N non-null values, frequency and ratio with which
+           * they occur in the scanned data. N is 10 or equal to the number of
+           * distinct values in the field, whichever is smaller. Not available for
+           * complex non-groupable field type RECORD and fields with REPEATABLE
+           * mode.
            * 
* * @@ -6236,10 +6375,11 @@ private void ensureTopNValuesIsMutable() { * * *
-           * The list of top N non-null values and number of times they occur in
-           * the scanned data. N is 10 or equal to the number of distinct values
-           * in the field, whichever is smaller. Not available for complex
-           * non-groupable field type RECORD and fields with REPEATABLE mode.
+           * The list of top N non-null values, frequency and ratio with which
+           * they occur in the scanned data. N is 10 or equal to the number of
+           * distinct values in the field, whichever is smaller. Not available for
+           * complex non-groupable field type RECORD and fields with REPEATABLE
+           * mode.
            * 
* * @@ -6257,10 +6397,11 @@ public int getTopNValuesCount() { * * *
-           * The list of top N non-null values and number of times they occur in
-           * the scanned data. N is 10 or equal to the number of distinct values
-           * in the field, whichever is smaller. Not available for complex
-           * non-groupable field type RECORD and fields with REPEATABLE mode.
+           * The list of top N non-null values, frequency and ratio with which
+           * they occur in the scanned data. N is 10 or equal to the number of
+           * distinct values in the field, whichever is smaller. Not available for
+           * complex non-groupable field type RECORD and fields with REPEATABLE
+           * mode.
            * 
* * @@ -6279,10 +6420,11 @@ public int getTopNValuesCount() { * * *
-           * The list of top N non-null values and number of times they occur in
-           * the scanned data. N is 10 or equal to the number of distinct values
-           * in the field, whichever is smaller. Not available for complex
-           * non-groupable field type RECORD and fields with REPEATABLE mode.
+           * The list of top N non-null values, frequency and ratio with which
+           * they occur in the scanned data. N is 10 or equal to the number of
+           * distinct values in the field, whichever is smaller. Not available for
+           * complex non-groupable field type RECORD and fields with REPEATABLE
+           * mode.
            * 
* * @@ -6309,10 +6451,11 @@ public Builder setTopNValues( * * *
-           * The list of top N non-null values and number of times they occur in
-           * the scanned data. N is 10 or equal to the number of distinct values
-           * in the field, whichever is smaller. Not available for complex
-           * non-groupable field type RECORD and fields with REPEATABLE mode.
+           * The list of top N non-null values, frequency and ratio with which
+           * they occur in the scanned data. N is 10 or equal to the number of
+           * distinct values in the field, whichever is smaller. Not available for
+           * complex non-groupable field type RECORD and fields with REPEATABLE
+           * mode.
            * 
* * @@ -6337,10 +6480,11 @@ public Builder setTopNValues( * * *
-           * The list of top N non-null values and number of times they occur in
-           * the scanned data. N is 10 or equal to the number of distinct values
-           * in the field, whichever is smaller. Not available for complex
-           * non-groupable field type RECORD and fields with REPEATABLE mode.
+           * The list of top N non-null values, frequency and ratio with which
+           * they occur in the scanned data. N is 10 or equal to the number of
+           * distinct values in the field, whichever is smaller. Not available for
+           * complex non-groupable field type RECORD and fields with REPEATABLE
+           * mode.
            * 
* * @@ -6366,10 +6510,11 @@ public Builder addTopNValues( * * *
-           * The list of top N non-null values and number of times they occur in
-           * the scanned data. N is 10 or equal to the number of distinct values
-           * in the field, whichever is smaller. Not available for complex
-           * non-groupable field type RECORD and fields with REPEATABLE mode.
+           * The list of top N non-null values, frequency and ratio with which
+           * they occur in the scanned data. N is 10 or equal to the number of
+           * distinct values in the field, whichever is smaller. Not available for
+           * complex non-groupable field type RECORD and fields with REPEATABLE
+           * mode.
            * 
* * @@ -6396,10 +6541,11 @@ public Builder addTopNValues( * * *
-           * The list of top N non-null values and number of times they occur in
-           * the scanned data. N is 10 or equal to the number of distinct values
-           * in the field, whichever is smaller. Not available for complex
-           * non-groupable field type RECORD and fields with REPEATABLE mode.
+           * The list of top N non-null values, frequency and ratio with which
+           * they occur in the scanned data. N is 10 or equal to the number of
+           * distinct values in the field, whichever is smaller. Not available for
+           * complex non-groupable field type RECORD and fields with REPEATABLE
+           * mode.
            * 
* * @@ -6423,10 +6569,11 @@ public Builder addTopNValues( * * *
-           * The list of top N non-null values and number of times they occur in
-           * the scanned data. N is 10 or equal to the number of distinct values
-           * in the field, whichever is smaller. Not available for complex
-           * non-groupable field type RECORD and fields with REPEATABLE mode.
+           * The list of top N non-null values, frequency and ratio with which
+           * they occur in the scanned data. N is 10 or equal to the number of
+           * distinct values in the field, whichever is smaller. Not available for
+           * complex non-groupable field type RECORD and fields with REPEATABLE
+           * mode.
            * 
* * @@ -6451,10 +6598,11 @@ public Builder addTopNValues( * * *
-           * The list of top N non-null values and number of times they occur in
-           * the scanned data. N is 10 or equal to the number of distinct values
-           * in the field, whichever is smaller. Not available for complex
-           * non-groupable field type RECORD and fields with REPEATABLE mode.
+           * The list of top N non-null values, frequency and ratio with which
+           * they occur in the scanned data. N is 10 or equal to the number of
+           * distinct values in the field, whichever is smaller. Not available for
+           * complex non-groupable field type RECORD and fields with REPEATABLE
+           * mode.
            * 
* * @@ -6480,10 +6628,11 @@ public Builder addAllTopNValues( * * *
-           * The list of top N non-null values and number of times they occur in
-           * the scanned data. N is 10 or equal to the number of distinct values
-           * in the field, whichever is smaller. Not available for complex
-           * non-groupable field type RECORD and fields with REPEATABLE mode.
+           * The list of top N non-null values, frequency and ratio with which
+           * they occur in the scanned data. N is 10 or equal to the number of
+           * distinct values in the field, whichever is smaller. Not available for
+           * complex non-groupable field type RECORD and fields with REPEATABLE
+           * mode.
            * 
* * @@ -6504,10 +6653,11 @@ public Builder clearTopNValues() { * * *
-           * The list of top N non-null values and number of times they occur in
-           * the scanned data. N is 10 or equal to the number of distinct values
-           * in the field, whichever is smaller. Not available for complex
-           * non-groupable field type RECORD and fields with REPEATABLE mode.
+           * The list of top N non-null values, frequency and ratio with which
+           * they occur in the scanned data. N is 10 or equal to the number of
+           * distinct values in the field, whichever is smaller. Not available for
+           * complex non-groupable field type RECORD and fields with REPEATABLE
+           * mode.
            * 
* * @@ -6528,10 +6678,11 @@ public Builder removeTopNValues(int index) { * * *
-           * The list of top N non-null values and number of times they occur in
-           * the scanned data. N is 10 or equal to the number of distinct values
-           * in the field, whichever is smaller. Not available for complex
-           * non-groupable field type RECORD and fields with REPEATABLE mode.
+           * The list of top N non-null values, frequency and ratio with which
+           * they occur in the scanned data. N is 10 or equal to the number of
+           * distinct values in the field, whichever is smaller. Not available for
+           * complex non-groupable field type RECORD and fields with REPEATABLE
+           * mode.
            * 
* * @@ -6547,10 +6698,11 @@ public Builder removeTopNValues(int index) { * * *
-           * The list of top N non-null values and number of times they occur in
-           * the scanned data. N is 10 or equal to the number of distinct values
-           * in the field, whichever is smaller. Not available for complex
-           * non-groupable field type RECORD and fields with REPEATABLE mode.
+           * The list of top N non-null values, frequency and ratio with which
+           * they occur in the scanned data. N is 10 or equal to the number of
+           * distinct values in the field, whichever is smaller. Not available for
+           * complex non-groupable field type RECORD and fields with REPEATABLE
+           * mode.
            * 
* * @@ -6570,10 +6722,11 @@ public Builder removeTopNValues(int index) { * * *
-           * The list of top N non-null values and number of times they occur in
-           * the scanned data. N is 10 or equal to the number of distinct values
-           * in the field, whichever is smaller. Not available for complex
-           * non-groupable field type RECORD and fields with REPEATABLE mode.
+           * The list of top N non-null values, frequency and ratio with which
+           * they occur in the scanned data. N is 10 or equal to the number of
+           * distinct values in the field, whichever is smaller. Not available for
+           * complex non-groupable field type RECORD and fields with REPEATABLE
+           * mode.
            * 
* * @@ -6595,10 +6748,11 @@ public Builder removeTopNValues(int index) { * * *
-           * The list of top N non-null values and number of times they occur in
-           * the scanned data. N is 10 or equal to the number of distinct values
-           * in the field, whichever is smaller. Not available for complex
-           * non-groupable field type RECORD and fields with REPEATABLE mode.
+           * The list of top N non-null values, frequency and ratio with which
+           * they occur in the scanned data. N is 10 or equal to the number of
+           * distinct values in the field, whichever is smaller. Not available for
+           * complex non-groupable field type RECORD and fields with REPEATABLE
+           * mode.
            * 
* * @@ -6617,10 +6771,11 @@ public Builder removeTopNValues(int index) { * * *
-           * The list of top N non-null values and number of times they occur in
-           * the scanned data. N is 10 or equal to the number of distinct values
-           * in the field, whichever is smaller. Not available for complex
-           * non-groupable field type RECORD and fields with REPEATABLE mode.
+           * The list of top N non-null values, frequency and ratio with which
+           * they occur in the scanned data. N is 10 or equal to the number of
+           * distinct values in the field, whichever is smaller. Not available for
+           * complex non-groupable field type RECORD and fields with REPEATABLE
+           * mode.
            * 
* * @@ -6640,10 +6795,11 @@ public Builder removeTopNValues(int index) { * * *
-           * The list of top N non-null values and number of times they occur in
-           * the scanned data. N is 10 or equal to the number of distinct values
-           * in the field, whichever is smaller. Not available for complex
-           * non-groupable field type RECORD and fields with REPEATABLE mode.
+           * The list of top N non-null values, frequency and ratio with which
+           * they occur in the scanned data. N is 10 or equal to the number of
+           * distinct values in the field, whichever is smaller. Not available for
+           * complex non-groupable field type RECORD and fields with REPEATABLE
+           * mode.
            * 
* * @@ -9734,137 +9890,2126 @@ public com.google.cloud.dataplex.v1.DataProfileResult.Profile getDefaultInstance } } - public static final int ROW_COUNT_FIELD_NUMBER = 3; - private long rowCount_ = 0L; - /** - * - * - *
-   * The count of rows scanned.
-   * 
- * - * int64 row_count = 3; - * - * @return The rowCount. - */ - @java.lang.Override - public long getRowCount() { - return rowCount_; - } + public interface PostScanActionsResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult) + com.google.protobuf.MessageOrBuilder { - public static final int PROFILE_FIELD_NUMBER = 4; - private com.google.cloud.dataplex.v1.DataProfileResult.Profile profile_; - /** - * - * - *
-   * The profile information per field.
-   * 
- * - * .google.cloud.dataplex.v1.DataProfileResult.Profile profile = 4; - * - * @return Whether the profile field is set. - */ - @java.lang.Override - public boolean hasProfile() { - return profile_ != null; - } - /** - * - * - *
-   * The profile information per field.
-   * 
- * - * .google.cloud.dataplex.v1.DataProfileResult.Profile profile = 4; - * - * @return The profile. - */ - @java.lang.Override - public com.google.cloud.dataplex.v1.DataProfileResult.Profile getProfile() { - return profile_ == null - ? com.google.cloud.dataplex.v1.DataProfileResult.Profile.getDefaultInstance() - : profile_; + /** + * + * + *
+     * Output only. The result of BigQuery export post scan action.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the bigqueryExportResult field is set. + */ + boolean hasBigqueryExportResult(); + /** + * + * + *
+     * Output only. The result of BigQuery export post scan action.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bigqueryExportResult. + */ + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult + getBigqueryExportResult(); + /** + * + * + *
+     * Output only. The result of BigQuery export post scan action.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResultOrBuilder + getBigqueryExportResultOrBuilder(); } /** * * *
-   * The profile information per field.
+   * The result of post scan actions of DataProfileScan job.
    * 
* - * .google.cloud.dataplex.v1.DataProfileResult.Profile profile = 4; + * Protobuf type {@code google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult} */ - @java.lang.Override - public com.google.cloud.dataplex.v1.DataProfileResult.ProfileOrBuilder getProfileOrBuilder() { - return profile_ == null - ? com.google.cloud.dataplex.v1.DataProfileResult.Profile.getDefaultInstance() - : profile_; - } + public static final class PostScanActionsResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult) + PostScanActionsResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use PostScanActionsResult.newBuilder() to construct. + private PostScanActionsResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } - public static final int SCANNED_DATA_FIELD_NUMBER = 5; - private com.google.cloud.dataplex.v1.ScannedData scannedData_; - /** - * - * - *
-   * The data scanned for this result.
-   * 
- * - * .google.cloud.dataplex.v1.ScannedData scanned_data = 5; - * - * @return Whether the scannedData field is set. - */ - @java.lang.Override - public boolean hasScannedData() { - return scannedData_ != null; - } - /** - * - * - *
-   * The data scanned for this result.
-   * 
- * - * .google.cloud.dataplex.v1.ScannedData scanned_data = 5; - * - * @return The scannedData. - */ - @java.lang.Override - public com.google.cloud.dataplex.v1.ScannedData getScannedData() { - return scannedData_ == null - ? com.google.cloud.dataplex.v1.ScannedData.getDefaultInstance() - : scannedData_; - } - /** - * - * - *
-   * The data scanned for this result.
-   * 
- * - * .google.cloud.dataplex.v1.ScannedData scanned_data = 5; - */ - @java.lang.Override - public com.google.cloud.dataplex.v1.ScannedDataOrBuilder getScannedDataOrBuilder() { - return scannedData_ == null - ? com.google.cloud.dataplex.v1.ScannedData.getDefaultInstance() - : scannedData_; - } + private PostScanActionsResult() {} - private byte memoizedIsInitialized = -1; + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PostScanActionsResult(); + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataProfileProto + .internal_static_google_cloud_dataplex_v1_DataProfileResult_PostScanActionsResult_descriptor; + } - memoizedIsInitialized = 1; - return true; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataProfileProto + .internal_static_google_cloud_dataplex_v1_DataProfileResult_PostScanActionsResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.class, + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.Builder.class); + } - @java.lang.Override + public interface BigQueryExportResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Output only. Execution state for the BigQuery exporting.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+       * Output only. Execution state for the BigQuery exporting.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult + .State + getState(); + + /** + * + * + *
+       * Output only. Additional information about the BigQuery exporting.
+       * 
+ * + * string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The message. + */ + java.lang.String getMessage(); + /** + * + * + *
+       * Output only. Additional information about the BigQuery exporting.
+       * 
+ * + * string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for message. + */ + com.google.protobuf.ByteString getMessageBytes(); + } + /** + * + * + *
+     * The result of BigQuery export post scan action.
+     * 
+ * + * Protobuf type {@code + * google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult} + */ + public static final class BigQueryExportResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult) + BigQueryExportResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use BigQueryExportResult.newBuilder() to construct. + private BigQueryExportResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BigQueryExportResult() { + state_ = 0; + message_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BigQueryExportResult(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataProfileProto + .internal_static_google_cloud_dataplex_v1_DataProfileResult_PostScanActionsResult_BigQueryExportResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataProfileProto + .internal_static_google_cloud_dataplex_v1_DataProfileResult_PostScanActionsResult_BigQueryExportResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult.class, + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult.Builder.class); + } + + /** + * + * + *
+       * Execution state for the exporting.
+       * 
+ * + * Protobuf enum {@code + * google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+         * The exporting state is unspecified.
+         * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+         * The exporting completed successfully.
+         * 
+ * + * SUCCEEDED = 1; + */ + SUCCEEDED(1), + /** + * + * + *
+         * The exporting is no longer running due to an error.
+         * 
+ * + * FAILED = 2; + */ + FAILED(2), + /** + * + * + *
+         * The exporting is skipped due to no valid scan result to export
+         * (usually caused by scan failed).
+         * 
+ * + * SKIPPED = 3; + */ + SKIPPED(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+         * The exporting state is unspecified.
+         * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+         * The exporting completed successfully.
+         * 
+ * + * SUCCEEDED = 1; + */ + public static final int SUCCEEDED_VALUE = 1; + /** + * + * + *
+         * The exporting is no longer running due to an error.
+         * 
+ * + * FAILED = 2; + */ + public static final int FAILED_VALUE = 2; + /** + * + * + *
+         * The exporting is skipped due to no valid scan result to export
+         * (usually caused by scan failed).
+         * 
+ * + * SKIPPED = 3; + */ + public static final int SKIPPED_VALUE = 3; + + 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 SUCCEEDED; + case 2: + return FAILED; + case 3: + return SKIPPED; + 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.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult.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.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State) + } + + public static final int STATE_FIELD_NUMBER = 1; + private int state_ = 0; + /** + * + * + *
+       * Output only. Execution state for the BigQuery exporting.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.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. Execution state for the BigQuery exporting.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult.State + getState() { + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult + .State + result = + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult.State.forNumber(state_); + return result == null + ? com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult.State.UNRECOGNIZED + : result; + } + + public static final int MESSAGE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object message_ = ""; + /** + * + * + *
+       * Output only. Additional information about the BigQuery exporting.
+       * 
+ * + * string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The message. + */ + @java.lang.Override + public java.lang.String getMessage() { + java.lang.Object ref = message_; + 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(); + message_ = s; + return s; + } + } + /** + * + * + *
+       * Output only. Additional information about the BigQuery exporting.
+       * 
+ * + * string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for message. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + message_ = 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 (state_ + != com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult.State.STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, message_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (state_ + != com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult.State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, message_); + } + 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.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult + other = + (com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult) + obj; + + if (state_ != other.state_) return false; + if (!getMessage().equals(other.getMessage())) 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) + MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getMessage().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult + 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.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult + 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.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult + 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.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult + 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.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult + 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.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult + 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 result of BigQuery export post scan action.
+       * 
+ * + * Protobuf type {@code + * google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult) + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataProfileProto + .internal_static_google_cloud_dataplex_v1_DataProfileResult_PostScanActionsResult_BigQueryExportResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataProfileProto + .internal_static_google_cloud_dataplex_v1_DataProfileResult_PostScanActionsResult_BigQueryExportResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult.class, + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult.Builder.class); + } + + // Construct using + // com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + state_ = 0; + message_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.DataProfileProto + .internal_static_google_cloud_dataplex_v1_DataProfileResult_PostScanActionsResult_BigQueryExportResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult + getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult + build() { + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult + buildPartial() { + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult + result = + new com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.message_ = message_; + } + } + + @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.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult) { + return mergeFrom( + (com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult + other) { + if (other + == com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult.getDefaultInstance()) return this; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getMessage().isEmpty()) { + message_ = other.message_; + bitField0_ |= 0x00000002; + 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: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + message_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + 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 int state_ = 0; + /** + * + * + *
+         * Output only. Execution state for the BigQuery exporting.
+         * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.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. Execution state for the BigQuery exporting.
+         * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Output only. Execution state for the BigQuery exporting.
+         * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult.State + getState() { + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult + .State + result = + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult.State.forNumber(state_); + return result == null + ? com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+         * Output only. Execution state for the BigQuery exporting.
+         * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.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.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult.State + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+         * Output only. Execution state for the BigQuery exporting.
+         * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000001); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object message_ = ""; + /** + * + * + *
+         * Output only. Additional information about the BigQuery exporting.
+         * 
+ * + * string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The message. + */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Output only. Additional information about the BigQuery exporting.
+         * 
+ * + * string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for message. + */ + public com.google.protobuf.ByteString getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Output only. Additional information about the BigQuery exporting.
+         * 
+ * + * string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The message to set. + * @return This builder for chaining. + */ + public Builder setMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Output only. Additional information about the BigQuery exporting.
+         * 
+ * + * string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearMessage() { + message_ = getDefaultInstance().getMessage(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+         * Output only. Additional information about the BigQuery exporting.
+         * 
+ * + * string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for message to set. + * @return This builder for chaining. + */ + public Builder setMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + message_ = value; + bitField0_ |= 0x00000002; + 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.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult) + private static final com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult(); + } + + public static com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQueryExportResult 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.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int BIGQUERY_EXPORT_RESULT_FIELD_NUMBER = 1; + private com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult + bigqueryExportResult_; + /** + * + * + *
+     * Output only. The result of BigQuery export post scan action.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the bigqueryExportResult field is set. + */ + @java.lang.Override + public boolean hasBigqueryExportResult() { + return bigqueryExportResult_ != null; + } + /** + * + * + *
+     * Output only. The result of BigQuery export post scan action.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bigqueryExportResult. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult + getBigqueryExportResult() { + return bigqueryExportResult_ == null + ? com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult.getDefaultInstance() + : bigqueryExportResult_; + } + /** + * + * + *
+     * Output only. The result of BigQuery export post scan action.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResultOrBuilder + getBigqueryExportResultOrBuilder() { + return bigqueryExportResult_ == null + ? com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult.getDefaultInstance() + : bigqueryExportResult_; + } + + 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 (bigqueryExportResult_ != null) { + output.writeMessage(1, getBigqueryExportResult()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (bigqueryExportResult_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBigqueryExportResult()); + } + 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.dataplex.v1.DataProfileResult.PostScanActionsResult)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult other = + (com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult) obj; + + if (hasBigqueryExportResult() != other.hasBigqueryExportResult()) return false; + if (hasBigqueryExportResult()) { + if (!getBigqueryExportResult().equals(other.getBigqueryExportResult())) 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 (hasBigqueryExportResult()) { + hash = (37 * hash) + BIGQUERY_EXPORT_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getBigqueryExportResult().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult 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.dataplex.v1.DataProfileResult.PostScanActionsResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult 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.dataplex.v1.DataProfileResult.PostScanActionsResult parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult 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.dataplex.v1.DataProfileResult.PostScanActionsResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + 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.dataplex.v1.DataProfileResult.PostScanActionsResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult 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.dataplex.v1.DataProfileResult.PostScanActionsResult 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 result of post scan actions of DataProfileScan job.
+     * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult) + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataProfileProto + .internal_static_google_cloud_dataplex_v1_DataProfileResult_PostScanActionsResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataProfileProto + .internal_static_google_cloud_dataplex_v1_DataProfileResult_PostScanActionsResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.class, + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.Builder.class); + } + + // Construct using + // com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + bigqueryExportResult_ = null; + if (bigqueryExportResultBuilder_ != null) { + bigqueryExportResultBuilder_.dispose(); + bigqueryExportResultBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.DataProfileProto + .internal_static_google_cloud_dataplex_v1_DataProfileResult_PostScanActionsResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult build() { + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult buildPartial() { + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult result = + new com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.bigqueryExportResult_ = + bigqueryExportResultBuilder_ == null + ? bigqueryExportResult_ + : bigqueryExportResultBuilder_.build(); + } + } + + @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.dataplex.v1.DataProfileResult.PostScanActionsResult) { + return mergeFrom( + (com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult other) { + if (other + == com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .getDefaultInstance()) return this; + if (other.hasBigqueryExportResult()) { + mergeBigqueryExportResult(other.getBigqueryExportResult()); + } + 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( + getBigqueryExportResultFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + 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 int bitField0_; + + private com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult + bigqueryExportResult_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult, + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult.Builder, + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResultOrBuilder> + bigqueryExportResultBuilder_; + /** + * + * + *
+       * Output only. The result of BigQuery export post scan action.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the bigqueryExportResult field is set. + */ + public boolean hasBigqueryExportResult() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Output only. The result of BigQuery export post scan action.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bigqueryExportResult. + */ + public com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult + getBigqueryExportResult() { + if (bigqueryExportResultBuilder_ == null) { + return bigqueryExportResult_ == null + ? com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult.getDefaultInstance() + : bigqueryExportResult_; + } else { + return bigqueryExportResultBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Output only. The result of BigQuery export post scan action.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setBigqueryExportResult( + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult + value) { + if (bigqueryExportResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + bigqueryExportResult_ = value; + } else { + bigqueryExportResultBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The result of BigQuery export post scan action.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setBigqueryExportResult( + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult + .Builder + builderForValue) { + if (bigqueryExportResultBuilder_ == null) { + bigqueryExportResult_ = builderForValue.build(); + } else { + bigqueryExportResultBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The result of BigQuery export post scan action.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeBigqueryExportResult( + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult + value) { + if (bigqueryExportResultBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && bigqueryExportResult_ != null + && bigqueryExportResult_ + != com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult.getDefaultInstance()) { + getBigqueryExportResultBuilder().mergeFrom(value); + } else { + bigqueryExportResult_ = value; + } + } else { + bigqueryExportResultBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The result of BigQuery export post scan action.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearBigqueryExportResult() { + bitField0_ = (bitField0_ & ~0x00000001); + bigqueryExportResult_ = null; + if (bigqueryExportResultBuilder_ != null) { + bigqueryExportResultBuilder_.dispose(); + bigqueryExportResultBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The result of BigQuery export post scan action.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult.Builder + getBigqueryExportResultBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getBigqueryExportResultFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Output only. The result of BigQuery export post scan action.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResultOrBuilder + getBigqueryExportResultOrBuilder() { + if (bigqueryExportResultBuilder_ != null) { + return bigqueryExportResultBuilder_.getMessageOrBuilder(); + } else { + return bigqueryExportResult_ == null + ? com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult.getDefaultInstance() + : bigqueryExportResult_; + } + } + /** + * + * + *
+       * Output only. The result of BigQuery export post scan action.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult, + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult.Builder, + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResultOrBuilder> + getBigqueryExportResultFieldBuilder() { + if (bigqueryExportResultBuilder_ == null) { + bigqueryExportResultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult, + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResult.Builder, + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .BigQueryExportResultOrBuilder>( + getBigqueryExportResult(), getParentForChildren(), isClean()); + bigqueryExportResult_ = null; + } + return bigqueryExportResultBuilder_; + } + + @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.dataplex.v1.DataProfileResult.PostScanActionsResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult) + private static final com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult(); + } + + public static com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PostScanActionsResult 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.dataplex.v1.DataProfileResult.PostScanActionsResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int ROW_COUNT_FIELD_NUMBER = 3; + private long rowCount_ = 0L; + /** + * + * + *
+   * The count of rows scanned.
+   * 
+ * + * int64 row_count = 3; + * + * @return The rowCount. + */ + @java.lang.Override + public long getRowCount() { + return rowCount_; + } + + public static final int PROFILE_FIELD_NUMBER = 4; + private com.google.cloud.dataplex.v1.DataProfileResult.Profile profile_; + /** + * + * + *
+   * The profile information per field.
+   * 
+ * + * .google.cloud.dataplex.v1.DataProfileResult.Profile profile = 4; + * + * @return Whether the profile field is set. + */ + @java.lang.Override + public boolean hasProfile() { + return profile_ != null; + } + /** + * + * + *
+   * The profile information per field.
+   * 
+ * + * .google.cloud.dataplex.v1.DataProfileResult.Profile profile = 4; + * + * @return The profile. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataProfileResult.Profile getProfile() { + return profile_ == null + ? com.google.cloud.dataplex.v1.DataProfileResult.Profile.getDefaultInstance() + : profile_; + } + /** + * + * + *
+   * The profile information per field.
+   * 
+ * + * .google.cloud.dataplex.v1.DataProfileResult.Profile profile = 4; + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataProfileResult.ProfileOrBuilder getProfileOrBuilder() { + return profile_ == null + ? com.google.cloud.dataplex.v1.DataProfileResult.Profile.getDefaultInstance() + : profile_; + } + + public static final int SCANNED_DATA_FIELD_NUMBER = 5; + private com.google.cloud.dataplex.v1.ScannedData scannedData_; + /** + * + * + *
+   * The data scanned for this result.
+   * 
+ * + * .google.cloud.dataplex.v1.ScannedData scanned_data = 5; + * + * @return Whether the scannedData field is set. + */ + @java.lang.Override + public boolean hasScannedData() { + return scannedData_ != null; + } + /** + * + * + *
+   * The data scanned for this result.
+   * 
+ * + * .google.cloud.dataplex.v1.ScannedData scanned_data = 5; + * + * @return The scannedData. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.ScannedData getScannedData() { + return scannedData_ == null + ? com.google.cloud.dataplex.v1.ScannedData.getDefaultInstance() + : scannedData_; + } + /** + * + * + *
+   * The data scanned for this result.
+   * 
+ * + * .google.cloud.dataplex.v1.ScannedData scanned_data = 5; + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.ScannedDataOrBuilder getScannedDataOrBuilder() { + return scannedData_ == null + ? com.google.cloud.dataplex.v1.ScannedData.getDefaultInstance() + : scannedData_; + } + + public static final int POST_SCAN_ACTIONS_RESULT_FIELD_NUMBER = 6; + private com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + postScanActionsResult_; + /** + * + * + *
+   * Output only. The result of post scan actions.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult post_scan_actions_result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the postScanActionsResult field is set. + */ + @java.lang.Override + public boolean hasPostScanActionsResult() { + return postScanActionsResult_ != null; + } + /** + * + * + *
+   * Output only. The result of post scan actions.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult post_scan_actions_result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The postScanActionsResult. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + getPostScanActionsResult() { + return postScanActionsResult_ == null + ? com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.getDefaultInstance() + : postScanActionsResult_; + } + /** + * + * + *
+   * Output only. The result of post scan actions.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult post_scan_actions_result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResultOrBuilder + getPostScanActionsResultOrBuilder() { + return postScanActionsResult_ == null + ? com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.getDefaultInstance() + : postScanActionsResult_; + } + + 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 (rowCount_ != 0L) { output.writeInt64(3, rowCount_); @@ -9875,6 +12020,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (scannedData_ != null) { output.writeMessage(5, getScannedData()); } + if (postScanActionsResult_ != null) { + output.writeMessage(6, getPostScanActionsResult()); + } getUnknownFields().writeTo(output); } @@ -9893,6 +12041,10 @@ public int getSerializedSize() { if (scannedData_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getScannedData()); } + if (postScanActionsResult_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(6, getPostScanActionsResult()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -9918,6 +12070,10 @@ public boolean equals(final java.lang.Object obj) { if (hasScannedData()) { if (!getScannedData().equals(other.getScannedData())) return false; } + if (hasPostScanActionsResult() != other.hasPostScanActionsResult()) return false; + if (hasPostScanActionsResult()) { + if (!getPostScanActionsResult().equals(other.getPostScanActionsResult())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -9939,6 +12095,10 @@ public int hashCode() { hash = (37 * hash) + SCANNED_DATA_FIELD_NUMBER; hash = (53 * hash) + getScannedData().hashCode(); } + if (hasPostScanActionsResult()) { + hash = (37 * hash) + POST_SCAN_ACTIONS_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getPostScanActionsResult().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -10090,6 +12250,11 @@ public Builder clear() { scannedDataBuilder_.dispose(); scannedDataBuilder_ = null; } + postScanActionsResult_ = null; + if (postScanActionsResultBuilder_ != null) { + postScanActionsResultBuilder_.dispose(); + postScanActionsResultBuilder_ = null; + } return this; } @@ -10136,6 +12301,12 @@ private void buildPartial0(com.google.cloud.dataplex.v1.DataProfileResult result result.scannedData_ = scannedDataBuilder_ == null ? scannedData_ : scannedDataBuilder_.build(); } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.postScanActionsResult_ = + postScanActionsResultBuilder_ == null + ? postScanActionsResult_ + : postScanActionsResultBuilder_.build(); + } } @java.lang.Override @@ -10192,6 +12363,9 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.DataProfileResult other) { if (other.hasScannedData()) { mergeScannedData(other.getScannedData()); } + if (other.hasPostScanActionsResult()) { + mergePostScanActionsResult(other.getPostScanActionsResult()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -10236,6 +12410,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 42 + case 50: + { + input.readMessage( + getPostScanActionsResultFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 50 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -10677,6 +12858,219 @@ public com.google.cloud.dataplex.v1.ScannedDataOrBuilder getScannedDataOrBuilder return scannedDataBuilder_; } + private com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + postScanActionsResult_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult, + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.Builder, + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResultOrBuilder> + postScanActionsResultBuilder_; + /** + * + * + *
+     * Output only. The result of post scan actions.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult post_scan_actions_result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the postScanActionsResult field is set. + */ + public boolean hasPostScanActionsResult() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Output only. The result of post scan actions.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult post_scan_actions_result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The postScanActionsResult. + */ + public com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + getPostScanActionsResult() { + if (postScanActionsResultBuilder_ == null) { + return postScanActionsResult_ == null + ? com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .getDefaultInstance() + : postScanActionsResult_; + } else { + return postScanActionsResultBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The result of post scan actions.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult post_scan_actions_result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPostScanActionsResult( + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult value) { + if (postScanActionsResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + postScanActionsResult_ = value; + } else { + postScanActionsResultBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The result of post scan actions.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult post_scan_actions_result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPostScanActionsResult( + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.Builder + builderForValue) { + if (postScanActionsResultBuilder_ == null) { + postScanActionsResult_ = builderForValue.build(); + } else { + postScanActionsResultBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The result of post scan actions.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult post_scan_actions_result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergePostScanActionsResult( + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult value) { + if (postScanActionsResultBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && postScanActionsResult_ != null + && postScanActionsResult_ + != com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .getDefaultInstance()) { + getPostScanActionsResultBuilder().mergeFrom(value); + } else { + postScanActionsResult_ = value; + } + } else { + postScanActionsResultBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The result of post scan actions.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult post_scan_actions_result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearPostScanActionsResult() { + bitField0_ = (bitField0_ & ~0x00000008); + postScanActionsResult_ = null; + if (postScanActionsResultBuilder_ != null) { + postScanActionsResultBuilder_.dispose(); + postScanActionsResultBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The result of post scan actions.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult post_scan_actions_result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.Builder + getPostScanActionsResultBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getPostScanActionsResultFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The result of post scan actions.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult post_scan_actions_result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResultOrBuilder + getPostScanActionsResultOrBuilder() { + if (postScanActionsResultBuilder_ != null) { + return postScanActionsResultBuilder_.getMessageOrBuilder(); + } else { + return postScanActionsResult_ == null + ? com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult + .getDefaultInstance() + : postScanActionsResult_; + } + } + /** + * + * + *
+     * Output only. The result of post scan actions.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult post_scan_actions_result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult, + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.Builder, + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResultOrBuilder> + getPostScanActionsResultFieldBuilder() { + if (postScanActionsResultBuilder_ == null) { + postScanActionsResultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult, + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult.Builder, + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResultOrBuilder>( + getPostScanActionsResult(), getParentForChildren(), isClean()); + postScanActionsResult_ = null; + } + return postScanActionsResultBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataProfileResultOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataProfileResultOrBuilder.java index 14192de5556a..9c446bc41705 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataProfileResultOrBuilder.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataProfileResultOrBuilder.java @@ -105,4 +105,46 @@ public interface DataProfileResultOrBuilder * .google.cloud.dataplex.v1.ScannedData scanned_data = 5; */ com.google.cloud.dataplex.v1.ScannedDataOrBuilder getScannedDataOrBuilder(); + + /** + * + * + *
+   * Output only. The result of post scan actions.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult post_scan_actions_result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the postScanActionsResult field is set. + */ + boolean hasPostScanActionsResult(); + /** + * + * + *
+   * Output only. The result of post scan actions.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult post_scan_actions_result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The postScanActionsResult. + */ + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult getPostScanActionsResult(); + /** + * + * + *
+   * Output only. The result of post scan actions.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResult post_scan_actions_result = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.dataplex.v1.DataProfileResult.PostScanActionsResultOrBuilder + getPostScanActionsResultOrBuilder(); } diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataProfileSpec.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataProfileSpec.java index 9b9caf8f34a8..c5c167e7f1cc 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataProfileSpec.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataProfileSpec.java @@ -37,27 +37,2682 @@ private DataProfileSpec(com.google.protobuf.GeneratedMessageV3.Builder builde super(builder); } - private DataProfileSpec() {} + private DataProfileSpec() { + rowFilter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DataProfileSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataProfileProto + .internal_static_google_cloud_dataplex_v1_DataProfileSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataProfileProto + .internal_static_google_cloud_dataplex_v1_DataProfileSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataProfileSpec.class, + com.google.cloud.dataplex.v1.DataProfileSpec.Builder.class); + } + + public interface PostScanActionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.DataProfileSpec.PostScanActions) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. If set, results will be exported to the provided BigQuery
+     * table.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the bigqueryExport field is set. + */ + boolean hasBigqueryExport(); + /** + * + * + *
+     * Optional. If set, results will be exported to the provided BigQuery
+     * table.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bigqueryExport. + */ + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport getBigqueryExport(); + /** + * + * + *
+     * Optional. If set, results will be exported to the provided BigQuery
+     * table.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExportOrBuilder + getBigqueryExportOrBuilder(); + } + /** + * + * + *
+   * The configuration of post scan actions of DataProfileScan job.
+   * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DataProfileSpec.PostScanActions} + */ + public static final class PostScanActions extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.DataProfileSpec.PostScanActions) + PostScanActionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use PostScanActions.newBuilder() to construct. + private PostScanActions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PostScanActions() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PostScanActions(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataProfileProto + .internal_static_google_cloud_dataplex_v1_DataProfileSpec_PostScanActions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataProfileProto + .internal_static_google_cloud_dataplex_v1_DataProfileSpec_PostScanActions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.class, + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.Builder.class); + } + + public interface BigQueryExportOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Optional. The BigQuery table to export DataProfileScan results to.
+       * Format:
+       * projects/{project}/datasets/{dataset}/tables/{table}
+       * 
+ * + * + * string results_table = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The resultsTable. + */ + java.lang.String getResultsTable(); + /** + * + * + *
+       * Optional. The BigQuery table to export DataProfileScan results to.
+       * Format:
+       * projects/{project}/datasets/{dataset}/tables/{table}
+       * 
+ * + * + * string results_table = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for resultsTable. + */ + com.google.protobuf.ByteString getResultsTableBytes(); + } + /** + * + * + *
+     * The configuration of BigQuery export post scan action.
+     * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport} + */ + public static final class BigQueryExport extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport) + BigQueryExportOrBuilder { + private static final long serialVersionUID = 0L; + // Use BigQueryExport.newBuilder() to construct. + private BigQueryExport(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BigQueryExport() { + resultsTable_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BigQueryExport(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataProfileProto + .internal_static_google_cloud_dataplex_v1_DataProfileSpec_PostScanActions_BigQueryExport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataProfileProto + .internal_static_google_cloud_dataplex_v1_DataProfileSpec_PostScanActions_BigQueryExport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport.class, + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport.Builder + .class); + } + + public static final int RESULTS_TABLE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object resultsTable_ = ""; + /** + * + * + *
+       * Optional. The BigQuery table to export DataProfileScan results to.
+       * Format:
+       * projects/{project}/datasets/{dataset}/tables/{table}
+       * 
+ * + * + * string results_table = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The resultsTable. + */ + @java.lang.Override + public java.lang.String getResultsTable() { + java.lang.Object ref = resultsTable_; + 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(); + resultsTable_ = s; + return s; + } + } + /** + * + * + *
+       * Optional. The BigQuery table to export DataProfileScan results to.
+       * Format:
+       * projects/{project}/datasets/{dataset}/tables/{table}
+       * 
+ * + * + * string results_table = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for resultsTable. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResultsTableBytes() { + java.lang.Object ref = resultsTable_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resultsTable_ = 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(resultsTable_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resultsTable_); + } + 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(resultsTable_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resultsTable_); + } + 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.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport other = + (com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport) obj; + + if (!getResultsTable().equals(other.getResultsTable())) 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) + RESULTS_TABLE_FIELD_NUMBER; + hash = (53 * hash) + getResultsTable().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + 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.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + 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.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + 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.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + 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.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + 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.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport 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 configuration of BigQuery export post scan action.
+       * 
+ * + * Protobuf type {@code + * google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport) + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExportOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataProfileProto + .internal_static_google_cloud_dataplex_v1_DataProfileSpec_PostScanActions_BigQueryExport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataProfileProto + .internal_static_google_cloud_dataplex_v1_DataProfileSpec_PostScanActions_BigQueryExport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport.class, + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + .Builder.class); + } + + // Construct using + // com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + resultsTable_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.DataProfileProto + .internal_static_google_cloud_dataplex_v1_DataProfileSpec_PostScanActions_BigQueryExport_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport build() { + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + buildPartial() { + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport result = + new com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.resultsTable_ = resultsTable_; + } + } + + @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.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport) { + return mergeFrom( + (com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport other) { + if (other + == com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + .getDefaultInstance()) return this; + if (!other.getResultsTable().isEmpty()) { + resultsTable_ = other.resultsTable_; + bitField0_ |= 0x00000001; + 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: + { + resultsTable_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + 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 int bitField0_; + + private java.lang.Object resultsTable_ = ""; + /** + * + * + *
+         * Optional. The BigQuery table to export DataProfileScan results to.
+         * Format:
+         * projects/{project}/datasets/{dataset}/tables/{table}
+         * 
+ * + * + * string results_table = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The resultsTable. + */ + public java.lang.String getResultsTable() { + java.lang.Object ref = resultsTable_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resultsTable_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Optional. The BigQuery table to export DataProfileScan results to.
+         * Format:
+         * projects/{project}/datasets/{dataset}/tables/{table}
+         * 
+ * + * + * string results_table = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for resultsTable. + */ + public com.google.protobuf.ByteString getResultsTableBytes() { + java.lang.Object ref = resultsTable_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resultsTable_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Optional. The BigQuery table to export DataProfileScan results to.
+         * Format:
+         * projects/{project}/datasets/{dataset}/tables/{table}
+         * 
+ * + * + * string results_table = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The resultsTable to set. + * @return This builder for chaining. + */ + public Builder setResultsTable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resultsTable_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. The BigQuery table to export DataProfileScan results to.
+         * Format:
+         * projects/{project}/datasets/{dataset}/tables/{table}
+         * 
+ * + * + * string results_table = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearResultsTable() { + resultsTable_ = getDefaultInstance().getResultsTable(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. The BigQuery table to export DataProfileScan results to.
+         * Format:
+         * projects/{project}/datasets/{dataset}/tables/{table}
+         * 
+ * + * + * string results_table = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for resultsTable to set. + * @return This builder for chaining. + */ + public Builder setResultsTableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resultsTable_ = value; + bitField0_ |= 0x00000001; + 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.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport) + private static final com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions + .BigQueryExport + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport(); + } + + public static com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQueryExport 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.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int BIGQUERY_EXPORT_FIELD_NUMBER = 1; + private com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + bigqueryExport_; + /** + * + * + *
+     * Optional. If set, results will be exported to the provided BigQuery
+     * table.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the bigqueryExport field is set. + */ + @java.lang.Override + public boolean hasBigqueryExport() { + return bigqueryExport_ != null; + } + /** + * + * + *
+     * Optional. If set, results will be exported to the provided BigQuery
+     * table.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bigqueryExport. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + getBigqueryExport() { + return bigqueryExport_ == null + ? com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + .getDefaultInstance() + : bigqueryExport_; + } + /** + * + * + *
+     * Optional. If set, results will be exported to the provided BigQuery
+     * table.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExportOrBuilder + getBigqueryExportOrBuilder() { + return bigqueryExport_ == null + ? com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + .getDefaultInstance() + : bigqueryExport_; + } + + 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 (bigqueryExport_ != null) { + output.writeMessage(1, getBigqueryExport()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (bigqueryExport_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBigqueryExport()); + } + 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.dataplex.v1.DataProfileSpec.PostScanActions)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions other = + (com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions) obj; + + if (hasBigqueryExport() != other.hasBigqueryExport()) return false; + if (hasBigqueryExport()) { + if (!getBigqueryExport().equals(other.getBigqueryExport())) 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 (hasBigqueryExport()) { + hash = (37 * hash) + BIGQUERY_EXPORT_FIELD_NUMBER; + hash = (53 * hash) + getBigqueryExport().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions 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.dataplex.v1.DataProfileSpec.PostScanActions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions 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.dataplex.v1.DataProfileSpec.PostScanActions parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions 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.dataplex.v1.DataProfileSpec.PostScanActions parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions 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.dataplex.v1.DataProfileSpec.PostScanActions parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions 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.dataplex.v1.DataProfileSpec.PostScanActions 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 configuration of post scan actions of DataProfileScan job.
+     * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DataProfileSpec.PostScanActions} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.DataProfileSpec.PostScanActions) + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataProfileProto + .internal_static_google_cloud_dataplex_v1_DataProfileSpec_PostScanActions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataProfileProto + .internal_static_google_cloud_dataplex_v1_DataProfileSpec_PostScanActions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.class, + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.Builder.class); + } + + // Construct using com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + bigqueryExport_ = null; + if (bigqueryExportBuilder_ != null) { + bigqueryExportBuilder_.dispose(); + bigqueryExportBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.DataProfileProto + .internal_static_google_cloud_dataplex_v1_DataProfileSpec_PostScanActions_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions + getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions build() { + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions buildPartial() { + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions result = + new com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.bigqueryExport_ = + bigqueryExportBuilder_ == null ? bigqueryExport_ : bigqueryExportBuilder_.build(); + } + } + + @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.dataplex.v1.DataProfileSpec.PostScanActions) { + return mergeFrom((com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions other) { + if (other + == com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.getDefaultInstance()) + return this; + if (other.hasBigqueryExport()) { + mergeBigqueryExport(other.getBigqueryExport()); + } + 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( + getBigqueryExportFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + 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 int bitField0_; + + private com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + bigqueryExport_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport, + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport.Builder, + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExportOrBuilder> + bigqueryExportBuilder_; + /** + * + * + *
+       * Optional. If set, results will be exported to the provided BigQuery
+       * table.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the bigqueryExport field is set. + */ + public boolean hasBigqueryExport() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Optional. If set, results will be exported to the provided BigQuery
+       * table.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bigqueryExport. + */ + public com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + getBigqueryExport() { + if (bigqueryExportBuilder_ == null) { + return bigqueryExport_ == null + ? com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + .getDefaultInstance() + : bigqueryExport_; + } else { + return bigqueryExportBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Optional. If set, results will be exported to the provided BigQuery
+       * table.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setBigqueryExport( + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport value) { + if (bigqueryExportBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + bigqueryExport_ = value; + } else { + bigqueryExportBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. If set, results will be exported to the provided BigQuery
+       * table.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setBigqueryExport( + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport.Builder + builderForValue) { + if (bigqueryExportBuilder_ == null) { + bigqueryExport_ = builderForValue.build(); + } else { + bigqueryExportBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. If set, results will be exported to the provided BigQuery
+       * table.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeBigqueryExport( + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport value) { + if (bigqueryExportBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && bigqueryExport_ != null + && bigqueryExport_ + != com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + .getDefaultInstance()) { + getBigqueryExportBuilder().mergeFrom(value); + } else { + bigqueryExport_ = value; + } + } else { + bigqueryExportBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. If set, results will be exported to the provided BigQuery
+       * table.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearBigqueryExport() { + bitField0_ = (bitField0_ & ~0x00000001); + bigqueryExport_ = null; + if (bigqueryExportBuilder_ != null) { + bigqueryExportBuilder_.dispose(); + bigqueryExportBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. If set, results will be exported to the provided BigQuery
+       * table.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport.Builder + getBigqueryExportBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getBigqueryExportFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. If set, results will be exported to the provided BigQuery
+       * table.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExportOrBuilder + getBigqueryExportOrBuilder() { + if (bigqueryExportBuilder_ != null) { + return bigqueryExportBuilder_.getMessageOrBuilder(); + } else { + return bigqueryExport_ == null + ? com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + .getDefaultInstance() + : bigqueryExport_; + } + } + /** + * + * + *
+       * Optional. If set, results will be exported to the provided BigQuery
+       * table.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport, + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport.Builder, + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExportOrBuilder> + getBigqueryExportFieldBuilder() { + if (bigqueryExportBuilder_ == null) { + bigqueryExportBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport, + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.BigQueryExport + .Builder, + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions + .BigQueryExportOrBuilder>( + getBigqueryExport(), getParentForChildren(), isClean()); + bigqueryExport_ = null; + } + return bigqueryExportBuilder_; + } + + @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.dataplex.v1.DataProfileSpec.PostScanActions) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.DataProfileSpec.PostScanActions) + private static final com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions(); + } + + public static com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PostScanActions 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.dataplex.v1.DataProfileSpec.PostScanActions + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SelectedFieldsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.DataProfileSpec.SelectedFields) + com.google.protobuf.MessageOrBuilder { + /** + * + * + *
+     * Optional. Expected input is a list of fully qualified names of fields as
+     * in the schema.
+     *
+     * Only top-level field names for nested fields are supported.
+     * For instance, if 'x' is of nested field type, listing 'x' is supported
+     * but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of
+     * 'x'.
+     * 
+ * + * repeated string field_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the fieldNames. + */ + java.util.List getFieldNamesList(); + /** + * + * + *
+     * Optional. Expected input is a list of fully qualified names of fields as
+     * in the schema.
+     *
+     * Only top-level field names for nested fields are supported.
+     * For instance, if 'x' is of nested field type, listing 'x' is supported
+     * but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of
+     * 'x'.
+     * 
+ * + * repeated string field_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of fieldNames. + */ + int getFieldNamesCount(); + /** + * + * + *
+     * Optional. Expected input is a list of fully qualified names of fields as
+     * in the schema.
+     *
+     * Only top-level field names for nested fields are supported.
+     * For instance, if 'x' is of nested field type, listing 'x' is supported
+     * but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of
+     * 'x'.
+     * 
+ * + * repeated string field_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The fieldNames at the given index. + */ + java.lang.String getFieldNames(int index); + /** + * + * + *
+     * Optional. Expected input is a list of fully qualified names of fields as
+     * in the schema.
+     *
+     * Only top-level field names for nested fields are supported.
+     * For instance, if 'x' is of nested field type, listing 'x' is supported
+     * but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of
+     * 'x'.
+     * 
+ * + * repeated string field_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the fieldNames at the given index. + */ + com.google.protobuf.ByteString getFieldNamesBytes(int index); + } + /** + * + * + *
+   * The specification for fields to include or exclude in data profile scan.
+   * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DataProfileSpec.SelectedFields} + */ + public static final class SelectedFields extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.DataProfileSpec.SelectedFields) + SelectedFieldsOrBuilder { + private static final long serialVersionUID = 0L; + // Use SelectedFields.newBuilder() to construct. + private SelectedFields(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SelectedFields() { + fieldNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SelectedFields(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataProfileProto + .internal_static_google_cloud_dataplex_v1_DataProfileSpec_SelectedFields_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataProfileProto + .internal_static_google_cloud_dataplex_v1_DataProfileSpec_SelectedFields_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.class, + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.Builder.class); + } + + public static final int FIELD_NAMES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList fieldNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+     * Optional. Expected input is a list of fully qualified names of fields as
+     * in the schema.
+     *
+     * Only top-level field names for nested fields are supported.
+     * For instance, if 'x' is of nested field type, listing 'x' is supported
+     * but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of
+     * 'x'.
+     * 
+ * + * repeated string field_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the fieldNames. + */ + public com.google.protobuf.ProtocolStringList getFieldNamesList() { + return fieldNames_; + } + /** + * + * + *
+     * Optional. Expected input is a list of fully qualified names of fields as
+     * in the schema.
+     *
+     * Only top-level field names for nested fields are supported.
+     * For instance, if 'x' is of nested field type, listing 'x' is supported
+     * but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of
+     * 'x'.
+     * 
+ * + * repeated string field_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of fieldNames. + */ + public int getFieldNamesCount() { + return fieldNames_.size(); + } + /** + * + * + *
+     * Optional. Expected input is a list of fully qualified names of fields as
+     * in the schema.
+     *
+     * Only top-level field names for nested fields are supported.
+     * For instance, if 'x' is of nested field type, listing 'x' is supported
+     * but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of
+     * 'x'.
+     * 
+ * + * repeated string field_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The fieldNames at the given index. + */ + public java.lang.String getFieldNames(int index) { + return fieldNames_.get(index); + } + /** + * + * + *
+     * Optional. Expected input is a list of fully qualified names of fields as
+     * in the schema.
+     *
+     * Only top-level field names for nested fields are supported.
+     * For instance, if 'x' is of nested field type, listing 'x' is supported
+     * but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of
+     * 'x'.
+     * 
+ * + * repeated string field_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the fieldNames at the given index. + */ + public com.google.protobuf.ByteString getFieldNamesBytes(int index) { + return fieldNames_.getByteString(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 { + for (int i = 0; i < fieldNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fieldNames_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < fieldNames_.size(); i++) { + dataSize += computeStringSizeNoTag(fieldNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getFieldNamesList().size(); + } + 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.dataplex.v1.DataProfileSpec.SelectedFields)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields other = + (com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields) obj; + + if (!getFieldNamesList().equals(other.getFieldNamesList())) 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 (getFieldNamesCount() > 0) { + hash = (37 * hash) + FIELD_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getFieldNamesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields 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.dataplex.v1.DataProfileSpec.SelectedFields parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields 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.dataplex.v1.DataProfileSpec.SelectedFields parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields 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.dataplex.v1.DataProfileSpec.SelectedFields parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields 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.dataplex.v1.DataProfileSpec.SelectedFields parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields 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.dataplex.v1.DataProfileSpec.SelectedFields 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 specification for fields to include or exclude in data profile scan.
+     * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DataProfileSpec.SelectedFields} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.DataProfileSpec.SelectedFields) + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFieldsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataProfileProto + .internal_static_google_cloud_dataplex_v1_DataProfileSpec_SelectedFields_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataProfileProto + .internal_static_google_cloud_dataplex_v1_DataProfileSpec_SelectedFields_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.class, + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.Builder.class); + } + + // Construct using com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + fieldNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.DataProfileProto + .internal_static_google_cloud_dataplex_v1_DataProfileSpec_SelectedFields_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields + getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields build() { + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields buildPartial() { + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields result = + new com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + fieldNames_.makeImmutable(); + result.fieldNames_ = fieldNames_; + } + } + + @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.dataplex.v1.DataProfileSpec.SelectedFields) { + return mergeFrom((com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields other) { + if (other + == com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.getDefaultInstance()) + return this; + if (!other.fieldNames_.isEmpty()) { + if (fieldNames_.isEmpty()) { + fieldNames_ = other.fieldNames_; + bitField0_ |= 0x00000001; + } else { + ensureFieldNamesIsMutable(); + fieldNames_.addAll(other.fieldNames_); + } + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureFieldNamesIsMutable(); + fieldNames_.add(s); + 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 int bitField0_; + + private com.google.protobuf.LazyStringArrayList fieldNames_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureFieldNamesIsMutable() { + if (!fieldNames_.isModifiable()) { + fieldNames_ = new com.google.protobuf.LazyStringArrayList(fieldNames_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+       * Optional. Expected input is a list of fully qualified names of fields as
+       * in the schema.
+       *
+       * Only top-level field names for nested fields are supported.
+       * For instance, if 'x' is of nested field type, listing 'x' is supported
+       * but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of
+       * 'x'.
+       * 
+ * + * repeated string field_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the fieldNames. + */ + public com.google.protobuf.ProtocolStringList getFieldNamesList() { + fieldNames_.makeImmutable(); + return fieldNames_; + } + /** + * + * + *
+       * Optional. Expected input is a list of fully qualified names of fields as
+       * in the schema.
+       *
+       * Only top-level field names for nested fields are supported.
+       * For instance, if 'x' is of nested field type, listing 'x' is supported
+       * but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of
+       * 'x'.
+       * 
+ * + * repeated string field_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of fieldNames. + */ + public int getFieldNamesCount() { + return fieldNames_.size(); + } + /** + * + * + *
+       * Optional. Expected input is a list of fully qualified names of fields as
+       * in the schema.
+       *
+       * Only top-level field names for nested fields are supported.
+       * For instance, if 'x' is of nested field type, listing 'x' is supported
+       * but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of
+       * 'x'.
+       * 
+ * + * repeated string field_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The fieldNames at the given index. + */ + public java.lang.String getFieldNames(int index) { + return fieldNames_.get(index); + } + /** + * + * + *
+       * Optional. Expected input is a list of fully qualified names of fields as
+       * in the schema.
+       *
+       * Only top-level field names for nested fields are supported.
+       * For instance, if 'x' is of nested field type, listing 'x' is supported
+       * but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of
+       * 'x'.
+       * 
+ * + * repeated string field_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the fieldNames at the given index. + */ + public com.google.protobuf.ByteString getFieldNamesBytes(int index) { + return fieldNames_.getByteString(index); + } + /** + * + * + *
+       * Optional. Expected input is a list of fully qualified names of fields as
+       * in the schema.
+       *
+       * Only top-level field names for nested fields are supported.
+       * For instance, if 'x' is of nested field type, listing 'x' is supported
+       * but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of
+       * 'x'.
+       * 
+ * + * repeated string field_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The fieldNames to set. + * @return This builder for chaining. + */ + public Builder setFieldNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldNamesIsMutable(); + fieldNames_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Expected input is a list of fully qualified names of fields as
+       * in the schema.
+       *
+       * Only top-level field names for nested fields are supported.
+       * For instance, if 'x' is of nested field type, listing 'x' is supported
+       * but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of
+       * 'x'.
+       * 
+ * + * repeated string field_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The fieldNames to add. + * @return This builder for chaining. + */ + public Builder addFieldNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldNamesIsMutable(); + fieldNames_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Expected input is a list of fully qualified names of fields as
+       * in the schema.
+       *
+       * Only top-level field names for nested fields are supported.
+       * For instance, if 'x' is of nested field type, listing 'x' is supported
+       * but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of
+       * 'x'.
+       * 
+ * + * repeated string field_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The fieldNames to add. + * @return This builder for chaining. + */ + public Builder addAllFieldNames(java.lang.Iterable values) { + ensureFieldNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fieldNames_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Expected input is a list of fully qualified names of fields as
+       * in the schema.
+       *
+       * Only top-level field names for nested fields are supported.
+       * For instance, if 'x' is of nested field type, listing 'x' is supported
+       * but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of
+       * 'x'.
+       * 
+ * + * repeated string field_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFieldNames() { + fieldNames_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Expected input is a list of fully qualified names of fields as
+       * in the schema.
+       *
+       * Only top-level field names for nested fields are supported.
+       * For instance, if 'x' is of nested field type, listing 'x' is supported
+       * but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of
+       * 'x'.
+       * 
+ * + * repeated string field_names = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the fieldNames to add. + * @return This builder for chaining. + */ + public Builder addFieldNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureFieldNamesIsMutable(); + fieldNames_.add(value); + bitField0_ |= 0x00000001; + 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.dataplex.v1.DataProfileSpec.SelectedFields) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.DataProfileSpec.SelectedFields) + private static final com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields(); + } + + public static com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SelectedFields 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.dataplex.v1.DataProfileSpec.SelectedFields getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int SAMPLING_PERCENT_FIELD_NUMBER = 2; + private float samplingPercent_ = 0F; + /** + * + * + *
+   * Optional. The percentage of the records to be selected from the dataset for
+   * DataScan.
+   *
+   * * Value can range between 0.0 and 100.0 with up to 3 significant decimal
+   * digits.
+   * * Sampling is not applied if `sampling_percent` is not specified, 0 or
+   * 100.
+   * 
+ * + * float sampling_percent = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The samplingPercent. + */ + @java.lang.Override + public float getSamplingPercent() { + return samplingPercent_; + } + + public static final int ROW_FILTER_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object rowFilter_ = ""; + /** + * + * + *
+   * Optional. A filter applied to all rows in a single DataScan job.
+   * The filter needs to be a valid SQL expression for a WHERE clause in
+   * BigQuery standard SQL syntax.
+   * Example: col1 >= 0 AND col2 < 10
+   * 
+ * + * string row_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The rowFilter. + */ + @java.lang.Override + public java.lang.String getRowFilter() { + java.lang.Object ref = rowFilter_; + 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(); + rowFilter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A filter applied to all rows in a single DataScan job.
+   * The filter needs to be a valid SQL expression for a WHERE clause in
+   * BigQuery standard SQL syntax.
+   * Example: col1 >= 0 AND col2 < 10
+   * 
+ * + * string row_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for rowFilter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRowFilterBytes() { + java.lang.Object ref = rowFilter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rowFilter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POST_SCAN_ACTIONS_FIELD_NUMBER = 4; + private com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions postScanActions_; + /** + * + * + *
+   * Optional. Actions to take upon job completion..
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions post_scan_actions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the postScanActions field is set. + */ + @java.lang.Override + public boolean hasPostScanActions() { + return postScanActions_ != null; + } + /** + * + * + *
+   * Optional. Actions to take upon job completion..
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions post_scan_actions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The postScanActions. + */ @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DataProfileSpec(); + public com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions getPostScanActions() { + return postScanActions_ == null + ? com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.getDefaultInstance() + : postScanActions_; + } + /** + * + * + *
+   * Optional. Actions to take upon job completion..
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions post_scan_actions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActionsOrBuilder + getPostScanActionsOrBuilder() { + return postScanActions_ == null + ? com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.getDefaultInstance() + : postScanActions_; } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataplex.v1.DataProfileProto - .internal_static_google_cloud_dataplex_v1_DataProfileSpec_descriptor; + public static final int INCLUDE_FIELDS_FIELD_NUMBER = 5; + private com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields includeFields_; + /** + * + * + *
+   * Optional. The fields to include in data profile.
+   *
+   * If not specified, all fields at the time of profile scan job execution are
+   * included, except for ones listed in `exclude_fields`.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields include_fields = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the includeFields field is set. + */ + @java.lang.Override + public boolean hasIncludeFields() { + return includeFields_ != null; + } + /** + * + * + *
+   * Optional. The fields to include in data profile.
+   *
+   * If not specified, all fields at the time of profile scan job execution are
+   * included, except for ones listed in `exclude_fields`.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields include_fields = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The includeFields. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields getIncludeFields() { + return includeFields_ == null + ? com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.getDefaultInstance() + : includeFields_; + } + /** + * + * + *
+   * Optional. The fields to include in data profile.
+   *
+   * If not specified, all fields at the time of profile scan job execution are
+   * included, except for ones listed in `exclude_fields`.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields include_fields = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFieldsOrBuilder + getIncludeFieldsOrBuilder() { + return includeFields_ == null + ? com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.getDefaultInstance() + : includeFields_; } + public static final int EXCLUDE_FIELDS_FIELD_NUMBER = 6; + private com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields excludeFields_; + /** + * + * + *
+   * Optional. The fields to exclude from data profile.
+   *
+   * If specified, the fields will be excluded from data profile, regardless of
+   * `include_fields` value.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields exclude_fields = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the excludeFields field is set. + */ @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataplex.v1.DataProfileProto - .internal_static_google_cloud_dataplex_v1_DataProfileSpec_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataplex.v1.DataProfileSpec.class, - com.google.cloud.dataplex.v1.DataProfileSpec.Builder.class); + public boolean hasExcludeFields() { + return excludeFields_ != null; + } + /** + * + * + *
+   * Optional. The fields to exclude from data profile.
+   *
+   * If specified, the fields will be excluded from data profile, regardless of
+   * `include_fields` value.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields exclude_fields = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The excludeFields. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields getExcludeFields() { + return excludeFields_ == null + ? com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.getDefaultInstance() + : excludeFields_; + } + /** + * + * + *
+   * Optional. The fields to exclude from data profile.
+   *
+   * If specified, the fields will be excluded from data profile, regardless of
+   * `include_fields` value.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields exclude_fields = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFieldsOrBuilder + getExcludeFieldsOrBuilder() { + return excludeFields_ == null + ? com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.getDefaultInstance() + : excludeFields_; } private byte memoizedIsInitialized = -1; @@ -74,6 +2729,21 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(samplingPercent_) != 0) { + output.writeFloat(2, samplingPercent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rowFilter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, rowFilter_); + } + if (postScanActions_ != null) { + output.writeMessage(4, getPostScanActions()); + } + if (includeFields_ != null) { + output.writeMessage(5, getIncludeFields()); + } + if (excludeFields_ != null) { + output.writeMessage(6, getExcludeFields()); + } getUnknownFields().writeTo(output); } @@ -83,6 +2753,21 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; + if (java.lang.Float.floatToRawIntBits(samplingPercent_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, samplingPercent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rowFilter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, rowFilter_); + } + if (postScanActions_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPostScanActions()); + } + if (includeFields_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getIncludeFields()); + } + if (excludeFields_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getExcludeFields()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -99,6 +2784,21 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.dataplex.v1.DataProfileSpec other = (com.google.cloud.dataplex.v1.DataProfileSpec) obj; + if (java.lang.Float.floatToIntBits(getSamplingPercent()) + != java.lang.Float.floatToIntBits(other.getSamplingPercent())) return false; + if (!getRowFilter().equals(other.getRowFilter())) return false; + if (hasPostScanActions() != other.hasPostScanActions()) return false; + if (hasPostScanActions()) { + if (!getPostScanActions().equals(other.getPostScanActions())) return false; + } + if (hasIncludeFields() != other.hasIncludeFields()) return false; + if (hasIncludeFields()) { + if (!getIncludeFields().equals(other.getIncludeFields())) return false; + } + if (hasExcludeFields() != other.hasExcludeFields()) return false; + if (hasExcludeFields()) { + if (!getExcludeFields().equals(other.getExcludeFields())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -110,6 +2810,22 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SAMPLING_PERCENT_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getSamplingPercent()); + hash = (37 * hash) + ROW_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getRowFilter().hashCode(); + if (hasPostScanActions()) { + hash = (37 * hash) + POST_SCAN_ACTIONS_FIELD_NUMBER; + hash = (53 * hash) + getPostScanActions().hashCode(); + } + if (hasIncludeFields()) { + hash = (37 * hash) + INCLUDE_FIELDS_FIELD_NUMBER; + hash = (53 * hash) + getIncludeFields().hashCode(); + } + if (hasExcludeFields()) { + hash = (37 * hash) + EXCLUDE_FIELDS_FIELD_NUMBER; + hash = (53 * hash) + getExcludeFields().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -248,6 +2964,24 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; + samplingPercent_ = 0F; + rowFilter_ = ""; + postScanActions_ = null; + if (postScanActionsBuilder_ != null) { + postScanActionsBuilder_.dispose(); + postScanActionsBuilder_ = null; + } + includeFields_ = null; + if (includeFieldsBuilder_ != null) { + includeFieldsBuilder_.dispose(); + includeFieldsBuilder_ = null; + } + excludeFields_ = null; + if (excludeFieldsBuilder_ != null) { + excludeFieldsBuilder_.dispose(); + excludeFieldsBuilder_ = null; + } return this; } @@ -275,10 +3009,35 @@ public com.google.cloud.dataplex.v1.DataProfileSpec build() { public com.google.cloud.dataplex.v1.DataProfileSpec buildPartial() { com.google.cloud.dataplex.v1.DataProfileSpec result = new com.google.cloud.dataplex.v1.DataProfileSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } onBuilt(); return result; } + private void buildPartial0(com.google.cloud.dataplex.v1.DataProfileSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.samplingPercent_ = samplingPercent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.rowFilter_ = rowFilter_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.postScanActions_ = + postScanActionsBuilder_ == null ? postScanActions_ : postScanActionsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.includeFields_ = + includeFieldsBuilder_ == null ? includeFields_ : includeFieldsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.excludeFields_ = + excludeFieldsBuilder_ == null ? excludeFields_ : excludeFieldsBuilder_.build(); + } + } + @java.lang.Override public Builder clone() { return super.clone(); @@ -324,6 +3083,23 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.dataplex.v1.DataProfileSpec other) { if (other == com.google.cloud.dataplex.v1.DataProfileSpec.getDefaultInstance()) return this; + if (other.getSamplingPercent() != 0F) { + setSamplingPercent(other.getSamplingPercent()); + } + if (!other.getRowFilter().isEmpty()) { + rowFilter_ = other.rowFilter_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasPostScanActions()) { + mergePostScanActions(other.getPostScanActions()); + } + if (other.hasIncludeFields()) { + mergeIncludeFields(other.getIncludeFields()); + } + if (other.hasExcludeFields()) { + mergeExcludeFields(other.getExcludeFields()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -350,6 +3126,36 @@ public Builder mergeFrom( case 0: done = true; break; + case 21: + { + samplingPercent_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 21 + case 26: + { + rowFilter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 34: + { + input.readMessage(getPostScanActionsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 34 + case 42: + { + input.readMessage(getIncludeFieldsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 42 + case 50: + { + input.readMessage(getExcludeFieldsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 50 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -367,6 +3173,878 @@ public Builder mergeFrom( return this; } + private int bitField0_; + + private float samplingPercent_; + /** + * + * + *
+     * Optional. The percentage of the records to be selected from the dataset for
+     * DataScan.
+     *
+     * * Value can range between 0.0 and 100.0 with up to 3 significant decimal
+     * digits.
+     * * Sampling is not applied if `sampling_percent` is not specified, 0 or
+     * 100.
+     * 
+ * + * float sampling_percent = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The samplingPercent. + */ + @java.lang.Override + public float getSamplingPercent() { + return samplingPercent_; + } + /** + * + * + *
+     * Optional. The percentage of the records to be selected from the dataset for
+     * DataScan.
+     *
+     * * Value can range between 0.0 and 100.0 with up to 3 significant decimal
+     * digits.
+     * * Sampling is not applied if `sampling_percent` is not specified, 0 or
+     * 100.
+     * 
+ * + * float sampling_percent = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The samplingPercent to set. + * @return This builder for chaining. + */ + public Builder setSamplingPercent(float value) { + + samplingPercent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The percentage of the records to be selected from the dataset for
+     * DataScan.
+     *
+     * * Value can range between 0.0 and 100.0 with up to 3 significant decimal
+     * digits.
+     * * Sampling is not applied if `sampling_percent` is not specified, 0 or
+     * 100.
+     * 
+ * + * float sampling_percent = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSamplingPercent() { + bitField0_ = (bitField0_ & ~0x00000001); + samplingPercent_ = 0F; + onChanged(); + return this; + } + + private java.lang.Object rowFilter_ = ""; + /** + * + * + *
+     * Optional. A filter applied to all rows in a single DataScan job.
+     * The filter needs to be a valid SQL expression for a WHERE clause in
+     * BigQuery standard SQL syntax.
+     * Example: col1 >= 0 AND col2 < 10
+     * 
+ * + * string row_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The rowFilter. + */ + public java.lang.String getRowFilter() { + java.lang.Object ref = rowFilter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rowFilter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A filter applied to all rows in a single DataScan job.
+     * The filter needs to be a valid SQL expression for a WHERE clause in
+     * BigQuery standard SQL syntax.
+     * Example: col1 >= 0 AND col2 < 10
+     * 
+ * + * string row_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for rowFilter. + */ + public com.google.protobuf.ByteString getRowFilterBytes() { + java.lang.Object ref = rowFilter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rowFilter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A filter applied to all rows in a single DataScan job.
+     * The filter needs to be a valid SQL expression for a WHERE clause in
+     * BigQuery standard SQL syntax.
+     * Example: col1 >= 0 AND col2 < 10
+     * 
+ * + * string row_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The rowFilter to set. + * @return This builder for chaining. + */ + public Builder setRowFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + rowFilter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A filter applied to all rows in a single DataScan job.
+     * The filter needs to be a valid SQL expression for a WHERE clause in
+     * BigQuery standard SQL syntax.
+     * Example: col1 >= 0 AND col2 < 10
+     * 
+ * + * string row_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRowFilter() { + rowFilter_ = getDefaultInstance().getRowFilter(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A filter applied to all rows in a single DataScan job.
+     * The filter needs to be a valid SQL expression for a WHERE clause in
+     * BigQuery standard SQL syntax.
+     * Example: col1 >= 0 AND col2 < 10
+     * 
+ * + * string row_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for rowFilter to set. + * @return This builder for chaining. + */ + public Builder setRowFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + rowFilter_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions postScanActions_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions, + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.Builder, + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActionsOrBuilder> + postScanActionsBuilder_; + /** + * + * + *
+     * Optional. Actions to take upon job completion..
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions post_scan_actions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the postScanActions field is set. + */ + public boolean hasPostScanActions() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Optional. Actions to take upon job completion..
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions post_scan_actions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The postScanActions. + */ + public com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions getPostScanActions() { + if (postScanActionsBuilder_ == null) { + return postScanActions_ == null + ? com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.getDefaultInstance() + : postScanActions_; + } else { + return postScanActionsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Actions to take upon job completion..
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions post_scan_actions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPostScanActions( + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions value) { + if (postScanActionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + postScanActions_ = value; + } else { + postScanActionsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Actions to take upon job completion..
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions post_scan_actions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPostScanActions( + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.Builder builderForValue) { + if (postScanActionsBuilder_ == null) { + postScanActions_ = builderForValue.build(); + } else { + postScanActionsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Actions to take upon job completion..
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions post_scan_actions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePostScanActions( + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions value) { + if (postScanActionsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && postScanActions_ != null + && postScanActions_ + != com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions + .getDefaultInstance()) { + getPostScanActionsBuilder().mergeFrom(value); + } else { + postScanActions_ = value; + } + } else { + postScanActionsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Actions to take upon job completion..
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions post_scan_actions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPostScanActions() { + bitField0_ = (bitField0_ & ~0x00000004); + postScanActions_ = null; + if (postScanActionsBuilder_ != null) { + postScanActionsBuilder_.dispose(); + postScanActionsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Actions to take upon job completion..
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions post_scan_actions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.Builder + getPostScanActionsBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getPostScanActionsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Actions to take upon job completion..
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions post_scan_actions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActionsOrBuilder + getPostScanActionsOrBuilder() { + if (postScanActionsBuilder_ != null) { + return postScanActionsBuilder_.getMessageOrBuilder(); + } else { + return postScanActions_ == null + ? com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.getDefaultInstance() + : postScanActions_; + } + } + /** + * + * + *
+     * Optional. Actions to take upon job completion..
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions post_scan_actions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions, + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.Builder, + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActionsOrBuilder> + getPostScanActionsFieldBuilder() { + if (postScanActionsBuilder_ == null) { + postScanActionsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions, + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions.Builder, + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActionsOrBuilder>( + getPostScanActions(), getParentForChildren(), isClean()); + postScanActions_ = null; + } + return postScanActionsBuilder_; + } + + private com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields includeFields_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields, + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.Builder, + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFieldsOrBuilder> + includeFieldsBuilder_; + /** + * + * + *
+     * Optional. The fields to include in data profile.
+     *
+     * If not specified, all fields at the time of profile scan job execution are
+     * included, except for ones listed in `exclude_fields`.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields include_fields = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the includeFields field is set. + */ + public boolean hasIncludeFields() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Optional. The fields to include in data profile.
+     *
+     * If not specified, all fields at the time of profile scan job execution are
+     * included, except for ones listed in `exclude_fields`.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields include_fields = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The includeFields. + */ + public com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields getIncludeFields() { + if (includeFieldsBuilder_ == null) { + return includeFields_ == null + ? com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.getDefaultInstance() + : includeFields_; + } else { + return includeFieldsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The fields to include in data profile.
+     *
+     * If not specified, all fields at the time of profile scan job execution are
+     * included, except for ones listed in `exclude_fields`.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields include_fields = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setIncludeFields( + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields value) { + if (includeFieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + includeFields_ = value; + } else { + includeFieldsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The fields to include in data profile.
+     *
+     * If not specified, all fields at the time of profile scan job execution are
+     * included, except for ones listed in `exclude_fields`.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields include_fields = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setIncludeFields( + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.Builder builderForValue) { + if (includeFieldsBuilder_ == null) { + includeFields_ = builderForValue.build(); + } else { + includeFieldsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The fields to include in data profile.
+     *
+     * If not specified, all fields at the time of profile scan job execution are
+     * included, except for ones listed in `exclude_fields`.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields include_fields = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeIncludeFields( + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields value) { + if (includeFieldsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && includeFields_ != null + && includeFields_ + != com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields + .getDefaultInstance()) { + getIncludeFieldsBuilder().mergeFrom(value); + } else { + includeFields_ = value; + } + } else { + includeFieldsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The fields to include in data profile.
+     *
+     * If not specified, all fields at the time of profile scan job execution are
+     * included, except for ones listed in `exclude_fields`.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields include_fields = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearIncludeFields() { + bitField0_ = (bitField0_ & ~0x00000008); + includeFields_ = null; + if (includeFieldsBuilder_ != null) { + includeFieldsBuilder_.dispose(); + includeFieldsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The fields to include in data profile.
+     *
+     * If not specified, all fields at the time of profile scan job execution are
+     * included, except for ones listed in `exclude_fields`.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields include_fields = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.Builder + getIncludeFieldsBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getIncludeFieldsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The fields to include in data profile.
+     *
+     * If not specified, all fields at the time of profile scan job execution are
+     * included, except for ones listed in `exclude_fields`.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields include_fields = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFieldsOrBuilder + getIncludeFieldsOrBuilder() { + if (includeFieldsBuilder_ != null) { + return includeFieldsBuilder_.getMessageOrBuilder(); + } else { + return includeFields_ == null + ? com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.getDefaultInstance() + : includeFields_; + } + } + /** + * + * + *
+     * Optional. The fields to include in data profile.
+     *
+     * If not specified, all fields at the time of profile scan job execution are
+     * included, except for ones listed in `exclude_fields`.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields include_fields = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields, + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.Builder, + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFieldsOrBuilder> + getIncludeFieldsFieldBuilder() { + if (includeFieldsBuilder_ == null) { + includeFieldsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields, + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.Builder, + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFieldsOrBuilder>( + getIncludeFields(), getParentForChildren(), isClean()); + includeFields_ = null; + } + return includeFieldsBuilder_; + } + + private com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields excludeFields_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields, + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.Builder, + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFieldsOrBuilder> + excludeFieldsBuilder_; + /** + * + * + *
+     * Optional. The fields to exclude from data profile.
+     *
+     * If specified, the fields will be excluded from data profile, regardless of
+     * `include_fields` value.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields exclude_fields = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the excludeFields field is set. + */ + public boolean hasExcludeFields() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * + * + *
+     * Optional. The fields to exclude from data profile.
+     *
+     * If specified, the fields will be excluded from data profile, regardless of
+     * `include_fields` value.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields exclude_fields = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The excludeFields. + */ + public com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields getExcludeFields() { + if (excludeFieldsBuilder_ == null) { + return excludeFields_ == null + ? com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.getDefaultInstance() + : excludeFields_; + } else { + return excludeFieldsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. The fields to exclude from data profile.
+     *
+     * If specified, the fields will be excluded from data profile, regardless of
+     * `include_fields` value.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields exclude_fields = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setExcludeFields( + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields value) { + if (excludeFieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + excludeFields_ = value; + } else { + excludeFieldsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The fields to exclude from data profile.
+     *
+     * If specified, the fields will be excluded from data profile, regardless of
+     * `include_fields` value.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields exclude_fields = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setExcludeFields( + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.Builder builderForValue) { + if (excludeFieldsBuilder_ == null) { + excludeFields_ = builderForValue.build(); + } else { + excludeFieldsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The fields to exclude from data profile.
+     *
+     * If specified, the fields will be excluded from data profile, regardless of
+     * `include_fields` value.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields exclude_fields = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeExcludeFields( + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields value) { + if (excludeFieldsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && excludeFields_ != null + && excludeFields_ + != com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields + .getDefaultInstance()) { + getExcludeFieldsBuilder().mergeFrom(value); + } else { + excludeFields_ = value; + } + } else { + excludeFieldsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The fields to exclude from data profile.
+     *
+     * If specified, the fields will be excluded from data profile, regardless of
+     * `include_fields` value.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields exclude_fields = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearExcludeFields() { + bitField0_ = (bitField0_ & ~0x00000010); + excludeFields_ = null; + if (excludeFieldsBuilder_ != null) { + excludeFieldsBuilder_.dispose(); + excludeFieldsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The fields to exclude from data profile.
+     *
+     * If specified, the fields will be excluded from data profile, regardless of
+     * `include_fields` value.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields exclude_fields = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.Builder + getExcludeFieldsBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getExcludeFieldsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. The fields to exclude from data profile.
+     *
+     * If specified, the fields will be excluded from data profile, regardless of
+     * `include_fields` value.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields exclude_fields = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFieldsOrBuilder + getExcludeFieldsOrBuilder() { + if (excludeFieldsBuilder_ != null) { + return excludeFieldsBuilder_.getMessageOrBuilder(); + } else { + return excludeFields_ == null + ? com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.getDefaultInstance() + : excludeFields_; + } + } + /** + * + * + *
+     * Optional. The fields to exclude from data profile.
+     *
+     * If specified, the fields will be excluded from data profile, regardless of
+     * `include_fields` value.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields exclude_fields = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields, + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.Builder, + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFieldsOrBuilder> + getExcludeFieldsFieldBuilder() { + if (excludeFieldsBuilder_ == null) { + excludeFieldsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields, + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields.Builder, + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFieldsOrBuilder>( + getExcludeFields(), getParentForChildren(), isClean()); + excludeFields_ = null; + } + return excludeFieldsBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataProfileSpecOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataProfileSpecOrBuilder.java index b9df952df7bb..7224d785b885 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataProfileSpecOrBuilder.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataProfileSpecOrBuilder.java @@ -21,4 +21,197 @@ public interface DataProfileSpecOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.DataProfileSpec) - com.google.protobuf.MessageOrBuilder {} + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The percentage of the records to be selected from the dataset for
+   * DataScan.
+   *
+   * * Value can range between 0.0 and 100.0 with up to 3 significant decimal
+   * digits.
+   * * Sampling is not applied if `sampling_percent` is not specified, 0 or
+   * 100.
+   * 
+ * + * float sampling_percent = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The samplingPercent. + */ + float getSamplingPercent(); + + /** + * + * + *
+   * Optional. A filter applied to all rows in a single DataScan job.
+   * The filter needs to be a valid SQL expression for a WHERE clause in
+   * BigQuery standard SQL syntax.
+   * Example: col1 >= 0 AND col2 < 10
+   * 
+ * + * string row_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The rowFilter. + */ + java.lang.String getRowFilter(); + /** + * + * + *
+   * Optional. A filter applied to all rows in a single DataScan job.
+   * The filter needs to be a valid SQL expression for a WHERE clause in
+   * BigQuery standard SQL syntax.
+   * Example: col1 >= 0 AND col2 < 10
+   * 
+ * + * string row_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for rowFilter. + */ + com.google.protobuf.ByteString getRowFilterBytes(); + + /** + * + * + *
+   * Optional. Actions to take upon job completion..
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions post_scan_actions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the postScanActions field is set. + */ + boolean hasPostScanActions(); + /** + * + * + *
+   * Optional. Actions to take upon job completion..
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions post_scan_actions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The postScanActions. + */ + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActions getPostScanActions(); + /** + * + * + *
+   * Optional. Actions to take upon job completion..
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.PostScanActions post_scan_actions = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dataplex.v1.DataProfileSpec.PostScanActionsOrBuilder + getPostScanActionsOrBuilder(); + + /** + * + * + *
+   * Optional. The fields to include in data profile.
+   *
+   * If not specified, all fields at the time of profile scan job execution are
+   * included, except for ones listed in `exclude_fields`.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields include_fields = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the includeFields field is set. + */ + boolean hasIncludeFields(); + /** + * + * + *
+   * Optional. The fields to include in data profile.
+   *
+   * If not specified, all fields at the time of profile scan job execution are
+   * included, except for ones listed in `exclude_fields`.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields include_fields = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The includeFields. + */ + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields getIncludeFields(); + /** + * + * + *
+   * Optional. The fields to include in data profile.
+   *
+   * If not specified, all fields at the time of profile scan job execution are
+   * included, except for ones listed in `exclude_fields`.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields include_fields = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFieldsOrBuilder getIncludeFieldsOrBuilder(); + + /** + * + * + *
+   * Optional. The fields to exclude from data profile.
+   *
+   * If specified, the fields will be excluded from data profile, regardless of
+   * `include_fields` value.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields exclude_fields = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the excludeFields field is set. + */ + boolean hasExcludeFields(); + /** + * + * + *
+   * Optional. The fields to exclude from data profile.
+   *
+   * If specified, the fields will be excluded from data profile, regardless of
+   * `include_fields` value.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields exclude_fields = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The excludeFields. + */ + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFields getExcludeFields(); + /** + * + * + *
+   * Optional. The fields to exclude from data profile.
+   *
+   * If specified, the fields will be excluded from data profile, regardless of
+   * `include_fields` value.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataProfileSpec.SelectedFields exclude_fields = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dataplex.v1.DataProfileSpec.SelectedFieldsOrBuilder getExcludeFieldsOrBuilder(); +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityProto.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityProto.java index 20b3b7d5b1ff..87e051d8a4e9 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityProto.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityProto.java @@ -31,10 +31,26 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dataplex_v1_DataQualitySpec_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dataplex_v1_DataQualitySpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_DataQualitySpec_PostScanActions_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_DataQualitySpec_PostScanActions_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_DataQualitySpec_PostScanActions_BigQueryExport_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_DataQualitySpec_PostScanActions_BigQueryExport_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dataplex_v1_DataQualityResult_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dataplex_v1_DataQualityResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_DataQualityResult_PostScanActionsResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_DataQualityResult_PostScanActionsResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_DataQualityResult_PostScanActionsResult_BigQueryExportResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_DataQualityResult_PostScanActionsResult_BigQueryExportResult_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dataplex_v1_DataQualityRuleResult_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -90,71 +106,99 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n+google/cloud/dataplex/v1/data_quality." + "proto\022\030google.cloud.dataplex.v1\032\037google/" - + "api/field_behavior.proto\032)google/cloud/d" - + "ataplex/v1/processing.proto\"K\n\017DataQuali" - + "tySpec\0228\n\005rules\030\001 \003(\0132).google.cloud.dat" - + "aplex.v1.DataQualityRule\"\375\001\n\021DataQuality" - + "Result\022\016\n\006passed\030\005 \001(\010\022H\n\ndimensions\030\002 \003" - + "(\01324.google.cloud.dataplex.v1.DataQualit" - + "yDimensionResult\022>\n\005rules\030\003 \003(\0132/.google" - + ".cloud.dataplex.v1.DataQualityRuleResult" - + "\022\021\n\trow_count\030\004 \001(\003\022;\n\014scanned_data\030\007 \001(" - + "\0132%.google.cloud.dataplex.v1.ScannedData" - + "\"\323\001\n\025DataQualityRuleResult\0227\n\004rule\030\001 \001(\013" - + "2).google.cloud.dataplex.v1.DataQualityR" - + "ule\022\016\n\006passed\030\007 \001(\010\022\027\n\017evaluated_count\030\t" - + " \001(\003\022\024\n\014passed_count\030\010 \001(\003\022\022\n\nnull_count" - + "\030\005 \001(\003\022\022\n\npass_ratio\030\006 \001(\001\022\032\n\022failing_ro" - + "ws_query\030\n \001(\t\",\n\032DataQualityDimensionRe" - + "sult\022\016\n\006passed\030\003 \001(\010\"\242\014\n\017DataQualityRule" - + "\022W\n\021range_expectation\030\001 \001(\0132:.google.clo" - + "ud.dataplex.v1.DataQualityRule.RangeExpe" - + "ctationH\000\022\\\n\024non_null_expectation\030\002 \001(\0132" - + "<.google.cloud.dataplex.v1.DataQualityRu" - + "le.NonNullExpectationH\000\022S\n\017set_expectati" - + "on\030\003 \001(\01328.google.cloud.dataplex.v1.Data" - + "QualityRule.SetExpectationH\000\022W\n\021regex_ex" - + "pectation\030\004 \001(\0132:.google.cloud.dataplex." - + "v1.DataQualityRule.RegexExpectationH\000\022a\n" - + "\026uniqueness_expectation\030d \001(\0132?.google.c" - + "loud.dataplex.v1.DataQualityRule.Uniquen" - + "essExpectationH\000\022j\n\033statistic_range_expe" - + "ctation\030e \001(\0132C.google.cloud.dataplex.v1" - + ".DataQualityRule.StatisticRangeExpectati" - + "onH\000\022g\n\031row_condition_expectation\030\310\001 \001(\013" - + "2A.google.cloud.dataplex.v1.DataQualityR" - + "ule.RowConditionExpectationH\000\022k\n\033table_c" - + "ondition_expectation\030\311\001 \001(\0132C.google.clo" - + "ud.dataplex.v1.DataQualityRule.TableCond" - + "itionExpectationH\000\022\025\n\006column\030\364\003 \001(\tB\004\342A\001" - + "\001\022\032\n\013ignore_null\030\365\003 \001(\010B\004\342A\001\001\022\030\n\tdimensi" - + "on\030\366\003 \001(\tB\004\342A\001\002\022\030\n\tthreshold\030\367\003 \001(\001B\004\342A\001" - + "\001\032\210\001\n\020RangeExpectation\022\027\n\tmin_value\030\001 \001(" - + "\tB\004\342A\001\001\022\027\n\tmax_value\030\002 \001(\tB\004\342A\001\001\022 \n\022stri" - + "ct_min_enabled\030\003 \001(\010B\004\342A\001\001\022 \n\022strict_max" - + "_enabled\030\004 \001(\010B\004\342A\001\001\032\024\n\022NonNullExpectati" - + "on\032 \n\016SetExpectation\022\016\n\006values\030\001 \003(\t\032!\n\020" - + "RegexExpectation\022\r\n\005regex\030\001 \001(\t\032\027\n\025Uniqu" - + "enessExpectation\032\251\002\n\031StatisticRangeExpec" - + "tation\022f\n\tstatistic\030\001 \001(\0162S.google.cloud" - + ".dataplex.v1.DataQualityRule.StatisticRa" - + "ngeExpectation.ColumnStatistic\022\021\n\tmin_va" - + "lue\030\002 \001(\t\022\021\n\tmax_value\030\003 \001(\t\022\032\n\022strict_m" - + "in_enabled\030\004 \001(\010\022\032\n\022strict_max_enabled\030\005" - + " \001(\010\"F\n\017ColumnStatistic\022\027\n\023STATISTIC_UND" - + "EFINED\020\000\022\010\n\004MEAN\020\001\022\007\n\003MIN\020\002\022\007\n\003MAX\020\003\0321\n\027" - + "RowConditionExpectation\022\026\n\016sql_expressio" - + "n\030\001 \001(\t\0323\n\031TableConditionExpectation\022\026\n\016" - + "sql_expression\030\001 \001(\tB\013\n\trule_typeBl\n\034com" - + ".google.cloud.dataplex.v1B\020DataQualityPr" - + "otoP\001Z8cloud.google.com/go/dataplex/apiv" - + "1/dataplexpb;dataplexpbb\006proto3" + + "api/field_behavior.proto\032\031google/api/res" + + "ource.proto\032)google/cloud/dataplex/v1/pr" + + "ocessing.proto\"\265\003\n\017DataQualitySpec\022>\n\005ru" + + "les\030\001 \003(\0132).google.cloud.dataplex.v1.Dat" + + "aQualityRuleB\004\342A\001\002\022\036\n\020sampling_percent\030\004" + + " \001(\002B\004\342A\001\001\022\030\n\nrow_filter\030\005 \001(\tB\004\342A\001\001\022Z\n\021" + + "post_scan_actions\030\006 \001(\01329.google.cloud.d" + + "ataplex.v1.DataQualitySpec.PostScanActio" + + "nsB\004\342A\001\001\032\313\001\n\017PostScanActions\022g\n\017bigquery" + + "_export\030\001 \001(\0132H.google.cloud.dataplex.v1" + + ".DataQualitySpec.PostScanActions.BigQuer" + + "yExportB\004\342A\001\001\032O\n\016BigQueryExport\022=\n\rresul" + + "ts_table\030\001 \001(\tB&\342A\001\001\372A\037\n\035bigquery.google" + + "apis.com/Table\"\353\005\n\021DataQualityResult\022\016\n\006" + + "passed\030\005 \001(\010\022H\n\ndimensions\030\002 \003(\01324.googl" + + "e.cloud.dataplex.v1.DataQualityDimension" + + "Result\022>\n\005rules\030\003 \003(\0132/.google.cloud.dat" + + "aplex.v1.DataQualityRuleResult\022\021\n\trow_co" + + "unt\030\004 \001(\003\022;\n\014scanned_data\030\007 \001(\0132%.google" + + ".cloud.dataplex.v1.ScannedData\022i\n\030post_s" + + "can_actions_result\030\010 \001(\0132A.google.cloud." + + "dataplex.v1.DataQualityResult.PostScanAc" + + "tionsResultB\004\342A\001\003\032\200\003\n\025PostScanActionsRes" + + "ult\022|\n\026bigquery_export_result\030\001 \001(\0132V.go" + + "ogle.cloud.dataplex.v1.DataQualityResult" + + ".PostScanActionsResult.BigQueryExportRes" + + "ultB\004\342A\001\003\032\350\001\n\024BigQueryExportResult\022q\n\005st" + + "ate\030\001 \001(\0162\\.google.cloud.dataplex.v1.Dat" + + "aQualityResult.PostScanActionsResult.Big" + + "QueryExportResult.StateB\004\342A\001\003\022\025\n\007message" + + "\030\002 \001(\tB\004\342A\001\003\"F\n\005State\022\025\n\021STATE_UNSPECIFI" + + "ED\020\000\022\r\n\tSUCCEEDED\020\001\022\n\n\006FAILED\020\002\022\013\n\007SKIPP" + + "ED\020\003\"\323\001\n\025DataQualityRuleResult\0227\n\004rule\030\001" + + " \001(\0132).google.cloud.dataplex.v1.DataQual" + + "ityRule\022\016\n\006passed\030\007 \001(\010\022\027\n\017evaluated_cou" + + "nt\030\t \001(\003\022\024\n\014passed_count\030\010 \001(\003\022\022\n\nnull_c" + + "ount\030\005 \001(\003\022\022\n\npass_ratio\030\006 \001(\001\022\032\n\022failin" + + "g_rows_query\030\n \001(\t\",\n\032DataQualityDimensi" + + "onResult\022\016\n\006passed\030\003 \001(\010\"\211\r\n\017DataQuality" + + "Rule\022W\n\021range_expectation\030\001 \001(\0132:.google" + + ".cloud.dataplex.v1.DataQualityRule.Range" + + "ExpectationH\000\022\\\n\024non_null_expectation\030\002 " + + "\001(\0132<.google.cloud.dataplex.v1.DataQuali" + + "tyRule.NonNullExpectationH\000\022S\n\017set_expec" + + "tation\030\003 \001(\01328.google.cloud.dataplex.v1." + + "DataQualityRule.SetExpectationH\000\022W\n\021rege" + + "x_expectation\030\004 \001(\0132:.google.cloud.datap" + + "lex.v1.DataQualityRule.RegexExpectationH" + + "\000\022a\n\026uniqueness_expectation\030d \001(\0132?.goog" + + "le.cloud.dataplex.v1.DataQualityRule.Uni" + + "quenessExpectationH\000\022j\n\033statistic_range_" + + "expectation\030e \001(\0132C.google.cloud.dataple" + + "x.v1.DataQualityRule.StatisticRangeExpec" + + "tationH\000\022g\n\031row_condition_expectation\030\310\001" + + " \001(\0132A.google.cloud.dataplex.v1.DataQual" + + "ityRule.RowConditionExpectationH\000\022k\n\033tab" + + "le_condition_expectation\030\311\001 \001(\0132C.google" + + ".cloud.dataplex.v1.DataQualityRule.Table" + + "ConditionExpectationH\000\022\025\n\006column\030\364\003 \001(\tB" + + "\004\342A\001\001\022\032\n\013ignore_null\030\365\003 \001(\010B\004\342A\001\001\022\030\n\tdim" + + "ension\030\366\003 \001(\tB\004\342A\001\002\022\030\n\tthreshold\030\367\003 \001(\001B" + + "\004\342A\001\001\022\023\n\004name\030\370\003 \001(\tB\004\342A\001\001\022\032\n\013descriptio" + + "n\030\371\003 \001(\tB\004\342A\001\001\032\210\001\n\020RangeExpectation\022\027\n\tm" + + "in_value\030\001 \001(\tB\004\342A\001\001\022\027\n\tmax_value\030\002 \001(\tB" + + "\004\342A\001\001\022 \n\022strict_min_enabled\030\003 \001(\010B\004\342A\001\001\022" + + " \n\022strict_max_enabled\030\004 \001(\010B\004\342A\001\001\032\024\n\022Non" + + "NullExpectation\032&\n\016SetExpectation\022\024\n\006val" + + "ues\030\001 \003(\tB\004\342A\001\001\032\'\n\020RegexExpectation\022\023\n\005r" + + "egex\030\001 \001(\tB\004\342A\001\001\032\027\n\025UniquenessExpectatio" + + "n\032\307\002\n\031StatisticRangeExpectation\022l\n\tstati" + + "stic\030\001 \001(\0162S.google.cloud.dataplex.v1.Da" + + "taQualityRule.StatisticRangeExpectation." + + "ColumnStatisticB\004\342A\001\001\022\027\n\tmin_value\030\002 \001(\t" + + "B\004\342A\001\001\022\027\n\tmax_value\030\003 \001(\tB\004\342A\001\001\022 \n\022stric" + + "t_min_enabled\030\004 \001(\010B\004\342A\001\001\022 \n\022strict_max_" + + "enabled\030\005 \001(\010B\004\342A\001\001\"F\n\017ColumnStatistic\022\027" + + "\n\023STATISTIC_UNDEFINED\020\000\022\010\n\004MEAN\020\001\022\007\n\003MIN" + + "\020\002\022\007\n\003MAX\020\003\0327\n\027RowConditionExpectation\022\034" + + "\n\016sql_expression\030\001 \001(\tB\004\342A\001\001\0329\n\031TableCon" + + "ditionExpectation\022\034\n\016sql_expression\030\001 \001(" + + "\tB\004\342A\001\001B\013\n\trule_typeB\304\001\n\034com.google.clou" + + "d.dataplex.v1B\020DataQualityProtoP\001Z8cloud" + + ".google.com/go/dataplex/apiv1/dataplexpb" + + ";dataplexpb\352AU\n\035bigquery.googleapis.com/" + + "Table\0224projects/{project}/datasets/{data" + + "set}/tables/{table}b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), com.google.cloud.dataplex.v1.ProcessingProto.getDescriptor(), }); internal_static_google_cloud_dataplex_v1_DataQualitySpec_descriptor = @@ -163,7 +207,25 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataplex_v1_DataQualitySpec_descriptor, new java.lang.String[] { - "Rules", + "Rules", "SamplingPercent", "RowFilter", "PostScanActions", + }); + internal_static_google_cloud_dataplex_v1_DataQualitySpec_PostScanActions_descriptor = + internal_static_google_cloud_dataplex_v1_DataQualitySpec_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_dataplex_v1_DataQualitySpec_PostScanActions_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_DataQualitySpec_PostScanActions_descriptor, + new java.lang.String[] { + "BigqueryExport", + }); + internal_static_google_cloud_dataplex_v1_DataQualitySpec_PostScanActions_BigQueryExport_descriptor = + internal_static_google_cloud_dataplex_v1_DataQualitySpec_PostScanActions_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dataplex_v1_DataQualitySpec_PostScanActions_BigQueryExport_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_DataQualitySpec_PostScanActions_BigQueryExport_descriptor, + new java.lang.String[] { + "ResultsTable", }); internal_static_google_cloud_dataplex_v1_DataQualityResult_descriptor = getDescriptor().getMessageTypes().get(1); @@ -171,7 +233,27 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataplex_v1_DataQualityResult_descriptor, new java.lang.String[] { - "Passed", "Dimensions", "Rules", "RowCount", "ScannedData", + "Passed", "Dimensions", "Rules", "RowCount", "ScannedData", "PostScanActionsResult", + }); + internal_static_google_cloud_dataplex_v1_DataQualityResult_PostScanActionsResult_descriptor = + internal_static_google_cloud_dataplex_v1_DataQualityResult_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dataplex_v1_DataQualityResult_PostScanActionsResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_DataQualityResult_PostScanActionsResult_descriptor, + new java.lang.String[] { + "BigqueryExportResult", + }); + internal_static_google_cloud_dataplex_v1_DataQualityResult_PostScanActionsResult_BigQueryExportResult_descriptor = + internal_static_google_cloud_dataplex_v1_DataQualityResult_PostScanActionsResult_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dataplex_v1_DataQualityResult_PostScanActionsResult_BigQueryExportResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_DataQualityResult_PostScanActionsResult_BigQueryExportResult_descriptor, + new java.lang.String[] { + "State", "Message", }); internal_static_google_cloud_dataplex_v1_DataQualityRuleResult_descriptor = getDescriptor().getMessageTypes().get(2); @@ -213,6 +295,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "IgnoreNull", "Dimension", "Threshold", + "Name", + "Description", "RuleType", }); internal_static_google_cloud_dataplex_v1_DataQualityRule_RangeExpectation_descriptor = @@ -278,9 +362,12 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resourceDefinition); + registry.add(com.google.api.ResourceProto.resourceReference); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); com.google.cloud.dataplex.v1.ProcessingProto.getDescriptor(); } diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityResult.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityResult.java index d0fdc49364cb..e7cbdfdfe68e 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityResult.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityResult.java @@ -63,6 +63,1936 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.dataplex.v1.DataQualityResult.Builder.class); } + public interface PostScanActionsResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. The result of BigQuery export post scan action.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the bigqueryExportResult field is set. + */ + boolean hasBigqueryExportResult(); + /** + * + * + *
+     * Output only. The result of BigQuery export post scan action.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bigqueryExportResult. + */ + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult + getBigqueryExportResult(); + /** + * + * + *
+     * Output only. The result of BigQuery export post scan action.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResultOrBuilder + getBigqueryExportResultOrBuilder(); + } + /** + * + * + *
+   * The result of post scan actions of DataQualityScan job.
+   * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult} + */ + public static final class PostScanActionsResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult) + PostScanActionsResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use PostScanActionsResult.newBuilder() to construct. + private PostScanActionsResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PostScanActionsResult() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PostScanActionsResult(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataQualityProto + .internal_static_google_cloud_dataplex_v1_DataQualityResult_PostScanActionsResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataQualityProto + .internal_static_google_cloud_dataplex_v1_DataQualityResult_PostScanActionsResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.class, + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.Builder.class); + } + + public interface BigQueryExportResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Output only. Execution state for the BigQuery exporting.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+       * Output only. Execution state for the BigQuery exporting.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult + .State + getState(); + + /** + * + * + *
+       * Output only. Additional information about the BigQuery exporting.
+       * 
+ * + * string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The message. + */ + java.lang.String getMessage(); + /** + * + * + *
+       * Output only. Additional information about the BigQuery exporting.
+       * 
+ * + * string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for message. + */ + com.google.protobuf.ByteString getMessageBytes(); + } + /** + * + * + *
+     * The result of BigQuery export post scan action.
+     * 
+ * + * Protobuf type {@code + * google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult} + */ + public static final class BigQueryExportResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult) + BigQueryExportResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use BigQueryExportResult.newBuilder() to construct. + private BigQueryExportResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BigQueryExportResult() { + state_ = 0; + message_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BigQueryExportResult(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataQualityProto + .internal_static_google_cloud_dataplex_v1_DataQualityResult_PostScanActionsResult_BigQueryExportResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataQualityProto + .internal_static_google_cloud_dataplex_v1_DataQualityResult_PostScanActionsResult_BigQueryExportResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult.class, + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult.Builder.class); + } + + /** + * + * + *
+       * Execution state for the exporting.
+       * 
+ * + * Protobuf enum {@code + * google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+         * The exporting state is unspecified.
+         * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+         * The exporting completed successfully.
+         * 
+ * + * SUCCEEDED = 1; + */ + SUCCEEDED(1), + /** + * + * + *
+         * The exporting is no longer running due to an error.
+         * 
+ * + * FAILED = 2; + */ + FAILED(2), + /** + * + * + *
+         * The exporting is skipped due to no valid scan result to export
+         * (usually caused by scan failed).
+         * 
+ * + * SKIPPED = 3; + */ + SKIPPED(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+         * The exporting state is unspecified.
+         * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+         * The exporting completed successfully.
+         * 
+ * + * SUCCEEDED = 1; + */ + public static final int SUCCEEDED_VALUE = 1; + /** + * + * + *
+         * The exporting is no longer running due to an error.
+         * 
+ * + * FAILED = 2; + */ + public static final int FAILED_VALUE = 2; + /** + * + * + *
+         * The exporting is skipped due to no valid scan result to export
+         * (usually caused by scan failed).
+         * 
+ * + * SKIPPED = 3; + */ + public static final int SKIPPED_VALUE = 3; + + 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 SUCCEEDED; + case 2: + return FAILED; + case 3: + return SKIPPED; + 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.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult.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.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State) + } + + public static final int STATE_FIELD_NUMBER = 1; + private int state_ = 0; + /** + * + * + *
+       * Output only. Execution state for the BigQuery exporting.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.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. Execution state for the BigQuery exporting.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult.State + getState() { + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult + .State + result = + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult.State.forNumber(state_); + return result == null + ? com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult.State.UNRECOGNIZED + : result; + } + + public static final int MESSAGE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object message_ = ""; + /** + * + * + *
+       * Output only. Additional information about the BigQuery exporting.
+       * 
+ * + * string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The message. + */ + @java.lang.Override + public java.lang.String getMessage() { + java.lang.Object ref = message_; + 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(); + message_ = s; + return s; + } + } + /** + * + * + *
+       * Output only. Additional information about the BigQuery exporting.
+       * 
+ * + * string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for message. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + message_ = 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 (state_ + != com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult.State.STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, message_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (state_ + != com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult.State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, message_); + } + 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.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult + other = + (com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult) + obj; + + if (state_ != other.state_) return false; + if (!getMessage().equals(other.getMessage())) 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) + MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getMessage().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult + 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.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult + 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.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult + 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.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult + 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.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult + 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.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult + 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 result of BigQuery export post scan action.
+       * 
+ * + * Protobuf type {@code + * google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult) + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataQualityProto + .internal_static_google_cloud_dataplex_v1_DataQualityResult_PostScanActionsResult_BigQueryExportResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataQualityProto + .internal_static_google_cloud_dataplex_v1_DataQualityResult_PostScanActionsResult_BigQueryExportResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult.class, + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult.Builder.class); + } + + // Construct using + // com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + state_ = 0; + message_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.DataQualityProto + .internal_static_google_cloud_dataplex_v1_DataQualityResult_PostScanActionsResult_BigQueryExportResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult + getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult + build() { + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult + buildPartial() { + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult + result = + new com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.message_ = message_; + } + } + + @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.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult) { + return mergeFrom( + (com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult + other) { + if (other + == com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult.getDefaultInstance()) return this; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getMessage().isEmpty()) { + message_ = other.message_; + bitField0_ |= 0x00000002; + 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: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + message_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + 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 int state_ = 0; + /** + * + * + *
+         * Output only. Execution state for the BigQuery exporting.
+         * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.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. Execution state for the BigQuery exporting.
+         * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Output only. Execution state for the BigQuery exporting.
+         * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult.State + getState() { + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult + .State + result = + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult.State.forNumber(state_); + return result == null + ? com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+         * Output only. Execution state for the BigQuery exporting.
+         * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.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.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult.State + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+         * Output only. Execution state for the BigQuery exporting.
+         * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000001); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object message_ = ""; + /** + * + * + *
+         * Output only. Additional information about the BigQuery exporting.
+         * 
+ * + * string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The message. + */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Output only. Additional information about the BigQuery exporting.
+         * 
+ * + * string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for message. + */ + public com.google.protobuf.ByteString getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Output only. Additional information about the BigQuery exporting.
+         * 
+ * + * string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The message to set. + * @return This builder for chaining. + */ + public Builder setMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Output only. Additional information about the BigQuery exporting.
+         * 
+ * + * string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearMessage() { + message_ = getDefaultInstance().getMessage(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+         * Output only. Additional information about the BigQuery exporting.
+         * 
+ * + * string message = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for message to set. + * @return This builder for chaining. + */ + public Builder setMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + message_ = value; + bitField0_ |= 0x00000002; + 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.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult) + private static final com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult(); + } + + public static com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQueryExportResult 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.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int BIGQUERY_EXPORT_RESULT_FIELD_NUMBER = 1; + private com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult + bigqueryExportResult_; + /** + * + * + *
+     * Output only. The result of BigQuery export post scan action.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the bigqueryExportResult field is set. + */ + @java.lang.Override + public boolean hasBigqueryExportResult() { + return bigqueryExportResult_ != null; + } + /** + * + * + *
+     * Output only. The result of BigQuery export post scan action.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bigqueryExportResult. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult + getBigqueryExportResult() { + return bigqueryExportResult_ == null + ? com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult.getDefaultInstance() + : bigqueryExportResult_; + } + /** + * + * + *
+     * Output only. The result of BigQuery export post scan action.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResultOrBuilder + getBigqueryExportResultOrBuilder() { + return bigqueryExportResult_ == null + ? com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult.getDefaultInstance() + : bigqueryExportResult_; + } + + 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 (bigqueryExportResult_ != null) { + output.writeMessage(1, getBigqueryExportResult()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (bigqueryExportResult_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBigqueryExportResult()); + } + 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.dataplex.v1.DataQualityResult.PostScanActionsResult)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult other = + (com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult) obj; + + if (hasBigqueryExportResult() != other.hasBigqueryExportResult()) return false; + if (hasBigqueryExportResult()) { + if (!getBigqueryExportResult().equals(other.getBigqueryExportResult())) 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 (hasBigqueryExportResult()) { + hash = (37 * hash) + BIGQUERY_EXPORT_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getBigqueryExportResult().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult 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.dataplex.v1.DataQualityResult.PostScanActionsResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult 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.dataplex.v1.DataQualityResult.PostScanActionsResult parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult 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.dataplex.v1.DataQualityResult.PostScanActionsResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + 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.dataplex.v1.DataQualityResult.PostScanActionsResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult 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.dataplex.v1.DataQualityResult.PostScanActionsResult 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 result of post scan actions of DataQualityScan job.
+     * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult) + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataQualityProto + .internal_static_google_cloud_dataplex_v1_DataQualityResult_PostScanActionsResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataQualityProto + .internal_static_google_cloud_dataplex_v1_DataQualityResult_PostScanActionsResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.class, + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.Builder.class); + } + + // Construct using + // com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + bigqueryExportResult_ = null; + if (bigqueryExportResultBuilder_ != null) { + bigqueryExportResultBuilder_.dispose(); + bigqueryExportResultBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.DataQualityProto + .internal_static_google_cloud_dataplex_v1_DataQualityResult_PostScanActionsResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult build() { + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult buildPartial() { + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult result = + new com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.bigqueryExportResult_ = + bigqueryExportResultBuilder_ == null + ? bigqueryExportResult_ + : bigqueryExportResultBuilder_.build(); + } + } + + @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.dataplex.v1.DataQualityResult.PostScanActionsResult) { + return mergeFrom( + (com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult other) { + if (other + == com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .getDefaultInstance()) return this; + if (other.hasBigqueryExportResult()) { + mergeBigqueryExportResult(other.getBigqueryExportResult()); + } + 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( + getBigqueryExportResultFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + 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 int bitField0_; + + private com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult + bigqueryExportResult_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult, + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult.Builder, + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResultOrBuilder> + bigqueryExportResultBuilder_; + /** + * + * + *
+       * Output only. The result of BigQuery export post scan action.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the bigqueryExportResult field is set. + */ + public boolean hasBigqueryExportResult() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Output only. The result of BigQuery export post scan action.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bigqueryExportResult. + */ + public com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult + getBigqueryExportResult() { + if (bigqueryExportResultBuilder_ == null) { + return bigqueryExportResult_ == null + ? com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult.getDefaultInstance() + : bigqueryExportResult_; + } else { + return bigqueryExportResultBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Output only. The result of BigQuery export post scan action.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setBigqueryExportResult( + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult + value) { + if (bigqueryExportResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + bigqueryExportResult_ = value; + } else { + bigqueryExportResultBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The result of BigQuery export post scan action.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setBigqueryExportResult( + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult + .Builder + builderForValue) { + if (bigqueryExportResultBuilder_ == null) { + bigqueryExportResult_ = builderForValue.build(); + } else { + bigqueryExportResultBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The result of BigQuery export post scan action.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeBigqueryExportResult( + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult + value) { + if (bigqueryExportResultBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && bigqueryExportResult_ != null + && bigqueryExportResult_ + != com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult.getDefaultInstance()) { + getBigqueryExportResultBuilder().mergeFrom(value); + } else { + bigqueryExportResult_ = value; + } + } else { + bigqueryExportResultBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The result of BigQuery export post scan action.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearBigqueryExportResult() { + bitField0_ = (bitField0_ & ~0x00000001); + bigqueryExportResult_ = null; + if (bigqueryExportResultBuilder_ != null) { + bigqueryExportResultBuilder_.dispose(); + bigqueryExportResultBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The result of BigQuery export post scan action.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult.Builder + getBigqueryExportResultBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getBigqueryExportResultFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Output only. The result of BigQuery export post scan action.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResultOrBuilder + getBigqueryExportResultOrBuilder() { + if (bigqueryExportResultBuilder_ != null) { + return bigqueryExportResultBuilder_.getMessageOrBuilder(); + } else { + return bigqueryExportResult_ == null + ? com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult.getDefaultInstance() + : bigqueryExportResult_; + } + } + /** + * + * + *
+       * Output only. The result of BigQuery export post scan action.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult, + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult.Builder, + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResultOrBuilder> + getBigqueryExportResultFieldBuilder() { + if (bigqueryExportResultBuilder_ == null) { + bigqueryExportResultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult, + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResult.Builder, + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .BigQueryExportResultOrBuilder>( + getBigqueryExportResult(), getParentForChildren(), isClean()); + bigqueryExportResult_ = null; + } + return bigqueryExportResultBuilder_; + } + + @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.dataplex.v1.DataQualityResult.PostScanActionsResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult) + private static final com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult(); + } + + public static com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PostScanActionsResult 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.dataplex.v1.DataQualityResult.PostScanActionsResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + public static final int PASSED_FIELD_NUMBER = 5; private boolean passed_ = false; /** @@ -293,6 +2223,65 @@ public com.google.cloud.dataplex.v1.ScannedDataOrBuilder getScannedDataOrBuilder : scannedData_; } + public static final int POST_SCAN_ACTIONS_RESULT_FIELD_NUMBER = 8; + private com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + postScanActionsResult_; + /** + * + * + *
+   * Output only. The result of post scan actions.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult post_scan_actions_result = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the postScanActionsResult field is set. + */ + @java.lang.Override + public boolean hasPostScanActionsResult() { + return postScanActionsResult_ != null; + } + /** + * + * + *
+   * Output only. The result of post scan actions.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult post_scan_actions_result = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The postScanActionsResult. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + getPostScanActionsResult() { + return postScanActionsResult_ == null + ? com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.getDefaultInstance() + : postScanActionsResult_; + } + /** + * + * + *
+   * Output only. The result of post scan actions.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult post_scan_actions_result = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResultOrBuilder + getPostScanActionsResultOrBuilder() { + return postScanActionsResult_ == null + ? com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.getDefaultInstance() + : postScanActionsResult_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -322,6 +2311,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (scannedData_ != null) { output.writeMessage(7, getScannedData()); } + if (postScanActionsResult_ != null) { + output.writeMessage(8, getPostScanActionsResult()); + } getUnknownFields().writeTo(output); } @@ -346,6 +2338,10 @@ public int getSerializedSize() { if (scannedData_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getScannedData()); } + if (postScanActionsResult_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(8, getPostScanActionsResult()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -370,6 +2366,10 @@ public boolean equals(final java.lang.Object obj) { if (hasScannedData()) { if (!getScannedData().equals(other.getScannedData())) return false; } + if (hasPostScanActionsResult() != other.hasPostScanActionsResult()) return false; + if (hasPostScanActionsResult()) { + if (!getPostScanActionsResult().equals(other.getPostScanActionsResult())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -397,6 +2397,10 @@ public int hashCode() { hash = (37 * hash) + SCANNED_DATA_FIELD_NUMBER; hash = (53 * hash) + getScannedData().hashCode(); } + if (hasPostScanActionsResult()) { + hash = (37 * hash) + POST_SCAN_ACTIONS_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getPostScanActionsResult().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -557,6 +2561,11 @@ public Builder clear() { scannedDataBuilder_.dispose(); scannedDataBuilder_ = null; } + postScanActionsResult_ = null; + if (postScanActionsResultBuilder_ != null) { + postScanActionsResultBuilder_.dispose(); + postScanActionsResultBuilder_ = null; + } return this; } @@ -625,6 +2634,12 @@ private void buildPartial0(com.google.cloud.dataplex.v1.DataQualityResult result result.scannedData_ = scannedDataBuilder_ == null ? scannedData_ : scannedDataBuilder_.build(); } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.postScanActionsResult_ = + postScanActionsResultBuilder_ == null + ? postScanActionsResult_ + : postScanActionsResultBuilder_.build(); + } } @java.lang.Override @@ -735,6 +2750,9 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.DataQualityResult other) { if (other.hasScannedData()) { mergeScannedData(other.getScannedData()); } + if (other.hasPostScanActionsResult()) { + mergePostScanActionsResult(other.getPostScanActionsResult()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -807,6 +2825,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000010; break; } // case 58 + case 66: + { + input.readMessage( + getPostScanActionsResultFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 66 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -1832,6 +3857,219 @@ public com.google.cloud.dataplex.v1.ScannedDataOrBuilder getScannedDataOrBuilder return scannedDataBuilder_; } + private com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + postScanActionsResult_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult, + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.Builder, + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResultOrBuilder> + postScanActionsResultBuilder_; + /** + * + * + *
+     * Output only. The result of post scan actions.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult post_scan_actions_result = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the postScanActionsResult field is set. + */ + public boolean hasPostScanActionsResult() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * + * + *
+     * Output only. The result of post scan actions.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult post_scan_actions_result = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The postScanActionsResult. + */ + public com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + getPostScanActionsResult() { + if (postScanActionsResultBuilder_ == null) { + return postScanActionsResult_ == null + ? com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .getDefaultInstance() + : postScanActionsResult_; + } else { + return postScanActionsResultBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The result of post scan actions.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult post_scan_actions_result = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPostScanActionsResult( + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult value) { + if (postScanActionsResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + postScanActionsResult_ = value; + } else { + postScanActionsResultBuilder_.setMessage(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The result of post scan actions.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult post_scan_actions_result = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setPostScanActionsResult( + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.Builder + builderForValue) { + if (postScanActionsResultBuilder_ == null) { + postScanActionsResult_ = builderForValue.build(); + } else { + postScanActionsResultBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The result of post scan actions.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult post_scan_actions_result = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergePostScanActionsResult( + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult value) { + if (postScanActionsResultBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0) + && postScanActionsResult_ != null + && postScanActionsResult_ + != com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .getDefaultInstance()) { + getPostScanActionsResultBuilder().mergeFrom(value); + } else { + postScanActionsResult_ = value; + } + } else { + postScanActionsResultBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The result of post scan actions.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult post_scan_actions_result = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearPostScanActionsResult() { + bitField0_ = (bitField0_ & ~0x00000020); + postScanActionsResult_ = null; + if (postScanActionsResultBuilder_ != null) { + postScanActionsResultBuilder_.dispose(); + postScanActionsResultBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The result of post scan actions.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult post_scan_actions_result = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.Builder + getPostScanActionsResultBuilder() { + bitField0_ |= 0x00000020; + onChanged(); + return getPostScanActionsResultFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The result of post scan actions.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult post_scan_actions_result = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResultOrBuilder + getPostScanActionsResultOrBuilder() { + if (postScanActionsResultBuilder_ != null) { + return postScanActionsResultBuilder_.getMessageOrBuilder(); + } else { + return postScanActionsResult_ == null + ? com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult + .getDefaultInstance() + : postScanActionsResult_; + } + } + /** + * + * + *
+     * Output only. The result of post scan actions.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult post_scan_actions_result = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult, + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.Builder, + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResultOrBuilder> + getPostScanActionsResultFieldBuilder() { + if (postScanActionsResultBuilder_ == null) { + postScanActionsResultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult, + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult.Builder, + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResultOrBuilder>( + getPostScanActionsResult(), getParentForChildren(), isClean()); + postScanActionsResult_ = null; + } + return postScanActionsResultBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityResultOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityResultOrBuilder.java index 2f30dac5d444..7fbfc20a0b2d 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityResultOrBuilder.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityResultOrBuilder.java @@ -188,4 +188,46 @@ com.google.cloud.dataplex.v1.DataQualityDimensionResultOrBuilder getDimensionsOr * .google.cloud.dataplex.v1.ScannedData scanned_data = 7; */ com.google.cloud.dataplex.v1.ScannedDataOrBuilder getScannedDataOrBuilder(); + + /** + * + * + *
+   * Output only. The result of post scan actions.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult post_scan_actions_result = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the postScanActionsResult field is set. + */ + boolean hasPostScanActionsResult(); + /** + * + * + *
+   * Output only. The result of post scan actions.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult post_scan_actions_result = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The postScanActionsResult. + */ + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult getPostScanActionsResult(); + /** + * + * + *
+   * Output only. The result of post scan actions.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResult post_scan_actions_result = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.dataplex.v1.DataQualityResult.PostScanActionsResultOrBuilder + getPostScanActionsResultOrBuilder(); } diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityRule.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityRule.java index fd935b26dfbc..eb002478d12f 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityRule.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityRule.java @@ -40,6 +40,8 @@ private DataQualityRule(com.google.protobuf.GeneratedMessageV3.Builder builde private DataQualityRule() { column_ = ""; dimension_ = ""; + name_ = ""; + description_ = ""; } @java.lang.Override @@ -1637,10 +1639,10 @@ public interface SetExpectationOrBuilder * * *
-     * Expected values for the column value.
+     * Optional. Expected values for the column value.
      * 
* - * repeated string values = 1; + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return A list containing the values. */ @@ -1649,10 +1651,10 @@ public interface SetExpectationOrBuilder * * *
-     * Expected values for the column value.
+     * Optional. Expected values for the column value.
      * 
* - * repeated string values = 1; + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The count of values. */ @@ -1661,10 +1663,10 @@ public interface SetExpectationOrBuilder * * *
-     * Expected values for the column value.
+     * Optional. Expected values for the column value.
      * 
* - * repeated string values = 1; + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the element to return. * @return The values at the given index. @@ -1674,10 +1676,10 @@ public interface SetExpectationOrBuilder * * *
-     * Expected values for the column value.
+     * Optional. Expected values for the column value.
      * 
* - * repeated string values = 1; + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the value to return. * @return The bytes of the values at the given index. @@ -1737,10 +1739,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-     * Expected values for the column value.
+     * Optional. Expected values for the column value.
      * 
* - * repeated string values = 1; + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return A list containing the values. */ @@ -1751,10 +1753,10 @@ public com.google.protobuf.ProtocolStringList getValuesList() { * * *
-     * Expected values for the column value.
+     * Optional. Expected values for the column value.
      * 
* - * repeated string values = 1; + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The count of values. */ @@ -1765,10 +1767,10 @@ public int getValuesCount() { * * *
-     * Expected values for the column value.
+     * Optional. Expected values for the column value.
      * 
* - * repeated string values = 1; + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the element to return. * @return The values at the given index. @@ -1780,10 +1782,10 @@ public java.lang.String getValues(int index) { * * *
-     * Expected values for the column value.
+     * Optional. Expected values for the column value.
      * 
* - * repeated string values = 1; + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the value to return. * @return The bytes of the values at the given index. @@ -2169,10 +2171,10 @@ private void ensureValuesIsMutable() { * * *
-       * Expected values for the column value.
+       * Optional. Expected values for the column value.
        * 
* - * repeated string values = 1; + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return A list containing the values. */ @@ -2184,10 +2186,10 @@ public com.google.protobuf.ProtocolStringList getValuesList() { * * *
-       * Expected values for the column value.
+       * Optional. Expected values for the column value.
        * 
* - * repeated string values = 1; + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The count of values. */ @@ -2198,10 +2200,10 @@ public int getValuesCount() { * * *
-       * Expected values for the column value.
+       * Optional. Expected values for the column value.
        * 
* - * repeated string values = 1; + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the element to return. * @return The values at the given index. @@ -2213,10 +2215,10 @@ public java.lang.String getValues(int index) { * * *
-       * Expected values for the column value.
+       * Optional. Expected values for the column value.
        * 
* - * repeated string values = 1; + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index of the value to return. * @return The bytes of the values at the given index. @@ -2228,10 +2230,10 @@ public com.google.protobuf.ByteString getValuesBytes(int index) { * * *
-       * Expected values for the column value.
+       * Optional. Expected values for the column value.
        * 
* - * repeated string values = 1; + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param index The index to set the value at. * @param value The values to set. @@ -2251,10 +2253,10 @@ public Builder setValues(int index, java.lang.String value) { * * *
-       * Expected values for the column value.
+       * Optional. Expected values for the column value.
        * 
* - * repeated string values = 1; + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The values to add. * @return This builder for chaining. @@ -2273,10 +2275,10 @@ public Builder addValues(java.lang.String value) { * * *
-       * Expected values for the column value.
+       * Optional. Expected values for the column value.
        * 
* - * repeated string values = 1; + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param values The values to add. * @return This builder for chaining. @@ -2292,10 +2294,10 @@ public Builder addAllValues(java.lang.Iterable values) { * * *
-       * Expected values for the column value.
+       * Optional. Expected values for the column value.
        * 
* - * repeated string values = 1; + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -2310,10 +2312,10 @@ public Builder clearValues() { * * *
-       * Expected values for the column value.
+       * Optional. Expected values for the column value.
        * 
* - * repeated string values = 1; + * repeated string values = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes of the values to add. * @return This builder for chaining. @@ -2404,10 +2406,10 @@ public interface RegexExpectationOrBuilder * * *
-     * A regular expression the column value is expected to match.
+     * Optional. A regular expression the column value is expected to match.
      * 
* - * string regex = 1; + * string regex = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The regex. */ @@ -2416,10 +2418,10 @@ public interface RegexExpectationOrBuilder * * *
-     * A regular expression the column value is expected to match.
+     * Optional. A regular expression the column value is expected to match.
      * 
* - * string regex = 1; + * string regex = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for regex. */ @@ -2477,10 +2479,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-     * A regular expression the column value is expected to match.
+     * Optional. A regular expression the column value is expected to match.
      * 
* - * string regex = 1; + * string regex = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The regex. */ @@ -2500,10 +2502,10 @@ public java.lang.String getRegex() { * * *
-     * A regular expression the column value is expected to match.
+     * Optional. A regular expression the column value is expected to match.
      * 
* - * string regex = 1; + * string regex = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for regex. */ @@ -2876,10 +2878,10 @@ public Builder mergeFrom( * * *
-       * A regular expression the column value is expected to match.
+       * Optional. A regular expression the column value is expected to match.
        * 
* - * string regex = 1; + * string regex = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The regex. */ @@ -2898,10 +2900,10 @@ public java.lang.String getRegex() { * * *
-       * A regular expression the column value is expected to match.
+       * Optional. A regular expression the column value is expected to match.
        * 
* - * string regex = 1; + * string regex = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for regex. */ @@ -2920,10 +2922,10 @@ public com.google.protobuf.ByteString getRegexBytes() { * * *
-       * A regular expression the column value is expected to match.
+       * Optional. A regular expression the column value is expected to match.
        * 
* - * string regex = 1; + * string regex = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The regex to set. * @return This builder for chaining. @@ -2941,10 +2943,10 @@ public Builder setRegex(java.lang.String value) { * * *
-       * A regular expression the column value is expected to match.
+       * Optional. A regular expression the column value is expected to match.
        * 
* - * string regex = 1; + * string regex = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -2958,10 +2960,10 @@ public Builder clearRegex() { * * *
-       * A regular expression the column value is expected to match.
+       * Optional. A regular expression the column value is expected to match.
        * 
* - * string regex = 1; + * string regex = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for regex to set. * @return This builder for chaining. @@ -3486,11 +3488,11 @@ public interface StatisticRangeExpectationOrBuilder * * *
-     * The aggregate metric to evaluate.
+     * Optional. The aggregate metric to evaluate.
      * 
* * - * .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic statistic = 1; + * .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic statistic = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The enum numeric value on the wire for statistic. @@ -3500,11 +3502,11 @@ public interface StatisticRangeExpectationOrBuilder * * *
-     * The aggregate metric to evaluate.
+     * Optional. The aggregate metric to evaluate.
      * 
* * - * .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic statistic = 1; + * .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic statistic = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The statistic. @@ -3516,13 +3518,13 @@ public interface StatisticRangeExpectationOrBuilder * * *
-     * The minimum column statistic value allowed for a row to pass this
-     * validation.
+     * Optional. The minimum column statistic value allowed for a row to pass
+     * this validation.
      *
      * At least one of `min_value` and `max_value` need to be provided.
      * 
* - * string min_value = 2; + * string min_value = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The minValue. */ @@ -3531,13 +3533,13 @@ public interface StatisticRangeExpectationOrBuilder * * *
-     * The minimum column statistic value allowed for a row to pass this
-     * validation.
+     * Optional. The minimum column statistic value allowed for a row to pass
+     * this validation.
      *
      * At least one of `min_value` and `max_value` need to be provided.
      * 
* - * string min_value = 2; + * string min_value = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for minValue. */ @@ -3547,13 +3549,13 @@ public interface StatisticRangeExpectationOrBuilder * * *
-     * The maximum column statistic value allowed for a row to pass this
-     * validation.
+     * Optional. The maximum column statistic value allowed for a row to pass
+     * this validation.
      *
      * At least one of `min_value` and `max_value` need to be provided.
      * 
* - * string max_value = 3; + * string max_value = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The maxValue. */ @@ -3562,13 +3564,13 @@ public interface StatisticRangeExpectationOrBuilder * * *
-     * The maximum column statistic value allowed for a row to pass this
-     * validation.
+     * Optional. The maximum column statistic value allowed for a row to pass
+     * this validation.
      *
      * At least one of `min_value` and `max_value` need to be provided.
      * 
* - * string max_value = 3; + * string max_value = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for maxValue. */ @@ -3578,13 +3580,13 @@ public interface StatisticRangeExpectationOrBuilder * * *
-     * Whether column statistic needs to be strictly greater than ('>')
-     * the minimum, or if equality is allowed.
+     * Optional. Whether column statistic needs to be strictly greater than
+     * ('>') the minimum, or if equality is allowed.
      *
      * Only relevant if a `min_value` has been defined. Default = false.
      * 
* - * bool strict_min_enabled = 4; + * bool strict_min_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The strictMinEnabled. */ @@ -3594,13 +3596,13 @@ public interface StatisticRangeExpectationOrBuilder * * *
-     * Whether column statistic needs to be strictly lesser than ('<') the
-     * maximum, or if equality is allowed.
+     * Optional. Whether column statistic needs to be strictly lesser than ('<')
+     * the maximum, or if equality is allowed.
      *
      * Only relevant if a `max_value` has been defined. Default = false.
      * 
* - * bool strict_max_enabled = 5; + * bool strict_max_enabled = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The strictMaxEnabled. */ @@ -3845,11 +3847,11 @@ private ColumnStatistic(int value) { * * *
-     * The aggregate metric to evaluate.
+     * Optional. The aggregate metric to evaluate.
      * 
* * - * .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic statistic = 1; + * .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic statistic = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The enum numeric value on the wire for statistic. @@ -3862,11 +3864,11 @@ public int getStatisticValue() { * * *
-     * The aggregate metric to evaluate.
+     * Optional. The aggregate metric to evaluate.
      * 
* * - * .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic statistic = 1; + * .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic statistic = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The statistic. @@ -3892,13 +3894,13 @@ public int getStatisticValue() { * * *
-     * The minimum column statistic value allowed for a row to pass this
-     * validation.
+     * Optional. The minimum column statistic value allowed for a row to pass
+     * this validation.
      *
      * At least one of `min_value` and `max_value` need to be provided.
      * 
* - * string min_value = 2; + * string min_value = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The minValue. */ @@ -3918,13 +3920,13 @@ public java.lang.String getMinValue() { * * *
-     * The minimum column statistic value allowed for a row to pass this
-     * validation.
+     * Optional. The minimum column statistic value allowed for a row to pass
+     * this validation.
      *
      * At least one of `min_value` and `max_value` need to be provided.
      * 
* - * string min_value = 2; + * string min_value = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for minValue. */ @@ -3949,13 +3951,13 @@ public com.google.protobuf.ByteString getMinValueBytes() { * * *
-     * The maximum column statistic value allowed for a row to pass this
-     * validation.
+     * Optional. The maximum column statistic value allowed for a row to pass
+     * this validation.
      *
      * At least one of `min_value` and `max_value` need to be provided.
      * 
* - * string max_value = 3; + * string max_value = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The maxValue. */ @@ -3975,13 +3977,13 @@ public java.lang.String getMaxValue() { * * *
-     * The maximum column statistic value allowed for a row to pass this
-     * validation.
+     * Optional. The maximum column statistic value allowed for a row to pass
+     * this validation.
      *
      * At least one of `min_value` and `max_value` need to be provided.
      * 
* - * string max_value = 3; + * string max_value = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for maxValue. */ @@ -4004,13 +4006,13 @@ public com.google.protobuf.ByteString getMaxValueBytes() { * * *
-     * Whether column statistic needs to be strictly greater than ('>')
-     * the minimum, or if equality is allowed.
+     * Optional. Whether column statistic needs to be strictly greater than
+     * ('>') the minimum, or if equality is allowed.
      *
      * Only relevant if a `min_value` has been defined. Default = false.
      * 
* - * bool strict_min_enabled = 4; + * bool strict_min_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The strictMinEnabled. */ @@ -4025,13 +4027,13 @@ public boolean getStrictMinEnabled() { * * *
-     * Whether column statistic needs to be strictly lesser than ('<') the
-     * maximum, or if equality is allowed.
+     * Optional. Whether column statistic needs to be strictly lesser than ('<')
+     * the maximum, or if equality is allowed.
      *
      * Only relevant if a `max_value` has been defined. Default = false.
      * 
* - * bool strict_max_enabled = 5; + * bool strict_max_enabled = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The strictMaxEnabled. */ @@ -4501,11 +4503,11 @@ public Builder mergeFrom( * * *
-       * The aggregate metric to evaluate.
+       * Optional. The aggregate metric to evaluate.
        * 
* * - * .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic statistic = 1; + * .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic statistic = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The enum numeric value on the wire for statistic. @@ -4518,11 +4520,11 @@ public int getStatisticValue() { * * *
-       * The aggregate metric to evaluate.
+       * Optional. The aggregate metric to evaluate.
        * 
* * - * .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic statistic = 1; + * .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic statistic = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @param value The enum numeric value on the wire for statistic to set. @@ -4538,11 +4540,11 @@ public Builder setStatisticValue(int value) { * * *
-       * The aggregate metric to evaluate.
+       * Optional. The aggregate metric to evaluate.
        * 
* * - * .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic statistic = 1; + * .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic statistic = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The statistic. @@ -4563,11 +4565,11 @@ public Builder setStatisticValue(int value) { * * *
-       * The aggregate metric to evaluate.
+       * Optional. The aggregate metric to evaluate.
        * 
* * - * .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic statistic = 1; + * .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic statistic = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @param value The statistic to set. @@ -4588,11 +4590,11 @@ public Builder setStatistic( * * *
-       * The aggregate metric to evaluate.
+       * Optional. The aggregate metric to evaluate.
        * 
* * - * .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic statistic = 1; + * .google.cloud.dataplex.v1.DataQualityRule.StatisticRangeExpectation.ColumnStatistic statistic = 1 [(.google.api.field_behavior) = OPTIONAL]; * * * @return This builder for chaining. @@ -4609,13 +4611,13 @@ public Builder clearStatistic() { * * *
-       * The minimum column statistic value allowed for a row to pass this
-       * validation.
+       * Optional. The minimum column statistic value allowed for a row to pass
+       * this validation.
        *
        * At least one of `min_value` and `max_value` need to be provided.
        * 
* - * string min_value = 2; + * string min_value = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The minValue. */ @@ -4634,13 +4636,13 @@ public java.lang.String getMinValue() { * * *
-       * The minimum column statistic value allowed for a row to pass this
-       * validation.
+       * Optional. The minimum column statistic value allowed for a row to pass
+       * this validation.
        *
        * At least one of `min_value` and `max_value` need to be provided.
        * 
* - * string min_value = 2; + * string min_value = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for minValue. */ @@ -4659,13 +4661,13 @@ public com.google.protobuf.ByteString getMinValueBytes() { * * *
-       * The minimum column statistic value allowed for a row to pass this
-       * validation.
+       * Optional. The minimum column statistic value allowed for a row to pass
+       * this validation.
        *
        * At least one of `min_value` and `max_value` need to be provided.
        * 
* - * string min_value = 2; + * string min_value = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The minValue to set. * @return This builder for chaining. @@ -4683,13 +4685,13 @@ public Builder setMinValue(java.lang.String value) { * * *
-       * The minimum column statistic value allowed for a row to pass this
-       * validation.
+       * Optional. The minimum column statistic value allowed for a row to pass
+       * this validation.
        *
        * At least one of `min_value` and `max_value` need to be provided.
        * 
* - * string min_value = 2; + * string min_value = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -4703,13 +4705,13 @@ public Builder clearMinValue() { * * *
-       * The minimum column statistic value allowed for a row to pass this
-       * validation.
+       * Optional. The minimum column statistic value allowed for a row to pass
+       * this validation.
        *
        * At least one of `min_value` and `max_value` need to be provided.
        * 
* - * string min_value = 2; + * string min_value = 2 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for minValue to set. * @return This builder for chaining. @@ -4730,13 +4732,13 @@ public Builder setMinValueBytes(com.google.protobuf.ByteString value) { * * *
-       * The maximum column statistic value allowed for a row to pass this
-       * validation.
+       * Optional. The maximum column statistic value allowed for a row to pass
+       * this validation.
        *
        * At least one of `min_value` and `max_value` need to be provided.
        * 
* - * string max_value = 3; + * string max_value = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The maxValue. */ @@ -4755,13 +4757,13 @@ public java.lang.String getMaxValue() { * * *
-       * The maximum column statistic value allowed for a row to pass this
-       * validation.
+       * Optional. The maximum column statistic value allowed for a row to pass
+       * this validation.
        *
        * At least one of `min_value` and `max_value` need to be provided.
        * 
* - * string max_value = 3; + * string max_value = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for maxValue. */ @@ -4780,13 +4782,13 @@ public com.google.protobuf.ByteString getMaxValueBytes() { * * *
-       * The maximum column statistic value allowed for a row to pass this
-       * validation.
+       * Optional. The maximum column statistic value allowed for a row to pass
+       * this validation.
        *
        * At least one of `min_value` and `max_value` need to be provided.
        * 
* - * string max_value = 3; + * string max_value = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The maxValue to set. * @return This builder for chaining. @@ -4804,13 +4806,13 @@ public Builder setMaxValue(java.lang.String value) { * * *
-       * The maximum column statistic value allowed for a row to pass this
-       * validation.
+       * Optional. The maximum column statistic value allowed for a row to pass
+       * this validation.
        *
        * At least one of `min_value` and `max_value` need to be provided.
        * 
* - * string max_value = 3; + * string max_value = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -4824,13 +4826,13 @@ public Builder clearMaxValue() { * * *
-       * The maximum column statistic value allowed for a row to pass this
-       * validation.
+       * Optional. The maximum column statistic value allowed for a row to pass
+       * this validation.
        *
        * At least one of `min_value` and `max_value` need to be provided.
        * 
* - * string max_value = 3; + * string max_value = 3 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for maxValue to set. * @return This builder for chaining. @@ -4851,13 +4853,13 @@ public Builder setMaxValueBytes(com.google.protobuf.ByteString value) { * * *
-       * Whether column statistic needs to be strictly greater than ('>')
-       * the minimum, or if equality is allowed.
+       * Optional. Whether column statistic needs to be strictly greater than
+       * ('>') the minimum, or if equality is allowed.
        *
        * Only relevant if a `min_value` has been defined. Default = false.
        * 
* - * bool strict_min_enabled = 4; + * bool strict_min_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The strictMinEnabled. */ @@ -4869,13 +4871,13 @@ public boolean getStrictMinEnabled() { * * *
-       * Whether column statistic needs to be strictly greater than ('>')
-       * the minimum, or if equality is allowed.
+       * Optional. Whether column statistic needs to be strictly greater than
+       * ('>') the minimum, or if equality is allowed.
        *
        * Only relevant if a `min_value` has been defined. Default = false.
        * 
* - * bool strict_min_enabled = 4; + * bool strict_min_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The strictMinEnabled to set. * @return This builder for chaining. @@ -4891,13 +4893,13 @@ public Builder setStrictMinEnabled(boolean value) { * * *
-       * Whether column statistic needs to be strictly greater than ('>')
-       * the minimum, or if equality is allowed.
+       * Optional. Whether column statistic needs to be strictly greater than
+       * ('>') the minimum, or if equality is allowed.
        *
        * Only relevant if a `min_value` has been defined. Default = false.
        * 
* - * bool strict_min_enabled = 4; + * bool strict_min_enabled = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -4913,13 +4915,13 @@ public Builder clearStrictMinEnabled() { * * *
-       * Whether column statistic needs to be strictly lesser than ('<') the
-       * maximum, or if equality is allowed.
+       * Optional. Whether column statistic needs to be strictly lesser than ('<')
+       * the maximum, or if equality is allowed.
        *
        * Only relevant if a `max_value` has been defined. Default = false.
        * 
* - * bool strict_max_enabled = 5; + * bool strict_max_enabled = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The strictMaxEnabled. */ @@ -4931,13 +4933,13 @@ public boolean getStrictMaxEnabled() { * * *
-       * Whether column statistic needs to be strictly lesser than ('<') the
-       * maximum, or if equality is allowed.
+       * Optional. Whether column statistic needs to be strictly lesser than ('<')
+       * the maximum, or if equality is allowed.
        *
        * Only relevant if a `max_value` has been defined. Default = false.
        * 
* - * bool strict_max_enabled = 5; + * bool strict_max_enabled = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The strictMaxEnabled to set. * @return This builder for chaining. @@ -4953,13 +4955,13 @@ public Builder setStrictMaxEnabled(boolean value) { * * *
-       * Whether column statistic needs to be strictly lesser than ('<') the
-       * maximum, or if equality is allowed.
+       * Optional. Whether column statistic needs to be strictly lesser than ('<')
+       * the maximum, or if equality is allowed.
        *
        * Only relevant if a `max_value` has been defined. Default = false.
        * 
* - * bool strict_max_enabled = 5; + * bool strict_max_enabled = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -5047,10 +5049,10 @@ public interface RowConditionExpectationOrBuilder * * *
-     * The SQL expression.
+     * Optional. The SQL expression.
      * 
* - * string sql_expression = 1; + * string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The sqlExpression. */ @@ -5059,10 +5061,10 @@ public interface RowConditionExpectationOrBuilder * * *
-     * The SQL expression.
+     * Optional. The SQL expression.
      * 
* - * string sql_expression = 1; + * string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for sqlExpression. */ @@ -5125,10 +5127,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-     * The SQL expression.
+     * Optional. The SQL expression.
      * 
* - * string sql_expression = 1; + * string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The sqlExpression. */ @@ -5148,10 +5150,10 @@ public java.lang.String getSqlExpression() { * * *
-     * The SQL expression.
+     * Optional. The SQL expression.
      * 
* - * string sql_expression = 1; + * string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for sqlExpression. */ @@ -5534,10 +5536,10 @@ public Builder mergeFrom( * * *
-       * The SQL expression.
+       * Optional. The SQL expression.
        * 
* - * string sql_expression = 1; + * string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The sqlExpression. */ @@ -5556,10 +5558,10 @@ public java.lang.String getSqlExpression() { * * *
-       * The SQL expression.
+       * Optional. The SQL expression.
        * 
* - * string sql_expression = 1; + * string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for sqlExpression. */ @@ -5578,10 +5580,10 @@ public com.google.protobuf.ByteString getSqlExpressionBytes() { * * *
-       * The SQL expression.
+       * Optional. The SQL expression.
        * 
* - * string sql_expression = 1; + * string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The sqlExpression to set. * @return This builder for chaining. @@ -5599,10 +5601,10 @@ public Builder setSqlExpression(java.lang.String value) { * * *
-       * The SQL expression.
+       * Optional. The SQL expression.
        * 
* - * string sql_expression = 1; + * string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -5616,10 +5618,10 @@ public Builder clearSqlExpression() { * * *
-       * The SQL expression.
+       * Optional. The SQL expression.
        * 
* - * string sql_expression = 1; + * string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for sqlExpression to set. * @return This builder for chaining. @@ -5711,10 +5713,10 @@ public interface TableConditionExpectationOrBuilder * * *
-     * The SQL expression.
+     * Optional. The SQL expression.
      * 
* - * string sql_expression = 1; + * string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The sqlExpression. */ @@ -5723,10 +5725,10 @@ public interface TableConditionExpectationOrBuilder * * *
-     * The SQL expression.
+     * Optional. The SQL expression.
      * 
* - * string sql_expression = 1; + * string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for sqlExpression. */ @@ -5789,10 +5791,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-     * The SQL expression.
+     * Optional. The SQL expression.
      * 
* - * string sql_expression = 1; + * string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The sqlExpression. */ @@ -5812,10 +5814,10 @@ public java.lang.String getSqlExpression() { * * *
-     * The SQL expression.
+     * Optional. The SQL expression.
      * 
* - * string sql_expression = 1; + * string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for sqlExpression. */ @@ -6201,10 +6203,10 @@ public Builder mergeFrom( * * *
-       * The SQL expression.
+       * Optional. The SQL expression.
        * 
* - * string sql_expression = 1; + * string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The sqlExpression. */ @@ -6223,10 +6225,10 @@ public java.lang.String getSqlExpression() { * * *
-       * The SQL expression.
+       * Optional. The SQL expression.
        * 
* - * string sql_expression = 1; + * string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for sqlExpression. */ @@ -6245,10 +6247,10 @@ public com.google.protobuf.ByteString getSqlExpressionBytes() { * * *
-       * The SQL expression.
+       * Optional. The SQL expression.
        * 
* - * string sql_expression = 1; + * string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The sqlExpression to set. * @return This builder for chaining. @@ -6266,10 +6268,10 @@ public Builder setSqlExpression(java.lang.String value) { * * *
-       * The SQL expression.
+       * Optional. The SQL expression.
        * 
* - * string sql_expression = 1; + * string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ @@ -6283,10 +6285,10 @@ public Builder clearSqlExpression() { * * *
-       * The SQL expression.
+       * Optional. The SQL expression.
        * 
* - * string sql_expression = 1; + * string sql_expression = 1 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for sqlExpression to set. * @return This builder for chaining. @@ -6442,7 +6444,7 @@ public RuleTypeCase getRuleTypeCase() { * * *
-   * ColumnMap rule which evaluates whether each column value lies between a
+   * Row-level rule which evaluates whether each column value lies between a
    * specified range.
    * 
* @@ -6458,7 +6460,7 @@ public boolean hasRangeExpectation() { * * *
-   * ColumnMap rule which evaluates whether each column value lies between a
+   * Row-level rule which evaluates whether each column value lies between a
    * specified range.
    * 
* @@ -6477,7 +6479,7 @@ public com.google.cloud.dataplex.v1.DataQualityRule.RangeExpectation getRangeExp * * *
-   * ColumnMap rule which evaluates whether each column value lies between a
+   * Row-level rule which evaluates whether each column value lies between a
    * specified range.
    * 
* @@ -6497,7 +6499,7 @@ public com.google.cloud.dataplex.v1.DataQualityRule.RangeExpectation getRangeExp * * *
-   * ColumnMap rule which evaluates whether each column value is null.
+   * Row-level rule which evaluates whether each column value is null.
    * 
* * .google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation non_null_expectation = 2; @@ -6513,7 +6515,7 @@ public boolean hasNonNullExpectation() { * * *
-   * ColumnMap rule which evaluates whether each column value is null.
+   * Row-level rule which evaluates whether each column value is null.
    * 
* * .google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation non_null_expectation = 2; @@ -6532,7 +6534,7 @@ public com.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation getNonNul * * *
-   * ColumnMap rule which evaluates whether each column value is null.
+   * Row-level rule which evaluates whether each column value is null.
    * 
* * .google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation non_null_expectation = 2; @@ -6552,7 +6554,7 @@ public com.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation getNonNul * * *
-   * ColumnMap rule which evaluates whether each column value is contained by
+   * Row-level rule which evaluates whether each column value is contained by
    * a specified set.
    * 
* @@ -6568,7 +6570,7 @@ public boolean hasSetExpectation() { * * *
-   * ColumnMap rule which evaluates whether each column value is contained by
+   * Row-level rule which evaluates whether each column value is contained by
    * a specified set.
    * 
* @@ -6587,7 +6589,7 @@ public com.google.cloud.dataplex.v1.DataQualityRule.SetExpectation getSetExpecta * * *
-   * ColumnMap rule which evaluates whether each column value is contained by
+   * Row-level rule which evaluates whether each column value is contained by
    * a specified set.
    * 
* @@ -6607,7 +6609,7 @@ public com.google.cloud.dataplex.v1.DataQualityRule.SetExpectation getSetExpecta * * *
-   * ColumnMap rule which evaluates whether each column value matches a
+   * Row-level rule which evaluates whether each column value matches a
    * specified regex.
    * 
* @@ -6623,7 +6625,7 @@ public boolean hasRegexExpectation() { * * *
-   * ColumnMap rule which evaluates whether each column value matches a
+   * Row-level rule which evaluates whether each column value matches a
    * specified regex.
    * 
* @@ -6642,7 +6644,7 @@ public com.google.cloud.dataplex.v1.DataQualityRule.RegexExpectation getRegexExp * * *
-   * ColumnMap rule which evaluates whether each column value matches a
+   * Row-level rule which evaluates whether each column value matches a
    * specified regex.
    * 
* @@ -6662,7 +6664,7 @@ public com.google.cloud.dataplex.v1.DataQualityRule.RegexExpectation getRegexExp * * *
-   * ColumnAggregate rule which evaluates whether the column has duplicates.
+   * Row-level rule which evaluates whether each column value is unique.
    * 
* * @@ -6679,7 +6681,7 @@ public boolean hasUniquenessExpectation() { * * *
-   * ColumnAggregate rule which evaluates whether the column has duplicates.
+   * Row-level rule which evaluates whether each column value is unique.
    * 
* * @@ -6700,7 +6702,7 @@ public boolean hasUniquenessExpectation() { * * *
-   * ColumnAggregate rule which evaluates whether the column has duplicates.
+   * Row-level rule which evaluates whether each column value is unique.
    * 
* * @@ -6721,7 +6723,7 @@ public boolean hasUniquenessExpectation() { * * *
-   * ColumnAggregate rule which evaluates whether the column aggregate
+   * Aggregate rule which evaluates whether the column aggregate
    * statistic lies between a specified range.
    * 
* @@ -6739,7 +6741,7 @@ public boolean hasStatisticRangeExpectation() { * * *
-   * ColumnAggregate rule which evaluates whether the column aggregate
+   * Aggregate rule which evaluates whether the column aggregate
    * statistic lies between a specified range.
    * 
* @@ -6762,7 +6764,7 @@ public boolean hasStatisticRangeExpectation() { * * *
-   * ColumnAggregate rule which evaluates whether the column aggregate
+   * Aggregate rule which evaluates whether the column aggregate
    * statistic lies between a specified range.
    * 
* @@ -6785,8 +6787,8 @@ public boolean hasStatisticRangeExpectation() { * * *
-   * Table rule which evaluates whether each row passes the specified
-   * condition.
+   * Row-level rule which evaluates whether each row in a table passes the
+   * specified condition.
    * 
* * @@ -6803,8 +6805,8 @@ public boolean hasRowConditionExpectation() { * * *
-   * Table rule which evaluates whether each row passes the specified
-   * condition.
+   * Row-level rule which evaluates whether each row in a table passes the
+   * specified condition.
    * 
* * @@ -6826,8 +6828,8 @@ public boolean hasRowConditionExpectation() { * * *
-   * Table rule which evaluates whether each row passes the specified
-   * condition.
+   * Row-level rule which evaluates whether each row in a table passes the
+   * specified condition.
    * 
* * @@ -6849,7 +6851,8 @@ public boolean hasRowConditionExpectation() { * * *
-   * Table rule which evaluates whether the provided expression is true.
+   * Aggregate rule which evaluates whether the provided expression is true
+   * for a table.
    * 
* * @@ -6866,7 +6869,8 @@ public boolean hasTableConditionExpectation() { * * *
-   * Table rule which evaluates whether the provided expression is true.
+   * Aggregate rule which evaluates whether the provided expression is true
+   * for a table.
    * 
* * @@ -6888,7 +6892,8 @@ public boolean hasTableConditionExpectation() { * * *
-   * Table rule which evaluates whether the provided expression is true.
+   * Aggregate rule which evaluates whether the provided expression is true
+   * for a table.
    * 
* * @@ -6966,7 +6971,7 @@ public com.google.protobuf.ByteString getColumnBytes() { * `ignore_null` is `true`. In that case, such `null` rows are trivially * considered passing. * - * Only applicable to ColumnMap rules. + * This field is only valid for row-level type rules. * * * bool ignore_null = 501 [(.google.api.field_behavior) = OPTIONAL]; @@ -7043,6 +7048,8 @@ public com.google.protobuf.ByteString getDimensionBytes() { * pass this rule, with a range of [0.0, 1.0]. * * 0 indicates default value (i.e. 1.0). + * + * This field is only valid for row-level type rules. * * * double threshold = 503 [(.google.api.field_behavior) = OPTIONAL]; @@ -7054,6 +7061,124 @@ public double getThreshold() { return threshold_; } + public static final int NAME_FIELD_NUMBER = 504; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Optional. A mutable name for the rule.
+   *
+   * * The name must contain only letters (a-z, A-Z), numbers (0-9), or
+   * hyphens (-).
+   * * The maximum length is 63 characters.
+   * * Must start with a letter.
+   * * Must end with a number or a letter.
+   * 
+ * + * string name = 504 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+   * Optional. A mutable name for the rule.
+   *
+   * * The name must contain only letters (a-z, A-Z), numbers (0-9), or
+   * hyphens (-).
+   * * The maximum length is 63 characters.
+   * * Must start with a letter.
+   * * Must end with a number or a letter.
+   * 
+ * + * string name = 504 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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 DESCRIPTION_FIELD_NUMBER = 505; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Optional. Description of the rule.
+   *
+   * * The maximum length is 1,024 characters.
+   * 
+ * + * string description = 505 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Description of the rule.
+   *
+   * * The maximum length is 1,024 characters.
+   * 
+ * + * string description = 505 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -7112,6 +7237,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (java.lang.Double.doubleToRawLongBits(threshold_) != 0) { output.writeDouble(503, threshold_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 504, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 505, description_); + } getUnknownFields().writeTo(output); } @@ -7176,6 +7307,12 @@ public int getSerializedSize() { if (java.lang.Double.doubleToRawLongBits(threshold_) != 0) { size += com.google.protobuf.CodedOutputStream.computeDoubleSize(503, threshold_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(504, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(505, description_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -7197,6 +7334,8 @@ public boolean equals(final java.lang.Object obj) { if (!getDimension().equals(other.getDimension())) return false; if (java.lang.Double.doubleToLongBits(getThreshold()) != java.lang.Double.doubleToLongBits(other.getThreshold())) return false; + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; if (!getRuleTypeCase().equals(other.getRuleTypeCase())) return false; switch (ruleTypeCase_) { case 1: @@ -7250,6 +7389,10 @@ public int hashCode() { (53 * hash) + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getThreshold())); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); switch (ruleTypeCase_) { case 1: hash = (37 * hash) + RANGE_EXPECTATION_FIELD_NUMBER; @@ -7453,6 +7596,8 @@ public Builder clear() { ignoreNull_ = false; dimension_ = ""; threshold_ = 0D; + name_ = ""; + description_ = ""; ruleTypeCase_ = 0; ruleType_ = null; return this; @@ -7504,6 +7649,12 @@ private void buildPartial0(com.google.cloud.dataplex.v1.DataQualityRule result) if (((from_bitField0_ & 0x00000800) != 0)) { result.threshold_ = threshold_; } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.description_ = description_; + } } private void buildPartialOneofs(com.google.cloud.dataplex.v1.DataQualityRule result) { @@ -7596,6 +7747,16 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.DataQualityRule other) { if (other.getThreshold() != 0D) { setThreshold(other.getThreshold()); } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00001000; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00002000; + onChanged(); + } switch (other.getRuleTypeCase()) { case RANGE_EXPECTATION: { @@ -7747,6 +7908,18 @@ public Builder mergeFrom( bitField0_ |= 0x00000800; break; } // case 4025 + case 4034: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 4034 + case 4042: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 4042 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -7789,7 +7962,7 @@ public Builder clearRuleType() { * * *
-     * ColumnMap rule which evaluates whether each column value lies between a
+     * Row-level rule which evaluates whether each column value lies between a
      * specified range.
      * 
* @@ -7806,7 +7979,7 @@ public boolean hasRangeExpectation() { * * *
-     * ColumnMap rule which evaluates whether each column value lies between a
+     * Row-level rule which evaluates whether each column value lies between a
      * specified range.
      * 
* @@ -7833,7 +8006,7 @@ public com.google.cloud.dataplex.v1.DataQualityRule.RangeExpectation getRangeExp * * *
-     * ColumnMap rule which evaluates whether each column value lies between a
+     * Row-level rule which evaluates whether each column value lies between a
      * specified range.
      * 
* @@ -7858,7 +8031,7 @@ public Builder setRangeExpectation( * * *
-     * ColumnMap rule which evaluates whether each column value lies between a
+     * Row-level rule which evaluates whether each column value lies between a
      * specified range.
      * 
* @@ -7880,7 +8053,7 @@ public Builder setRangeExpectation( * * *
-     * ColumnMap rule which evaluates whether each column value lies between a
+     * Row-level rule which evaluates whether each column value lies between a
      * specified range.
      * 
* @@ -7917,7 +8090,7 @@ public Builder mergeRangeExpectation( * * *
-     * ColumnMap rule which evaluates whether each column value lies between a
+     * Row-level rule which evaluates whether each column value lies between a
      * specified range.
      * 
* @@ -7944,7 +8117,7 @@ public Builder clearRangeExpectation() { * * *
-     * ColumnMap rule which evaluates whether each column value lies between a
+     * Row-level rule which evaluates whether each column value lies between a
      * specified range.
      * 
* @@ -7959,7 +8132,7 @@ public Builder clearRangeExpectation() { * * *
-     * ColumnMap rule which evaluates whether each column value lies between a
+     * Row-level rule which evaluates whether each column value lies between a
      * specified range.
      * 
* @@ -7982,7 +8155,7 @@ public Builder clearRangeExpectation() { * * *
-     * ColumnMap rule which evaluates whether each column value lies between a
+     * Row-level rule which evaluates whether each column value lies between a
      * specified range.
      * 
* @@ -8023,7 +8196,7 @@ public Builder clearRangeExpectation() { * * *
-     * ColumnMap rule which evaluates whether each column value is null.
+     * Row-level rule which evaluates whether each column value is null.
      * 
* * .google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation non_null_expectation = 2; @@ -8039,7 +8212,7 @@ public boolean hasNonNullExpectation() { * * *
-     * ColumnMap rule which evaluates whether each column value is null.
+     * Row-level rule which evaluates whether each column value is null.
      * 
* * .google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation non_null_expectation = 2; @@ -8065,7 +8238,7 @@ public com.google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation getNonNul * * *
-     * ColumnMap rule which evaluates whether each column value is null.
+     * Row-level rule which evaluates whether each column value is null.
      * 
* * .google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation non_null_expectation = 2; @@ -8089,7 +8262,7 @@ public Builder setNonNullExpectation( * * *
-     * ColumnMap rule which evaluates whether each column value is null.
+     * Row-level rule which evaluates whether each column value is null.
      * 
* * .google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation non_null_expectation = 2; @@ -8110,7 +8283,7 @@ public Builder setNonNullExpectation( * * *
-     * ColumnMap rule which evaluates whether each column value is null.
+     * Row-level rule which evaluates whether each column value is null.
      * 
* * .google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation non_null_expectation = 2; @@ -8146,7 +8319,7 @@ public Builder mergeNonNullExpectation( * * *
-     * ColumnMap rule which evaluates whether each column value is null.
+     * Row-level rule which evaluates whether each column value is null.
      * 
* * .google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation non_null_expectation = 2; @@ -8172,7 +8345,7 @@ public Builder clearNonNullExpectation() { * * *
-     * ColumnMap rule which evaluates whether each column value is null.
+     * Row-level rule which evaluates whether each column value is null.
      * 
* * .google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation non_null_expectation = 2; @@ -8186,7 +8359,7 @@ public Builder clearNonNullExpectation() { * * *
-     * ColumnMap rule which evaluates whether each column value is null.
+     * Row-level rule which evaluates whether each column value is null.
      * 
* * .google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation non_null_expectation = 2; @@ -8208,7 +8381,7 @@ public Builder clearNonNullExpectation() { * * *
-     * ColumnMap rule which evaluates whether each column value is null.
+     * Row-level rule which evaluates whether each column value is null.
      * 
* * .google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation non_null_expectation = 2; @@ -8248,7 +8421,7 @@ public Builder clearNonNullExpectation() { * * *
-     * ColumnMap rule which evaluates whether each column value is contained by
+     * Row-level rule which evaluates whether each column value is contained by
      * a specified set.
      * 
* @@ -8264,7 +8437,7 @@ public boolean hasSetExpectation() { * * *
-     * ColumnMap rule which evaluates whether each column value is contained by
+     * Row-level rule which evaluates whether each column value is contained by
      * a specified set.
      * 
* @@ -8290,7 +8463,7 @@ public com.google.cloud.dataplex.v1.DataQualityRule.SetExpectation getSetExpecta * * *
-     * ColumnMap rule which evaluates whether each column value is contained by
+     * Row-level rule which evaluates whether each column value is contained by
      * a specified set.
      * 
* @@ -8314,7 +8487,7 @@ public Builder setSetExpectation( * * *
-     * ColumnMap rule which evaluates whether each column value is contained by
+     * Row-level rule which evaluates whether each column value is contained by
      * a specified set.
      * 
* @@ -8335,7 +8508,7 @@ public Builder setSetExpectation( * * *
-     * ColumnMap rule which evaluates whether each column value is contained by
+     * Row-level rule which evaluates whether each column value is contained by
      * a specified set.
      * 
* @@ -8371,7 +8544,7 @@ public Builder mergeSetExpectation( * * *
-     * ColumnMap rule which evaluates whether each column value is contained by
+     * Row-level rule which evaluates whether each column value is contained by
      * a specified set.
      * 
* @@ -8397,7 +8570,7 @@ public Builder clearSetExpectation() { * * *
-     * ColumnMap rule which evaluates whether each column value is contained by
+     * Row-level rule which evaluates whether each column value is contained by
      * a specified set.
      * 
* @@ -8411,7 +8584,7 @@ public Builder clearSetExpectation() { * * *
-     * ColumnMap rule which evaluates whether each column value is contained by
+     * Row-level rule which evaluates whether each column value is contained by
      * a specified set.
      * 
* @@ -8433,7 +8606,7 @@ public Builder clearSetExpectation() { * * *
-     * ColumnMap rule which evaluates whether each column value is contained by
+     * Row-level rule which evaluates whether each column value is contained by
      * a specified set.
      * 
* @@ -8473,7 +8646,7 @@ public Builder clearSetExpectation() { * * *
-     * ColumnMap rule which evaluates whether each column value matches a
+     * Row-level rule which evaluates whether each column value matches a
      * specified regex.
      * 
* @@ -8490,7 +8663,7 @@ public boolean hasRegexExpectation() { * * *
-     * ColumnMap rule which evaluates whether each column value matches a
+     * Row-level rule which evaluates whether each column value matches a
      * specified regex.
      * 
* @@ -8517,7 +8690,7 @@ public com.google.cloud.dataplex.v1.DataQualityRule.RegexExpectation getRegexExp * * *
-     * ColumnMap rule which evaluates whether each column value matches a
+     * Row-level rule which evaluates whether each column value matches a
      * specified regex.
      * 
* @@ -8542,7 +8715,7 @@ public Builder setRegexExpectation( * * *
-     * ColumnMap rule which evaluates whether each column value matches a
+     * Row-level rule which evaluates whether each column value matches a
      * specified regex.
      * 
* @@ -8564,7 +8737,7 @@ public Builder setRegexExpectation( * * *
-     * ColumnMap rule which evaluates whether each column value matches a
+     * Row-level rule which evaluates whether each column value matches a
      * specified regex.
      * 
* @@ -8601,7 +8774,7 @@ public Builder mergeRegexExpectation( * * *
-     * ColumnMap rule which evaluates whether each column value matches a
+     * Row-level rule which evaluates whether each column value matches a
      * specified regex.
      * 
* @@ -8628,7 +8801,7 @@ public Builder clearRegexExpectation() { * * *
-     * ColumnMap rule which evaluates whether each column value matches a
+     * Row-level rule which evaluates whether each column value matches a
      * specified regex.
      * 
* @@ -8643,7 +8816,7 @@ public Builder clearRegexExpectation() { * * *
-     * ColumnMap rule which evaluates whether each column value matches a
+     * Row-level rule which evaluates whether each column value matches a
      * specified regex.
      * 
* @@ -8666,7 +8839,7 @@ public Builder clearRegexExpectation() { * * *
-     * ColumnMap rule which evaluates whether each column value matches a
+     * Row-level rule which evaluates whether each column value matches a
      * specified regex.
      * 
* @@ -8707,7 +8880,7 @@ public Builder clearRegexExpectation() { * * *
-     * ColumnAggregate rule which evaluates whether the column has duplicates.
+     * Row-level rule which evaluates whether each column value is unique.
      * 
* * @@ -8724,7 +8897,7 @@ public boolean hasUniquenessExpectation() { * * *
-     * ColumnAggregate rule which evaluates whether the column has duplicates.
+     * Row-level rule which evaluates whether each column value is unique.
      * 
* * @@ -8754,7 +8927,7 @@ public boolean hasUniquenessExpectation() { * * *
-     * ColumnAggregate rule which evaluates whether the column has duplicates.
+     * Row-level rule which evaluates whether each column value is unique.
      * 
* * @@ -8779,7 +8952,7 @@ public Builder setUniquenessExpectation( * * *
-     * ColumnAggregate rule which evaluates whether the column has duplicates.
+     * Row-level rule which evaluates whether each column value is unique.
      * 
* * @@ -8802,7 +8975,7 @@ public Builder setUniquenessExpectation( * * *
-     * ColumnAggregate rule which evaluates whether the column has duplicates.
+     * Row-level rule which evaluates whether each column value is unique.
      * 
* * @@ -8840,7 +9013,7 @@ public Builder mergeUniquenessExpectation( * * *
-     * ColumnAggregate rule which evaluates whether the column has duplicates.
+     * Row-level rule which evaluates whether each column value is unique.
      * 
* * @@ -8867,7 +9040,7 @@ public Builder clearUniquenessExpectation() { * * *
-     * ColumnAggregate rule which evaluates whether the column has duplicates.
+     * Row-level rule which evaluates whether each column value is unique.
      * 
* * @@ -8882,7 +9055,7 @@ public Builder clearUniquenessExpectation() { * * *
-     * ColumnAggregate rule which evaluates whether the column has duplicates.
+     * Row-level rule which evaluates whether each column value is unique.
      * 
* * @@ -8906,7 +9079,7 @@ public Builder clearUniquenessExpectation() { * * *
-     * ColumnAggregate rule which evaluates whether the column has duplicates.
+     * Row-level rule which evaluates whether each column value is unique.
      * 
* * @@ -8948,7 +9121,7 @@ public Builder clearUniquenessExpectation() { * * *
-     * ColumnAggregate rule which evaluates whether the column aggregate
+     * Aggregate rule which evaluates whether the column aggregate
      * statistic lies between a specified range.
      * 
* @@ -8966,7 +9139,7 @@ public boolean hasStatisticRangeExpectation() { * * *
-     * ColumnAggregate rule which evaluates whether the column aggregate
+     * Aggregate rule which evaluates whether the column aggregate
      * statistic lies between a specified range.
      * 
* @@ -8997,7 +9170,7 @@ public boolean hasStatisticRangeExpectation() { * * *
-     * ColumnAggregate rule which evaluates whether the column aggregate
+     * Aggregate rule which evaluates whether the column aggregate
      * statistic lies between a specified range.
      * 
* @@ -9023,7 +9196,7 @@ public Builder setStatisticRangeExpectation( * * *
-     * ColumnAggregate rule which evaluates whether the column aggregate
+     * Aggregate rule which evaluates whether the column aggregate
      * statistic lies between a specified range.
      * 
* @@ -9047,7 +9220,7 @@ public Builder setStatisticRangeExpectation( * * *
-     * ColumnAggregate rule which evaluates whether the column aggregate
+     * Aggregate rule which evaluates whether the column aggregate
      * statistic lies between a specified range.
      * 
* @@ -9086,7 +9259,7 @@ public Builder mergeStatisticRangeExpectation( * * *
-     * ColumnAggregate rule which evaluates whether the column aggregate
+     * Aggregate rule which evaluates whether the column aggregate
      * statistic lies between a specified range.
      * 
* @@ -9114,7 +9287,7 @@ public Builder clearStatisticRangeExpectation() { * * *
-     * ColumnAggregate rule which evaluates whether the column aggregate
+     * Aggregate rule which evaluates whether the column aggregate
      * statistic lies between a specified range.
      * 
* @@ -9130,7 +9303,7 @@ public Builder clearStatisticRangeExpectation() { * * *
-     * ColumnAggregate rule which evaluates whether the column aggregate
+     * Aggregate rule which evaluates whether the column aggregate
      * statistic lies between a specified range.
      * 
* @@ -9155,7 +9328,7 @@ public Builder clearStatisticRangeExpectation() { * * *
-     * ColumnAggregate rule which evaluates whether the column aggregate
+     * Aggregate rule which evaluates whether the column aggregate
      * statistic lies between a specified range.
      * 
* @@ -9198,8 +9371,8 @@ public Builder clearStatisticRangeExpectation() { * * *
-     * Table rule which evaluates whether each row passes the specified
-     * condition.
+     * Row-level rule which evaluates whether each row in a table passes the
+     * specified condition.
      * 
* * @@ -9216,8 +9389,8 @@ public boolean hasRowConditionExpectation() { * * *
-     * Table rule which evaluates whether each row passes the specified
-     * condition.
+     * Row-level rule which evaluates whether each row in a table passes the
+     * specified condition.
      * 
* * @@ -9247,8 +9420,8 @@ public boolean hasRowConditionExpectation() { * * *
-     * Table rule which evaluates whether each row passes the specified
-     * condition.
+     * Row-level rule which evaluates whether each row in a table passes the
+     * specified condition.
      * 
* * @@ -9273,8 +9446,8 @@ public Builder setRowConditionExpectation( * * *
-     * Table rule which evaluates whether each row passes the specified
-     * condition.
+     * Row-level rule which evaluates whether each row in a table passes the
+     * specified condition.
      * 
* * @@ -9297,8 +9470,8 @@ public Builder setRowConditionExpectation( * * *
-     * Table rule which evaluates whether each row passes the specified
-     * condition.
+     * Row-level rule which evaluates whether each row in a table passes the
+     * specified condition.
      * 
* * @@ -9336,8 +9509,8 @@ public Builder mergeRowConditionExpectation( * * *
-     * Table rule which evaluates whether each row passes the specified
-     * condition.
+     * Row-level rule which evaluates whether each row in a table passes the
+     * specified condition.
      * 
* * @@ -9364,8 +9537,8 @@ public Builder clearRowConditionExpectation() { * * *
-     * Table rule which evaluates whether each row passes the specified
-     * condition.
+     * Row-level rule which evaluates whether each row in a table passes the
+     * specified condition.
      * 
* * @@ -9380,8 +9553,8 @@ public Builder clearRowConditionExpectation() { * * *
-     * Table rule which evaluates whether each row passes the specified
-     * condition.
+     * Row-level rule which evaluates whether each row in a table passes the
+     * specified condition.
      * 
* * @@ -9405,8 +9578,8 @@ public Builder clearRowConditionExpectation() { * * *
-     * Table rule which evaluates whether each row passes the specified
-     * condition.
+     * Row-level rule which evaluates whether each row in a table passes the
+     * specified condition.
      * 
* * @@ -9448,7 +9621,8 @@ public Builder clearRowConditionExpectation() { * * *
-     * Table rule which evaluates whether the provided expression is true.
+     * Aggregate rule which evaluates whether the provided expression is true
+     * for a table.
      * 
* * @@ -9465,7 +9639,8 @@ public boolean hasTableConditionExpectation() { * * *
-     * Table rule which evaluates whether the provided expression is true.
+     * Aggregate rule which evaluates whether the provided expression is true
+     * for a table.
      * 
* * @@ -9495,7 +9670,8 @@ public boolean hasTableConditionExpectation() { * * *
-     * Table rule which evaluates whether the provided expression is true.
+     * Aggregate rule which evaluates whether the provided expression is true
+     * for a table.
      * 
* * @@ -9520,7 +9696,8 @@ public Builder setTableConditionExpectation( * * *
-     * Table rule which evaluates whether the provided expression is true.
+     * Aggregate rule which evaluates whether the provided expression is true
+     * for a table.
      * 
* * @@ -9543,7 +9720,8 @@ public Builder setTableConditionExpectation( * * *
-     * Table rule which evaluates whether the provided expression is true.
+     * Aggregate rule which evaluates whether the provided expression is true
+     * for a table.
      * 
* * @@ -9581,7 +9759,8 @@ public Builder mergeTableConditionExpectation( * * *
-     * Table rule which evaluates whether the provided expression is true.
+     * Aggregate rule which evaluates whether the provided expression is true
+     * for a table.
      * 
* * @@ -9608,7 +9787,8 @@ public Builder clearTableConditionExpectation() { * * *
-     * Table rule which evaluates whether the provided expression is true.
+     * Aggregate rule which evaluates whether the provided expression is true
+     * for a table.
      * 
* * @@ -9623,7 +9803,8 @@ public Builder clearTableConditionExpectation() { * * *
-     * Table rule which evaluates whether the provided expression is true.
+     * Aggregate rule which evaluates whether the provided expression is true
+     * for a table.
      * 
* * @@ -9647,7 +9828,8 @@ public Builder clearTableConditionExpectation() { * * *
-     * Table rule which evaluates whether the provided expression is true.
+     * Aggregate rule which evaluates whether the provided expression is true
+     * for a table.
      * 
* * @@ -9795,7 +9977,7 @@ public Builder setColumnBytes(com.google.protobuf.ByteString value) { * `ignore_null` is `true`. In that case, such `null` rows are trivially * considered passing. * - * Only applicable to ColumnMap rules. + * This field is only valid for row-level type rules. * * * bool ignore_null = 501 [(.google.api.field_behavior) = OPTIONAL]; @@ -9814,7 +9996,7 @@ public boolean getIgnoreNull() { * `ignore_null` is `true`. In that case, such `null` rows are trivially * considered passing. * - * Only applicable to ColumnMap rules. + * This field is only valid for row-level type rules. * * * bool ignore_null = 501 [(.google.api.field_behavior) = OPTIONAL]; @@ -9837,7 +10019,7 @@ public Builder setIgnoreNull(boolean value) { * `ignore_null` is `true`. In that case, such `null` rows are trivially * considered passing. * - * Only applicable to ColumnMap rules. + * This field is only valid for row-level type rules. * * * bool ignore_null = 501 [(.google.api.field_behavior) = OPTIONAL]; @@ -9976,6 +10158,8 @@ public Builder setDimensionBytes(com.google.protobuf.ByteString value) { * pass this rule, with a range of [0.0, 1.0]. * * 0 indicates default value (i.e. 1.0). + * + * This field is only valid for row-level type rules. * * * double threshold = 503 [(.google.api.field_behavior) = OPTIONAL]; @@ -9994,6 +10178,8 @@ public double getThreshold() { * pass this rule, with a range of [0.0, 1.0]. * * 0 indicates default value (i.e. 1.0). + * + * This field is only valid for row-level type rules. * * * double threshold = 503 [(.google.api.field_behavior) = OPTIONAL]; @@ -10016,6 +10202,8 @@ public Builder setThreshold(double value) { * pass this rule, with a range of [0.0, 1.0]. * * 0 indicates default value (i.e. 1.0). + * + * This field is only valid for row-level type rules. * * * double threshold = 503 [(.google.api.field_behavior) = OPTIONAL]; @@ -10029,6 +10217,258 @@ public Builder clearThreshold() { return this; } + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Optional. A mutable name for the rule.
+     *
+     * * The name must contain only letters (a-z, A-Z), numbers (0-9), or
+     * hyphens (-).
+     * * The maximum length is 63 characters.
+     * * Must start with a letter.
+     * * Must end with a number or a letter.
+     * 
+ * + * string name = 504 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+     * Optional. A mutable name for the rule.
+     *
+     * * The name must contain only letters (a-z, A-Z), numbers (0-9), or
+     * hyphens (-).
+     * * The maximum length is 63 characters.
+     * * Must start with a letter.
+     * * Must end with a number or a letter.
+     * 
+ * + * string name = 504 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + } + } + /** + * + * + *
+     * Optional. A mutable name for the rule.
+     *
+     * * The name must contain only letters (a-z, A-Z), numbers (0-9), or
+     * hyphens (-).
+     * * The maximum length is 63 characters.
+     * * Must start with a letter.
+     * * Must end with a number or a letter.
+     * 
+ * + * string name = 504 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A mutable name for the rule.
+     *
+     * * The name must contain only letters (a-z, A-Z), numbers (0-9), or
+     * hyphens (-).
+     * * The maximum length is 63 characters.
+     * * Must start with a letter.
+     * * Must end with a number or a letter.
+     * 
+ * + * string name = 504 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A mutable name for the rule.
+     *
+     * * The name must contain only letters (a-z, A-Z), numbers (0-9), or
+     * hyphens (-).
+     * * The maximum length is 63 characters.
+     * * Must start with a letter.
+     * * Must end with a number or a letter.
+     * 
+ * + * string name = 504 [(.google.api.field_behavior) = OPTIONAL]; + * + * @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; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. Description of the rule.
+     *
+     * * The maximum length is 1,024 characters.
+     * 
+ * + * string description = 505 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Description of the rule.
+     *
+     * * The maximum length is 1,024 characters.
+     * 
+ * + * string description = 505 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Description of the rule.
+     *
+     * * The maximum length is 1,024 characters.
+     * 
+ * + * string description = 505 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Description of the rule.
+     *
+     * * The maximum length is 1,024 characters.
+     * 
+ * + * string description = 505 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Description of the rule.
+     *
+     * * The maximum length is 1,024 characters.
+     * 
+ * + * string description = 505 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityRuleOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityRuleOrBuilder.java index c44a1ab67900..8a9a9e5926c3 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityRuleOrBuilder.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityRuleOrBuilder.java @@ -27,7 +27,7 @@ public interface DataQualityRuleOrBuilder * * *
-   * ColumnMap rule which evaluates whether each column value lies between a
+   * Row-level rule which evaluates whether each column value lies between a
    * specified range.
    * 
* @@ -40,7 +40,7 @@ public interface DataQualityRuleOrBuilder * * *
-   * ColumnMap rule which evaluates whether each column value lies between a
+   * Row-level rule which evaluates whether each column value lies between a
    * specified range.
    * 
* @@ -53,7 +53,7 @@ public interface DataQualityRuleOrBuilder * * *
-   * ColumnMap rule which evaluates whether each column value lies between a
+   * Row-level rule which evaluates whether each column value lies between a
    * specified range.
    * 
* @@ -66,7 +66,7 @@ public interface DataQualityRuleOrBuilder * * *
-   * ColumnMap rule which evaluates whether each column value is null.
+   * Row-level rule which evaluates whether each column value is null.
    * 
* * .google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation non_null_expectation = 2; @@ -79,7 +79,7 @@ public interface DataQualityRuleOrBuilder * * *
-   * ColumnMap rule which evaluates whether each column value is null.
+   * Row-level rule which evaluates whether each column value is null.
    * 
* * .google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation non_null_expectation = 2; @@ -92,7 +92,7 @@ public interface DataQualityRuleOrBuilder * * *
-   * ColumnMap rule which evaluates whether each column value is null.
+   * Row-level rule which evaluates whether each column value is null.
    * 
* * .google.cloud.dataplex.v1.DataQualityRule.NonNullExpectation non_null_expectation = 2; @@ -105,7 +105,7 @@ public interface DataQualityRuleOrBuilder * * *
-   * ColumnMap rule which evaluates whether each column value is contained by
+   * Row-level rule which evaluates whether each column value is contained by
    * a specified set.
    * 
* @@ -118,7 +118,7 @@ public interface DataQualityRuleOrBuilder * * *
-   * ColumnMap rule which evaluates whether each column value is contained by
+   * Row-level rule which evaluates whether each column value is contained by
    * a specified set.
    * 
* @@ -131,7 +131,7 @@ public interface DataQualityRuleOrBuilder * * *
-   * ColumnMap rule which evaluates whether each column value is contained by
+   * Row-level rule which evaluates whether each column value is contained by
    * a specified set.
    * 
* @@ -143,7 +143,7 @@ public interface DataQualityRuleOrBuilder * * *
-   * ColumnMap rule which evaluates whether each column value matches a
+   * Row-level rule which evaluates whether each column value matches a
    * specified regex.
    * 
* @@ -156,7 +156,7 @@ public interface DataQualityRuleOrBuilder * * *
-   * ColumnMap rule which evaluates whether each column value matches a
+   * Row-level rule which evaluates whether each column value matches a
    * specified regex.
    * 
* @@ -169,7 +169,7 @@ public interface DataQualityRuleOrBuilder * * *
-   * ColumnMap rule which evaluates whether each column value matches a
+   * Row-level rule which evaluates whether each column value matches a
    * specified regex.
    * 
* @@ -182,7 +182,7 @@ public interface DataQualityRuleOrBuilder * * *
-   * ColumnAggregate rule which evaluates whether the column has duplicates.
+   * Row-level rule which evaluates whether each column value is unique.
    * 
* * @@ -196,7 +196,7 @@ public interface DataQualityRuleOrBuilder * * *
-   * ColumnAggregate rule which evaluates whether the column has duplicates.
+   * Row-level rule which evaluates whether each column value is unique.
    * 
* * @@ -210,7 +210,7 @@ public interface DataQualityRuleOrBuilder * * *
-   * ColumnAggregate rule which evaluates whether the column has duplicates.
+   * Row-level rule which evaluates whether each column value is unique.
    * 
* * @@ -224,7 +224,7 @@ public interface DataQualityRuleOrBuilder * * *
-   * ColumnAggregate rule which evaluates whether the column aggregate
+   * Aggregate rule which evaluates whether the column aggregate
    * statistic lies between a specified range.
    * 
* @@ -239,7 +239,7 @@ public interface DataQualityRuleOrBuilder * * *
-   * ColumnAggregate rule which evaluates whether the column aggregate
+   * Aggregate rule which evaluates whether the column aggregate
    * statistic lies between a specified range.
    * 
* @@ -255,7 +255,7 @@ public interface DataQualityRuleOrBuilder * * *
-   * ColumnAggregate rule which evaluates whether the column aggregate
+   * Aggregate rule which evaluates whether the column aggregate
    * statistic lies between a specified range.
    * 
* @@ -270,8 +270,8 @@ public interface DataQualityRuleOrBuilder * * *
-   * Table rule which evaluates whether each row passes the specified
-   * condition.
+   * Row-level rule which evaluates whether each row in a table passes the
+   * specified condition.
    * 
* * @@ -285,8 +285,8 @@ public interface DataQualityRuleOrBuilder * * *
-   * Table rule which evaluates whether each row passes the specified
-   * condition.
+   * Row-level rule which evaluates whether each row in a table passes the
+   * specified condition.
    * 
* * @@ -300,8 +300,8 @@ public interface DataQualityRuleOrBuilder * * *
-   * Table rule which evaluates whether each row passes the specified
-   * condition.
+   * Row-level rule which evaluates whether each row in a table passes the
+   * specified condition.
    * 
* * @@ -315,7 +315,8 @@ public interface DataQualityRuleOrBuilder * * *
-   * Table rule which evaluates whether the provided expression is true.
+   * Aggregate rule which evaluates whether the provided expression is true
+   * for a table.
    * 
* * @@ -329,7 +330,8 @@ public interface DataQualityRuleOrBuilder * * *
-   * Table rule which evaluates whether the provided expression is true.
+   * Aggregate rule which evaluates whether the provided expression is true
+   * for a table.
    * 
* * @@ -344,7 +346,8 @@ public interface DataQualityRuleOrBuilder * * *
-   * Table rule which evaluates whether the provided expression is true.
+   * Aggregate rule which evaluates whether the provided expression is true
+   * for a table.
    * 
* * @@ -387,7 +390,7 @@ public interface DataQualityRuleOrBuilder * `ignore_null` is `true`. In that case, such `null` rows are trivially * considered passing. * - * Only applicable to ColumnMap rules. + * This field is only valid for row-level type rules. * * * bool ignore_null = 501 [(.google.api.field_behavior) = OPTIONAL]; @@ -433,6 +436,8 @@ public interface DataQualityRuleOrBuilder * pass this rule, with a range of [0.0, 1.0]. * * 0 indicates default value (i.e. 1.0). + * + * This field is only valid for row-level type rules. * * * double threshold = 503 [(.google.api.field_behavior) = OPTIONAL]; @@ -441,5 +446,71 @@ public interface DataQualityRuleOrBuilder */ double getThreshold(); + /** + * + * + *
+   * Optional. A mutable name for the rule.
+   *
+   * * The name must contain only letters (a-z, A-Z), numbers (0-9), or
+   * hyphens (-).
+   * * The maximum length is 63 characters.
+   * * Must start with a letter.
+   * * Must end with a number or a letter.
+   * 
+ * + * string name = 504 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Optional. A mutable name for the rule.
+   *
+   * * The name must contain only letters (a-z, A-Z), numbers (0-9), or
+   * hyphens (-).
+   * * The maximum length is 63 characters.
+   * * Must start with a letter.
+   * * Must end with a number or a letter.
+   * 
+ * + * string name = 504 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. Description of the rule.
+   *
+   * * The maximum length is 1,024 characters.
+   * 
+ * + * string description = 505 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. Description of the rule.
+   *
+   * * The maximum length is 1,024 characters.
+   * 
+ * + * string description = 505 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + com.google.cloud.dataplex.v1.DataQualityRule.RuleTypeCase getRuleTypeCase(); } diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityRuleResult.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityRuleResult.java index ea31094fc88d..7c2adc3f7a7a 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityRuleResult.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityRuleResult.java @@ -136,8 +136,9 @@ public boolean getPassed() { * * *
-   * The number of rows a rule was evaluated against. This field is only valid
-   * for ColumnMap type rules.
+   * The number of rows a rule was evaluated against.
+   *
+   * This field is only valid for row-level type rules.
    *
    * Evaluated count can be configured to either
    *
@@ -163,7 +164,8 @@ public long getEvaluatedCount() {
    *
    * 
    * The number of rows which passed a rule evaluation.
-   * This field is only valid for ColumnMap type rules.
+   *
+   * This field is only valid for row-level type rules.
    * 
* * int64 passed_count = 8; @@ -200,7 +202,8 @@ public long getNullCount() { * *
    * The ratio of **passed_count / evaluated_count**.
-   * This field is only valid for ColumnMap type rules.
+   *
+   * This field is only valid for row-level type rules.
    * 
* * double pass_ratio = 6; @@ -221,7 +224,8 @@ public double getPassRatio() { * *
    * The query to find rows that did not pass this rule.
-   * Only applies to ColumnMap and RowCondition rules.
+   *
+   * This field is only valid for row-level type rules.
    * 
* * string failing_rows_query = 10; @@ -245,7 +249,8 @@ public java.lang.String getFailingRowsQuery() { * *
    * The query to find rows that did not pass this rule.
-   * Only applies to ColumnMap and RowCondition rules.
+   *
+   * This field is only valid for row-level type rules.
    * 
* * string failing_rows_query = 10; @@ -993,8 +998,9 @@ public Builder clearPassed() { * * *
-     * The number of rows a rule was evaluated against. This field is only valid
-     * for ColumnMap type rules.
+     * The number of rows a rule was evaluated against.
+     *
+     * This field is only valid for row-level type rules.
      *
      * Evaluated count can be configured to either
      *
@@ -1016,8 +1022,9 @@ public long getEvaluatedCount() {
      *
      *
      * 
-     * The number of rows a rule was evaluated against. This field is only valid
-     * for ColumnMap type rules.
+     * The number of rows a rule was evaluated against.
+     *
+     * This field is only valid for row-level type rules.
      *
      * Evaluated count can be configured to either
      *
@@ -1043,8 +1050,9 @@ public Builder setEvaluatedCount(long value) {
      *
      *
      * 
-     * The number of rows a rule was evaluated against. This field is only valid
-     * for ColumnMap type rules.
+     * The number of rows a rule was evaluated against.
+     *
+     * This field is only valid for row-level type rules.
      *
      * Evaluated count can be configured to either
      *
@@ -1071,7 +1079,8 @@ public Builder clearEvaluatedCount() {
      *
      * 
      * The number of rows which passed a rule evaluation.
-     * This field is only valid for ColumnMap type rules.
+     *
+     * This field is only valid for row-level type rules.
      * 
* * int64 passed_count = 8; @@ -1087,7 +1096,8 @@ public long getPassedCount() { * *
      * The number of rows which passed a rule evaluation.
-     * This field is only valid for ColumnMap type rules.
+     *
+     * This field is only valid for row-level type rules.
      * 
* * int64 passed_count = 8; @@ -1107,7 +1117,8 @@ public Builder setPassedCount(long value) { * *
      * The number of rows which passed a rule evaluation.
-     * This field is only valid for ColumnMap type rules.
+     *
+     * This field is only valid for row-level type rules.
      * 
* * int64 passed_count = 8; @@ -1180,7 +1191,8 @@ public Builder clearNullCount() { * *
      * The ratio of **passed_count / evaluated_count**.
-     * This field is only valid for ColumnMap type rules.
+     *
+     * This field is only valid for row-level type rules.
      * 
* * double pass_ratio = 6; @@ -1196,7 +1208,8 @@ public double getPassRatio() { * *
      * The ratio of **passed_count / evaluated_count**.
-     * This field is only valid for ColumnMap type rules.
+     *
+     * This field is only valid for row-level type rules.
      * 
* * double pass_ratio = 6; @@ -1216,7 +1229,8 @@ public Builder setPassRatio(double value) { * *
      * The ratio of **passed_count / evaluated_count**.
-     * This field is only valid for ColumnMap type rules.
+     *
+     * This field is only valid for row-level type rules.
      * 
* * double pass_ratio = 6; @@ -1236,7 +1250,8 @@ public Builder clearPassRatio() { * *
      * The query to find rows that did not pass this rule.
-     * Only applies to ColumnMap and RowCondition rules.
+     *
+     * This field is only valid for row-level type rules.
      * 
* * string failing_rows_query = 10; @@ -1259,7 +1274,8 @@ public java.lang.String getFailingRowsQuery() { * *
      * The query to find rows that did not pass this rule.
-     * Only applies to ColumnMap and RowCondition rules.
+     *
+     * This field is only valid for row-level type rules.
      * 
* * string failing_rows_query = 10; @@ -1282,7 +1298,8 @@ public com.google.protobuf.ByteString getFailingRowsQueryBytes() { * *
      * The query to find rows that did not pass this rule.
-     * Only applies to ColumnMap and RowCondition rules.
+     *
+     * This field is only valid for row-level type rules.
      * 
* * string failing_rows_query = 10; @@ -1304,7 +1321,8 @@ public Builder setFailingRowsQuery(java.lang.String value) { * *
      * The query to find rows that did not pass this rule.
-     * Only applies to ColumnMap and RowCondition rules.
+     *
+     * This field is only valid for row-level type rules.
      * 
* * string failing_rows_query = 10; @@ -1322,7 +1340,8 @@ public Builder clearFailingRowsQuery() { * *
      * The query to find rows that did not pass this rule.
-     * Only applies to ColumnMap and RowCondition rules.
+     *
+     * This field is only valid for row-level type rules.
      * 
* * string failing_rows_query = 10; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityRuleResultOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityRuleResultOrBuilder.java index 5e6284fac2c2..4270b227b988 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityRuleResultOrBuilder.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityRuleResultOrBuilder.java @@ -75,8 +75,9 @@ public interface DataQualityRuleResultOrBuilder * * *
-   * The number of rows a rule was evaluated against. This field is only valid
-   * for ColumnMap type rules.
+   * The number of rows a rule was evaluated against.
+   *
+   * This field is only valid for row-level type rules.
    *
    * Evaluated count can be configured to either
    *
@@ -97,7 +98,8 @@ public interface DataQualityRuleResultOrBuilder
    *
    * 
    * The number of rows which passed a rule evaluation.
-   * This field is only valid for ColumnMap type rules.
+   *
+   * This field is only valid for row-level type rules.
    * 
* * int64 passed_count = 8; @@ -124,7 +126,8 @@ public interface DataQualityRuleResultOrBuilder * *
    * The ratio of **passed_count / evaluated_count**.
-   * This field is only valid for ColumnMap type rules.
+   *
+   * This field is only valid for row-level type rules.
    * 
* * double pass_ratio = 6; @@ -138,7 +141,8 @@ public interface DataQualityRuleResultOrBuilder * *
    * The query to find rows that did not pass this rule.
-   * Only applies to ColumnMap and RowCondition rules.
+   *
+   * This field is only valid for row-level type rules.
    * 
* * string failing_rows_query = 10; @@ -151,7 +155,8 @@ public interface DataQualityRuleResultOrBuilder * *
    * The query to find rows that did not pass this rule.
-   * Only applies to ColumnMap and RowCondition rules.
+   *
+   * This field is only valid for row-level type rules.
    * 
* * string failing_rows_query = 10; diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityScanRuleResult.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityScanRuleResult.java new file mode 100644 index 000000000000..9e8a294dbd95 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityScanRuleResult.java @@ -0,0 +1,2846 @@ +/* + * Copyright 2023 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/dataplex/v1/logs.proto + +package com.google.cloud.dataplex.v1; + +/** + * + * + *
+ * Information about the result of a data quality rule for data quality scan.
+ * The monitored resource is 'DataScan'.
+ * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DataQualityScanRuleResult} + */ +public final class DataQualityScanRuleResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.DataQualityScanRuleResult) + DataQualityScanRuleResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use DataQualityScanRuleResult.newBuilder() to construct. + private DataQualityScanRuleResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DataQualityScanRuleResult() { + jobId_ = ""; + dataSource_ = ""; + column_ = ""; + ruleName_ = ""; + ruleType_ = 0; + evalutionType_ = 0; + ruleDimension_ = ""; + result_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DataQualityScanRuleResult(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.LogsProto + .internal_static_google_cloud_dataplex_v1_DataQualityScanRuleResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.LogsProto + .internal_static_google_cloud_dataplex_v1_DataQualityScanRuleResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataQualityScanRuleResult.class, + com.google.cloud.dataplex.v1.DataQualityScanRuleResult.Builder.class); + } + + /** + * + * + *
+   * The type of the data quality rule.
+   * 
+ * + * Protobuf enum {@code google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType} + */ + public enum RuleType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * An unspecified rule type.
+     * 
+ * + * RULE_TYPE_UNSPECIFIED = 0; + */ + RULE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Please see
+     * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#nonnullexpectation.
+     * 
+ * + * NON_NULL_EXPECTATION = 1; + */ + NON_NULL_EXPECTATION(1), + /** + * + * + *
+     * Please see
+     * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#rangeexpectation.
+     * 
+ * + * RANGE_EXPECTATION = 2; + */ + RANGE_EXPECTATION(2), + /** + * + * + *
+     * Please see
+     * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#regexexpectation.
+     * 
+ * + * REGEX_EXPECTATION = 3; + */ + REGEX_EXPECTATION(3), + /** + * + * + *
+     * Please see
+     * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#rowconditionexpectation.
+     * 
+ * + * ROW_CONDITION_EXPECTATION = 4; + */ + ROW_CONDITION_EXPECTATION(4), + /** + * + * + *
+     * Please see
+     * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#setexpectation.
+     * 
+ * + * SET_EXPECTATION = 5; + */ + SET_EXPECTATION(5), + /** + * + * + *
+     * Please see
+     * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#statisticrangeexpectation.
+     * 
+ * + * STATISTIC_RANGE_EXPECTATION = 6; + */ + STATISTIC_RANGE_EXPECTATION(6), + /** + * + * + *
+     * Please see
+     * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#tableconditionexpectation.
+     * 
+ * + * TABLE_CONDITION_EXPECTATION = 7; + */ + TABLE_CONDITION_EXPECTATION(7), + /** + * + * + *
+     * Please see
+     * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#uniquenessexpectation.
+     * 
+ * + * UNIQUENESS_EXPECTATION = 8; + */ + UNIQUENESS_EXPECTATION(8), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * An unspecified rule type.
+     * 
+ * + * RULE_TYPE_UNSPECIFIED = 0; + */ + public static final int RULE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Please see
+     * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#nonnullexpectation.
+     * 
+ * + * NON_NULL_EXPECTATION = 1; + */ + public static final int NON_NULL_EXPECTATION_VALUE = 1; + /** + * + * + *
+     * Please see
+     * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#rangeexpectation.
+     * 
+ * + * RANGE_EXPECTATION = 2; + */ + public static final int RANGE_EXPECTATION_VALUE = 2; + /** + * + * + *
+     * Please see
+     * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#regexexpectation.
+     * 
+ * + * REGEX_EXPECTATION = 3; + */ + public static final int REGEX_EXPECTATION_VALUE = 3; + /** + * + * + *
+     * Please see
+     * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#rowconditionexpectation.
+     * 
+ * + * ROW_CONDITION_EXPECTATION = 4; + */ + public static final int ROW_CONDITION_EXPECTATION_VALUE = 4; + /** + * + * + *
+     * Please see
+     * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#setexpectation.
+     * 
+ * + * SET_EXPECTATION = 5; + */ + public static final int SET_EXPECTATION_VALUE = 5; + /** + * + * + *
+     * Please see
+     * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#statisticrangeexpectation.
+     * 
+ * + * STATISTIC_RANGE_EXPECTATION = 6; + */ + public static final int STATISTIC_RANGE_EXPECTATION_VALUE = 6; + /** + * + * + *
+     * Please see
+     * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#tableconditionexpectation.
+     * 
+ * + * TABLE_CONDITION_EXPECTATION = 7; + */ + public static final int TABLE_CONDITION_EXPECTATION_VALUE = 7; + /** + * + * + *
+     * Please see
+     * https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#uniquenessexpectation.
+     * 
+ * + * UNIQUENESS_EXPECTATION = 8; + */ + public static final int UNIQUENESS_EXPECTATION_VALUE = 8; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RuleType 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 RuleType forNumber(int value) { + switch (value) { + case 0: + return RULE_TYPE_UNSPECIFIED; + case 1: + return NON_NULL_EXPECTATION; + case 2: + return RANGE_EXPECTATION; + case 3: + return REGEX_EXPECTATION; + case 4: + return ROW_CONDITION_EXPECTATION; + case 5: + return SET_EXPECTATION; + case 6: + return STATISTIC_RANGE_EXPECTATION; + case 7: + return TABLE_CONDITION_EXPECTATION; + case 8: + return UNIQUENESS_EXPECTATION; + 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 RuleType findValueByNumber(int number) { + return RuleType.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.dataplex.v1.DataQualityScanRuleResult.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final RuleType[] VALUES = values(); + + public static RuleType 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 RuleType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType) + } + + /** + * + * + *
+   * The evaluation type of the data quality rule.
+   * 
+ * + * Protobuf enum {@code google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType} + */ + public enum EvaluationType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * An unspecified evaluation type.
+     * 
+ * + * EVALUATION_TYPE_UNSPECIFIED = 0; + */ + EVALUATION_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * The rule evaluation is done at per row level.
+     * 
+ * + * PER_ROW = 1; + */ + PER_ROW(1), + /** + * + * + *
+     * The rule evaluation is done for an aggregate of rows.
+     * 
+ * + * AGGREGATE = 2; + */ + AGGREGATE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * An unspecified evaluation type.
+     * 
+ * + * EVALUATION_TYPE_UNSPECIFIED = 0; + */ + public static final int EVALUATION_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The rule evaluation is done at per row level.
+     * 
+ * + * PER_ROW = 1; + */ + public static final int PER_ROW_VALUE = 1; + /** + * + * + *
+     * The rule evaluation is done for an aggregate of rows.
+     * 
+ * + * AGGREGATE = 2; + */ + public static final int AGGREGATE_VALUE = 2; + + 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 EvaluationType 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 EvaluationType forNumber(int value) { + switch (value) { + case 0: + return EVALUATION_TYPE_UNSPECIFIED; + case 1: + return PER_ROW; + case 2: + return AGGREGATE; + 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 EvaluationType findValueByNumber(int number) { + return EvaluationType.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.dataplex.v1.DataQualityScanRuleResult.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final EvaluationType[] VALUES = values(); + + public static EvaluationType 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 EvaluationType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType) + } + + /** + * + * + *
+   * Whether the data quality rule passed or failed.
+   * 
+ * + * Protobuf enum {@code google.cloud.dataplex.v1.DataQualityScanRuleResult.Result} + */ + public enum Result implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * An unspecified result.
+     * 
+ * + * RESULT_UNSPECIFIED = 0; + */ + RESULT_UNSPECIFIED(0), + /** + * + * + *
+     * The data quality rule passed.
+     * 
+ * + * PASSED = 1; + */ + PASSED(1), + /** + * + * + *
+     * The data quality rule failed.
+     * 
+ * + * FAILED = 2; + */ + FAILED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * An unspecified result.
+     * 
+ * + * RESULT_UNSPECIFIED = 0; + */ + public static final int RESULT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The data quality rule passed.
+     * 
+ * + * PASSED = 1; + */ + public static final int PASSED_VALUE = 1; + /** + * + * + *
+     * The data quality rule failed.
+     * 
+ * + * FAILED = 2; + */ + public static final int FAILED_VALUE = 2; + + 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 Result 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 Result forNumber(int value) { + switch (value) { + case 0: + return RESULT_UNSPECIFIED; + case 1: + return PASSED; + case 2: + 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 Result findValueByNumber(int number) { + return Result.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.dataplex.v1.DataQualityScanRuleResult.getDescriptor() + .getEnumTypes() + .get(2); + } + + private static final Result[] VALUES = values(); + + public static Result 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 Result(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dataplex.v1.DataQualityScanRuleResult.Result) + } + + public static final int JOB_ID_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object jobId_ = ""; + /** + * + * + *
+   * Identifier of the specific data scan job this log entry is for.
+   * 
+ * + * string job_id = 1; + * + * @return The jobId. + */ + @java.lang.Override + public java.lang.String getJobId() { + java.lang.Object ref = jobId_; + 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(); + jobId_ = s; + return s; + } + } + /** + * + * + *
+   * Identifier of the specific data scan job this log entry is for.
+   * 
+ * + * string job_id = 1; + * + * @return The bytes for jobId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getJobIdBytes() { + java.lang.Object ref = jobId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jobId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_SOURCE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataSource_ = ""; + /** + * + * + *
+   * The data source of the data scan (e.g. BigQuery table name).
+   * 
+ * + * string data_source = 2; + * + * @return The dataSource. + */ + @java.lang.Override + public java.lang.String getDataSource() { + java.lang.Object ref = dataSource_; + 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(); + dataSource_ = s; + return s; + } + } + /** + * + * + *
+   * The data source of the data scan (e.g. BigQuery table name).
+   * 
+ * + * string data_source = 2; + * + * @return The bytes for dataSource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataSourceBytes() { + java.lang.Object ref = dataSource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataSource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COLUMN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object column_ = ""; + /** + * + * + *
+   * The column which this rule is evaluated against.
+   * 
+ * + * string column = 3; + * + * @return The column. + */ + @java.lang.Override + public java.lang.String getColumn() { + java.lang.Object ref = column_; + 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(); + column_ = s; + return s; + } + } + /** + * + * + *
+   * The column which this rule is evaluated against.
+   * 
+ * + * string column = 3; + * + * @return The bytes for column. + */ + @java.lang.Override + public com.google.protobuf.ByteString getColumnBytes() { + java.lang.Object ref = column_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + column_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RULE_NAME_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object ruleName_ = ""; + /** + * + * + *
+   * The name of the data quality rule.
+   * 
+ * + * string rule_name = 4; + * + * @return The ruleName. + */ + @java.lang.Override + public java.lang.String getRuleName() { + java.lang.Object ref = ruleName_; + 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(); + ruleName_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the data quality rule.
+   * 
+ * + * string rule_name = 4; + * + * @return The bytes for ruleName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRuleNameBytes() { + java.lang.Object ref = ruleName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ruleName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RULE_TYPE_FIELD_NUMBER = 5; + private int ruleType_ = 0; + /** + * + * + *
+   * The type of the data quality rule.
+   * 
+ * + * .google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType rule_type = 5; + * + * @return The enum numeric value on the wire for ruleType. + */ + @java.lang.Override + public int getRuleTypeValue() { + return ruleType_; + } + /** + * + * + *
+   * The type of the data quality rule.
+   * 
+ * + * .google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType rule_type = 5; + * + * @return The ruleType. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType getRuleType() { + com.google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType result = + com.google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType.forNumber(ruleType_); + return result == null + ? com.google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType.UNRECOGNIZED + : result; + } + + public static final int EVALUTION_TYPE_FIELD_NUMBER = 6; + private int evalutionType_ = 0; + /** + * + * + *
+   * The evaluation type of the data quality rule.
+   * 
+ * + * .google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType evalution_type = 6; + * + * + * @return The enum numeric value on the wire for evalutionType. + */ + @java.lang.Override + public int getEvalutionTypeValue() { + return evalutionType_; + } + /** + * + * + *
+   * The evaluation type of the data quality rule.
+   * 
+ * + * .google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType evalution_type = 6; + * + * + * @return The evalutionType. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType getEvalutionType() { + com.google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType result = + com.google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType.forNumber( + evalutionType_); + return result == null + ? com.google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType.UNRECOGNIZED + : result; + } + + public static final int RULE_DIMENSION_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object ruleDimension_ = ""; + /** + * + * + *
+   * The dimension of the data quality rule.
+   * 
+ * + * string rule_dimension = 7; + * + * @return The ruleDimension. + */ + @java.lang.Override + public java.lang.String getRuleDimension() { + java.lang.Object ref = ruleDimension_; + 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(); + ruleDimension_ = s; + return s; + } + } + /** + * + * + *
+   * The dimension of the data quality rule.
+   * 
+ * + * string rule_dimension = 7; + * + * @return The bytes for ruleDimension. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRuleDimensionBytes() { + java.lang.Object ref = ruleDimension_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ruleDimension_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int THRESHOLD_PERCENT_FIELD_NUMBER = 8; + private double thresholdPercent_ = 0D; + /** + * + * + *
+   * The passing threshold ([0.0, 100.0]) of the data quality rule.
+   * 
+ * + * double threshold_percent = 8; + * + * @return The thresholdPercent. + */ + @java.lang.Override + public double getThresholdPercent() { + return thresholdPercent_; + } + + public static final int RESULT_FIELD_NUMBER = 9; + private int result_ = 0; + /** + * + * + *
+   * The result of the data quality rule.
+   * 
+ * + * .google.cloud.dataplex.v1.DataQualityScanRuleResult.Result result = 9; + * + * @return The enum numeric value on the wire for result. + */ + @java.lang.Override + public int getResultValue() { + return result_; + } + /** + * + * + *
+   * The result of the data quality rule.
+   * 
+ * + * .google.cloud.dataplex.v1.DataQualityScanRuleResult.Result result = 9; + * + * @return The result. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataQualityScanRuleResult.Result getResult() { + com.google.cloud.dataplex.v1.DataQualityScanRuleResult.Result result = + com.google.cloud.dataplex.v1.DataQualityScanRuleResult.Result.forNumber(result_); + return result == null + ? com.google.cloud.dataplex.v1.DataQualityScanRuleResult.Result.UNRECOGNIZED + : result; + } + + public static final int EVALUATED_ROW_COUNT_FIELD_NUMBER = 10; + private long evaluatedRowCount_ = 0L; + /** + * + * + *
+   * The number of rows evaluated against the data quality rule.
+   * This field is only valid for rules of PER_ROW evaluation type.
+   * 
+ * + * int64 evaluated_row_count = 10; + * + * @return The evaluatedRowCount. + */ + @java.lang.Override + public long getEvaluatedRowCount() { + return evaluatedRowCount_; + } + + public static final int PASSED_ROW_COUNT_FIELD_NUMBER = 11; + private long passedRowCount_ = 0L; + /** + * + * + *
+   * The number of rows which passed a rule evaluation.
+   * This field is only valid for rules of PER_ROW evaluation type.
+   * 
+ * + * int64 passed_row_count = 11; + * + * @return The passedRowCount. + */ + @java.lang.Override + public long getPassedRowCount() { + return passedRowCount_; + } + + public static final int NULL_ROW_COUNT_FIELD_NUMBER = 12; + private long nullRowCount_ = 0L; + /** + * + * + *
+   * The number of rows with null values in the specified column.
+   * 
+ * + * int64 null_row_count = 12; + * + * @return The nullRowCount. + */ + @java.lang.Override + public long getNullRowCount() { + return nullRowCount_; + } + + 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(jobId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, jobId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataSource_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dataSource_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(column_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, column_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ruleName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, ruleName_); + } + if (ruleType_ + != com.google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType.RULE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(5, ruleType_); + } + if (evalutionType_ + != com.google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType + .EVALUATION_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(6, evalutionType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ruleDimension_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, ruleDimension_); + } + if (java.lang.Double.doubleToRawLongBits(thresholdPercent_) != 0) { + output.writeDouble(8, thresholdPercent_); + } + if (result_ + != com.google.cloud.dataplex.v1.DataQualityScanRuleResult.Result.RESULT_UNSPECIFIED + .getNumber()) { + output.writeEnum(9, result_); + } + if (evaluatedRowCount_ != 0L) { + output.writeInt64(10, evaluatedRowCount_); + } + if (passedRowCount_ != 0L) { + output.writeInt64(11, passedRowCount_); + } + if (nullRowCount_ != 0L) { + output.writeInt64(12, nullRowCount_); + } + 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(jobId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, jobId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataSource_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dataSource_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(column_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, column_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ruleName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, ruleName_); + } + if (ruleType_ + != com.google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType.RULE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, ruleType_); + } + if (evalutionType_ + != com.google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType + .EVALUATION_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, evalutionType_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ruleDimension_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, ruleDimension_); + } + if (java.lang.Double.doubleToRawLongBits(thresholdPercent_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(8, thresholdPercent_); + } + if (result_ + != com.google.cloud.dataplex.v1.DataQualityScanRuleResult.Result.RESULT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, result_); + } + if (evaluatedRowCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(10, evaluatedRowCount_); + } + if (passedRowCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(11, passedRowCount_); + } + if (nullRowCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream.computeInt64Size(12, nullRowCount_); + } + 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.dataplex.v1.DataQualityScanRuleResult)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.DataQualityScanRuleResult other = + (com.google.cloud.dataplex.v1.DataQualityScanRuleResult) obj; + + if (!getJobId().equals(other.getJobId())) return false; + if (!getDataSource().equals(other.getDataSource())) return false; + if (!getColumn().equals(other.getColumn())) return false; + if (!getRuleName().equals(other.getRuleName())) return false; + if (ruleType_ != other.ruleType_) return false; + if (evalutionType_ != other.evalutionType_) return false; + if (!getRuleDimension().equals(other.getRuleDimension())) return false; + if (java.lang.Double.doubleToLongBits(getThresholdPercent()) + != java.lang.Double.doubleToLongBits(other.getThresholdPercent())) return false; + if (result_ != other.result_) return false; + if (getEvaluatedRowCount() != other.getEvaluatedRowCount()) return false; + if (getPassedRowCount() != other.getPassedRowCount()) return false; + if (getNullRowCount() != other.getNullRowCount()) 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) + JOB_ID_FIELD_NUMBER; + hash = (53 * hash) + getJobId().hashCode(); + hash = (37 * hash) + DATA_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getDataSource().hashCode(); + hash = (37 * hash) + COLUMN_FIELD_NUMBER; + hash = (53 * hash) + getColumn().hashCode(); + hash = (37 * hash) + RULE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getRuleName().hashCode(); + hash = (37 * hash) + RULE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + ruleType_; + hash = (37 * hash) + EVALUTION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + evalutionType_; + hash = (37 * hash) + RULE_DIMENSION_FIELD_NUMBER; + hash = (53 * hash) + getRuleDimension().hashCode(); + hash = (37 * hash) + THRESHOLD_PERCENT_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getThresholdPercent())); + hash = (37 * hash) + RESULT_FIELD_NUMBER; + hash = (53 * hash) + result_; + hash = (37 * hash) + EVALUATED_ROW_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getEvaluatedRowCount()); + hash = (37 * hash) + PASSED_ROW_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPassedRowCount()); + hash = (37 * hash) + NULL_ROW_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getNullRowCount()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.DataQualityScanRuleResult parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataQualityScanRuleResult 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.dataplex.v1.DataQualityScanRuleResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataQualityScanRuleResult 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.dataplex.v1.DataQualityScanRuleResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataQualityScanRuleResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.DataQualityScanRuleResult parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataQualityScanRuleResult 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.dataplex.v1.DataQualityScanRuleResult parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataQualityScanRuleResult 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.dataplex.v1.DataQualityScanRuleResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataQualityScanRuleResult 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.dataplex.v1.DataQualityScanRuleResult 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; + } + /** + * + * + *
+   * Information about the result of a data quality rule for data quality scan.
+   * The monitored resource is 'DataScan'.
+   * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DataQualityScanRuleResult} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.DataQualityScanRuleResult) + com.google.cloud.dataplex.v1.DataQualityScanRuleResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.LogsProto + .internal_static_google_cloud_dataplex_v1_DataQualityScanRuleResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.LogsProto + .internal_static_google_cloud_dataplex_v1_DataQualityScanRuleResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataQualityScanRuleResult.class, + com.google.cloud.dataplex.v1.DataQualityScanRuleResult.Builder.class); + } + + // Construct using com.google.cloud.dataplex.v1.DataQualityScanRuleResult.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + jobId_ = ""; + dataSource_ = ""; + column_ = ""; + ruleName_ = ""; + ruleType_ = 0; + evalutionType_ = 0; + ruleDimension_ = ""; + thresholdPercent_ = 0D; + result_ = 0; + evaluatedRowCount_ = 0L; + passedRowCount_ = 0L; + nullRowCount_ = 0L; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.LogsProto + .internal_static_google_cloud_dataplex_v1_DataQualityScanRuleResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataQualityScanRuleResult getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.DataQualityScanRuleResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataQualityScanRuleResult build() { + com.google.cloud.dataplex.v1.DataQualityScanRuleResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataQualityScanRuleResult buildPartial() { + com.google.cloud.dataplex.v1.DataQualityScanRuleResult result = + new com.google.cloud.dataplex.v1.DataQualityScanRuleResult(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dataplex.v1.DataQualityScanRuleResult result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.jobId_ = jobId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dataSource_ = dataSource_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.column_ = column_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.ruleName_ = ruleName_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.ruleType_ = ruleType_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.evalutionType_ = evalutionType_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.ruleDimension_ = ruleDimension_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.thresholdPercent_ = thresholdPercent_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.result_ = result_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.evaluatedRowCount_ = evaluatedRowCount_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.passedRowCount_ = passedRowCount_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.nullRowCount_ = nullRowCount_; + } + } + + @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.dataplex.v1.DataQualityScanRuleResult) { + return mergeFrom((com.google.cloud.dataplex.v1.DataQualityScanRuleResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataplex.v1.DataQualityScanRuleResult other) { + if (other == com.google.cloud.dataplex.v1.DataQualityScanRuleResult.getDefaultInstance()) + return this; + if (!other.getJobId().isEmpty()) { + jobId_ = other.jobId_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getDataSource().isEmpty()) { + dataSource_ = other.dataSource_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getColumn().isEmpty()) { + column_ = other.column_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getRuleName().isEmpty()) { + ruleName_ = other.ruleName_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (other.ruleType_ != 0) { + setRuleTypeValue(other.getRuleTypeValue()); + } + if (other.evalutionType_ != 0) { + setEvalutionTypeValue(other.getEvalutionTypeValue()); + } + if (!other.getRuleDimension().isEmpty()) { + ruleDimension_ = other.ruleDimension_; + bitField0_ |= 0x00000040; + onChanged(); + } + if (other.getThresholdPercent() != 0D) { + setThresholdPercent(other.getThresholdPercent()); + } + if (other.result_ != 0) { + setResultValue(other.getResultValue()); + } + if (other.getEvaluatedRowCount() != 0L) { + setEvaluatedRowCount(other.getEvaluatedRowCount()); + } + if (other.getPassedRowCount() != 0L) { + setPassedRowCount(other.getPassedRowCount()); + } + if (other.getNullRowCount() != 0L) { + setNullRowCount(other.getNullRowCount()); + } + 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: + { + jobId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + dataSource_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + column_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + ruleName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: + { + ruleType_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: + { + evalutionType_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 58: + { + ruleDimension_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 + case 65: + { + thresholdPercent_ = input.readDouble(); + bitField0_ |= 0x00000080; + break; + } // case 65 + case 72: + { + result_ = input.readEnum(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 80: + { + evaluatedRowCount_ = input.readInt64(); + bitField0_ |= 0x00000200; + break; + } // case 80 + case 88: + { + passedRowCount_ = input.readInt64(); + bitField0_ |= 0x00000400; + break; + } // case 88 + case 96: + { + nullRowCount_ = input.readInt64(); + bitField0_ |= 0x00000800; + break; + } // case 96 + 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 jobId_ = ""; + /** + * + * + *
+     * Identifier of the specific data scan job this log entry is for.
+     * 
+ * + * string job_id = 1; + * + * @return The jobId. + */ + public java.lang.String getJobId() { + java.lang.Object ref = jobId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jobId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Identifier of the specific data scan job this log entry is for.
+     * 
+ * + * string job_id = 1; + * + * @return The bytes for jobId. + */ + public com.google.protobuf.ByteString getJobIdBytes() { + java.lang.Object ref = jobId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jobId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Identifier of the specific data scan job this log entry is for.
+     * 
+ * + * string job_id = 1; + * + * @param value The jobId to set. + * @return This builder for chaining. + */ + public Builder setJobId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + jobId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Identifier of the specific data scan job this log entry is for.
+     * 
+ * + * string job_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearJobId() { + jobId_ = getDefaultInstance().getJobId(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Identifier of the specific data scan job this log entry is for.
+     * 
+ * + * string job_id = 1; + * + * @param value The bytes for jobId to set. + * @return This builder for chaining. + */ + public Builder setJobIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + jobId_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object dataSource_ = ""; + /** + * + * + *
+     * The data source of the data scan (e.g. BigQuery table name).
+     * 
+ * + * string data_source = 2; + * + * @return The dataSource. + */ + public java.lang.String getDataSource() { + java.lang.Object ref = dataSource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataSource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The data source of the data scan (e.g. BigQuery table name).
+     * 
+ * + * string data_source = 2; + * + * @return The bytes for dataSource. + */ + public com.google.protobuf.ByteString getDataSourceBytes() { + java.lang.Object ref = dataSource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataSource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The data source of the data scan (e.g. BigQuery table name).
+     * 
+ * + * string data_source = 2; + * + * @param value The dataSource to set. + * @return This builder for chaining. + */ + public Builder setDataSource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataSource_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The data source of the data scan (e.g. BigQuery table name).
+     * 
+ * + * string data_source = 2; + * + * @return This builder for chaining. + */ + public Builder clearDataSource() { + dataSource_ = getDefaultInstance().getDataSource(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The data source of the data scan (e.g. BigQuery table name).
+     * 
+ * + * string data_source = 2; + * + * @param value The bytes for dataSource to set. + * @return This builder for chaining. + */ + public Builder setDataSourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataSource_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object column_ = ""; + /** + * + * + *
+     * The column which this rule is evaluated against.
+     * 
+ * + * string column = 3; + * + * @return The column. + */ + public java.lang.String getColumn() { + java.lang.Object ref = column_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + column_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The column which this rule is evaluated against.
+     * 
+ * + * string column = 3; + * + * @return The bytes for column. + */ + public com.google.protobuf.ByteString getColumnBytes() { + java.lang.Object ref = column_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + column_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The column which this rule is evaluated against.
+     * 
+ * + * string column = 3; + * + * @param value The column to set. + * @return This builder for chaining. + */ + public Builder setColumn(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + column_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The column which this rule is evaluated against.
+     * 
+ * + * string column = 3; + * + * @return This builder for chaining. + */ + public Builder clearColumn() { + column_ = getDefaultInstance().getColumn(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * The column which this rule is evaluated against.
+     * 
+ * + * string column = 3; + * + * @param value The bytes for column to set. + * @return This builder for chaining. + */ + public Builder setColumnBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + column_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object ruleName_ = ""; + /** + * + * + *
+     * The name of the data quality rule.
+     * 
+ * + * string rule_name = 4; + * + * @return The ruleName. + */ + public java.lang.String getRuleName() { + java.lang.Object ref = ruleName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ruleName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the data quality rule.
+     * 
+ * + * string rule_name = 4; + * + * @return The bytes for ruleName. + */ + public com.google.protobuf.ByteString getRuleNameBytes() { + java.lang.Object ref = ruleName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ruleName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the data quality rule.
+     * 
+ * + * string rule_name = 4; + * + * @param value The ruleName to set. + * @return This builder for chaining. + */ + public Builder setRuleName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ruleName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the data quality rule.
+     * 
+ * + * string rule_name = 4; + * + * @return This builder for chaining. + */ + public Builder clearRuleName() { + ruleName_ = getDefaultInstance().getRuleName(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the data quality rule.
+     * 
+ * + * string rule_name = 4; + * + * @param value The bytes for ruleName to set. + * @return This builder for chaining. + */ + public Builder setRuleNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ruleName_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private int ruleType_ = 0; + /** + * + * + *
+     * The type of the data quality rule.
+     * 
+ * + * .google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType rule_type = 5; + * + * @return The enum numeric value on the wire for ruleType. + */ + @java.lang.Override + public int getRuleTypeValue() { + return ruleType_; + } + /** + * + * + *
+     * The type of the data quality rule.
+     * 
+ * + * .google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType rule_type = 5; + * + * @param value The enum numeric value on the wire for ruleType to set. + * @return This builder for chaining. + */ + public Builder setRuleTypeValue(int value) { + ruleType_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the data quality rule.
+     * 
+ * + * .google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType rule_type = 5; + * + * @return The ruleType. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType getRuleType() { + com.google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType result = + com.google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType.forNumber(ruleType_); + return result == null + ? com.google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The type of the data quality rule.
+     * 
+ * + * .google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType rule_type = 5; + * + * @param value The ruleType to set. + * @return This builder for chaining. + */ + public Builder setRuleType( + com.google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + ruleType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the data quality rule.
+     * 
+ * + * .google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType rule_type = 5; + * + * @return This builder for chaining. + */ + public Builder clearRuleType() { + bitField0_ = (bitField0_ & ~0x00000010); + ruleType_ = 0; + onChanged(); + return this; + } + + private int evalutionType_ = 0; + /** + * + * + *
+     * The evaluation type of the data quality rule.
+     * 
+ * + * .google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType evalution_type = 6; + * + * + * @return The enum numeric value on the wire for evalutionType. + */ + @java.lang.Override + public int getEvalutionTypeValue() { + return evalutionType_; + } + /** + * + * + *
+     * The evaluation type of the data quality rule.
+     * 
+ * + * .google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType evalution_type = 6; + * + * + * @param value The enum numeric value on the wire for evalutionType to set. + * @return This builder for chaining. + */ + public Builder setEvalutionTypeValue(int value) { + evalutionType_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The evaluation type of the data quality rule.
+     * 
+ * + * .google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType evalution_type = 6; + * + * + * @return The evalutionType. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType + getEvalutionType() { + com.google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType result = + com.google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType.forNumber( + evalutionType_); + return result == null + ? com.google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The evaluation type of the data quality rule.
+     * 
+ * + * .google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType evalution_type = 6; + * + * + * @param value The evalutionType to set. + * @return This builder for chaining. + */ + public Builder setEvalutionType( + com.google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000020; + evalutionType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The evaluation type of the data quality rule.
+     * 
+ * + * .google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType evalution_type = 6; + * + * + * @return This builder for chaining. + */ + public Builder clearEvalutionType() { + bitField0_ = (bitField0_ & ~0x00000020); + evalutionType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object ruleDimension_ = ""; + /** + * + * + *
+     * The dimension of the data quality rule.
+     * 
+ * + * string rule_dimension = 7; + * + * @return The ruleDimension. + */ + public java.lang.String getRuleDimension() { + java.lang.Object ref = ruleDimension_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ruleDimension_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The dimension of the data quality rule.
+     * 
+ * + * string rule_dimension = 7; + * + * @return The bytes for ruleDimension. + */ + public com.google.protobuf.ByteString getRuleDimensionBytes() { + java.lang.Object ref = ruleDimension_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ruleDimension_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The dimension of the data quality rule.
+     * 
+ * + * string rule_dimension = 7; + * + * @param value The ruleDimension to set. + * @return This builder for chaining. + */ + public Builder setRuleDimension(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ruleDimension_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * + * + *
+     * The dimension of the data quality rule.
+     * 
+ * + * string rule_dimension = 7; + * + * @return This builder for chaining. + */ + public Builder clearRuleDimension() { + ruleDimension_ = getDefaultInstance().getRuleDimension(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + * + * + *
+     * The dimension of the data quality rule.
+     * 
+ * + * string rule_dimension = 7; + * + * @param value The bytes for ruleDimension to set. + * @return This builder for chaining. + */ + public Builder setRuleDimensionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ruleDimension_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + + private double thresholdPercent_; + /** + * + * + *
+     * The passing threshold ([0.0, 100.0]) of the data quality rule.
+     * 
+ * + * double threshold_percent = 8; + * + * @return The thresholdPercent. + */ + @java.lang.Override + public double getThresholdPercent() { + return thresholdPercent_; + } + /** + * + * + *
+     * The passing threshold ([0.0, 100.0]) of the data quality rule.
+     * 
+ * + * double threshold_percent = 8; + * + * @param value The thresholdPercent to set. + * @return This builder for chaining. + */ + public Builder setThresholdPercent(double value) { + + thresholdPercent_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * The passing threshold ([0.0, 100.0]) of the data quality rule.
+     * 
+ * + * double threshold_percent = 8; + * + * @return This builder for chaining. + */ + public Builder clearThresholdPercent() { + bitField0_ = (bitField0_ & ~0x00000080); + thresholdPercent_ = 0D; + onChanged(); + return this; + } + + private int result_ = 0; + /** + * + * + *
+     * The result of the data quality rule.
+     * 
+ * + * .google.cloud.dataplex.v1.DataQualityScanRuleResult.Result result = 9; + * + * @return The enum numeric value on the wire for result. + */ + @java.lang.Override + public int getResultValue() { + return result_; + } + /** + * + * + *
+     * The result of the data quality rule.
+     * 
+ * + * .google.cloud.dataplex.v1.DataQualityScanRuleResult.Result result = 9; + * + * @param value The enum numeric value on the wire for result to set. + * @return This builder for chaining. + */ + public Builder setResultValue(int value) { + result_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * The result of the data quality rule.
+     * 
+ * + * .google.cloud.dataplex.v1.DataQualityScanRuleResult.Result result = 9; + * + * @return The result. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataQualityScanRuleResult.Result getResult() { + com.google.cloud.dataplex.v1.DataQualityScanRuleResult.Result result = + com.google.cloud.dataplex.v1.DataQualityScanRuleResult.Result.forNumber(result_); + return result == null + ? com.google.cloud.dataplex.v1.DataQualityScanRuleResult.Result.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The result of the data quality rule.
+     * 
+ * + * .google.cloud.dataplex.v1.DataQualityScanRuleResult.Result result = 9; + * + * @param value The result to set. + * @return This builder for chaining. + */ + public Builder setResult(com.google.cloud.dataplex.v1.DataQualityScanRuleResult.Result value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000100; + result_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The result of the data quality rule.
+     * 
+ * + * .google.cloud.dataplex.v1.DataQualityScanRuleResult.Result result = 9; + * + * @return This builder for chaining. + */ + public Builder clearResult() { + bitField0_ = (bitField0_ & ~0x00000100); + result_ = 0; + onChanged(); + return this; + } + + private long evaluatedRowCount_; + /** + * + * + *
+     * The number of rows evaluated against the data quality rule.
+     * This field is only valid for rules of PER_ROW evaluation type.
+     * 
+ * + * int64 evaluated_row_count = 10; + * + * @return The evaluatedRowCount. + */ + @java.lang.Override + public long getEvaluatedRowCount() { + return evaluatedRowCount_; + } + /** + * + * + *
+     * The number of rows evaluated against the data quality rule.
+     * This field is only valid for rules of PER_ROW evaluation type.
+     * 
+ * + * int64 evaluated_row_count = 10; + * + * @param value The evaluatedRowCount to set. + * @return This builder for chaining. + */ + public Builder setEvaluatedRowCount(long value) { + + evaluatedRowCount_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of rows evaluated against the data quality rule.
+     * This field is only valid for rules of PER_ROW evaluation type.
+     * 
+ * + * int64 evaluated_row_count = 10; + * + * @return This builder for chaining. + */ + public Builder clearEvaluatedRowCount() { + bitField0_ = (bitField0_ & ~0x00000200); + evaluatedRowCount_ = 0L; + onChanged(); + return this; + } + + private long passedRowCount_; + /** + * + * + *
+     * The number of rows which passed a rule evaluation.
+     * This field is only valid for rules of PER_ROW evaluation type.
+     * 
+ * + * int64 passed_row_count = 11; + * + * @return The passedRowCount. + */ + @java.lang.Override + public long getPassedRowCount() { + return passedRowCount_; + } + /** + * + * + *
+     * The number of rows which passed a rule evaluation.
+     * This field is only valid for rules of PER_ROW evaluation type.
+     * 
+ * + * int64 passed_row_count = 11; + * + * @param value The passedRowCount to set. + * @return This builder for chaining. + */ + public Builder setPassedRowCount(long value) { + + passedRowCount_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of rows which passed a rule evaluation.
+     * This field is only valid for rules of PER_ROW evaluation type.
+     * 
+ * + * int64 passed_row_count = 11; + * + * @return This builder for chaining. + */ + public Builder clearPassedRowCount() { + bitField0_ = (bitField0_ & ~0x00000400); + passedRowCount_ = 0L; + onChanged(); + return this; + } + + private long nullRowCount_; + /** + * + * + *
+     * The number of rows with null values in the specified column.
+     * 
+ * + * int64 null_row_count = 12; + * + * @return The nullRowCount. + */ + @java.lang.Override + public long getNullRowCount() { + return nullRowCount_; + } + /** + * + * + *
+     * The number of rows with null values in the specified column.
+     * 
+ * + * int64 null_row_count = 12; + * + * @param value The nullRowCount to set. + * @return This builder for chaining. + */ + public Builder setNullRowCount(long value) { + + nullRowCount_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * The number of rows with null values in the specified column.
+     * 
+ * + * int64 null_row_count = 12; + * + * @return This builder for chaining. + */ + public Builder clearNullRowCount() { + bitField0_ = (bitField0_ & ~0x00000800); + nullRowCount_ = 0L; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.dataplex.v1.DataQualityScanRuleResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.DataQualityScanRuleResult) + private static final com.google.cloud.dataplex.v1.DataQualityScanRuleResult DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.DataQualityScanRuleResult(); + } + + public static com.google.cloud.dataplex.v1.DataQualityScanRuleResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataQualityScanRuleResult 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.dataplex.v1.DataQualityScanRuleResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityScanRuleResultOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityScanRuleResultOrBuilder.java new file mode 100644 index 000000000000..30bf67f7cb91 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualityScanRuleResultOrBuilder.java @@ -0,0 +1,281 @@ +/* + * Copyright 2023 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/dataplex/v1/logs.proto + +package com.google.cloud.dataplex.v1; + +public interface DataQualityScanRuleResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.DataQualityScanRuleResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Identifier of the specific data scan job this log entry is for.
+   * 
+ * + * string job_id = 1; + * + * @return The jobId. + */ + java.lang.String getJobId(); + /** + * + * + *
+   * Identifier of the specific data scan job this log entry is for.
+   * 
+ * + * string job_id = 1; + * + * @return The bytes for jobId. + */ + com.google.protobuf.ByteString getJobIdBytes(); + + /** + * + * + *
+   * The data source of the data scan (e.g. BigQuery table name).
+   * 
+ * + * string data_source = 2; + * + * @return The dataSource. + */ + java.lang.String getDataSource(); + /** + * + * + *
+   * The data source of the data scan (e.g. BigQuery table name).
+   * 
+ * + * string data_source = 2; + * + * @return The bytes for dataSource. + */ + com.google.protobuf.ByteString getDataSourceBytes(); + + /** + * + * + *
+   * The column which this rule is evaluated against.
+   * 
+ * + * string column = 3; + * + * @return The column. + */ + java.lang.String getColumn(); + /** + * + * + *
+   * The column which this rule is evaluated against.
+   * 
+ * + * string column = 3; + * + * @return The bytes for column. + */ + com.google.protobuf.ByteString getColumnBytes(); + + /** + * + * + *
+   * The name of the data quality rule.
+   * 
+ * + * string rule_name = 4; + * + * @return The ruleName. + */ + java.lang.String getRuleName(); + /** + * + * + *
+   * The name of the data quality rule.
+   * 
+ * + * string rule_name = 4; + * + * @return The bytes for ruleName. + */ + com.google.protobuf.ByteString getRuleNameBytes(); + + /** + * + * + *
+   * The type of the data quality rule.
+   * 
+ * + * .google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType rule_type = 5; + * + * @return The enum numeric value on the wire for ruleType. + */ + int getRuleTypeValue(); + /** + * + * + *
+   * The type of the data quality rule.
+   * 
+ * + * .google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType rule_type = 5; + * + * @return The ruleType. + */ + com.google.cloud.dataplex.v1.DataQualityScanRuleResult.RuleType getRuleType(); + + /** + * + * + *
+   * The evaluation type of the data quality rule.
+   * 
+ * + * .google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType evalution_type = 6; + * + * + * @return The enum numeric value on the wire for evalutionType. + */ + int getEvalutionTypeValue(); + /** + * + * + *
+   * The evaluation type of the data quality rule.
+   * 
+ * + * .google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType evalution_type = 6; + * + * + * @return The evalutionType. + */ + com.google.cloud.dataplex.v1.DataQualityScanRuleResult.EvaluationType getEvalutionType(); + + /** + * + * + *
+   * The dimension of the data quality rule.
+   * 
+ * + * string rule_dimension = 7; + * + * @return The ruleDimension. + */ + java.lang.String getRuleDimension(); + /** + * + * + *
+   * The dimension of the data quality rule.
+   * 
+ * + * string rule_dimension = 7; + * + * @return The bytes for ruleDimension. + */ + com.google.protobuf.ByteString getRuleDimensionBytes(); + + /** + * + * + *
+   * The passing threshold ([0.0, 100.0]) of the data quality rule.
+   * 
+ * + * double threshold_percent = 8; + * + * @return The thresholdPercent. + */ + double getThresholdPercent(); + + /** + * + * + *
+   * The result of the data quality rule.
+   * 
+ * + * .google.cloud.dataplex.v1.DataQualityScanRuleResult.Result result = 9; + * + * @return The enum numeric value on the wire for result. + */ + int getResultValue(); + /** + * + * + *
+   * The result of the data quality rule.
+   * 
+ * + * .google.cloud.dataplex.v1.DataQualityScanRuleResult.Result result = 9; + * + * @return The result. + */ + com.google.cloud.dataplex.v1.DataQualityScanRuleResult.Result getResult(); + + /** + * + * + *
+   * The number of rows evaluated against the data quality rule.
+   * This field is only valid for rules of PER_ROW evaluation type.
+   * 
+ * + * int64 evaluated_row_count = 10; + * + * @return The evaluatedRowCount. + */ + long getEvaluatedRowCount(); + + /** + * + * + *
+   * The number of rows which passed a rule evaluation.
+   * This field is only valid for rules of PER_ROW evaluation type.
+   * 
+ * + * int64 passed_row_count = 11; + * + * @return The passedRowCount. + */ + long getPassedRowCount(); + + /** + * + * + *
+   * The number of rows with null values in the specified column.
+   * 
+ * + * int64 null_row_count = 12; + * + * @return The nullRowCount. + */ + long getNullRowCount(); +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualitySpec.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualitySpec.java index 1b30e74e88c0..7c1ce5524fbc 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualitySpec.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualitySpec.java @@ -39,6 +39,7 @@ private DataQualitySpec(com.google.protobuf.GeneratedMessageV3.Builder builde private DataQualitySpec() { rules_ = java.util.Collections.emptyList(); + rowFilter_ = ""; } @java.lang.Override @@ -62,80 +63,1742 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.dataplex.v1.DataQualitySpec.Builder.class); } + public interface PostScanActionsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.DataQualitySpec.PostScanActions) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. If set, results will be exported to the provided BigQuery
+     * table.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the bigqueryExport field is set. + */ + boolean hasBigqueryExport(); + /** + * + * + *
+     * Optional. If set, results will be exported to the provided BigQuery
+     * table.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bigqueryExport. + */ + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport getBigqueryExport(); + /** + * + * + *
+     * Optional. If set, results will be exported to the provided BigQuery
+     * table.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExportOrBuilder + getBigqueryExportOrBuilder(); + } + /** + * + * + *
+   * The configuration of post scan actions of DataQualityScan.
+   * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DataQualitySpec.PostScanActions} + */ + public static final class PostScanActions extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.DataQualitySpec.PostScanActions) + PostScanActionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use PostScanActions.newBuilder() to construct. + private PostScanActions(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PostScanActions() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PostScanActions(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataQualityProto + .internal_static_google_cloud_dataplex_v1_DataQualitySpec_PostScanActions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataQualityProto + .internal_static_google_cloud_dataplex_v1_DataQualitySpec_PostScanActions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.class, + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Builder.class); + } + + public interface BigQueryExportOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Optional. The BigQuery table to export DataQualityScan results to.
+       * Format:
+       * projects/{project}/datasets/{dataset}/tables/{table}
+       * 
+ * + * + * string results_table = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The resultsTable. + */ + java.lang.String getResultsTable(); + /** + * + * + *
+       * Optional. The BigQuery table to export DataQualityScan results to.
+       * Format:
+       * projects/{project}/datasets/{dataset}/tables/{table}
+       * 
+ * + * + * string results_table = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for resultsTable. + */ + com.google.protobuf.ByteString getResultsTableBytes(); + } + /** + * + * + *
+     * The configuration of BigQuery export post scan action.
+     * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport} + */ + public static final class BigQueryExport extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport) + BigQueryExportOrBuilder { + private static final long serialVersionUID = 0L; + // Use BigQueryExport.newBuilder() to construct. + private BigQueryExport(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BigQueryExport() { + resultsTable_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BigQueryExport(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataQualityProto + .internal_static_google_cloud_dataplex_v1_DataQualitySpec_PostScanActions_BigQueryExport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataQualityProto + .internal_static_google_cloud_dataplex_v1_DataQualitySpec_PostScanActions_BigQueryExport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport.class, + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport.Builder + .class); + } + + public static final int RESULTS_TABLE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object resultsTable_ = ""; + /** + * + * + *
+       * Optional. The BigQuery table to export DataQualityScan results to.
+       * Format:
+       * projects/{project}/datasets/{dataset}/tables/{table}
+       * 
+ * + * + * string results_table = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The resultsTable. + */ + @java.lang.Override + public java.lang.String getResultsTable() { + java.lang.Object ref = resultsTable_; + 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(); + resultsTable_ = s; + return s; + } + } + /** + * + * + *
+       * Optional. The BigQuery table to export DataQualityScan results to.
+       * Format:
+       * projects/{project}/datasets/{dataset}/tables/{table}
+       * 
+ * + * + * string results_table = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for resultsTable. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResultsTableBytes() { + java.lang.Object ref = resultsTable_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resultsTable_ = 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(resultsTable_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resultsTable_); + } + 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(resultsTable_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resultsTable_); + } + 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.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport other = + (com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport) obj; + + if (!getResultsTable().equals(other.getResultsTable())) 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) + RESULTS_TABLE_FIELD_NUMBER; + hash = (53 * hash) + getResultsTable().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + 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.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + 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.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + 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.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + 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.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + 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.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport 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 configuration of BigQuery export post scan action.
+       * 
+ * + * Protobuf type {@code + * google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport) + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExportOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataQualityProto + .internal_static_google_cloud_dataplex_v1_DataQualitySpec_PostScanActions_BigQueryExport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataQualityProto + .internal_static_google_cloud_dataplex_v1_DataQualitySpec_PostScanActions_BigQueryExport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport.class, + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + .Builder.class); + } + + // Construct using + // com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + resultsTable_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.DataQualityProto + .internal_static_google_cloud_dataplex_v1_DataQualitySpec_PostScanActions_BigQueryExport_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport build() { + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + buildPartial() { + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport result = + new com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.resultsTable_ = resultsTable_; + } + } + + @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.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport) { + return mergeFrom( + (com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport other) { + if (other + == com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + .getDefaultInstance()) return this; + if (!other.getResultsTable().isEmpty()) { + resultsTable_ = other.resultsTable_; + bitField0_ |= 0x00000001; + 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: + { + resultsTable_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + 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 int bitField0_; + + private java.lang.Object resultsTable_ = ""; + /** + * + * + *
+         * Optional. The BigQuery table to export DataQualityScan results to.
+         * Format:
+         * projects/{project}/datasets/{dataset}/tables/{table}
+         * 
+ * + * + * string results_table = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The resultsTable. + */ + public java.lang.String getResultsTable() { + java.lang.Object ref = resultsTable_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resultsTable_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Optional. The BigQuery table to export DataQualityScan results to.
+         * Format:
+         * projects/{project}/datasets/{dataset}/tables/{table}
+         * 
+ * + * + * string results_table = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for resultsTable. + */ + public com.google.protobuf.ByteString getResultsTableBytes() { + java.lang.Object ref = resultsTable_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resultsTable_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Optional. The BigQuery table to export DataQualityScan results to.
+         * Format:
+         * projects/{project}/datasets/{dataset}/tables/{table}
+         * 
+ * + * + * string results_table = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The resultsTable to set. + * @return This builder for chaining. + */ + public Builder setResultsTable(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + resultsTable_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. The BigQuery table to export DataQualityScan results to.
+         * Format:
+         * projects/{project}/datasets/{dataset}/tables/{table}
+         * 
+ * + * + * string results_table = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearResultsTable() { + resultsTable_ = getDefaultInstance().getResultsTable(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+         * Optional. The BigQuery table to export DataQualityScan results to.
+         * Format:
+         * projects/{project}/datasets/{dataset}/tables/{table}
+         * 
+ * + * + * string results_table = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for resultsTable to set. + * @return This builder for chaining. + */ + public Builder setResultsTableBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + resultsTable_ = value; + bitField0_ |= 0x00000001; + 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.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport) + private static final com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions + .BigQueryExport + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport(); + } + + public static com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQueryExport 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.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int BIGQUERY_EXPORT_FIELD_NUMBER = 1; + private com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + bigqueryExport_; + /** + * + * + *
+     * Optional. If set, results will be exported to the provided BigQuery
+     * table.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the bigqueryExport field is set. + */ + @java.lang.Override + public boolean hasBigqueryExport() { + return bigqueryExport_ != null; + } + /** + * + * + *
+     * Optional. If set, results will be exported to the provided BigQuery
+     * table.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bigqueryExport. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + getBigqueryExport() { + return bigqueryExport_ == null + ? com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + .getDefaultInstance() + : bigqueryExport_; + } + /** + * + * + *
+     * Optional. If set, results will be exported to the provided BigQuery
+     * table.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExportOrBuilder + getBigqueryExportOrBuilder() { + return bigqueryExport_ == null + ? com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + .getDefaultInstance() + : bigqueryExport_; + } + + 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 (bigqueryExport_ != null) { + output.writeMessage(1, getBigqueryExport()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (bigqueryExport_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBigqueryExport()); + } + 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.dataplex.v1.DataQualitySpec.PostScanActions)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions other = + (com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions) obj; + + if (hasBigqueryExport() != other.hasBigqueryExport()) return false; + if (hasBigqueryExport()) { + if (!getBigqueryExport().equals(other.getBigqueryExport())) 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 (hasBigqueryExport()) { + hash = (37 * hash) + BIGQUERY_EXPORT_FIELD_NUMBER; + hash = (53 * hash) + getBigqueryExport().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions 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.dataplex.v1.DataQualitySpec.PostScanActions parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions 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.dataplex.v1.DataQualitySpec.PostScanActions parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions 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.dataplex.v1.DataQualitySpec.PostScanActions parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions 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.dataplex.v1.DataQualitySpec.PostScanActions parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions 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.dataplex.v1.DataQualitySpec.PostScanActions 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 configuration of post scan actions of DataQualityScan.
+     * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DataQualitySpec.PostScanActions} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.DataQualitySpec.PostScanActions) + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActionsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataQualityProto + .internal_static_google_cloud_dataplex_v1_DataQualitySpec_PostScanActions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataQualityProto + .internal_static_google_cloud_dataplex_v1_DataQualitySpec_PostScanActions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.class, + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Builder.class); + } + + // Construct using com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + bigqueryExport_ = null; + if (bigqueryExportBuilder_ != null) { + bigqueryExportBuilder_.dispose(); + bigqueryExportBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.DataQualityProto + .internal_static_google_cloud_dataplex_v1_DataQualitySpec_PostScanActions_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions + getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions build() { + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions buildPartial() { + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions result = + new com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.bigqueryExport_ = + bigqueryExportBuilder_ == null ? bigqueryExport_ : bigqueryExportBuilder_.build(); + } + } + + @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.dataplex.v1.DataQualitySpec.PostScanActions) { + return mergeFrom((com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions other) { + if (other + == com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.getDefaultInstance()) + return this; + if (other.hasBigqueryExport()) { + mergeBigqueryExport(other.getBigqueryExport()); + } + 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( + getBigqueryExportFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + 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 int bitField0_; + + private com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + bigqueryExport_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport, + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport.Builder, + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExportOrBuilder> + bigqueryExportBuilder_; + /** + * + * + *
+       * Optional. If set, results will be exported to the provided BigQuery
+       * table.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the bigqueryExport field is set. + */ + public boolean hasBigqueryExport() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * Optional. If set, results will be exported to the provided BigQuery
+       * table.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The bigqueryExport. + */ + public com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + getBigqueryExport() { + if (bigqueryExportBuilder_ == null) { + return bigqueryExport_ == null + ? com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + .getDefaultInstance() + : bigqueryExport_; + } else { + return bigqueryExportBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Optional. If set, results will be exported to the provided BigQuery
+       * table.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setBigqueryExport( + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport value) { + if (bigqueryExportBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + bigqueryExport_ = value; + } else { + bigqueryExportBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. If set, results will be exported to the provided BigQuery
+       * table.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setBigqueryExport( + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport.Builder + builderForValue) { + if (bigqueryExportBuilder_ == null) { + bigqueryExport_ = builderForValue.build(); + } else { + bigqueryExportBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. If set, results will be exported to the provided BigQuery
+       * table.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeBigqueryExport( + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport value) { + if (bigqueryExportBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && bigqueryExport_ != null + && bigqueryExport_ + != com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + .getDefaultInstance()) { + getBigqueryExportBuilder().mergeFrom(value); + } else { + bigqueryExport_ = value; + } + } else { + bigqueryExportBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. If set, results will be exported to the provided BigQuery
+       * table.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearBigqueryExport() { + bitField0_ = (bitField0_ & ~0x00000001); + bigqueryExport_ = null; + if (bigqueryExportBuilder_ != null) { + bigqueryExportBuilder_.dispose(); + bigqueryExportBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. If set, results will be exported to the provided BigQuery
+       * table.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport.Builder + getBigqueryExportBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getBigqueryExportFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Optional. If set, results will be exported to the provided BigQuery
+       * table.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExportOrBuilder + getBigqueryExportOrBuilder() { + if (bigqueryExportBuilder_ != null) { + return bigqueryExportBuilder_.getMessageOrBuilder(); + } else { + return bigqueryExport_ == null + ? com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + .getDefaultInstance() + : bigqueryExport_; + } + } + /** + * + * + *
+       * Optional. If set, results will be exported to the provided BigQuery
+       * table.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport bigquery_export = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport, + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport.Builder, + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExportOrBuilder> + getBigqueryExportFieldBuilder() { + if (bigqueryExportBuilder_ == null) { + bigqueryExportBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport, + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.BigQueryExport + .Builder, + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions + .BigQueryExportOrBuilder>( + getBigqueryExport(), getParentForChildren(), isClean()); + bigqueryExport_ = null; + } + return bigqueryExportBuilder_; + } + + @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.dataplex.v1.DataQualitySpec.PostScanActions) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.DataQualitySpec.PostScanActions) + private static final com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions(); + } + + public static com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PostScanActions 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.dataplex.v1.DataQualitySpec.PostScanActions + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + public static final int RULES_FIELD_NUMBER = 1; @SuppressWarnings("serial") - private java.util.List rules_; + private java.util.List rules_; + /** + * + * + *
+   * Required. The list of rules to evaluate against a data source. At least one
+   * rule is required.
+   * 
+ * + * + * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getRulesList() { + return rules_; + } + /** + * + * + *
+   * Required. The list of rules to evaluate against a data source. At least one
+   * rule is required.
+   * 
+ * + * + * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getRulesOrBuilderList() { + return rules_; + } + /** + * + * + *
+   * Required. The list of rules to evaluate against a data source. At least one
+   * rule is required.
+   * 
+ * + * + * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getRulesCount() { + return rules_.size(); + } + /** + * + * + *
+   * Required. The list of rules to evaluate against a data source. At least one
+   * rule is required.
+   * 
+ * + * + * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataQualityRule getRules(int index) { + return rules_.get(index); + } + /** + * + * + *
+   * Required. The list of rules to evaluate against a data source. At least one
+   * rule is required.
+   * 
+ * + * + * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataQualityRuleOrBuilder getRulesOrBuilder(int index) { + return rules_.get(index); + } + + public static final int SAMPLING_PERCENT_FIELD_NUMBER = 4; + private float samplingPercent_ = 0F; + /** + * + * + *
+   * Optional. The percentage of the records to be selected from the dataset for
+   * DataScan.
+   *
+   * * Value can range between 0.0 and 100.0 with up to 3 significant decimal
+   * digits.
+   * * Sampling is not applied if `sampling_percent` is not specified, 0 or
+   * 100.
+   * 
+ * + * float sampling_percent = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The samplingPercent. + */ + @java.lang.Override + public float getSamplingPercent() { + return samplingPercent_; + } + + public static final int ROW_FILTER_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object rowFilter_ = ""; /** * * *
-   * The list of rules to evaluate against a data source. At least one rule is
-   * required.
+   * Optional. A filter applied to all rows in a single DataScan job.
+   * The filter needs to be a valid SQL expression for a WHERE clause in
+   * BigQuery standard SQL syntax.
+   * Example: col1 >= 0 AND col2 < 10
    * 
* - * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1; + * string row_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The rowFilter. */ @java.lang.Override - public java.util.List getRulesList() { - return rules_; + public java.lang.String getRowFilter() { + java.lang.Object ref = rowFilter_; + 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(); + rowFilter_ = s; + return s; + } } /** * * *
-   * The list of rules to evaluate against a data source. At least one rule is
-   * required.
+   * Optional. A filter applied to all rows in a single DataScan job.
+   * The filter needs to be a valid SQL expression for a WHERE clause in
+   * BigQuery standard SQL syntax.
+   * Example: col1 >= 0 AND col2 < 10
    * 
* - * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1; + * string row_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for rowFilter. */ @java.lang.Override - public java.util.List - getRulesOrBuilderList() { - return rules_; + public com.google.protobuf.ByteString getRowFilterBytes() { + java.lang.Object ref = rowFilter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rowFilter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } + + public static final int POST_SCAN_ACTIONS_FIELD_NUMBER = 6; + private com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions postScanActions_; /** * * *
-   * The list of rules to evaluate against a data source. At least one rule is
-   * required.
+   * Optional. Actions to take upon job completion.
    * 
* - * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1; + * + * .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions post_scan_actions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the postScanActions field is set. */ @java.lang.Override - public int getRulesCount() { - return rules_.size(); + public boolean hasPostScanActions() { + return postScanActions_ != null; } /** * * *
-   * The list of rules to evaluate against a data source. At least one rule is
-   * required.
+   * Optional. Actions to take upon job completion.
    * 
* - * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1; + * + * .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions post_scan_actions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The postScanActions. */ @java.lang.Override - public com.google.cloud.dataplex.v1.DataQualityRule getRules(int index) { - return rules_.get(index); + public com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions getPostScanActions() { + return postScanActions_ == null + ? com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.getDefaultInstance() + : postScanActions_; } /** * * *
-   * The list of rules to evaluate against a data source. At least one rule is
-   * required.
+   * Optional. Actions to take upon job completion.
    * 
* - * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1; + * + * .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions post_scan_actions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override - public com.google.cloud.dataplex.v1.DataQualityRuleOrBuilder getRulesOrBuilder(int index) { - return rules_.get(index); + public com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActionsOrBuilder + getPostScanActionsOrBuilder() { + return postScanActions_ == null + ? com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.getDefaultInstance() + : postScanActions_; } private byte memoizedIsInitialized = -1; @@ -155,6 +1818,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < rules_.size(); i++) { output.writeMessage(1, rules_.get(i)); } + if (java.lang.Float.floatToRawIntBits(samplingPercent_) != 0) { + output.writeFloat(4, samplingPercent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rowFilter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, rowFilter_); + } + if (postScanActions_ != null) { + output.writeMessage(6, getPostScanActions()); + } getUnknownFields().writeTo(output); } @@ -167,6 +1839,15 @@ public int getSerializedSize() { for (int i = 0; i < rules_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, rules_.get(i)); } + if (java.lang.Float.floatToRawIntBits(samplingPercent_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, samplingPercent_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rowFilter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, rowFilter_); + } + if (postScanActions_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getPostScanActions()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -184,6 +1865,13 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.dataplex.v1.DataQualitySpec) obj; if (!getRulesList().equals(other.getRulesList())) return false; + if (java.lang.Float.floatToIntBits(getSamplingPercent()) + != java.lang.Float.floatToIntBits(other.getSamplingPercent())) return false; + if (!getRowFilter().equals(other.getRowFilter())) return false; + if (hasPostScanActions() != other.hasPostScanActions()) return false; + if (hasPostScanActions()) { + if (!getPostScanActions().equals(other.getPostScanActions())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -199,6 +1887,14 @@ public int hashCode() { hash = (37 * hash) + RULES_FIELD_NUMBER; hash = (53 * hash) + getRulesList().hashCode(); } + hash = (37 * hash) + SAMPLING_PERCENT_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getSamplingPercent()); + hash = (37 * hash) + ROW_FILTER_FIELD_NUMBER; + hash = (53 * hash) + getRowFilter().hashCode(); + if (hasPostScanActions()) { + hash = (37 * hash) + POST_SCAN_ACTIONS_FIELD_NUMBER; + hash = (53 * hash) + getPostScanActions().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -345,6 +2041,13 @@ public Builder clear() { rulesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); + samplingPercent_ = 0F; + rowFilter_ = ""; + postScanActions_ = null; + if (postScanActionsBuilder_ != null) { + postScanActionsBuilder_.dispose(); + postScanActionsBuilder_ = null; + } return this; } @@ -394,6 +2097,16 @@ private void buildPartialRepeatedFields(com.google.cloud.dataplex.v1.DataQuality private void buildPartial0(com.google.cloud.dataplex.v1.DataQualitySpec result) { int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.samplingPercent_ = samplingPercent_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.rowFilter_ = rowFilter_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.postScanActions_ = + postScanActionsBuilder_ == null ? postScanActions_ : postScanActionsBuilder_.build(); + } } @java.lang.Override @@ -468,6 +2181,17 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.DataQualitySpec other) { } } } + if (other.getSamplingPercent() != 0F) { + setSamplingPercent(other.getSamplingPercent()); + } + if (!other.getRowFilter().isEmpty()) { + rowFilter_ = other.rowFilter_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasPostScanActions()) { + mergePostScanActions(other.getPostScanActions()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -507,6 +2231,24 @@ public Builder mergeFrom( } break; } // case 10 + case 37: + { + samplingPercent_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 37 + case 42: + { + rowFilter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 42 + case 50: + { + input.readMessage(getPostScanActionsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 50 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -546,11 +2288,13 @@ private void ensureRulesIsMutable() { * * *
-     * The list of rules to evaluate against a data source. At least one rule is
-     * required.
+     * Required. The list of rules to evaluate against a data source. At least one
+     * rule is required.
      * 
* - * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1; + * + * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public java.util.List getRulesList() { if (rulesBuilder_ == null) { @@ -563,11 +2307,13 @@ public java.util.List getRulesList * * *
-     * The list of rules to evaluate against a data source. At least one rule is
-     * required.
+     * Required. The list of rules to evaluate against a data source. At least one
+     * rule is required.
      * 
* - * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1; + * + * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public int getRulesCount() { if (rulesBuilder_ == null) { @@ -580,11 +2326,13 @@ public int getRulesCount() { * * *
-     * The list of rules to evaluate against a data source. At least one rule is
-     * required.
+     * Required. The list of rules to evaluate against a data source. At least one
+     * rule is required.
      * 
* - * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1; + * + * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.cloud.dataplex.v1.DataQualityRule getRules(int index) { if (rulesBuilder_ == null) { @@ -597,11 +2345,13 @@ public com.google.cloud.dataplex.v1.DataQualityRule getRules(int index) { * * *
-     * The list of rules to evaluate against a data source. At least one rule is
-     * required.
+     * Required. The list of rules to evaluate against a data source. At least one
+     * rule is required.
      * 
* - * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1; + * + * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder setRules(int index, com.google.cloud.dataplex.v1.DataQualityRule value) { if (rulesBuilder_ == null) { @@ -620,11 +2370,13 @@ public Builder setRules(int index, com.google.cloud.dataplex.v1.DataQualityRule * * *
-     * The list of rules to evaluate against a data source. At least one rule is
-     * required.
+     * Required. The list of rules to evaluate against a data source. At least one
+     * rule is required.
      * 
* - * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1; + * + * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder setRules( int index, com.google.cloud.dataplex.v1.DataQualityRule.Builder builderForValue) { @@ -641,11 +2393,13 @@ public Builder setRules( * * *
-     * The list of rules to evaluate against a data source. At least one rule is
-     * required.
+     * Required. The list of rules to evaluate against a data source. At least one
+     * rule is required.
      * 
* - * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1; + * + * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder addRules(com.google.cloud.dataplex.v1.DataQualityRule value) { if (rulesBuilder_ == null) { @@ -664,11 +2418,13 @@ public Builder addRules(com.google.cloud.dataplex.v1.DataQualityRule value) { * * *
-     * The list of rules to evaluate against a data source. At least one rule is
-     * required.
+     * Required. The list of rules to evaluate against a data source. At least one
+     * rule is required.
      * 
* - * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1; + * + * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder addRules(int index, com.google.cloud.dataplex.v1.DataQualityRule value) { if (rulesBuilder_ == null) { @@ -687,11 +2443,13 @@ public Builder addRules(int index, com.google.cloud.dataplex.v1.DataQualityRule * * *
-     * The list of rules to evaluate against a data source. At least one rule is
-     * required.
+     * Required. The list of rules to evaluate against a data source. At least one
+     * rule is required.
      * 
* - * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1; + * + * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder addRules(com.google.cloud.dataplex.v1.DataQualityRule.Builder builderForValue) { if (rulesBuilder_ == null) { @@ -707,11 +2465,13 @@ public Builder addRules(com.google.cloud.dataplex.v1.DataQualityRule.Builder bui * * *
-     * The list of rules to evaluate against a data source. At least one rule is
-     * required.
+     * Required. The list of rules to evaluate against a data source. At least one
+     * rule is required.
      * 
* - * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1; + * + * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder addRules( int index, com.google.cloud.dataplex.v1.DataQualityRule.Builder builderForValue) { @@ -728,11 +2488,13 @@ public Builder addRules( * * *
-     * The list of rules to evaluate against a data source. At least one rule is
-     * required.
+     * Required. The list of rules to evaluate against a data source. At least one
+     * rule is required.
      * 
* - * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1; + * + * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder addAllRules( java.lang.Iterable values) { @@ -749,11 +2511,13 @@ public Builder addAllRules( * * *
-     * The list of rules to evaluate against a data source. At least one rule is
-     * required.
+     * Required. The list of rules to evaluate against a data source. At least one
+     * rule is required.
      * 
* - * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1; + * + * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder clearRules() { if (rulesBuilder_ == null) { @@ -769,11 +2533,13 @@ public Builder clearRules() { * * *
-     * The list of rules to evaluate against a data source. At least one rule is
-     * required.
+     * Required. The list of rules to evaluate against a data source. At least one
+     * rule is required.
      * 
* - * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1; + * + * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public Builder removeRules(int index) { if (rulesBuilder_ == null) { @@ -789,11 +2555,13 @@ public Builder removeRules(int index) { * * *
-     * The list of rules to evaluate against a data source. At least one rule is
-     * required.
+     * Required. The list of rules to evaluate against a data source. At least one
+     * rule is required.
      * 
* - * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1; + * + * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.cloud.dataplex.v1.DataQualityRule.Builder getRulesBuilder(int index) { return getRulesFieldBuilder().getBuilder(index); @@ -802,11 +2570,13 @@ public com.google.cloud.dataplex.v1.DataQualityRule.Builder getRulesBuilder(int * * *
-     * The list of rules to evaluate against a data source. At least one rule is
-     * required.
+     * Required. The list of rules to evaluate against a data source. At least one
+     * rule is required.
      * 
* - * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1; + * + * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.cloud.dataplex.v1.DataQualityRuleOrBuilder getRulesOrBuilder(int index) { if (rulesBuilder_ == null) { @@ -819,11 +2589,13 @@ public com.google.cloud.dataplex.v1.DataQualityRuleOrBuilder getRulesOrBuilder(i * * *
-     * The list of rules to evaluate against a data source. At least one rule is
-     * required.
+     * Required. The list of rules to evaluate against a data source. At least one
+     * rule is required.
      * 
* - * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1; + * + * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public java.util.List getRulesOrBuilderList() { @@ -837,11 +2609,13 @@ public com.google.cloud.dataplex.v1.DataQualityRuleOrBuilder getRulesOrBuilder(i * * *
-     * The list of rules to evaluate against a data source. At least one rule is
-     * required.
+     * Required. The list of rules to evaluate against a data source. At least one
+     * rule is required.
      * 
* - * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1; + * + * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.cloud.dataplex.v1.DataQualityRule.Builder addRulesBuilder() { return getRulesFieldBuilder() @@ -851,11 +2625,13 @@ public com.google.cloud.dataplex.v1.DataQualityRule.Builder addRulesBuilder() { * * *
-     * The list of rules to evaluate against a data source. At least one rule is
-     * required.
+     * Required. The list of rules to evaluate against a data source. At least one
+     * rule is required.
      * 
* - * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1; + * + * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public com.google.cloud.dataplex.v1.DataQualityRule.Builder addRulesBuilder(int index) { return getRulesFieldBuilder() @@ -865,11 +2641,13 @@ public com.google.cloud.dataplex.v1.DataQualityRule.Builder addRulesBuilder(int * * *
-     * The list of rules to evaluate against a data source. At least one rule is
-     * required.
+     * Required. The list of rules to evaluate against a data source. At least one
+     * rule is required.
      * 
* - * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1; + * + * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ public java.util.List getRulesBuilderList() { @@ -893,6 +2671,406 @@ public com.google.cloud.dataplex.v1.DataQualityRule.Builder addRulesBuilder(int return rulesBuilder_; } + private float samplingPercent_; + /** + * + * + *
+     * Optional. The percentage of the records to be selected from the dataset for
+     * DataScan.
+     *
+     * * Value can range between 0.0 and 100.0 with up to 3 significant decimal
+     * digits.
+     * * Sampling is not applied if `sampling_percent` is not specified, 0 or
+     * 100.
+     * 
+ * + * float sampling_percent = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The samplingPercent. + */ + @java.lang.Override + public float getSamplingPercent() { + return samplingPercent_; + } + /** + * + * + *
+     * Optional. The percentage of the records to be selected from the dataset for
+     * DataScan.
+     *
+     * * Value can range between 0.0 and 100.0 with up to 3 significant decimal
+     * digits.
+     * * Sampling is not applied if `sampling_percent` is not specified, 0 or
+     * 100.
+     * 
+ * + * float sampling_percent = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The samplingPercent to set. + * @return This builder for chaining. + */ + public Builder setSamplingPercent(float value) { + + samplingPercent_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The percentage of the records to be selected from the dataset for
+     * DataScan.
+     *
+     * * Value can range between 0.0 and 100.0 with up to 3 significant decimal
+     * digits.
+     * * Sampling is not applied if `sampling_percent` is not specified, 0 or
+     * 100.
+     * 
+ * + * float sampling_percent = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearSamplingPercent() { + bitField0_ = (bitField0_ & ~0x00000002); + samplingPercent_ = 0F; + onChanged(); + return this; + } + + private java.lang.Object rowFilter_ = ""; + /** + * + * + *
+     * Optional. A filter applied to all rows in a single DataScan job.
+     * The filter needs to be a valid SQL expression for a WHERE clause in
+     * BigQuery standard SQL syntax.
+     * Example: col1 >= 0 AND col2 < 10
+     * 
+ * + * string row_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The rowFilter. + */ + public java.lang.String getRowFilter() { + java.lang.Object ref = rowFilter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rowFilter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A filter applied to all rows in a single DataScan job.
+     * The filter needs to be a valid SQL expression for a WHERE clause in
+     * BigQuery standard SQL syntax.
+     * Example: col1 >= 0 AND col2 < 10
+     * 
+ * + * string row_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for rowFilter. + */ + public com.google.protobuf.ByteString getRowFilterBytes() { + java.lang.Object ref = rowFilter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rowFilter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A filter applied to all rows in a single DataScan job.
+     * The filter needs to be a valid SQL expression for a WHERE clause in
+     * BigQuery standard SQL syntax.
+     * Example: col1 >= 0 AND col2 < 10
+     * 
+ * + * string row_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The rowFilter to set. + * @return This builder for chaining. + */ + public Builder setRowFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + rowFilter_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A filter applied to all rows in a single DataScan job.
+     * The filter needs to be a valid SQL expression for a WHERE clause in
+     * BigQuery standard SQL syntax.
+     * Example: col1 >= 0 AND col2 < 10
+     * 
+ * + * string row_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRowFilter() { + rowFilter_ = getDefaultInstance().getRowFilter(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A filter applied to all rows in a single DataScan job.
+     * The filter needs to be a valid SQL expression for a WHERE clause in
+     * BigQuery standard SQL syntax.
+     * Example: col1 >= 0 AND col2 < 10
+     * 
+ * + * string row_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for rowFilter to set. + * @return This builder for chaining. + */ + public Builder setRowFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + rowFilter_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions postScanActions_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions, + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Builder, + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActionsOrBuilder> + postScanActionsBuilder_; + /** + * + * + *
+     * Optional. Actions to take upon job completion.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions post_scan_actions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the postScanActions field is set. + */ + public boolean hasPostScanActions() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Optional. Actions to take upon job completion.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions post_scan_actions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The postScanActions. + */ + public com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions getPostScanActions() { + if (postScanActionsBuilder_ == null) { + return postScanActions_ == null + ? com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.getDefaultInstance() + : postScanActions_; + } else { + return postScanActionsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Actions to take upon job completion.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions post_scan_actions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPostScanActions( + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions value) { + if (postScanActionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + postScanActions_ = value; + } else { + postScanActionsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Actions to take upon job completion.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions post_scan_actions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPostScanActions( + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Builder builderForValue) { + if (postScanActionsBuilder_ == null) { + postScanActions_ = builderForValue.build(); + } else { + postScanActionsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Actions to take upon job completion.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions post_scan_actions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergePostScanActions( + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions value) { + if (postScanActionsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && postScanActions_ != null + && postScanActions_ + != com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions + .getDefaultInstance()) { + getPostScanActionsBuilder().mergeFrom(value); + } else { + postScanActions_ = value; + } + } else { + postScanActionsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Actions to take upon job completion.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions post_scan_actions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPostScanActions() { + bitField0_ = (bitField0_ & ~0x00000008); + postScanActions_ = null; + if (postScanActionsBuilder_ != null) { + postScanActionsBuilder_.dispose(); + postScanActionsBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Actions to take upon job completion.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions post_scan_actions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Builder + getPostScanActionsBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getPostScanActionsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Actions to take upon job completion.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions post_scan_actions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActionsOrBuilder + getPostScanActionsOrBuilder() { + if (postScanActionsBuilder_ != null) { + return postScanActionsBuilder_.getMessageOrBuilder(); + } else { + return postScanActions_ == null + ? com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.getDefaultInstance() + : postScanActions_; + } + } + /** + * + * + *
+     * Optional. Actions to take upon job completion.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions post_scan_actions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions, + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Builder, + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActionsOrBuilder> + getPostScanActionsFieldBuilder() { + if (postScanActionsBuilder_ == null) { + postScanActionsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions, + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions.Builder, + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActionsOrBuilder>( + getPostScanActions(), getParentForChildren(), isClean()); + postScanActions_ = null; + } + return postScanActionsBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualitySpecOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualitySpecOrBuilder.java index 8870e00ee2ba..5ccb8c3737b2 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualitySpecOrBuilder.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataQualitySpecOrBuilder.java @@ -27,44 +27,52 @@ public interface DataQualitySpecOrBuilder * * *
-   * The list of rules to evaluate against a data source. At least one rule is
-   * required.
+   * Required. The list of rules to evaluate against a data source. At least one
+   * rule is required.
    * 
* - * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1; + * + * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ java.util.List getRulesList(); /** * * *
-   * The list of rules to evaluate against a data source. At least one rule is
-   * required.
+   * Required. The list of rules to evaluate against a data source. At least one
+   * rule is required.
    * 
* - * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1; + * + * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ com.google.cloud.dataplex.v1.DataQualityRule getRules(int index); /** * * *
-   * The list of rules to evaluate against a data source. At least one rule is
-   * required.
+   * Required. The list of rules to evaluate against a data source. At least one
+   * rule is required.
    * 
* - * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1; + * + * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ int getRulesCount(); /** * * *
-   * The list of rules to evaluate against a data source. At least one rule is
-   * required.
+   * Required. The list of rules to evaluate against a data source. At least one
+   * rule is required.
    * 
* - * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1; + * + * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ java.util.List getRulesOrBuilderList(); @@ -72,11 +80,105 @@ public interface DataQualitySpecOrBuilder * * *
-   * The list of rules to evaluate against a data source. At least one rule is
-   * required.
+   * Required. The list of rules to evaluate against a data source. At least one
+   * rule is required.
    * 
* - * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1; + * + * repeated .google.cloud.dataplex.v1.DataQualityRule rules = 1 [(.google.api.field_behavior) = REQUIRED]; + * */ com.google.cloud.dataplex.v1.DataQualityRuleOrBuilder getRulesOrBuilder(int index); + + /** + * + * + *
+   * Optional. The percentage of the records to be selected from the dataset for
+   * DataScan.
+   *
+   * * Value can range between 0.0 and 100.0 with up to 3 significant decimal
+   * digits.
+   * * Sampling is not applied if `sampling_percent` is not specified, 0 or
+   * 100.
+   * 
+ * + * float sampling_percent = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The samplingPercent. + */ + float getSamplingPercent(); + + /** + * + * + *
+   * Optional. A filter applied to all rows in a single DataScan job.
+   * The filter needs to be a valid SQL expression for a WHERE clause in
+   * BigQuery standard SQL syntax.
+   * Example: col1 >= 0 AND col2 < 10
+   * 
+ * + * string row_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The rowFilter. + */ + java.lang.String getRowFilter(); + /** + * + * + *
+   * Optional. A filter applied to all rows in a single DataScan job.
+   * The filter needs to be a valid SQL expression for a WHERE clause in
+   * BigQuery standard SQL syntax.
+   * Example: col1 >= 0 AND col2 < 10
+   * 
+ * + * string row_filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for rowFilter. + */ + com.google.protobuf.ByteString getRowFilterBytes(); + + /** + * + * + *
+   * Optional. Actions to take upon job completion.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions post_scan_actions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the postScanActions field is set. + */ + boolean hasPostScanActions(); + /** + * + * + *
+   * Optional. Actions to take upon job completion.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions post_scan_actions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The postScanActions. + */ + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActions getPostScanActions(); + /** + * + * + *
+   * Optional. Actions to take upon job completion.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataQualitySpec.PostScanActions post_scan_actions = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.dataplex.v1.DataQualitySpec.PostScanActionsOrBuilder + getPostScanActionsOrBuilder(); } diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataScanEvent.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataScanEvent.java index 3722bcf2a231..a1342dfe80cd 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataScanEvent.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataScanEvent.java @@ -24,6 +24,7 @@ *
  * These messages contain information about the execution of a datascan.
  * The monitored resource is 'DataScan'
+ * Next ID: 13
  * 
* * Protobuf type {@code google.cloud.dataplex.v1.DataScanEvent} @@ -251,7 +252,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Data scan started.
+     * Data scan job started.
      * 
* * STARTED = 1; @@ -261,7 +262,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Data scan successfully completed.
+     * Data scan job successfully completed.
      * 
* * SUCCEEDED = 2; @@ -271,7 +272,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Data scan was unsuccessful.
+     * Data scan job was unsuccessful.
      * 
* * FAILED = 3; @@ -281,12 +282,22 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Data scan was cancelled.
+     * Data scan job was cancelled.
      * 
* * CANCELLED = 4; */ CANCELLED(4), + /** + * + * + *
+     * Data scan job was createed.
+     * 
+ * + * CREATED = 5; + */ + CREATED(5), UNRECOGNIZED(-1), ; @@ -304,7 +315,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Data scan started.
+     * Data scan job started.
      * 
* * STARTED = 1; @@ -314,7 +325,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Data scan successfully completed.
+     * Data scan job successfully completed.
      * 
* * SUCCEEDED = 2; @@ -324,7 +335,7 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Data scan was unsuccessful.
+     * Data scan job was unsuccessful.
      * 
* * FAILED = 3; @@ -334,12 +345,22 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * Data scan was cancelled.
+     * Data scan job was cancelled.
      * 
* * CANCELLED = 4; */ public static final int CANCELLED_VALUE = 4; + /** + * + * + *
+     * Data scan job was createed.
+     * 
+ * + * CREATED = 5; + */ + public static final int CREATED_VALUE = 5; public final int getNumber() { if (this == UNRECOGNIZED) { @@ -375,6 +396,8 @@ public static State forNumber(int value) { return FAILED; case 4: return CANCELLED; + case 5: + return CREATED; default: return null; } @@ -2378,1333 +2401,5744 @@ public com.google.protobuf.Parser getParserForType() { } } - private int resultCase_ = 0; - - @SuppressWarnings("serial") - private java.lang.Object result_; - - public enum ResultCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - DATA_PROFILE(101), - DATA_QUALITY(102), - RESULT_NOT_SET(0); - private final int value; + public interface DataProfileAppliedConfigsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs) + com.google.protobuf.MessageOrBuilder { - private ResultCase(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. + * + * + *
+     * The percentage of the records selected from the dataset for DataScan.
+     *
+     * * Value ranges between 0.0 and 100.0.
+     * * Value 0.0 or 100.0 imply that sampling was not applied.
+     * 
+ * + * float sampling_percent = 1; + * + * @return The samplingPercent. */ - @java.lang.Deprecated - public static ResultCase valueOf(int value) { - return forNumber(value); - } - - public static ResultCase forNumber(int value) { - switch (value) { - case 101: - return DATA_PROFILE; - case 102: - return DATA_QUALITY; - case 0: - return RESULT_NOT_SET; - default: - return null; - } - } + float getSamplingPercent(); - public int getNumber() { - return this.value; - } - }; + /** + * + * + *
+     * Boolean indicating whether a row filter was applied in the DataScan job.
+     * 
+ * + * bool row_filter_applied = 2; + * + * @return The rowFilterApplied. + */ + boolean getRowFilterApplied(); - public ResultCase getResultCase() { - return ResultCase.forNumber(resultCase_); + /** + * + * + *
+     * Boolean indicating whether a column filter was applied in the DataScan
+     * job.
+     * 
+ * + * bool column_filter_applied = 3; + * + * @return The columnFilterApplied. + */ + boolean getColumnFilterApplied(); } - - public static final int DATA_SOURCE_FIELD_NUMBER = 1; - - @SuppressWarnings("serial") - private volatile java.lang.Object dataSource_ = ""; /** * * *
-   * The data source of the data scan
+   * Applied configs for data profile type data scan job.
    * 
* - * string data_source = 1; - * - * @return The dataSource. + * Protobuf type {@code google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs} */ - @java.lang.Override - public java.lang.String getDataSource() { - java.lang.Object ref = dataSource_; - 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(); - dataSource_ = s; - return s; + public static final class DataProfileAppliedConfigs extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs) + DataProfileAppliedConfigsOrBuilder { + private static final long serialVersionUID = 0L; + // Use DataProfileAppliedConfigs.newBuilder() to construct. + private DataProfileAppliedConfigs(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - } - /** - * - * - *
-   * The data source of the data scan
-   * 
- * - * string data_source = 1; - * - * @return The bytes for dataSource. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDataSourceBytes() { - java.lang.Object ref = dataSource_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - dataSource_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + + private DataProfileAppliedConfigs() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DataProfileAppliedConfigs(); } - } - public static final int JOB_ID_FIELD_NUMBER = 2; + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.LogsProto + .internal_static_google_cloud_dataplex_v1_DataScanEvent_DataProfileAppliedConfigs_descriptor; + } - @SuppressWarnings("serial") - private volatile java.lang.Object jobId_ = ""; - /** - * - * - *
-   * The identifier of the specific data scan job this log entry is for.
-   * 
- * - * string job_id = 2; - * - * @return The jobId. - */ - @java.lang.Override - public java.lang.String getJobId() { - java.lang.Object ref = jobId_; - 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(); - jobId_ = s; - return s; + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.LogsProto + .internal_static_google_cloud_dataplex_v1_DataScanEvent_DataProfileAppliedConfigs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs.class, + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs.Builder.class); } - } - /** - * - * - *
-   * The identifier of the specific data scan job this log entry is for.
-   * 
- * - * string job_id = 2; - * - * @return The bytes for jobId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getJobIdBytes() { - java.lang.Object ref = jobId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - jobId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + + public static final int SAMPLING_PERCENT_FIELD_NUMBER = 1; + private float samplingPercent_ = 0F; + /** + * + * + *
+     * The percentage of the records selected from the dataset for DataScan.
+     *
+     * * Value ranges between 0.0 and 100.0.
+     * * Value 0.0 or 100.0 imply that sampling was not applied.
+     * 
+ * + * float sampling_percent = 1; + * + * @return The samplingPercent. + */ + @java.lang.Override + public float getSamplingPercent() { + return samplingPercent_; } - } - public static final int START_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp startTime_; - /** - * - * - *
-   * The time when the data scan job started to run.
-   * 
- * - * .google.protobuf.Timestamp start_time = 3; - * - * @return Whether the startTime field is set. - */ - @java.lang.Override - public boolean hasStartTime() { - return startTime_ != null; - } - /** - * - * - *
-   * The time when the data scan job started to run.
-   * 
- * - * .google.protobuf.Timestamp start_time = 3; - * - * @return The startTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getStartTime() { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - /** - * - * - *
-   * The time when the data scan job started to run.
-   * 
- * - * .google.protobuf.Timestamp start_time = 3; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } + public static final int ROW_FILTER_APPLIED_FIELD_NUMBER = 2; + private boolean rowFilterApplied_ = false; + /** + * + * + *
+     * Boolean indicating whether a row filter was applied in the DataScan job.
+     * 
+ * + * bool row_filter_applied = 2; + * + * @return The rowFilterApplied. + */ + @java.lang.Override + public boolean getRowFilterApplied() { + return rowFilterApplied_; + } - public static final int END_TIME_FIELD_NUMBER = 4; - private com.google.protobuf.Timestamp endTime_; - /** - * - * - *
-   * The time when the data scan job finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 4; - * - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - * - * - *
-   * The time when the data scan job finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 4; - * - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - * - * - *
-   * The time when the data scan job finished.
-   * 
- * - * .google.protobuf.Timestamp end_time = 4; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - - public static final int TYPE_FIELD_NUMBER = 5; - private int type_ = 0; - /** - * - * - *
-   * The type of the data scan.
-   * 
- * - * .google.cloud.dataplex.v1.DataScanEvent.ScanType type = 5; - * - * @return The enum numeric value on the wire for type. - */ - @java.lang.Override - public int getTypeValue() { - return type_; - } - /** - * - * - *
-   * The type of the data scan.
-   * 
- * - * .google.cloud.dataplex.v1.DataScanEvent.ScanType type = 5; - * - * @return The type. - */ - @java.lang.Override - public com.google.cloud.dataplex.v1.DataScanEvent.ScanType getType() { - com.google.cloud.dataplex.v1.DataScanEvent.ScanType result = - com.google.cloud.dataplex.v1.DataScanEvent.ScanType.forNumber(type_); - return result == null - ? com.google.cloud.dataplex.v1.DataScanEvent.ScanType.UNRECOGNIZED - : result; - } + public static final int COLUMN_FILTER_APPLIED_FIELD_NUMBER = 3; + private boolean columnFilterApplied_ = false; + /** + * + * + *
+     * Boolean indicating whether a column filter was applied in the DataScan
+     * job.
+     * 
+ * + * bool column_filter_applied = 3; + * + * @return The columnFilterApplied. + */ + @java.lang.Override + public boolean getColumnFilterApplied() { + return columnFilterApplied_; + } - public static final int STATE_FIELD_NUMBER = 6; - private int state_ = 0; - /** - * - * - *
-   * The status of the data scan job.
-   * 
- * - * .google.cloud.dataplex.v1.DataScanEvent.State state = 6; - * - * @return The enum numeric value on the wire for state. - */ - @java.lang.Override - public int getStateValue() { - return state_; - } - /** - * - * - *
-   * The status of the data scan job.
-   * 
- * - * .google.cloud.dataplex.v1.DataScanEvent.State state = 6; - * - * @return The state. - */ - @java.lang.Override - public com.google.cloud.dataplex.v1.DataScanEvent.State getState() { - com.google.cloud.dataplex.v1.DataScanEvent.State result = - com.google.cloud.dataplex.v1.DataScanEvent.State.forNumber(state_); - return result == null ? com.google.cloud.dataplex.v1.DataScanEvent.State.UNRECOGNIZED : result; - } + private byte memoizedIsInitialized = -1; - public static final int MESSAGE_FIELD_NUMBER = 7; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; - @SuppressWarnings("serial") - private volatile java.lang.Object message_ = ""; - /** - * - * - *
-   * The message describing the data scan job event.
-   * 
- * - * string message = 7; - * - * @return The message. - */ - @java.lang.Override - public java.lang.String getMessage() { - java.lang.Object ref = message_; - 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(); - message_ = s; - return s; + memoizedIsInitialized = 1; + return true; } - } - /** - * - * - *
-   * The message describing the data scan job event.
-   * 
- * - * string message = 7; - * - * @return The bytes for message. - */ - @java.lang.Override - public com.google.protobuf.ByteString getMessageBytes() { - java.lang.Object ref = message_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - message_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(samplingPercent_) != 0) { + output.writeFloat(1, samplingPercent_); + } + if (rowFilterApplied_ != false) { + output.writeBool(2, rowFilterApplied_); + } + if (columnFilterApplied_ != false) { + output.writeBool(3, columnFilterApplied_); + } + getUnknownFields().writeTo(output); } - } - public static final int SPEC_VERSION_FIELD_NUMBER = 8; + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; - @SuppressWarnings("serial") - private volatile java.lang.Object specVersion_ = ""; - /** - * - * - *
-   * A version identifier of the spec which was used to execute this job.
-   * 
- * - * string spec_version = 8; - * - * @return The specVersion. - */ - @java.lang.Override - public java.lang.String getSpecVersion() { - java.lang.Object ref = specVersion_; - 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(); - specVersion_ = s; - return s; + size = 0; + if (java.lang.Float.floatToRawIntBits(samplingPercent_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, samplingPercent_); + } + if (rowFilterApplied_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, rowFilterApplied_); + } + if (columnFilterApplied_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, columnFilterApplied_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; } - } - /** - * - * - *
-   * A version identifier of the spec which was used to execute this job.
-   * 
- * - * string spec_version = 8; - * - * @return The bytes for specVersion. - */ - @java.lang.Override - public com.google.protobuf.ByteString getSpecVersionBytes() { - java.lang.Object ref = specVersion_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - specVersion_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs other = + (com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs) obj; + + if (java.lang.Float.floatToIntBits(getSamplingPercent()) + != java.lang.Float.floatToIntBits(other.getSamplingPercent())) return false; + if (getRowFilterApplied() != other.getRowFilterApplied()) return false; + if (getColumnFilterApplied() != other.getColumnFilterApplied()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - } - public static final int TRIGGER_FIELD_NUMBER = 9; - private int trigger_ = 0; - /** - * - * - *
-   * The trigger type of the data scan job.
-   * 
- * - * .google.cloud.dataplex.v1.DataScanEvent.Trigger trigger = 9; - * - * @return The enum numeric value on the wire for trigger. - */ - @java.lang.Override - public int getTriggerValue() { - return trigger_; - } - /** - * - * - *
-   * The trigger type of the data scan job.
-   * 
- * - * .google.cloud.dataplex.v1.DataScanEvent.Trigger trigger = 9; - * - * @return The trigger. - */ - @java.lang.Override - public com.google.cloud.dataplex.v1.DataScanEvent.Trigger getTrigger() { - com.google.cloud.dataplex.v1.DataScanEvent.Trigger result = - com.google.cloud.dataplex.v1.DataScanEvent.Trigger.forNumber(trigger_); - return result == null - ? com.google.cloud.dataplex.v1.DataScanEvent.Trigger.UNRECOGNIZED - : result; - } + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SAMPLING_PERCENT_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getSamplingPercent()); + hash = (37 * hash) + ROW_FILTER_APPLIED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRowFilterApplied()); + hash = (37 * hash) + COLUMN_FILTER_APPLIED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getColumnFilterApplied()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } - public static final int SCOPE_FIELD_NUMBER = 10; - private int scope_ = 0; - /** - * - * - *
-   * The scope of the data scan (e.g. full, incremental).
-   * 
- * - * .google.cloud.dataplex.v1.DataScanEvent.Scope scope = 10; - * - * @return The enum numeric value on the wire for scope. - */ - @java.lang.Override - public int getScopeValue() { - return scope_; - } - /** - * - * - *
-   * The scope of the data scan (e.g. full, incremental).
-   * 
- * - * .google.cloud.dataplex.v1.DataScanEvent.Scope scope = 10; - * - * @return The scope. - */ - @java.lang.Override - public com.google.cloud.dataplex.v1.DataScanEvent.Scope getScope() { - com.google.cloud.dataplex.v1.DataScanEvent.Scope result = - com.google.cloud.dataplex.v1.DataScanEvent.Scope.forNumber(scope_); - return result == null ? com.google.cloud.dataplex.v1.DataScanEvent.Scope.UNRECOGNIZED : result; - } + public static com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } - public static final int DATA_PROFILE_FIELD_NUMBER = 101; - /** - * - * - *
-   * Data profile result for data profile type data scan.
-   * 
- * - * .google.cloud.dataplex.v1.DataScanEvent.DataProfileResult data_profile = 101; - * - * @return Whether the dataProfile field is set. - */ - @java.lang.Override - public boolean hasDataProfile() { - return resultCase_ == 101; - } - /** - * - * - *
-   * Data profile result for data profile type data scan.
-   * 
- * - * .google.cloud.dataplex.v1.DataScanEvent.DataProfileResult data_profile = 101; - * - * @return The dataProfile. - */ - @java.lang.Override - public com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult getDataProfile() { - if (resultCase_ == 101) { - return (com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult) result_; + public static com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - return com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.getDefaultInstance(); - } - /** - * - * - *
-   * Data profile result for data profile type data scan.
-   * 
- * - * .google.cloud.dataplex.v1.DataScanEvent.DataProfileResult data_profile = 101; - */ - @java.lang.Override - public com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResultOrBuilder - getDataProfileOrBuilder() { - if (resultCase_ == 101) { - return (com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult) result_; + + public static com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - return com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.getDefaultInstance(); - } - public static final int DATA_QUALITY_FIELD_NUMBER = 102; - /** - * - * - *
-   * Data quality result for data quality type data scan.
-   * 
- * - * .google.cloud.dataplex.v1.DataScanEvent.DataQualityResult data_quality = 102; - * - * @return Whether the dataQuality field is set. - */ - @java.lang.Override - public boolean hasDataQuality() { - return resultCase_ == 102; - } - /** - * - * - *
-   * Data quality result for data quality type data scan.
-   * 
- * - * .google.cloud.dataplex.v1.DataScanEvent.DataQualityResult data_quality = 102; - * - * @return The dataQuality. - */ - @java.lang.Override - public com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult getDataQuality() { - if (resultCase_ == 102) { - return (com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult) result_; + public static com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); } - return com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.getDefaultInstance(); - } - /** - * - * - *
-   * Data quality result for data quality type data scan.
-   * 
- * - * .google.cloud.dataplex.v1.DataScanEvent.DataQualityResult data_quality = 102; - */ - @java.lang.Override - public com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResultOrBuilder - getDataQualityOrBuilder() { - if (resultCase_ == 102) { - return (com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult) result_; + + public static com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); } - return com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.getDefaultInstance(); - } - private byte memoizedIsInitialized = -1; + public static com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; + public static com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } - memoizedIsInitialized = 1; - return true; - } + public static com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataSource_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataSource_); + public static com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, jobId_); + + public static com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); } - if (startTime_ != null) { - output.writeMessage(3, getStartTime()); + + public static com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - if (endTime_ != null) { - output.writeMessage(4, getEndTime()); + + public static com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); } - if (type_ - != com.google.cloud.dataplex.v1.DataScanEvent.ScanType.SCAN_TYPE_UNSPECIFIED.getNumber()) { - output.writeEnum(5, type_); + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); } - if (state_ != com.google.cloud.dataplex.v1.DataScanEvent.State.STATE_UNSPECIFIED.getNumber()) { - output.writeEnum(6, state_); + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, message_); + + public static Builder newBuilder( + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(specVersion_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 8, specVersion_); - } - if (trigger_ - != com.google.cloud.dataplex.v1.DataScanEvent.Trigger.TRIGGER_UNSPECIFIED.getNumber()) { - output.writeEnum(9, trigger_); - } - if (scope_ != com.google.cloud.dataplex.v1.DataScanEvent.Scope.SCOPE_UNSPECIFIED.getNumber()) { - output.writeEnum(10, scope_); - } - if (resultCase_ == 101) { - output.writeMessage( - 101, (com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult) result_); - } - if (resultCase_ == 102) { - output.writeMessage( - 102, (com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult) result_); - } - 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(dataSource_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataSource_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, jobId_); - } - if (startTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getStartTime()); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getEndTime()); - } - if (type_ - != com.google.cloud.dataplex.v1.DataScanEvent.ScanType.SCAN_TYPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, type_); - } - if (state_ != com.google.cloud.dataplex.v1.DataScanEvent.State.STATE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, state_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, message_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(specVersion_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, specVersion_); - } - if (trigger_ - != com.google.cloud.dataplex.v1.DataScanEvent.Trigger.TRIGGER_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, trigger_); - } - if (scope_ != com.google.cloud.dataplex.v1.DataScanEvent.Scope.SCOPE_UNSPECIFIED.getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, scope_); - } - if (resultCase_ == 101) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 101, (com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult) result_); - } - if (resultCase_ == 102) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 102, (com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult) result_); + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } - 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.dataplex.v1.DataScanEvent)) { - return super.equals(obj); + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; } - com.google.cloud.dataplex.v1.DataScanEvent other = - (com.google.cloud.dataplex.v1.DataScanEvent) obj; + /** + * + * + *
+     * Applied configs for data profile type data scan job.
+     * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs) + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.LogsProto + .internal_static_google_cloud_dataplex_v1_DataScanEvent_DataProfileAppliedConfigs_descriptor; + } - if (!getDataSource().equals(other.getDataSource())) return false; - if (!getJobId().equals(other.getJobId())) 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 (type_ != other.type_) return false; - if (state_ != other.state_) return false; - if (!getMessage().equals(other.getMessage())) return false; - if (!getSpecVersion().equals(other.getSpecVersion())) return false; - if (trigger_ != other.trigger_) return false; - if (scope_ != other.scope_) return false; - if (!getResultCase().equals(other.getResultCase())) return false; - switch (resultCase_) { - case 101: - if (!getDataProfile().equals(other.getDataProfile())) return false; - break; - case 102: - if (!getDataQuality().equals(other.getDataQuality())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.LogsProto + .internal_static_google_cloud_dataplex_v1_DataScanEvent_DataProfileAppliedConfigs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs.class, + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs.Builder.class); + } - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + DATA_SOURCE_FIELD_NUMBER; - hash = (53 * hash) + getDataSource().hashCode(); - hash = (37 * hash) + JOB_ID_FIELD_NUMBER; - hash = (53 * hash) + getJobId().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) + TYPE_FIELD_NUMBER; - hash = (53 * hash) + type_; - hash = (37 * hash) + STATE_FIELD_NUMBER; - hash = (53 * hash) + state_; - hash = (37 * hash) + MESSAGE_FIELD_NUMBER; - hash = (53 * hash) + getMessage().hashCode(); - hash = (37 * hash) + SPEC_VERSION_FIELD_NUMBER; - hash = (53 * hash) + getSpecVersion().hashCode(); - hash = (37 * hash) + TRIGGER_FIELD_NUMBER; - hash = (53 * hash) + trigger_; - hash = (37 * hash) + SCOPE_FIELD_NUMBER; - hash = (53 * hash) + scope_; - switch (resultCase_) { - case 101: - hash = (37 * hash) + DATA_PROFILE_FIELD_NUMBER; - hash = (53 * hash) + getDataProfile().hashCode(); - break; - case 102: - hash = (37 * hash) + DATA_QUALITY_FIELD_NUMBER; - hash = (53 * hash) + getDataQuality().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } + // Construct using + // com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs.newBuilder() + private Builder() {} - public static com.google.cloud.dataplex.v1.DataScanEvent parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } - public static com.google.cloud.dataplex.v1.DataScanEvent parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + samplingPercent_ = 0F; + rowFilterApplied_ = false; + columnFilterApplied_ = false; + return this; + } - public static com.google.cloud.dataplex.v1.DataScanEvent parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.LogsProto + .internal_static_google_cloud_dataplex_v1_DataScanEvent_DataProfileAppliedConfigs_descriptor; + } - public static com.google.cloud.dataplex.v1.DataScanEvent parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs + getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs + .getDefaultInstance(); + } - public static com.google.cloud.dataplex.v1.DataScanEvent parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs build() { + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } - public static com.google.cloud.dataplex.v1.DataScanEvent parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs buildPartial() { + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs result = + new com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } - public static com.google.cloud.dataplex.v1.DataScanEvent parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + private void buildPartial0( + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.samplingPercent_ = samplingPercent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.rowFilterApplied_ = rowFilterApplied_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.columnFilterApplied_ = columnFilterApplied_; + } + } - public static com.google.cloud.dataplex.v1.DataScanEvent 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.dataplex.v1.DataScanEvent parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } + @java.lang.Override + public Builder clone() { + return super.clone(); + } - public static com.google.cloud.dataplex.v1.DataScanEvent parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } - public static com.google.cloud.dataplex.v1.DataScanEvent parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } - public static com.google.cloud.dataplex.v1.DataScanEvent 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 clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } - public static Builder newBuilder(com.google.cloud.dataplex.v1.DataScanEvent prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs) { + return mergeFrom( + (com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs) other); + } else { + super.mergeFrom(other); + return this; + } + } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } + public Builder mergeFrom( + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs other) { + if (other + == com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs + .getDefaultInstance()) return this; + if (other.getSamplingPercent() != 0F) { + setSamplingPercent(other.getSamplingPercent()); + } + if (other.getRowFilterApplied() != false) { + setRowFilterApplied(other.getRowFilterApplied()); + } + if (other.getColumnFilterApplied() != false) { + setColumnFilterApplied(other.getColumnFilterApplied()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * These messages contain information about the execution of a datascan.
-   * The monitored resource is 'DataScan'
-   * 
- * - * Protobuf type {@code google.cloud.dataplex.v1.DataScanEvent} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.DataScanEvent) - com.google.cloud.dataplex.v1.DataScanEventOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.dataplex.v1.LogsProto - .internal_static_google_cloud_dataplex_v1_DataScanEvent_descriptor; - } + @java.lang.Override + public final boolean isInitialized() { + return true; + } - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.dataplex.v1.LogsProto - .internal_static_google_cloud_dataplex_v1_DataScanEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.dataplex.v1.DataScanEvent.class, - com.google.cloud.dataplex.v1.DataScanEvent.Builder.class); - } + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + samplingPercent_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + case 16: + { + rowFilterApplied_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: + { + columnFilterApplied_ = input.readBool(); + bitField0_ |= 0x00000004; + 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; + } - // Construct using com.google.cloud.dataplex.v1.DataScanEvent.newBuilder() - private Builder() {} + private int bitField0_; - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } + private float samplingPercent_; + /** + * + * + *
+       * The percentage of the records selected from the dataset for DataScan.
+       *
+       * * Value ranges between 0.0 and 100.0.
+       * * Value 0.0 or 100.0 imply that sampling was not applied.
+       * 
+ * + * float sampling_percent = 1; + * + * @return The samplingPercent. + */ + @java.lang.Override + public float getSamplingPercent() { + return samplingPercent_; + } + /** + * + * + *
+       * The percentage of the records selected from the dataset for DataScan.
+       *
+       * * Value ranges between 0.0 and 100.0.
+       * * Value 0.0 or 100.0 imply that sampling was not applied.
+       * 
+ * + * float sampling_percent = 1; + * + * @param value The samplingPercent to set. + * @return This builder for chaining. + */ + public Builder setSamplingPercent(float value) { - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - dataSource_ = ""; - jobId_ = ""; - startTime_ = null; - if (startTimeBuilder_ != null) { - startTimeBuilder_.dispose(); - startTimeBuilder_ = null; + samplingPercent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; } - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; + /** + * + * + *
+       * The percentage of the records selected from the dataset for DataScan.
+       *
+       * * Value ranges between 0.0 and 100.0.
+       * * Value 0.0 or 100.0 imply that sampling was not applied.
+       * 
+ * + * float sampling_percent = 1; + * + * @return This builder for chaining. + */ + public Builder clearSamplingPercent() { + bitField0_ = (bitField0_ & ~0x00000001); + samplingPercent_ = 0F; + onChanged(); + return this; } - type_ = 0; - state_ = 0; - message_ = ""; - specVersion_ = ""; - trigger_ = 0; - scope_ = 0; - if (dataProfileBuilder_ != null) { - dataProfileBuilder_.clear(); + + private boolean rowFilterApplied_; + /** + * + * + *
+       * Boolean indicating whether a row filter was applied in the DataScan job.
+       * 
+ * + * bool row_filter_applied = 2; + * + * @return The rowFilterApplied. + */ + @java.lang.Override + public boolean getRowFilterApplied() { + return rowFilterApplied_; } - if (dataQualityBuilder_ != null) { - dataQualityBuilder_.clear(); + /** + * + * + *
+       * Boolean indicating whether a row filter was applied in the DataScan job.
+       * 
+ * + * bool row_filter_applied = 2; + * + * @param value The rowFilterApplied to set. + * @return This builder for chaining. + */ + public Builder setRowFilterApplied(boolean value) { + + rowFilterApplied_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Boolean indicating whether a row filter was applied in the DataScan job.
+       * 
+ * + * bool row_filter_applied = 2; + * + * @return This builder for chaining. + */ + public Builder clearRowFilterApplied() { + bitField0_ = (bitField0_ & ~0x00000002); + rowFilterApplied_ = false; + onChanged(); + return this; + } + + private boolean columnFilterApplied_; + /** + * + * + *
+       * Boolean indicating whether a column filter was applied in the DataScan
+       * job.
+       * 
+ * + * bool column_filter_applied = 3; + * + * @return The columnFilterApplied. + */ + @java.lang.Override + public boolean getColumnFilterApplied() { + return columnFilterApplied_; + } + /** + * + * + *
+       * Boolean indicating whether a column filter was applied in the DataScan
+       * job.
+       * 
+ * + * bool column_filter_applied = 3; + * + * @param value The columnFilterApplied to set. + * @return This builder for chaining. + */ + public Builder setColumnFilterApplied(boolean value) { + + columnFilterApplied_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+       * Boolean indicating whether a column filter was applied in the DataScan
+       * job.
+       * 
+ * + * bool column_filter_applied = 3; + * + * @return This builder for chaining. + */ + public Builder clearColumnFilterApplied() { + bitField0_ = (bitField0_ & ~0x00000004); + columnFilterApplied_ = 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.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs) + private static final com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs(); + } + + public static com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataProfileAppliedConfigs 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.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DataQualityAppliedConfigsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The percentage of the records selected from the dataset for DataScan.
+     *
+     * * Value ranges between 0.0 and 100.0.
+     * * Value 0.0 or 100.0 imply that sampling was not applied.
+     * 
+ * + * float sampling_percent = 1; + * + * @return The samplingPercent. + */ + float getSamplingPercent(); + + /** + * + * + *
+     * Boolean indicating whether a row filter was applied in the DataScan job.
+     * 
+ * + * bool row_filter_applied = 2; + * + * @return The rowFilterApplied. + */ + boolean getRowFilterApplied(); + } + /** + * + * + *
+   * Applied configs for data quality type data scan job.
+   * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs} + */ + public static final class DataQualityAppliedConfigs extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs) + DataQualityAppliedConfigsOrBuilder { + private static final long serialVersionUID = 0L; + // Use DataQualityAppliedConfigs.newBuilder() to construct. + private DataQualityAppliedConfigs(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DataQualityAppliedConfigs() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DataQualityAppliedConfigs(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.LogsProto + .internal_static_google_cloud_dataplex_v1_DataScanEvent_DataQualityAppliedConfigs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.LogsProto + .internal_static_google_cloud_dataplex_v1_DataScanEvent_DataQualityAppliedConfigs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs.class, + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs.Builder.class); + } + + public static final int SAMPLING_PERCENT_FIELD_NUMBER = 1; + private float samplingPercent_ = 0F; + /** + * + * + *
+     * The percentage of the records selected from the dataset for DataScan.
+     *
+     * * Value ranges between 0.0 and 100.0.
+     * * Value 0.0 or 100.0 imply that sampling was not applied.
+     * 
+ * + * float sampling_percent = 1; + * + * @return The samplingPercent. + */ + @java.lang.Override + public float getSamplingPercent() { + return samplingPercent_; + } + + public static final int ROW_FILTER_APPLIED_FIELD_NUMBER = 2; + private boolean rowFilterApplied_ = false; + /** + * + * + *
+     * Boolean indicating whether a row filter was applied in the DataScan job.
+     * 
+ * + * bool row_filter_applied = 2; + * + * @return The rowFilterApplied. + */ + @java.lang.Override + public boolean getRowFilterApplied() { + return rowFilterApplied_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(samplingPercent_) != 0) { + output.writeFloat(1, samplingPercent_); + } + if (rowFilterApplied_ != false) { + output.writeBool(2, rowFilterApplied_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(samplingPercent_) != 0) { + size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, samplingPercent_); + } + if (rowFilterApplied_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, rowFilterApplied_); + } + 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.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs other = + (com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs) obj; + + if (java.lang.Float.floatToIntBits(getSamplingPercent()) + != java.lang.Float.floatToIntBits(other.getSamplingPercent())) return false; + if (getRowFilterApplied() != other.getRowFilterApplied()) 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) + SAMPLING_PERCENT_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits(getSamplingPercent()); + hash = (37 * hash) + ROW_FILTER_APPLIED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRowFilterApplied()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs 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.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs 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.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs 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.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs + 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.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs 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.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs 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; + } + /** + * + * + *
+     * Applied configs for data quality type data scan job.
+     * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs) + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.LogsProto + .internal_static_google_cloud_dataplex_v1_DataScanEvent_DataQualityAppliedConfigs_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.LogsProto + .internal_static_google_cloud_dataplex_v1_DataScanEvent_DataQualityAppliedConfigs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs.class, + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs.Builder.class); + } + + // Construct using + // com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + samplingPercent_ = 0F; + rowFilterApplied_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.LogsProto + .internal_static_google_cloud_dataplex_v1_DataScanEvent_DataQualityAppliedConfigs_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs + getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs build() { + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs buildPartial() { + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs result = + new com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.samplingPercent_ = samplingPercent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.rowFilterApplied_ = rowFilterApplied_; + } + } + + @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.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs) { + return mergeFrom( + (com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs other) { + if (other + == com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs + .getDefaultInstance()) return this; + if (other.getSamplingPercent() != 0F) { + setSamplingPercent(other.getSamplingPercent()); + } + if (other.getRowFilterApplied() != false) { + setRowFilterApplied(other.getRowFilterApplied()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + samplingPercent_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + case 16: + { + rowFilterApplied_ = input.readBool(); + bitField0_ |= 0x00000002; + 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 int bitField0_; + + private float samplingPercent_; + /** + * + * + *
+       * The percentage of the records selected from the dataset for DataScan.
+       *
+       * * Value ranges between 0.0 and 100.0.
+       * * Value 0.0 or 100.0 imply that sampling was not applied.
+       * 
+ * + * float sampling_percent = 1; + * + * @return The samplingPercent. + */ + @java.lang.Override + public float getSamplingPercent() { + return samplingPercent_; + } + /** + * + * + *
+       * The percentage of the records selected from the dataset for DataScan.
+       *
+       * * Value ranges between 0.0 and 100.0.
+       * * Value 0.0 or 100.0 imply that sampling was not applied.
+       * 
+ * + * float sampling_percent = 1; + * + * @param value The samplingPercent to set. + * @return This builder for chaining. + */ + public Builder setSamplingPercent(float value) { + + samplingPercent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The percentage of the records selected from the dataset for DataScan.
+       *
+       * * Value ranges between 0.0 and 100.0.
+       * * Value 0.0 or 100.0 imply that sampling was not applied.
+       * 
+ * + * float sampling_percent = 1; + * + * @return This builder for chaining. + */ + public Builder clearSamplingPercent() { + bitField0_ = (bitField0_ & ~0x00000001); + samplingPercent_ = 0F; + onChanged(); + return this; + } + + private boolean rowFilterApplied_; + /** + * + * + *
+       * Boolean indicating whether a row filter was applied in the DataScan job.
+       * 
+ * + * bool row_filter_applied = 2; + * + * @return The rowFilterApplied. + */ + @java.lang.Override + public boolean getRowFilterApplied() { + return rowFilterApplied_; + } + /** + * + * + *
+       * Boolean indicating whether a row filter was applied in the DataScan job.
+       * 
+ * + * bool row_filter_applied = 2; + * + * @param value The rowFilterApplied to set. + * @return This builder for chaining. + */ + public Builder setRowFilterApplied(boolean value) { + + rowFilterApplied_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+       * Boolean indicating whether a row filter was applied in the DataScan job.
+       * 
+ * + * bool row_filter_applied = 2; + * + * @return This builder for chaining. + */ + public Builder clearRowFilterApplied() { + bitField0_ = (bitField0_ & ~0x00000002); + rowFilterApplied_ = 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.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs) + private static final com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs(); + } + + public static com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataQualityAppliedConfigs 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.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PostScanActionsResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The result of BigQuery export post scan action.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1; + * + * + * @return Whether the bigqueryExportResult field is set. + */ + boolean hasBigqueryExportResult(); + /** + * + * + *
+     * The result of BigQuery export post scan action.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1; + * + * + * @return The bigqueryExportResult. + */ + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + getBigqueryExportResult(); + /** + * + * + *
+     * The result of BigQuery export post scan action.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1; + * + */ + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResultOrBuilder + getBigqueryExportResultOrBuilder(); + } + /** + * + * + *
+   * Post scan actions result for data scan job.
+   * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult} + */ + public static final class PostScanActionsResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult) + PostScanActionsResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use PostScanActionsResult.newBuilder() to construct. + private PostScanActionsResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PostScanActionsResult() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PostScanActionsResult(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.LogsProto + .internal_static_google_cloud_dataplex_v1_DataScanEvent_PostScanActionsResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.LogsProto + .internal_static_google_cloud_dataplex_v1_DataScanEvent_PostScanActionsResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.class, + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.Builder.class); + } + + public interface BigQueryExportResultOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+       * Execution state for the BigQuery exporting.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State state = 1; + * + * + * @return The enum numeric value on the wire for state. + */ + int getStateValue(); + /** + * + * + *
+       * Execution state for the BigQuery exporting.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State state = 1; + * + * + * @return The state. + */ + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State + getState(); + + /** + * + * + *
+       * Additional information about the BigQuery exporting.
+       * 
+ * + * string message = 2; + * + * @return The message. + */ + java.lang.String getMessage(); + /** + * + * + *
+       * Additional information about the BigQuery exporting.
+       * 
+ * + * string message = 2; + * + * @return The bytes for message. + */ + com.google.protobuf.ByteString getMessageBytes(); + } + /** + * + * + *
+     * The result of BigQuery export post scan action.
+     * 
+ * + * Protobuf type {@code + * google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult} + */ + public static final class BigQueryExportResult extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult) + BigQueryExportResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use BigQueryExportResult.newBuilder() to construct. + private BigQueryExportResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BigQueryExportResult() { + state_ = 0; + message_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BigQueryExportResult(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.LogsProto + .internal_static_google_cloud_dataplex_v1_DataScanEvent_PostScanActionsResult_BigQueryExportResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.LogsProto + .internal_static_google_cloud_dataplex_v1_DataScanEvent_PostScanActionsResult_BigQueryExportResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult.class, + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult.Builder.class); + } + + /** + * + * + *
+       * Execution state for the exporting.
+       * 
+ * + * Protobuf enum {@code + * google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State} + */ + public enum State implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+         * The exporting state is unspecified.
+         * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + * + * + *
+         * The exporting completed successfully.
+         * 
+ * + * SUCCEEDED = 1; + */ + SUCCEEDED(1), + /** + * + * + *
+         * The exporting is no longer running due to an error.
+         * 
+ * + * FAILED = 2; + */ + FAILED(2), + /** + * + * + *
+         * The exporting is skipped due to no valid scan result to export
+         * (usually caused by scan failed).
+         * 
+ * + * SKIPPED = 3; + */ + SKIPPED(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+         * The exporting state is unspecified.
+         * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+         * The exporting completed successfully.
+         * 
+ * + * SUCCEEDED = 1; + */ + public static final int SUCCEEDED_VALUE = 1; + /** + * + * + *
+         * The exporting is no longer running due to an error.
+         * 
+ * + * FAILED = 2; + */ + public static final int FAILED_VALUE = 2; + /** + * + * + *
+         * The exporting is skipped due to no valid scan result to export
+         * (usually caused by scan failed).
+         * 
+ * + * SKIPPED = 3; + */ + public static final int SKIPPED_VALUE = 3; + + 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 SUCCEEDED; + case 2: + return FAILED; + case 3: + return SKIPPED; + 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.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult.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.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State) + } + + public static final int STATE_FIELD_NUMBER = 1; + private int state_ = 0; + /** + * + * + *
+       * Execution state for the BigQuery exporting.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State state = 1; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+       * Execution state for the BigQuery exporting.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State state = 1; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + .State + getState() { + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State + result = + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult.State.forNumber(state_); + return result == null + ? com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + .State.UNRECOGNIZED + : result; + } + + public static final int MESSAGE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object message_ = ""; + /** + * + * + *
+       * Additional information about the BigQuery exporting.
+       * 
+ * + * string message = 2; + * + * @return The message. + */ + @java.lang.Override + public java.lang.String getMessage() { + java.lang.Object ref = message_; + 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(); + message_ = s; + return s; + } + } + /** + * + * + *
+       * Additional information about the BigQuery exporting.
+       * 
+ * + * string message = 2; + * + * @return The bytes for message. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + message_ = 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 (state_ + != com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + .State.STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, message_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (state_ + != com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + .State.STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, message_); + } + 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.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + other = + (com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult) + obj; + + if (state_ != other.state_) return false; + if (!getMessage().equals(other.getMessage())) 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) + MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getMessage().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult + 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.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult + 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.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult + 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.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult + 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.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult + 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.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + 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 result of BigQuery export post scan action.
+       * 
+ * + * Protobuf type {@code + * google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult) + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.LogsProto + .internal_static_google_cloud_dataplex_v1_DataScanEvent_PostScanActionsResult_BigQueryExportResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.LogsProto + .internal_static_google_cloud_dataplex_v1_DataScanEvent_PostScanActionsResult_BigQueryExportResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult.class, + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult.Builder.class); + } + + // Construct using + // com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + state_ = 0; + message_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.LogsProto + .internal_static_google_cloud_dataplex_v1_DataScanEvent_PostScanActionsResult_BigQueryExportResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + build() { + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + buildPartial() { + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + result = + new com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.message_ = message_; + } + } + + @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.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult) { + return mergeFrom( + (com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + other) { + if (other + == com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult.getDefaultInstance()) return this; + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getMessage().isEmpty()) { + message_ = other.message_; + bitField0_ |= 0x00000002; + 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: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + message_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + 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 int state_ = 0; + /** + * + * + *
+         * Execution state for the BigQuery exporting.
+         * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State state = 1; + * + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+         * Execution state for the BigQuery exporting.
+         * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State state = 1; + * + * + * @param value The enum numeric value on the wire for state to set. + * @return This builder for chaining. + */ + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+         * Execution state for the BigQuery exporting.
+         * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State state = 1; + * + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + .State + getState() { + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + .State + result = + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult.State.forNumber(state_); + return result == null + ? com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult.State.UNRECOGNIZED + : result; + } + /** + * + * + *
+         * Execution state for the BigQuery exporting.
+         * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State state = 1; + * + * + * @param value The state to set. + * @return This builder for chaining. + */ + public Builder setState( + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + .State + value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+         * Execution state for the BigQuery exporting.
+         * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult.State state = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000001); + state_ = 0; + onChanged(); + return this; + } + + private java.lang.Object message_ = ""; + /** + * + * + *
+         * Additional information about the BigQuery exporting.
+         * 
+ * + * string message = 2; + * + * @return The message. + */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+         * Additional information about the BigQuery exporting.
+         * 
+ * + * string message = 2; + * + * @return The bytes for message. + */ + public com.google.protobuf.ByteString getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+         * Additional information about the BigQuery exporting.
+         * 
+ * + * string message = 2; + * + * @param value The message to set. + * @return This builder for chaining. + */ + public Builder setMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + message_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+         * Additional information about the BigQuery exporting.
+         * 
+ * + * string message = 2; + * + * @return This builder for chaining. + */ + public Builder clearMessage() { + message_ = getDefaultInstance().getMessage(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+         * Additional information about the BigQuery exporting.
+         * 
+ * + * string message = 2; + * + * @param value The bytes for message to set. + * @return This builder for chaining. + */ + public Builder setMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + message_ = value; + bitField0_ |= 0x00000002; + 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.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult) + private static final com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult(); + } + + public static com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BigQueryExportResult 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.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int BIGQUERY_EXPORT_RESULT_FIELD_NUMBER = 1; + private com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + bigqueryExportResult_; + /** + * + * + *
+     * The result of BigQuery export post scan action.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1; + * + * + * @return Whether the bigqueryExportResult field is set. + */ + @java.lang.Override + public boolean hasBigqueryExportResult() { + return bigqueryExportResult_ != null; + } + /** + * + * + *
+     * The result of BigQuery export post scan action.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1; + * + * + * @return The bigqueryExportResult. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + getBigqueryExportResult() { + return bigqueryExportResult_ == null + ? com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + .getDefaultInstance() + : bigqueryExportResult_; + } + /** + * + * + *
+     * The result of BigQuery export post scan action.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1; + * + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResultOrBuilder + getBigqueryExportResultOrBuilder() { + return bigqueryExportResult_ == null + ? com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + .getDefaultInstance() + : bigqueryExportResult_; + } + + 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 (bigqueryExportResult_ != null) { + output.writeMessage(1, getBigqueryExportResult()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (bigqueryExportResult_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBigqueryExportResult()); + } + 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.dataplex.v1.DataScanEvent.PostScanActionsResult)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult other = + (com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult) obj; + + if (hasBigqueryExportResult() != other.hasBigqueryExportResult()) return false; + if (hasBigqueryExportResult()) { + if (!getBigqueryExportResult().equals(other.getBigqueryExportResult())) 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 (hasBigqueryExportResult()) { + hash = (37 * hash) + BIGQUERY_EXPORT_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getBigqueryExportResult().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult 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.dataplex.v1.DataScanEvent.PostScanActionsResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult 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.dataplex.v1.DataScanEvent.PostScanActionsResult parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult 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.dataplex.v1.DataScanEvent.PostScanActionsResult + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + 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.dataplex.v1.DataScanEvent.PostScanActionsResult parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult 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.dataplex.v1.DataScanEvent.PostScanActionsResult 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; + } + /** + * + * + *
+     * Post scan actions result for data scan job.
+     * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult) + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.LogsProto + .internal_static_google_cloud_dataplex_v1_DataScanEvent_PostScanActionsResult_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.LogsProto + .internal_static_google_cloud_dataplex_v1_DataScanEvent_PostScanActionsResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.class, + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.Builder.class); + } + + // Construct using + // com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + bigqueryExportResult_ = null; + if (bigqueryExportResultBuilder_ != null) { + bigqueryExportResultBuilder_.dispose(); + bigqueryExportResultBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.LogsProto + .internal_static_google_cloud_dataplex_v1_DataScanEvent_PostScanActionsResult_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult build() { + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult buildPartial() { + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult result = + new com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.bigqueryExportResult_ = + bigqueryExportResultBuilder_ == null + ? bigqueryExportResult_ + : bigqueryExportResultBuilder_.build(); + } + } + + @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.dataplex.v1.DataScanEvent.PostScanActionsResult) { + return mergeFrom( + (com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult other) { + if (other + == com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .getDefaultInstance()) return this; + if (other.hasBigqueryExportResult()) { + mergeBigqueryExportResult(other.getBigqueryExportResult()); + } + 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( + getBigqueryExportResultFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + 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 int bitField0_; + + private com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + bigqueryExportResult_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult, + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + .Builder, + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResultOrBuilder> + bigqueryExportResultBuilder_; + /** + * + * + *
+       * The result of BigQuery export post scan action.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1; + * + * + * @return Whether the bigqueryExportResult field is set. + */ + public boolean hasBigqueryExportResult() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+       * The result of BigQuery export post scan action.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1; + * + * + * @return The bigqueryExportResult. + */ + public com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + getBigqueryExportResult() { + if (bigqueryExportResultBuilder_ == null) { + return bigqueryExportResult_ == null + ? com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult.getDefaultInstance() + : bigqueryExportResult_; + } else { + return bigqueryExportResultBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The result of BigQuery export post scan action.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1; + * + */ + public Builder setBigqueryExportResult( + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + value) { + if (bigqueryExportResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + bigqueryExportResult_ = value; + } else { + bigqueryExportResultBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The result of BigQuery export post scan action.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1; + * + */ + public Builder setBigqueryExportResult( + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + .Builder + builderForValue) { + if (bigqueryExportResultBuilder_ == null) { + bigqueryExportResult_ = builderForValue.build(); + } else { + bigqueryExportResultBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The result of BigQuery export post scan action.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1; + * + */ + public Builder mergeBigqueryExportResult( + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + value) { + if (bigqueryExportResultBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && bigqueryExportResult_ != null + && bigqueryExportResult_ + != com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult.getDefaultInstance()) { + getBigqueryExportResultBuilder().mergeFrom(value); + } else { + bigqueryExportResult_ = value; + } + } else { + bigqueryExportResultBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+       * The result of BigQuery export post scan action.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1; + * + */ + public Builder clearBigqueryExportResult() { + bitField0_ = (bitField0_ & ~0x00000001); + bigqueryExportResult_ = null; + if (bigqueryExportResultBuilder_ != null) { + bigqueryExportResultBuilder_.dispose(); + bigqueryExportResultBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+       * The result of BigQuery export post scan action.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1; + * + */ + public com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + .Builder + getBigqueryExportResultBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getBigqueryExportResultFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The result of BigQuery export post scan action.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1; + * + */ + public com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResultOrBuilder + getBigqueryExportResultOrBuilder() { + if (bigqueryExportResultBuilder_ != null) { + return bigqueryExportResultBuilder_.getMessageOrBuilder(); + } else { + return bigqueryExportResult_ == null + ? com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult.getDefaultInstance() + : bigqueryExportResult_; + } + } + /** + * + * + *
+       * The result of BigQuery export post scan action.
+       * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult bigquery_export_result = 1; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult, + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.BigQueryExportResult + .Builder, + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResultOrBuilder> + getBigqueryExportResultFieldBuilder() { + if (bigqueryExportResultBuilder_ == null) { + bigqueryExportResultBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult, + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResult.Builder, + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + .BigQueryExportResultOrBuilder>( + getBigqueryExportResult(), getParentForChildren(), isClean()); + bigqueryExportResult_ = null; + } + return bigqueryExportResultBuilder_; + } + + @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.dataplex.v1.DataScanEvent.PostScanActionsResult) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult) + private static final com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult(); + } + + public static com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PostScanActionsResult 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.dataplex.v1.DataScanEvent.PostScanActionsResult + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int resultCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object result_; + + public enum ResultCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DATA_PROFILE(101), + DATA_QUALITY(102), + RESULT_NOT_SET(0); + private final int value; + + private ResultCase(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 ResultCase valueOf(int value) { + return forNumber(value); + } + + public static ResultCase forNumber(int value) { + switch (value) { + case 101: + return DATA_PROFILE; + case 102: + return DATA_QUALITY; + case 0: + return RESULT_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ResultCase getResultCase() { + return ResultCase.forNumber(resultCase_); + } + + private int appliedConfigsCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object appliedConfigs_; + + public enum AppliedConfigsCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + DATA_PROFILE_CONFIGS(201), + DATA_QUALITY_CONFIGS(202), + APPLIEDCONFIGS_NOT_SET(0); + private final int value; + + private AppliedConfigsCase(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 AppliedConfigsCase valueOf(int value) { + return forNumber(value); + } + + public static AppliedConfigsCase forNumber(int value) { + switch (value) { + case 201: + return DATA_PROFILE_CONFIGS; + case 202: + return DATA_QUALITY_CONFIGS; + case 0: + return APPLIEDCONFIGS_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public AppliedConfigsCase getAppliedConfigsCase() { + return AppliedConfigsCase.forNumber(appliedConfigsCase_); + } + + public static final int DATA_SOURCE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object dataSource_ = ""; + /** + * + * + *
+   * The data source of the data scan
+   * 
+ * + * string data_source = 1; + * + * @return The dataSource. + */ + @java.lang.Override + public java.lang.String getDataSource() { + java.lang.Object ref = dataSource_; + 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(); + dataSource_ = s; + return s; + } + } + /** + * + * + *
+   * The data source of the data scan
+   * 
+ * + * string data_source = 1; + * + * @return The bytes for dataSource. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDataSourceBytes() { + java.lang.Object ref = dataSource_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataSource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int JOB_ID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object jobId_ = ""; + /** + * + * + *
+   * The identifier of the specific data scan job this log entry is for.
+   * 
+ * + * string job_id = 2; + * + * @return The jobId. + */ + @java.lang.Override + public java.lang.String getJobId() { + java.lang.Object ref = jobId_; + 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(); + jobId_ = s; + return s; + } + } + /** + * + * + *
+   * The identifier of the specific data scan job this log entry is for.
+   * 
+ * + * string job_id = 2; + * + * @return The bytes for jobId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getJobIdBytes() { + java.lang.Object ref = jobId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jobId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 12; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * The time when the data scan job was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 12; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * The time when the data scan job was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 12; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * The time when the data scan job was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 12; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int START_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * The time when the data scan job started to run.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 3; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+   * The time when the data scan job started to run.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 3; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * The time when the data scan job started to run.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 3; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + + public static final int END_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * The time when the data scan job finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 4; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * The time when the data scan job finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 4; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * The time when the data scan job finished.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 4; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + + public static final int TYPE_FIELD_NUMBER = 5; + private int type_ = 0; + /** + * + * + *
+   * The type of the data scan.
+   * 
+ * + * .google.cloud.dataplex.v1.DataScanEvent.ScanType type = 5; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * The type of the data scan.
+   * 
+ * + * .google.cloud.dataplex.v1.DataScanEvent.ScanType type = 5; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.ScanType getType() { + com.google.cloud.dataplex.v1.DataScanEvent.ScanType result = + com.google.cloud.dataplex.v1.DataScanEvent.ScanType.forNumber(type_); + return result == null + ? com.google.cloud.dataplex.v1.DataScanEvent.ScanType.UNRECOGNIZED + : result; + } + + public static final int STATE_FIELD_NUMBER = 6; + private int state_ = 0; + /** + * + * + *
+   * The status of the data scan job.
+   * 
+ * + * .google.cloud.dataplex.v1.DataScanEvent.State state = 6; + * + * @return The enum numeric value on the wire for state. + */ + @java.lang.Override + public int getStateValue() { + return state_; + } + /** + * + * + *
+   * The status of the data scan job.
+   * 
+ * + * .google.cloud.dataplex.v1.DataScanEvent.State state = 6; + * + * @return The state. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.State getState() { + com.google.cloud.dataplex.v1.DataScanEvent.State result = + com.google.cloud.dataplex.v1.DataScanEvent.State.forNumber(state_); + return result == null ? com.google.cloud.dataplex.v1.DataScanEvent.State.UNRECOGNIZED : result; + } + + public static final int MESSAGE_FIELD_NUMBER = 7; + + @SuppressWarnings("serial") + private volatile java.lang.Object message_ = ""; + /** + * + * + *
+   * The message describing the data scan job event.
+   * 
+ * + * string message = 7; + * + * @return The message. + */ + @java.lang.Override + public java.lang.String getMessage() { + java.lang.Object ref = message_; + 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(); + message_ = s; + return s; + } + } + /** + * + * + *
+   * The message describing the data scan job event.
+   * 
+ * + * string message = 7; + * + * @return The bytes for message. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SPEC_VERSION_FIELD_NUMBER = 8; + + @SuppressWarnings("serial") + private volatile java.lang.Object specVersion_ = ""; + /** + * + * + *
+   * A version identifier of the spec which was used to execute this job.
+   * 
+ * + * string spec_version = 8; + * + * @return The specVersion. + */ + @java.lang.Override + public java.lang.String getSpecVersion() { + java.lang.Object ref = specVersion_; + 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(); + specVersion_ = s; + return s; + } + } + /** + * + * + *
+   * A version identifier of the spec which was used to execute this job.
+   * 
+ * + * string spec_version = 8; + * + * @return The bytes for specVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSpecVersionBytes() { + java.lang.Object ref = specVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + specVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRIGGER_FIELD_NUMBER = 9; + private int trigger_ = 0; + /** + * + * + *
+   * The trigger type of the data scan job.
+   * 
+ * + * .google.cloud.dataplex.v1.DataScanEvent.Trigger trigger = 9; + * + * @return The enum numeric value on the wire for trigger. + */ + @java.lang.Override + public int getTriggerValue() { + return trigger_; + } + /** + * + * + *
+   * The trigger type of the data scan job.
+   * 
+ * + * .google.cloud.dataplex.v1.DataScanEvent.Trigger trigger = 9; + * + * @return The trigger. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.Trigger getTrigger() { + com.google.cloud.dataplex.v1.DataScanEvent.Trigger result = + com.google.cloud.dataplex.v1.DataScanEvent.Trigger.forNumber(trigger_); + return result == null + ? com.google.cloud.dataplex.v1.DataScanEvent.Trigger.UNRECOGNIZED + : result; + } + + public static final int SCOPE_FIELD_NUMBER = 10; + private int scope_ = 0; + /** + * + * + *
+   * The scope of the data scan (e.g. full, incremental).
+   * 
+ * + * .google.cloud.dataplex.v1.DataScanEvent.Scope scope = 10; + * + * @return The enum numeric value on the wire for scope. + */ + @java.lang.Override + public int getScopeValue() { + return scope_; + } + /** + * + * + *
+   * The scope of the data scan (e.g. full, incremental).
+   * 
+ * + * .google.cloud.dataplex.v1.DataScanEvent.Scope scope = 10; + * + * @return The scope. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.Scope getScope() { + com.google.cloud.dataplex.v1.DataScanEvent.Scope result = + com.google.cloud.dataplex.v1.DataScanEvent.Scope.forNumber(scope_); + return result == null ? com.google.cloud.dataplex.v1.DataScanEvent.Scope.UNRECOGNIZED : result; + } + + public static final int DATA_PROFILE_FIELD_NUMBER = 101; + /** + * + * + *
+   * Data profile result for data profile type data scan.
+   * 
+ * + * .google.cloud.dataplex.v1.DataScanEvent.DataProfileResult data_profile = 101; + * + * @return Whether the dataProfile field is set. + */ + @java.lang.Override + public boolean hasDataProfile() { + return resultCase_ == 101; + } + /** + * + * + *
+   * Data profile result for data profile type data scan.
+   * 
+ * + * .google.cloud.dataplex.v1.DataScanEvent.DataProfileResult data_profile = 101; + * + * @return The dataProfile. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult getDataProfile() { + if (resultCase_ == 101) { + return (com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult) result_; + } + return com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.getDefaultInstance(); + } + /** + * + * + *
+   * Data profile result for data profile type data scan.
+   * 
+ * + * .google.cloud.dataplex.v1.DataScanEvent.DataProfileResult data_profile = 101; + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResultOrBuilder + getDataProfileOrBuilder() { + if (resultCase_ == 101) { + return (com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult) result_; + } + return com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.getDefaultInstance(); + } + + public static final int DATA_QUALITY_FIELD_NUMBER = 102; + /** + * + * + *
+   * Data quality result for data quality type data scan.
+   * 
+ * + * .google.cloud.dataplex.v1.DataScanEvent.DataQualityResult data_quality = 102; + * + * @return Whether the dataQuality field is set. + */ + @java.lang.Override + public boolean hasDataQuality() { + return resultCase_ == 102; + } + /** + * + * + *
+   * Data quality result for data quality type data scan.
+   * 
+ * + * .google.cloud.dataplex.v1.DataScanEvent.DataQualityResult data_quality = 102; + * + * @return The dataQuality. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult getDataQuality() { + if (resultCase_ == 102) { + return (com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult) result_; + } + return com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.getDefaultInstance(); + } + /** + * + * + *
+   * Data quality result for data quality type data scan.
+   * 
+ * + * .google.cloud.dataplex.v1.DataScanEvent.DataQualityResult data_quality = 102; + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResultOrBuilder + getDataQualityOrBuilder() { + if (resultCase_ == 102) { + return (com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult) result_; + } + return com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.getDefaultInstance(); + } + + public static final int DATA_PROFILE_CONFIGS_FIELD_NUMBER = 201; + /** + * + * + *
+   * Applied configs for data profile type data scan.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs data_profile_configs = 201; + * + * + * @return Whether the dataProfileConfigs field is set. + */ + @java.lang.Override + public boolean hasDataProfileConfigs() { + return appliedConfigsCase_ == 201; + } + /** + * + * + *
+   * Applied configs for data profile type data scan.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs data_profile_configs = 201; + * + * + * @return The dataProfileConfigs. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs + getDataProfileConfigs() { + if (appliedConfigsCase_ == 201) { + return (com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs) appliedConfigs_; + } + return com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs + .getDefaultInstance(); + } + /** + * + * + *
+   * Applied configs for data profile type data scan.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs data_profile_configs = 201; + * + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigsOrBuilder + getDataProfileConfigsOrBuilder() { + if (appliedConfigsCase_ == 201) { + return (com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs) appliedConfigs_; + } + return com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs + .getDefaultInstance(); + } + + public static final int DATA_QUALITY_CONFIGS_FIELD_NUMBER = 202; + /** + * + * + *
+   * Applied configs for data quality type data scan.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs data_quality_configs = 202; + * + * + * @return Whether the dataQualityConfigs field is set. + */ + @java.lang.Override + public boolean hasDataQualityConfigs() { + return appliedConfigsCase_ == 202; + } + /** + * + * + *
+   * Applied configs for data quality type data scan.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs data_quality_configs = 202; + * + * + * @return The dataQualityConfigs. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs + getDataQualityConfigs() { + if (appliedConfigsCase_ == 202) { + return (com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs) appliedConfigs_; + } + return com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs + .getDefaultInstance(); + } + /** + * + * + *
+   * Applied configs for data quality type data scan.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs data_quality_configs = 202; + * + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigsOrBuilder + getDataQualityConfigsOrBuilder() { + if (appliedConfigsCase_ == 202) { + return (com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs) appliedConfigs_; + } + return com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs + .getDefaultInstance(); + } + + public static final int POST_SCAN_ACTIONS_RESULT_FIELD_NUMBER = 11; + private com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult postScanActionsResult_; + /** + * + * + *
+   * The result of post scan actions.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult post_scan_actions_result = 11; + * + * + * @return Whether the postScanActionsResult field is set. + */ + @java.lang.Override + public boolean hasPostScanActionsResult() { + return postScanActionsResult_ != null; + } + /** + * + * + *
+   * The result of post scan actions.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult post_scan_actions_result = 11; + * + * + * @return The postScanActionsResult. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + getPostScanActionsResult() { + return postScanActionsResult_ == null + ? com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.getDefaultInstance() + : postScanActionsResult_; + } + /** + * + * + *
+   * The result of post scan actions.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult post_scan_actions_result = 11; + * + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResultOrBuilder + getPostScanActionsResultOrBuilder() { + return postScanActionsResult_ == null + ? com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.getDefaultInstance() + : postScanActionsResult_; + } + + 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(dataSource_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dataSource_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, jobId_); + } + if (startTime_ != null) { + output.writeMessage(3, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(4, getEndTime()); + } + if (type_ + != com.google.cloud.dataplex.v1.DataScanEvent.ScanType.SCAN_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(5, type_); + } + if (state_ != com.google.cloud.dataplex.v1.DataScanEvent.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(6, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, message_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(specVersion_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, specVersion_); + } + if (trigger_ + != com.google.cloud.dataplex.v1.DataScanEvent.Trigger.TRIGGER_UNSPECIFIED.getNumber()) { + output.writeEnum(9, trigger_); + } + if (scope_ != com.google.cloud.dataplex.v1.DataScanEvent.Scope.SCOPE_UNSPECIFIED.getNumber()) { + output.writeEnum(10, scope_); + } + if (postScanActionsResult_ != null) { + output.writeMessage(11, getPostScanActionsResult()); + } + if (createTime_ != null) { + output.writeMessage(12, getCreateTime()); + } + if (resultCase_ == 101) { + output.writeMessage( + 101, (com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult) result_); + } + if (resultCase_ == 102) { + output.writeMessage( + 102, (com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult) result_); + } + if (appliedConfigsCase_ == 201) { + output.writeMessage( + 201, + (com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs) appliedConfigs_); + } + if (appliedConfigsCase_ == 202) { + output.writeMessage( + 202, + (com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs) appliedConfigs_); + } + 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(dataSource_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dataSource_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(jobId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, jobId_); + } + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getEndTime()); + } + if (type_ + != com.google.cloud.dataplex.v1.DataScanEvent.ScanType.SCAN_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, type_); + } + if (state_ != com.google.cloud.dataplex.v1.DataScanEvent.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, state_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, message_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(specVersion_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, specVersion_); + } + if (trigger_ + != com.google.cloud.dataplex.v1.DataScanEvent.Trigger.TRIGGER_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, trigger_); + } + if (scope_ != com.google.cloud.dataplex.v1.DataScanEvent.Scope.SCOPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, scope_); + } + if (postScanActionsResult_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(11, getPostScanActionsResult()); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getCreateTime()); + } + if (resultCase_ == 101) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 101, (com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult) result_); + } + if (resultCase_ == 102) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 102, (com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult) result_); + } + if (appliedConfigsCase_ == 201) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 201, + (com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs) + appliedConfigs_); + } + if (appliedConfigsCase_ == 202) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 202, + (com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs) + appliedConfigs_); + } + 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.dataplex.v1.DataScanEvent)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.DataScanEvent other = + (com.google.cloud.dataplex.v1.DataScanEvent) obj; + + if (!getDataSource().equals(other.getDataSource())) return false; + if (!getJobId().equals(other.getJobId())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) 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 (type_ != other.type_) return false; + if (state_ != other.state_) return false; + if (!getMessage().equals(other.getMessage())) return false; + if (!getSpecVersion().equals(other.getSpecVersion())) return false; + if (trigger_ != other.trigger_) return false; + if (scope_ != other.scope_) return false; + if (hasPostScanActionsResult() != other.hasPostScanActionsResult()) return false; + if (hasPostScanActionsResult()) { + if (!getPostScanActionsResult().equals(other.getPostScanActionsResult())) return false; + } + if (!getResultCase().equals(other.getResultCase())) return false; + switch (resultCase_) { + case 101: + if (!getDataProfile().equals(other.getDataProfile())) return false; + break; + case 102: + if (!getDataQuality().equals(other.getDataQuality())) return false; + break; + case 0: + default: + } + if (!getAppliedConfigsCase().equals(other.getAppliedConfigsCase())) return false; + switch (appliedConfigsCase_) { + case 201: + if (!getDataProfileConfigs().equals(other.getDataProfileConfigs())) return false; + break; + case 202: + if (!getDataQualityConfigs().equals(other.getDataQualityConfigs())) 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) + DATA_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getDataSource().hashCode(); + hash = (37 * hash) + JOB_ID_FIELD_NUMBER; + hash = (53 * hash) + getJobId().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().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) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + hash = (37 * hash) + MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getMessage().hashCode(); + hash = (37 * hash) + SPEC_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getSpecVersion().hashCode(); + hash = (37 * hash) + TRIGGER_FIELD_NUMBER; + hash = (53 * hash) + trigger_; + hash = (37 * hash) + SCOPE_FIELD_NUMBER; + hash = (53 * hash) + scope_; + if (hasPostScanActionsResult()) { + hash = (37 * hash) + POST_SCAN_ACTIONS_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getPostScanActionsResult().hashCode(); + } + switch (resultCase_) { + case 101: + hash = (37 * hash) + DATA_PROFILE_FIELD_NUMBER; + hash = (53 * hash) + getDataProfile().hashCode(); + break; + case 102: + hash = (37 * hash) + DATA_QUALITY_FIELD_NUMBER; + hash = (53 * hash) + getDataQuality().hashCode(); + break; + case 0: + default: + } + switch (appliedConfigsCase_) { + case 201: + hash = (37 * hash) + DATA_PROFILE_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getDataProfileConfigs().hashCode(); + break; + case 202: + hash = (37 * hash) + DATA_QUALITY_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getDataQualityConfigs().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.DataScanEvent parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataScanEvent 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.dataplex.v1.DataScanEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataScanEvent 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.dataplex.v1.DataScanEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataScanEvent parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.DataScanEvent parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataScanEvent 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.dataplex.v1.DataScanEvent parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataScanEvent 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.dataplex.v1.DataScanEvent parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataScanEvent 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.dataplex.v1.DataScanEvent 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; + } + /** + * + * + *
+   * These messages contain information about the execution of a datascan.
+   * The monitored resource is 'DataScan'
+   * Next ID: 13
+   * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DataScanEvent} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.DataScanEvent) + com.google.cloud.dataplex.v1.DataScanEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.LogsProto + .internal_static_google_cloud_dataplex_v1_DataScanEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.LogsProto + .internal_static_google_cloud_dataplex_v1_DataScanEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataScanEvent.class, + com.google.cloud.dataplex.v1.DataScanEvent.Builder.class); + } + + // Construct using com.google.cloud.dataplex.v1.DataScanEvent.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + dataSource_ = ""; + jobId_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; + } + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; + } + type_ = 0; + state_ = 0; + message_ = ""; + specVersion_ = ""; + trigger_ = 0; + scope_ = 0; + if (dataProfileBuilder_ != null) { + dataProfileBuilder_.clear(); + } + if (dataQualityBuilder_ != null) { + dataQualityBuilder_.clear(); + } + if (dataProfileConfigsBuilder_ != null) { + dataProfileConfigsBuilder_.clear(); + } + if (dataQualityConfigsBuilder_ != null) { + dataQualityConfigsBuilder_.clear(); + } + postScanActionsResult_ = null; + if (postScanActionsResultBuilder_ != null) { + postScanActionsResultBuilder_.dispose(); + postScanActionsResultBuilder_ = null; + } + resultCase_ = 0; + result_ = null; + appliedConfigsCase_ = 0; + appliedConfigs_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.LogsProto + .internal_static_google_cloud_dataplex_v1_DataScanEvent_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.DataScanEvent.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent build() { + com.google.cloud.dataplex.v1.DataScanEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent buildPartial() { + com.google.cloud.dataplex.v1.DataScanEvent result = + new com.google.cloud.dataplex.v1.DataScanEvent(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dataplex.v1.DataScanEvent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.dataSource_ = dataSource_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.jobId_ = jobId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.state_ = state_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.message_ = message_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.specVersion_ = specVersion_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.trigger_ = trigger_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.scope_ = scope_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.postScanActionsResult_ = + postScanActionsResultBuilder_ == null + ? postScanActionsResult_ + : postScanActionsResultBuilder_.build(); + } + } + + private void buildPartialOneofs(com.google.cloud.dataplex.v1.DataScanEvent result) { + result.resultCase_ = resultCase_; + result.result_ = this.result_; + if (resultCase_ == 101 && dataProfileBuilder_ != null) { + result.result_ = dataProfileBuilder_.build(); + } + if (resultCase_ == 102 && dataQualityBuilder_ != null) { + result.result_ = dataQualityBuilder_.build(); + } + result.appliedConfigsCase_ = appliedConfigsCase_; + result.appliedConfigs_ = this.appliedConfigs_; + if (appliedConfigsCase_ == 201 && dataProfileConfigsBuilder_ != null) { + result.appliedConfigs_ = dataProfileConfigsBuilder_.build(); + } + if (appliedConfigsCase_ == 202 && dataQualityConfigsBuilder_ != null) { + result.appliedConfigs_ = dataQualityConfigsBuilder_.build(); + } + } + + @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.dataplex.v1.DataScanEvent) { + return mergeFrom((com.google.cloud.dataplex.v1.DataScanEvent) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataplex.v1.DataScanEvent other) { + if (other == com.google.cloud.dataplex.v1.DataScanEvent.getDefaultInstance()) return this; + if (!other.getDataSource().isEmpty()) { + dataSource_ = other.dataSource_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getJobId().isEmpty()) { + jobId_ = other.jobId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (!other.getMessage().isEmpty()) { + message_ = other.message_; + bitField0_ |= 0x00000080; + onChanged(); + } + if (!other.getSpecVersion().isEmpty()) { + specVersion_ = other.specVersion_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (other.trigger_ != 0) { + setTriggerValue(other.getTriggerValue()); + } + if (other.scope_ != 0) { + setScopeValue(other.getScopeValue()); + } + if (other.hasPostScanActionsResult()) { + mergePostScanActionsResult(other.getPostScanActionsResult()); + } + switch (other.getResultCase()) { + case DATA_PROFILE: + { + mergeDataProfile(other.getDataProfile()); + break; + } + case DATA_QUALITY: + { + mergeDataQuality(other.getDataQuality()); + break; + } + case RESULT_NOT_SET: + { + break; + } + } + switch (other.getAppliedConfigsCase()) { + case DATA_PROFILE_CONFIGS: + { + mergeDataProfileConfigs(other.getDataProfileConfigs()); + break; + } + case DATA_QUALITY_CONFIGS: + { + mergeDataQualityConfigs(other.getDataQualityConfigs()); + break; + } + case APPLIEDCONFIGS_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: + { + dataSource_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + jobId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 26 + case 34: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 34 + case 40: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000020; + break; + } // case 40 + case 48: + { + state_ = input.readEnum(); + bitField0_ |= 0x00000040; + break; + } // case 48 + case 58: + { + message_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 58 + case 66: + { + specVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 66 + case 72: + { + trigger_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 72 + case 80: + { + scope_ = input.readEnum(); + bitField0_ |= 0x00000400; + break; + } // case 80 + case 90: + { + input.readMessage( + getPostScanActionsResultFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00008000; + break; + } // case 90 + case 98: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 98 + case 810: + { + input.readMessage(getDataProfileFieldBuilder().getBuilder(), extensionRegistry); + resultCase_ = 101; + break; + } // case 810 + case 818: + { + input.readMessage(getDataQualityFieldBuilder().getBuilder(), extensionRegistry); + resultCase_ = 102; + break; + } // case 818 + case 1610: + { + input.readMessage( + getDataProfileConfigsFieldBuilder().getBuilder(), extensionRegistry); + appliedConfigsCase_ = 201; + break; + } // case 1610 + case 1618: + { + input.readMessage( + getDataQualityConfigsFieldBuilder().getBuilder(), extensionRegistry); + appliedConfigsCase_ = 202; + break; + } // case 1618 + 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 resultCase_ = 0; + private java.lang.Object result_; + + public ResultCase getResultCase() { + return ResultCase.forNumber(resultCase_); + } + + public Builder clearResult() { + resultCase_ = 0; + result_ = null; + onChanged(); + return this; + } + + private int appliedConfigsCase_ = 0; + private java.lang.Object appliedConfigs_; + + public AppliedConfigsCase getAppliedConfigsCase() { + return AppliedConfigsCase.forNumber(appliedConfigsCase_); + } + + public Builder clearAppliedConfigs() { + appliedConfigsCase_ = 0; + appliedConfigs_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private java.lang.Object dataSource_ = ""; + /** + * + * + *
+     * The data source of the data scan
+     * 
+ * + * string data_source = 1; + * + * @return The dataSource. + */ + public java.lang.String getDataSource() { + java.lang.Object ref = dataSource_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + dataSource_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The data source of the data scan
+     * 
+ * + * string data_source = 1; + * + * @return The bytes for dataSource. + */ + public com.google.protobuf.ByteString getDataSourceBytes() { + java.lang.Object ref = dataSource_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + dataSource_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The data source of the data scan
+     * 
+ * + * string data_source = 1; + * + * @param value The dataSource to set. + * @return This builder for chaining. + */ + public Builder setDataSource(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + dataSource_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * The data source of the data scan
+     * 
+ * + * string data_source = 1; + * + * @return This builder for chaining. + */ + public Builder clearDataSource() { + dataSource_ = getDefaultInstance().getDataSource(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The data source of the data scan
+     * 
+ * + * string data_source = 1; + * + * @param value The bytes for dataSource to set. + * @return This builder for chaining. + */ + public Builder setDataSourceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + dataSource_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object jobId_ = ""; + /** + * + * + *
+     * The identifier of the specific data scan job this log entry is for.
+     * 
+ * + * string job_id = 2; + * + * @return The jobId. + */ + public java.lang.String getJobId() { + java.lang.Object ref = jobId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jobId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The identifier of the specific data scan job this log entry is for.
+     * 
+ * + * string job_id = 2; + * + * @return The bytes for jobId. + */ + public com.google.protobuf.ByteString getJobIdBytes() { + java.lang.Object ref = jobId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jobId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The identifier of the specific data scan job this log entry is for.
+     * 
+ * + * string job_id = 2; + * + * @param value The jobId to set. + * @return This builder for chaining. + */ + public Builder setJobId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + jobId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * The identifier of the specific data scan job this log entry is for.
+     * 
+ * + * string job_id = 2; + * + * @return This builder for chaining. + */ + public Builder clearJobId() { + jobId_ = getDefaultInstance().getJobId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * The identifier of the specific data scan job this log entry is for.
+     * 
+ * + * string job_id = 2; + * + * @param value The bytes for jobId to set. + * @return This builder for chaining. + */ + public Builder setJobIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + jobId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * The time when the data scan job was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 12; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * The time when the data scan job was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 12; + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The time when the data scan job was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 12; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * The time when the data scan job was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 12; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); } - resultCase_ = 0; - result_ = null; + bitField0_ |= 0x00000004; + onChanged(); return this; } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.dataplex.v1.LogsProto - .internal_static_google_cloud_dataplex_v1_DataScanEvent_descriptor; - } - - @java.lang.Override - public com.google.cloud.dataplex.v1.DataScanEvent getDefaultInstanceForType() { - return com.google.cloud.dataplex.v1.DataScanEvent.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.dataplex.v1.DataScanEvent build() { - com.google.cloud.dataplex.v1.DataScanEvent result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); + /** + * + * + *
+     * The time when the data scan job was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 12; + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); } - return result; + bitField0_ |= 0x00000004; + onChanged(); + return this; } - - @java.lang.Override - public com.google.cloud.dataplex.v1.DataScanEvent buildPartial() { - com.google.cloud.dataplex.v1.DataScanEvent result = - new com.google.cloud.dataplex.v1.DataScanEvent(this); - if (bitField0_ != 0) { - buildPartial0(result); + /** + * + * + *
+     * The time when the data scan job was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 12; + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; } - buildPartialOneofs(result); - onBuilt(); - return result; + onChanged(); + return this; } - - private void buildPartial0(com.google.cloud.dataplex.v1.DataScanEvent result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.dataSource_ = dataSource_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.jobId_ = jobId_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.startTime_ = startTimeBuilder_ == null ? startTime_ : startTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.endTime_ = endTimeBuilder_ == null ? endTime_ : endTimeBuilder_.build(); - } - if (((from_bitField0_ & 0x00000010) != 0)) { - result.type_ = type_; - } - if (((from_bitField0_ & 0x00000020) != 0)) { - result.state_ = state_; - } - if (((from_bitField0_ & 0x00000040) != 0)) { - result.message_ = message_; - } - if (((from_bitField0_ & 0x00000080) != 0)) { - result.specVersion_ = specVersion_; - } - if (((from_bitField0_ & 0x00000100) != 0)) { - result.trigger_ = trigger_; - } - if (((from_bitField0_ & 0x00000200) != 0)) { - result.scope_ = scope_; - } + /** + * + * + *
+     * The time when the data scan job was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 12; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); } - - private void buildPartialOneofs(com.google.cloud.dataplex.v1.DataScanEvent result) { - result.resultCase_ = resultCase_; - result.result_ = this.result_; - if (resultCase_ == 101 && dataProfileBuilder_ != null) { - result.result_ = dataProfileBuilder_.build(); - } - if (resultCase_ == 102 && dataQualityBuilder_ != null) { - result.result_ = dataQualityBuilder_.build(); + /** + * + * + *
+     * The time when the data scan job was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 12; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; } } - - @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); + /** + * + * + *
+     * The time when the data scan job was created.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 12; + */ + 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_; } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); + 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 time when the data scan job started to run.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 3; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return ((bitField0_ & 0x00000008) != 0); } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); + /** + * + * + *
+     * The time when the data scan job started to run.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 3; + * + * @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(); + } } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); + /** + * + * + *
+     * The time when the data scan job started to run.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 3; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + } else { + startTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + /** + * + * + *
+     * The time when the data scan job started to run.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 3; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.dataplex.v1.DataScanEvent) { - return mergeFrom((com.google.cloud.dataplex.v1.DataScanEvent) other); + /** + * + * + *
+     * The time when the data scan job started to run.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 3; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && startTime_ != null + && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getStartTimeBuilder().mergeFrom(value); + } else { + startTime_ = value; + } } else { - super.mergeFrom(other); - return this; + startTimeBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000008; + onChanged(); + return this; } - - public Builder mergeFrom(com.google.cloud.dataplex.v1.DataScanEvent other) { - if (other == com.google.cloud.dataplex.v1.DataScanEvent.getDefaultInstance()) return this; - if (!other.getDataSource().isEmpty()) { - dataSource_ = other.dataSource_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (!other.getJobId().isEmpty()) { - jobId_ = other.jobId_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasStartTime()) { - mergeStartTime(other.getStartTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - if (other.type_ != 0) { - setTypeValue(other.getTypeValue()); - } - if (other.state_ != 0) { - setStateValue(other.getStateValue()); - } - if (!other.getMessage().isEmpty()) { - message_ = other.message_; - bitField0_ |= 0x00000040; - onChanged(); - } - if (!other.getSpecVersion().isEmpty()) { - specVersion_ = other.specVersion_; - bitField0_ |= 0x00000080; - onChanged(); - } - if (other.trigger_ != 0) { - setTriggerValue(other.getTriggerValue()); - } - if (other.scope_ != 0) { - setScopeValue(other.getScopeValue()); - } - switch (other.getResultCase()) { - case DATA_PROFILE: - { - mergeDataProfile(other.getDataProfile()); - break; - } - case DATA_QUALITY: - { - mergeDataQuality(other.getDataQuality()); - break; - } - case RESULT_NOT_SET: - { - break; - } + /** + * + * + *
+     * The time when the data scan job started to run.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 3; + */ + public Builder clearStartTime() { + bitField0_ = (bitField0_ & ~0x00000008); + startTime_ = null; + if (startTimeBuilder_ != null) { + startTimeBuilder_.dispose(); + startTimeBuilder_ = null; } - this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } - - @java.lang.Override - public final boolean isInitialized() { - return true; + /** + * + * + *
+     * The time when the data scan job started to run.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); } - - @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(); + /** + * + * + *
+     * The time when the data scan job started to run.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - dataSource_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: - { - jobId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: - { - input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: - { - input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 40: - { - type_ = input.readEnum(); - bitField0_ |= 0x00000010; - break; - } // case 40 - case 48: - { - state_ = input.readEnum(); - bitField0_ |= 0x00000020; - break; - } // case 48 - case 58: - { - message_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - break; - } // case 58 - case 66: - { - specVersion_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - break; - } // case 66 - case 72: - { - trigger_ = input.readEnum(); - bitField0_ |= 0x00000100; - break; - } // case 72 - case 80: - { - scope_ = input.readEnum(); - bitField0_ |= 0x00000200; - break; - } // case 80 - case 810: - { - input.readMessage(getDataProfileFieldBuilder().getBuilder(), extensionRegistry); - resultCase_ = 101; - break; - } // case 810 - case 818: - { - input.readMessage(getDataQualityFieldBuilder().getBuilder(), extensionRegistry); - resultCase_ = 102; - break; - } // case 818 - 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 resultCase_ = 0; - private java.lang.Object result_; - - public ResultCase getResultCase() { - return ResultCase.forNumber(resultCase_); + /** + * + * + *
+     * The time when the data scan job started to run.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 3; + */ + 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_; } - public Builder clearResult() { - resultCase_ = 0; - result_ = null; - onChanged(); - return this; + 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 time when the data scan job finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 4; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return ((bitField0_ & 0x00000010) != 0); } - - private int bitField0_; - - private java.lang.Object dataSource_ = ""; /** * * *
-     * The data source of the data scan
+     * The time when the data scan job finished.
      * 
* - * string data_source = 1; + * .google.protobuf.Timestamp end_time = 4; * - * @return The dataSource. + * @return The endTime. */ - public java.lang.String getDataSource() { - java.lang.Object ref = dataSource_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - dataSource_ = s; - return s; + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } else { - return (java.lang.String) ref; + return endTimeBuilder_.getMessage(); } } /** * * *
-     * The data source of the data scan
+     * The time when the data scan job finished.
      * 
* - * string data_source = 1; - * - * @return The bytes for dataSource. + * .google.protobuf.Timestamp end_time = 4; */ - public com.google.protobuf.ByteString getDataSourceBytes() { - java.lang.Object ref = dataSource_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - dataSource_ = b; - return b; + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; } else { - return (com.google.protobuf.ByteString) ref; + endTimeBuilder_.setMessage(value); } + bitField0_ |= 0x00000010; + onChanged(); + return this; } /** * * *
-     * The data source of the data scan
+     * The time when the data scan job finished.
      * 
* - * string data_source = 1; - * - * @param value The dataSource to set. - * @return This builder for chaining. + * .google.protobuf.Timestamp end_time = 4; */ - public Builder setDataSource(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); } - dataSource_ = value; - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -3712,16 +8146,24 @@ public Builder setDataSource(java.lang.String value) { * * *
-     * The data source of the data scan
+     * The time when the data scan job finished.
      * 
* - * string data_source = 1; - * - * @return This builder for chaining. + * .google.protobuf.Timestamp end_time = 4; */ - public Builder clearDataSource() { - dataSource_ = getDefaultInstance().getDataSource(); - bitField0_ = (bitField0_ & ~0x00000001); + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && endTime_ != null + && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getEndTimeBuilder().mergeFrom(value); + } else { + endTime_ = value; + } + } else { + endTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -3729,251 +8171,324 @@ public Builder clearDataSource() { * * *
-     * The data source of the data scan
+     * The time when the data scan job finished.
      * 
* - * string data_source = 1; - * - * @param value The bytes for dataSource to set. - * @return This builder for chaining. + * .google.protobuf.Timestamp end_time = 4; */ - public Builder setDataSourceBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder clearEndTime() { + bitField0_ = (bitField0_ & ~0x00000010); + endTime_ = null; + if (endTimeBuilder_ != null) { + endTimeBuilder_.dispose(); + endTimeBuilder_ = null; } - checkByteStringIsUtf8(value); - dataSource_ = value; - bitField0_ |= 0x00000001; onChanged(); return this; } - - private java.lang.Object jobId_ = ""; /** * * *
-     * The identifier of the specific data scan job this log entry is for.
+     * The time when the data scan job finished.
      * 
* - * string job_id = 2; + * .google.protobuf.Timestamp end_time = 4; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** * - * @return The jobId. + * + *
+     * The time when the data scan job finished.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 4; */ - public java.lang.String getJobId() { - java.lang.Object ref = jobId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - jobId_ = s; - return s; + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); } else { - return (java.lang.String) ref; + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } } /** * * *
-     * The identifier of the specific data scan job this log entry is for.
+     * The time when the data scan job finished.
      * 
* - * string job_id = 2; - * - * @return The bytes for jobId. + * .google.protobuf.Timestamp end_time = 4; */ - public com.google.protobuf.ByteString getJobIdBytes() { - java.lang.Object ref = jobId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - jobId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + 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 type_ = 0; /** * * *
-     * The identifier of the specific data scan job this log entry is for.
+     * The type of the data scan.
      * 
* - * string job_id = 2; + * .google.cloud.dataplex.v1.DataScanEvent.ScanType type = 5; * - * @param value The jobId to set. + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * The type of the data scan.
+     * 
+ * + * .google.cloud.dataplex.v1.DataScanEvent.ScanType type = 5; + * + * @param value The enum numeric value on the wire for type to set. * @return This builder for chaining. */ - public Builder setJobId(java.lang.String value) { + public Builder setTypeValue(int value) { + type_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the data scan.
+     * 
+ * + * .google.cloud.dataplex.v1.DataScanEvent.ScanType type = 5; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.ScanType getType() { + com.google.cloud.dataplex.v1.DataScanEvent.ScanType result = + com.google.cloud.dataplex.v1.DataScanEvent.ScanType.forNumber(type_); + return result == null + ? com.google.cloud.dataplex.v1.DataScanEvent.ScanType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The type of the data scan.
+     * 
+ * + * .google.cloud.dataplex.v1.DataScanEvent.ScanType type = 5; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.dataplex.v1.DataScanEvent.ScanType value) { if (value == null) { throw new NullPointerException(); } - jobId_ = value; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000020; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of the data scan.
+     * 
+ * + * .google.cloud.dataplex.v1.DataScanEvent.ScanType type = 5; + * + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000020); + type_ = 0; onChanged(); return this; } + + private int state_ = 0; /** * * *
-     * The identifier of the specific data scan job this log entry is for.
+     * The status of the data scan job.
      * 
* - * string job_id = 2; + * .google.cloud.dataplex.v1.DataScanEvent.State state = 6; * - * @return This builder for chaining. + * @return The enum numeric value on the wire for state. */ - public Builder clearJobId() { - jobId_ = getDefaultInstance().getJobId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; + @java.lang.Override + public int getStateValue() { + return state_; } /** * * *
-     * The identifier of the specific data scan job this log entry is for.
+     * The status of the data scan job.
      * 
* - * string job_id = 2; + * .google.cloud.dataplex.v1.DataScanEvent.State state = 6; * - * @param value The bytes for jobId to set. + * @param value The enum numeric value on the wire for state to set. * @return This builder for chaining. */ - public Builder setJobIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - jobId_ = value; - bitField0_ |= 0x00000002; + public Builder setStateValue(int value) { + state_ = value; + bitField0_ |= 0x00000040; 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 time when the data scan job started to run.
+     * The status of the data scan job.
      * 
* - * .google.protobuf.Timestamp start_time = 3; + * .google.cloud.dataplex.v1.DataScanEvent.State state = 6; * - * @return Whether the startTime field is set. + * @return The state. */ - public boolean hasStartTime() { - return ((bitField0_ & 0x00000004) != 0); + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.State getState() { + com.google.cloud.dataplex.v1.DataScanEvent.State result = + com.google.cloud.dataplex.v1.DataScanEvent.State.forNumber(state_); + return result == null + ? com.google.cloud.dataplex.v1.DataScanEvent.State.UNRECOGNIZED + : result; } /** * * *
-     * The time when the data scan job started to run.
+     * The status of the data scan job.
      * 
* - * .google.protobuf.Timestamp start_time = 3; + * .google.cloud.dataplex.v1.DataScanEvent.State state = 6; * - * @return The startTime. + * @param value The state to set. + * @return This builder for chaining. */ - public com.google.protobuf.Timestamp getStartTime() { - if (startTimeBuilder_ == null) { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } else { - return startTimeBuilder_.getMessage(); + public Builder setState(com.google.cloud.dataplex.v1.DataScanEvent.State value) { + if (value == null) { + throw new NullPointerException(); } + bitField0_ |= 0x00000040; + state_ = value.getNumber(); + onChanged(); + return this; } /** * * *
-     * The time when the data scan job started to run.
+     * The status of the data scan job.
      * 
* - * .google.protobuf.Timestamp start_time = 3; + * .google.cloud.dataplex.v1.DataScanEvent.State state = 6; + * + * @return This builder for chaining. */ - public Builder setStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - startTime_ = value; - } else { - startTimeBuilder_.setMessage(value); - } - bitField0_ |= 0x00000004; + public Builder clearState() { + bitField0_ = (bitField0_ & ~0x00000040); + state_ = 0; onChanged(); return this; } + + private java.lang.Object message_ = ""; /** * * *
-     * The time when the data scan job started to run.
+     * The message describing the data scan job event.
      * 
* - * .google.protobuf.Timestamp start_time = 3; + * string message = 7; + * + * @return The message. */ - public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (startTimeBuilder_ == null) { - startTime_ = builderForValue.build(); + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; } else { - startTimeBuilder_.setMessage(builderForValue.build()); + return (java.lang.String) ref; } - bitField0_ |= 0x00000004; - onChanged(); - return this; } /** * * *
-     * The time when the data scan job started to run.
+     * The message describing the data scan job event.
      * 
* - * .google.protobuf.Timestamp start_time = 3; + * string message = 7; + * + * @return The bytes for message. */ - public Builder mergeStartTime(com.google.protobuf.Timestamp value) { - if (startTimeBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) - && startTime_ != null - && startTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getStartTimeBuilder().mergeFrom(value); - } else { - startTime_ = value; - } + public com.google.protobuf.ByteString getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + message_ = b; + return b; } else { - startTimeBuilder_.mergeFrom(value); + return (com.google.protobuf.ByteString) ref; } - bitField0_ |= 0x00000004; - onChanged(); - return this; } /** * * *
-     * The time when the data scan job started to run.
+     * The message describing the data scan job event.
      * 
* - * .google.protobuf.Timestamp start_time = 3; + * string message = 7; + * + * @param value The message to set. + * @return This builder for chaining. */ - public Builder clearStartTime() { - bitField0_ = (bitField0_ & ~0x00000004); - startTime_ = null; - if (startTimeBuilder_ != null) { - startTimeBuilder_.dispose(); - startTimeBuilder_ = null; + public Builder setMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } + message_ = value; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -3981,115 +8496,105 @@ public Builder clearStartTime() { * * *
-     * The time when the data scan job started to run.
+     * The message describing the data scan job event.
      * 
* - * .google.protobuf.Timestamp start_time = 3; + * string message = 7; + * + * @return This builder for chaining. */ - public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { - bitField0_ |= 0x00000004; + public Builder clearMessage() { + message_ = getDefaultInstance().getMessage(); + bitField0_ = (bitField0_ & ~0x00000080); onChanged(); - return getStartTimeFieldBuilder().getBuilder(); + return this; } /** * * *
-     * The time when the data scan job started to run.
+     * The message describing the data scan job event.
      * 
* - * .google.protobuf.Timestamp start_time = 3; - */ - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { - if (startTimeBuilder_ != null) { - return startTimeBuilder_.getMessageOrBuilder(); - } else { - return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; - } - } - /** - * - * - *
-     * The time when the data scan job started to run.
-     * 
+ * string message = 7; * - * .google.protobuf.Timestamp start_time = 3; + * @param value The bytes for message to set. + * @return This builder for chaining. */ - 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; + public Builder setMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - return startTimeBuilder_; + checkByteStringIsUtf8(value); + message_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; } - 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_; + private java.lang.Object specVersion_ = ""; /** * * *
-     * The time when the data scan job finished.
+     * A version identifier of the spec which was used to execute this job.
      * 
* - * .google.protobuf.Timestamp end_time = 4; + * string spec_version = 8; * - * @return Whether the endTime field is set. + * @return The specVersion. */ - public boolean hasEndTime() { - return ((bitField0_ & 0x00000008) != 0); + public java.lang.String getSpecVersion() { + java.lang.Object ref = specVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + specVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } } /** * * *
-     * The time when the data scan job finished.
+     * A version identifier of the spec which was used to execute this job.
      * 
* - * .google.protobuf.Timestamp end_time = 4; + * string spec_version = 8; * - * @return The endTime. + * @return The bytes for specVersion. */ - public com.google.protobuf.Timestamp getEndTime() { - if (endTimeBuilder_ == null) { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + public com.google.protobuf.ByteString getSpecVersionBytes() { + java.lang.Object ref = specVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + specVersion_ = b; + return b; } else { - return endTimeBuilder_.getMessage(); + return (com.google.protobuf.ByteString) ref; } } /** * * *
-     * The time when the data scan job finished.
+     * A version identifier of the spec which was used to execute this job.
      * 
* - * .google.protobuf.Timestamp end_time = 4; + * string spec_version = 8; + * + * @param value The specVersion to set. + * @return This builder for chaining. */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - endTime_ = value; - } else { - endTimeBuilder_.setMessage(value); + public Builder setSpecVersion(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); } - bitField0_ |= 0x00000008; + specVersion_ = value; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -4097,18 +8602,16 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) { * * *
-     * The time when the data scan job finished.
+     * A version identifier of the spec which was used to execute this job.
      * 
* - * .google.protobuf.Timestamp end_time = 4; + * string spec_version = 8; + * + * @return This builder for chaining. */ - public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; + public Builder clearSpecVersion() { + specVersion_ = getDefaultInstance().getSpecVersion(); + bitField0_ = (bitField0_ & ~0x00000100); onChanged(); return this; } @@ -4116,43 +8619,56 @@ public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) * * *
-     * The time when the data scan job finished.
+     * A version identifier of the spec which was used to execute this job.
      * 
* - * .google.protobuf.Timestamp end_time = 4; + * string spec_version = 8; + * + * @param value The bytes for specVersion to set. + * @return This builder for chaining. */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { - if (endTimeBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) - && endTime_ != null - && endTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { - getEndTimeBuilder().mergeFrom(value); - } else { - endTime_ = value; - } - } else { - endTimeBuilder_.mergeFrom(value); + public Builder setSpecVersionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } - bitField0_ |= 0x00000008; + checkByteStringIsUtf8(value); + specVersion_ = value; + bitField0_ |= 0x00000100; onChanged(); return this; } + + private int trigger_ = 0; /** * * *
-     * The time when the data scan job finished.
+     * The trigger type of the data scan job.
      * 
* - * .google.protobuf.Timestamp end_time = 4; + * .google.cloud.dataplex.v1.DataScanEvent.Trigger trigger = 9; + * + * @return The enum numeric value on the wire for trigger. */ - public Builder clearEndTime() { - bitField0_ = (bitField0_ & ~0x00000008); - endTime_ = null; - if (endTimeBuilder_ != null) { - endTimeBuilder_.dispose(); - endTimeBuilder_ = null; - } + @java.lang.Override + public int getTriggerValue() { + return trigger_; + } + /** + * + * + *
+     * The trigger type of the data scan job.
+     * 
+ * + * .google.cloud.dataplex.v1.DataScanEvent.Trigger trigger = 9; + * + * @param value The enum numeric value on the wire for trigger to set. + * @return This builder for chaining. + */ + public Builder setTriggerValue(int value) { + trigger_ = value; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -4160,89 +8676,91 @@ public Builder clearEndTime() { * * *
-     * The time when the data scan job finished.
+     * The trigger type of the data scan job.
      * 
* - * .google.protobuf.Timestamp end_time = 4; + * .google.cloud.dataplex.v1.DataScanEvent.Trigger trigger = 9; + * + * @return The trigger. */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.Trigger getTrigger() { + com.google.cloud.dataplex.v1.DataScanEvent.Trigger result = + com.google.cloud.dataplex.v1.DataScanEvent.Trigger.forNumber(trigger_); + return result == null + ? com.google.cloud.dataplex.v1.DataScanEvent.Trigger.UNRECOGNIZED + : result; } /** * * *
-     * The time when the data scan job finished.
+     * The trigger type of the data scan job.
      * 
* - * .google.protobuf.Timestamp end_time = 4; + * .google.cloud.dataplex.v1.DataScanEvent.Trigger trigger = 9; + * + * @param value The trigger to set. + * @return This builder for chaining. */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + public Builder setTrigger(com.google.cloud.dataplex.v1.DataScanEvent.Trigger value) { + if (value == null) { + throw new NullPointerException(); } + bitField0_ |= 0x00000200; + trigger_ = value.getNumber(); + onChanged(); + return this; } /** * * *
-     * The time when the data scan job finished.
+     * The trigger type of the data scan job.
      * 
* - * .google.protobuf.Timestamp end_time = 4; + * .google.cloud.dataplex.v1.DataScanEvent.Trigger trigger = 9; + * + * @return This builder for chaining. */ - 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_; + public Builder clearTrigger() { + bitField0_ = (bitField0_ & ~0x00000200); + trigger_ = 0; + onChanged(); + return this; } - private int type_ = 0; + private int scope_ = 0; /** * * *
-     * The type of the data scan.
+     * The scope of the data scan (e.g. full, incremental).
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.ScanType type = 5; + * .google.cloud.dataplex.v1.DataScanEvent.Scope scope = 10; * - * @return The enum numeric value on the wire for type. + * @return The enum numeric value on the wire for scope. */ @java.lang.Override - public int getTypeValue() { - return type_; + public int getScopeValue() { + return scope_; } /** * * *
-     * The type of the data scan.
+     * The scope of the data scan (e.g. full, incremental).
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.ScanType type = 5; + * .google.cloud.dataplex.v1.DataScanEvent.Scope scope = 10; * - * @param value The enum numeric value on the wire for type to set. + * @param value The enum numeric value on the wire for scope to set. * @return This builder for chaining. */ - public Builder setTypeValue(int value) { - type_ = value; - bitField0_ |= 0x00000010; + public Builder setScopeValue(int value) { + scope_ = value; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -4250,39 +8768,39 @@ public Builder setTypeValue(int value) { * * *
-     * The type of the data scan.
+     * The scope of the data scan (e.g. full, incremental).
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.ScanType type = 5; + * .google.cloud.dataplex.v1.DataScanEvent.Scope scope = 10; * - * @return The type. + * @return The scope. */ @java.lang.Override - public com.google.cloud.dataplex.v1.DataScanEvent.ScanType getType() { - com.google.cloud.dataplex.v1.DataScanEvent.ScanType result = - com.google.cloud.dataplex.v1.DataScanEvent.ScanType.forNumber(type_); + public com.google.cloud.dataplex.v1.DataScanEvent.Scope getScope() { + com.google.cloud.dataplex.v1.DataScanEvent.Scope result = + com.google.cloud.dataplex.v1.DataScanEvent.Scope.forNumber(scope_); return result == null - ? com.google.cloud.dataplex.v1.DataScanEvent.ScanType.UNRECOGNIZED + ? com.google.cloud.dataplex.v1.DataScanEvent.Scope.UNRECOGNIZED : result; } /** * * *
-     * The type of the data scan.
+     * The scope of the data scan (e.g. full, incremental).
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.ScanType type = 5; + * .google.cloud.dataplex.v1.DataScanEvent.Scope scope = 10; * - * @param value The type to set. + * @param value The scope to set. * @return This builder for chaining. */ - public Builder setType(com.google.cloud.dataplex.v1.DataScanEvent.ScanType value) { + public Builder setScope(com.google.cloud.dataplex.v1.DataScanEvent.Scope value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000010; - type_ = value.getNumber(); + bitField0_ |= 0x00000400; + scope_ = value.getNumber(); onChanged(); return this; } @@ -4290,653 +8808,859 @@ public Builder setType(com.google.cloud.dataplex.v1.DataScanEvent.ScanType value * * *
-     * The type of the data scan.
+     * The scope of the data scan (e.g. full, incremental).
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.ScanType type = 5; + * .google.cloud.dataplex.v1.DataScanEvent.Scope scope = 10; * * @return This builder for chaining. */ - public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000010); - type_ = 0; + public Builder clearScope() { + bitField0_ = (bitField0_ & ~0x00000400); + scope_ = 0; onChanged(); return this; } - - private int state_ = 0; + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult, + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.Builder, + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResultOrBuilder> + dataProfileBuilder_; + /** + * + * + *
+     * Data profile result for data profile type data scan.
+     * 
+ * + * .google.cloud.dataplex.v1.DataScanEvent.DataProfileResult data_profile = 101; + * + * @return Whether the dataProfile field is set. + */ + @java.lang.Override + public boolean hasDataProfile() { + return resultCase_ == 101; + } + /** + * + * + *
+     * Data profile result for data profile type data scan.
+     * 
+ * + * .google.cloud.dataplex.v1.DataScanEvent.DataProfileResult data_profile = 101; + * + * @return The dataProfile. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult getDataProfile() { + if (dataProfileBuilder_ == null) { + if (resultCase_ == 101) { + return (com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult) result_; + } + return com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.getDefaultInstance(); + } else { + if (resultCase_ == 101) { + return dataProfileBuilder_.getMessage(); + } + return com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.getDefaultInstance(); + } + } /** * * *
-     * The status of the data scan job.
+     * Data profile result for data profile type data scan.
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.State state = 6; - * - * @return The enum numeric value on the wire for state. + * .google.cloud.dataplex.v1.DataScanEvent.DataProfileResult data_profile = 101; */ - @java.lang.Override - public int getStateValue() { - return state_; + public Builder setDataProfile( + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult value) { + if (dataProfileBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + dataProfileBuilder_.setMessage(value); + } + resultCase_ = 101; + return this; } /** * * *
-     * The status of the data scan job.
+     * Data profile result for data profile type data scan.
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.State state = 6; - * - * @param value The enum numeric value on the wire for state to set. - * @return This builder for chaining. + * .google.cloud.dataplex.v1.DataScanEvent.DataProfileResult data_profile = 101; */ - public Builder setStateValue(int value) { - state_ = value; - bitField0_ |= 0x00000020; - onChanged(); + public Builder setDataProfile( + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.Builder builderForValue) { + if (dataProfileBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + dataProfileBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 101; return this; } /** * * *
-     * The status of the data scan job.
+     * Data profile result for data profile type data scan.
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.State state = 6; - * - * @return The state. + * .google.cloud.dataplex.v1.DataScanEvent.DataProfileResult data_profile = 101; */ - @java.lang.Override - public com.google.cloud.dataplex.v1.DataScanEvent.State getState() { - com.google.cloud.dataplex.v1.DataScanEvent.State result = - com.google.cloud.dataplex.v1.DataScanEvent.State.forNumber(state_); - return result == null - ? com.google.cloud.dataplex.v1.DataScanEvent.State.UNRECOGNIZED - : result; + public Builder mergeDataProfile( + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult value) { + if (dataProfileBuilder_ == null) { + if (resultCase_ == 101 + && result_ + != com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + .getDefaultInstance()) { + result_ = + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.newBuilder( + (com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult) result_) + .mergeFrom(value) + .buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 101) { + dataProfileBuilder_.mergeFrom(value); + } else { + dataProfileBuilder_.setMessage(value); + } + } + resultCase_ = 101; + return this; } /** * * *
-     * The status of the data scan job.
+     * Data profile result for data profile type data scan.
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.State state = 6; - * - * @param value The state to set. - * @return This builder for chaining. + * .google.cloud.dataplex.v1.DataScanEvent.DataProfileResult data_profile = 101; */ - public Builder setState(com.google.cloud.dataplex.v1.DataScanEvent.State value) { - if (value == null) { - throw new NullPointerException(); + public Builder clearDataProfile() { + if (dataProfileBuilder_ == null) { + if (resultCase_ == 101) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 101) { + resultCase_ = 0; + result_ = null; + } + dataProfileBuilder_.clear(); } - bitField0_ |= 0x00000020; - state_ = value.getNumber(); - onChanged(); return this; } /** * * *
-     * The status of the data scan job.
+     * Data profile result for data profile type data scan.
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.State state = 6; - * - * @return This builder for chaining. + * .google.cloud.dataplex.v1.DataScanEvent.DataProfileResult data_profile = 101; */ - public Builder clearState() { - bitField0_ = (bitField0_ & ~0x00000020); - state_ = 0; - onChanged(); - return this; + public com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.Builder + getDataProfileBuilder() { + return getDataProfileFieldBuilder().getBuilder(); } - - private java.lang.Object message_ = ""; /** * * *
-     * The message describing the data scan job event.
+     * Data profile result for data profile type data scan.
      * 
* - * string message = 7; - * - * @return The message. + * .google.cloud.dataplex.v1.DataScanEvent.DataProfileResult data_profile = 101; */ - public java.lang.String getMessage() { - java.lang.Object ref = message_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - message_ = s; - return s; + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResultOrBuilder + getDataProfileOrBuilder() { + if ((resultCase_ == 101) && (dataProfileBuilder_ != null)) { + return dataProfileBuilder_.getMessageOrBuilder(); } else { - return (java.lang.String) ref; + if (resultCase_ == 101) { + return (com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult) result_; + } + return com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.getDefaultInstance(); } } /** * * *
-     * The message describing the data scan job event.
+     * Data profile result for data profile type data scan.
      * 
* - * string message = 7; - * - * @return The bytes for message. + * .google.cloud.dataplex.v1.DataScanEvent.DataProfileResult data_profile = 101; */ - public com.google.protobuf.ByteString getMessageBytes() { - java.lang.Object ref = message_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - message_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult, + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.Builder, + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResultOrBuilder> + getDataProfileFieldBuilder() { + if (dataProfileBuilder_ == null) { + if (!(resultCase_ == 101)) { + result_ = + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.getDefaultInstance(); + } + dataProfileBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult, + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.Builder, + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResultOrBuilder>( + (com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult) result_, + getParentForChildren(), + isClean()); + result_ = null; } + resultCase_ = 101; + onChanged(); + return dataProfileBuilder_; } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult, + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.Builder, + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResultOrBuilder> + dataQualityBuilder_; /** * * *
-     * The message describing the data scan job event.
+     * Data quality result for data quality type data scan.
      * 
* - * string message = 7; + * .google.cloud.dataplex.v1.DataScanEvent.DataQualityResult data_quality = 102; * - * @param value The message to set. - * @return This builder for chaining. + * @return Whether the dataQuality field is set. */ - public Builder setMessage(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - message_ = value; - bitField0_ |= 0x00000040; - onChanged(); - return this; + @java.lang.Override + public boolean hasDataQuality() { + return resultCase_ == 102; } /** * * *
-     * The message describing the data scan job event.
+     * Data quality result for data quality type data scan.
      * 
* - * string message = 7; + * .google.cloud.dataplex.v1.DataScanEvent.DataQualityResult data_quality = 102; * - * @return This builder for chaining. + * @return The dataQuality. */ - public Builder clearMessage() { - message_ = getDefaultInstance().getMessage(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - return this; + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult getDataQuality() { + if (dataQualityBuilder_ == null) { + if (resultCase_ == 102) { + return (com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult) result_; + } + return com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.getDefaultInstance(); + } else { + if (resultCase_ == 102) { + return dataQualityBuilder_.getMessage(); + } + return com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.getDefaultInstance(); + } } /** * * *
-     * The message describing the data scan job event.
+     * Data quality result for data quality type data scan.
      * 
* - * string message = 7; - * - * @param value The bytes for message to set. - * @return This builder for chaining. + * .google.cloud.dataplex.v1.DataScanEvent.DataQualityResult data_quality = 102; */ - public Builder setMessageBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder setDataQuality( + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult value) { + if (dataQualityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + dataQualityBuilder_.setMessage(value); } - checkByteStringIsUtf8(value); - message_ = value; - bitField0_ |= 0x00000040; - onChanged(); + resultCase_ = 102; return this; } - - private java.lang.Object specVersion_ = ""; /** * * *
-     * A version identifier of the spec which was used to execute this job.
+     * Data quality result for data quality type data scan.
      * 
* - * string spec_version = 8; - * - * @return The specVersion. + * .google.cloud.dataplex.v1.DataScanEvent.DataQualityResult data_quality = 102; */ - public java.lang.String getSpecVersion() { - java.lang.Object ref = specVersion_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - specVersion_ = s; - return s; + public Builder setDataQuality( + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.Builder builderForValue) { + if (dataQualityBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); } else { - return (java.lang.String) ref; + dataQualityBuilder_.setMessage(builderForValue.build()); } + resultCase_ = 102; + return this; } /** * * *
-     * A version identifier of the spec which was used to execute this job.
+     * Data quality result for data quality type data scan.
      * 
* - * string spec_version = 8; - * - * @return The bytes for specVersion. + * .google.cloud.dataplex.v1.DataScanEvent.DataQualityResult data_quality = 102; */ - public com.google.protobuf.ByteString getSpecVersionBytes() { - java.lang.Object ref = specVersion_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - specVersion_ = b; - return b; + public Builder mergeDataQuality( + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult value) { + if (dataQualityBuilder_ == null) { + if (resultCase_ == 102 + && result_ + != com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + .getDefaultInstance()) { + result_ = + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.newBuilder( + (com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult) result_) + .mergeFrom(value) + .buildPartial(); + } else { + result_ = value; + } + onChanged(); } else { - return (com.google.protobuf.ByteString) ref; + if (resultCase_ == 102) { + dataQualityBuilder_.mergeFrom(value); + } else { + dataQualityBuilder_.setMessage(value); + } } + resultCase_ = 102; + return this; } /** * * *
-     * A version identifier of the spec which was used to execute this job.
+     * Data quality result for data quality type data scan.
      * 
* - * string spec_version = 8; - * - * @param value The specVersion to set. - * @return This builder for chaining. + * .google.cloud.dataplex.v1.DataScanEvent.DataQualityResult data_quality = 102; */ - public Builder setSpecVersion(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder clearDataQuality() { + if (dataQualityBuilder_ == null) { + if (resultCase_ == 102) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 102) { + resultCase_ = 0; + result_ = null; + } + dataQualityBuilder_.clear(); } - specVersion_ = value; - bitField0_ |= 0x00000080; - onChanged(); return this; } /** * * *
-     * A version identifier of the spec which was used to execute this job.
+     * Data quality result for data quality type data scan.
      * 
* - * string spec_version = 8; - * - * @return This builder for chaining. + * .google.cloud.dataplex.v1.DataScanEvent.DataQualityResult data_quality = 102; */ - public Builder clearSpecVersion() { - specVersion_ = getDefaultInstance().getSpecVersion(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - return this; + public com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.Builder + getDataQualityBuilder() { + return getDataQualityFieldBuilder().getBuilder(); } /** * * *
-     * A version identifier of the spec which was used to execute this job.
+     * Data quality result for data quality type data scan.
      * 
* - * string spec_version = 8; - * - * @param value The bytes for specVersion to set. - * @return This builder for chaining. + * .google.cloud.dataplex.v1.DataScanEvent.DataQualityResult data_quality = 102; */ - public Builder setSpecVersionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResultOrBuilder + getDataQualityOrBuilder() { + if ((resultCase_ == 102) && (dataQualityBuilder_ != null)) { + return dataQualityBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 102) { + return (com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult) result_; + } + return com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.getDefaultInstance(); } - checkByteStringIsUtf8(value); - specVersion_ = value; - bitField0_ |= 0x00000080; - onChanged(); - return this; } - - private int trigger_ = 0; /** * * *
-     * The trigger type of the data scan job.
+     * Data quality result for data quality type data scan.
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.Trigger trigger = 9; - * - * @return The enum numeric value on the wire for trigger. + * .google.cloud.dataplex.v1.DataScanEvent.DataQualityResult data_quality = 102; */ - @java.lang.Override - public int getTriggerValue() { - return trigger_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult, + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.Builder, + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResultOrBuilder> + getDataQualityFieldBuilder() { + if (dataQualityBuilder_ == null) { + if (!(resultCase_ == 102)) { + result_ = + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.getDefaultInstance(); + } + dataQualityBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult, + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.Builder, + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResultOrBuilder>( + (com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult) result_, + getParentForChildren(), + isClean()); + result_ = null; + } + resultCase_ = 102; + onChanged(); + return dataQualityBuilder_; } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs, + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs.Builder, + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigsOrBuilder> + dataProfileConfigsBuilder_; /** * * *
-     * The trigger type of the data scan job.
+     * Applied configs for data profile type data scan.
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.Trigger trigger = 9; + * + * .google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs data_profile_configs = 201; + * * - * @param value The enum numeric value on the wire for trigger to set. - * @return This builder for chaining. + * @return Whether the dataProfileConfigs field is set. */ - public Builder setTriggerValue(int value) { - trigger_ = value; - bitField0_ |= 0x00000100; - onChanged(); - return this; + @java.lang.Override + public boolean hasDataProfileConfigs() { + return appliedConfigsCase_ == 201; } /** * * *
-     * The trigger type of the data scan job.
+     * Applied configs for data profile type data scan.
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.Trigger trigger = 9; + * + * .google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs data_profile_configs = 201; + * * - * @return The trigger. + * @return The dataProfileConfigs. */ @java.lang.Override - public com.google.cloud.dataplex.v1.DataScanEvent.Trigger getTrigger() { - com.google.cloud.dataplex.v1.DataScanEvent.Trigger result = - com.google.cloud.dataplex.v1.DataScanEvent.Trigger.forNumber(trigger_); - return result == null - ? com.google.cloud.dataplex.v1.DataScanEvent.Trigger.UNRECOGNIZED - : result; + public com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs + getDataProfileConfigs() { + if (dataProfileConfigsBuilder_ == null) { + if (appliedConfigsCase_ == 201) { + return (com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs) + appliedConfigs_; + } + return com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs + .getDefaultInstance(); + } else { + if (appliedConfigsCase_ == 201) { + return dataProfileConfigsBuilder_.getMessage(); + } + return com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs + .getDefaultInstance(); + } } /** * * *
-     * The trigger type of the data scan job.
+     * Applied configs for data profile type data scan.
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.Trigger trigger = 9; - * - * @param value The trigger to set. - * @return This builder for chaining. + * + * .google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs data_profile_configs = 201; + * */ - public Builder setTrigger(com.google.cloud.dataplex.v1.DataScanEvent.Trigger value) { - if (value == null) { - throw new NullPointerException(); + public Builder setDataProfileConfigs( + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs value) { + if (dataProfileConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + appliedConfigs_ = value; + onChanged(); + } else { + dataProfileConfigsBuilder_.setMessage(value); } - bitField0_ |= 0x00000100; - trigger_ = value.getNumber(); - onChanged(); + appliedConfigsCase_ = 201; return this; } /** * * *
-     * The trigger type of the data scan job.
+     * Applied configs for data profile type data scan.
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.Trigger trigger = 9; - * - * @return This builder for chaining. + * + * .google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs data_profile_configs = 201; + * */ - public Builder clearTrigger() { - bitField0_ = (bitField0_ & ~0x00000100); - trigger_ = 0; - onChanged(); + public Builder setDataProfileConfigs( + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs.Builder + builderForValue) { + if (dataProfileConfigsBuilder_ == null) { + appliedConfigs_ = builderForValue.build(); + onChanged(); + } else { + dataProfileConfigsBuilder_.setMessage(builderForValue.build()); + } + appliedConfigsCase_ = 201; return this; } - - private int scope_ = 0; /** * * *
-     * The scope of the data scan (e.g. full, incremental).
+     * Applied configs for data profile type data scan.
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.Scope scope = 10; - * - * @return The enum numeric value on the wire for scope. + * + * .google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs data_profile_configs = 201; + * */ - @java.lang.Override - public int getScopeValue() { - return scope_; + public Builder mergeDataProfileConfigs( + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs value) { + if (dataProfileConfigsBuilder_ == null) { + if (appliedConfigsCase_ == 201 + && appliedConfigs_ + != com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs + .getDefaultInstance()) { + appliedConfigs_ = + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs.newBuilder( + (com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs) + appliedConfigs_) + .mergeFrom(value) + .buildPartial(); + } else { + appliedConfigs_ = value; + } + onChanged(); + } else { + if (appliedConfigsCase_ == 201) { + dataProfileConfigsBuilder_.mergeFrom(value); + } else { + dataProfileConfigsBuilder_.setMessage(value); + } + } + appliedConfigsCase_ = 201; + return this; } /** * * *
-     * The scope of the data scan (e.g. full, incremental).
+     * Applied configs for data profile type data scan.
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.Scope scope = 10; - * - * @param value The enum numeric value on the wire for scope to set. - * @return This builder for chaining. + * + * .google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs data_profile_configs = 201; + * */ - public Builder setScopeValue(int value) { - scope_ = value; - bitField0_ |= 0x00000200; - onChanged(); + public Builder clearDataProfileConfigs() { + if (dataProfileConfigsBuilder_ == null) { + if (appliedConfigsCase_ == 201) { + appliedConfigsCase_ = 0; + appliedConfigs_ = null; + onChanged(); + } + } else { + if (appliedConfigsCase_ == 201) { + appliedConfigsCase_ = 0; + appliedConfigs_ = null; + } + dataProfileConfigsBuilder_.clear(); + } return this; } /** * * *
-     * The scope of the data scan (e.g. full, incremental).
+     * Applied configs for data profile type data scan.
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.Scope scope = 10; - * - * @return The scope. + * + * .google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs data_profile_configs = 201; + * */ - @java.lang.Override - public com.google.cloud.dataplex.v1.DataScanEvent.Scope getScope() { - com.google.cloud.dataplex.v1.DataScanEvent.Scope result = - com.google.cloud.dataplex.v1.DataScanEvent.Scope.forNumber(scope_); - return result == null - ? com.google.cloud.dataplex.v1.DataScanEvent.Scope.UNRECOGNIZED - : result; + public com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs.Builder + getDataProfileConfigsBuilder() { + return getDataProfileConfigsFieldBuilder().getBuilder(); } /** * * *
-     * The scope of the data scan (e.g. full, incremental).
+     * Applied configs for data profile type data scan.
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.Scope scope = 10; - * - * @param value The scope to set. - * @return This builder for chaining. + * + * .google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs data_profile_configs = 201; + * */ - public Builder setScope(com.google.cloud.dataplex.v1.DataScanEvent.Scope value) { - if (value == null) { - throw new NullPointerException(); + @java.lang.Override + public com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigsOrBuilder + getDataProfileConfigsOrBuilder() { + if ((appliedConfigsCase_ == 201) && (dataProfileConfigsBuilder_ != null)) { + return dataProfileConfigsBuilder_.getMessageOrBuilder(); + } else { + if (appliedConfigsCase_ == 201) { + return (com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs) + appliedConfigs_; + } + return com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs + .getDefaultInstance(); } - bitField0_ |= 0x00000200; - scope_ = value.getNumber(); - onChanged(); - return this; } /** * * *
-     * The scope of the data scan (e.g. full, incremental).
+     * Applied configs for data profile type data scan.
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.Scope scope = 10; - * - * @return This builder for chaining. + * + * .google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs data_profile_configs = 201; + * */ - public Builder clearScope() { - bitField0_ = (bitField0_ & ~0x00000200); - scope_ = 0; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs, + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs.Builder, + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigsOrBuilder> + getDataProfileConfigsFieldBuilder() { + if (dataProfileConfigsBuilder_ == null) { + if (!(appliedConfigsCase_ == 201)) { + appliedConfigs_ = + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs + .getDefaultInstance(); + } + dataProfileConfigsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs, + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs.Builder, + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigsOrBuilder>( + (com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs) + appliedConfigs_, + getParentForChildren(), + isClean()); + appliedConfigs_ = null; + } + appliedConfigsCase_ = 201; onChanged(); - return this; + return dataProfileConfigsBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult, - com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.Builder, - com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResultOrBuilder> - dataProfileBuilder_; + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs, + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs.Builder, + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigsOrBuilder> + dataQualityConfigsBuilder_; /** * * *
-     * Data profile result for data profile type data scan.
+     * Applied configs for data quality type data scan.
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.DataProfileResult data_profile = 101; + * + * .google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs data_quality_configs = 202; + * * - * @return Whether the dataProfile field is set. + * @return Whether the dataQualityConfigs field is set. */ @java.lang.Override - public boolean hasDataProfile() { - return resultCase_ == 101; + public boolean hasDataQualityConfigs() { + return appliedConfigsCase_ == 202; } /** * * *
-     * Data profile result for data profile type data scan.
+     * Applied configs for data quality type data scan.
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.DataProfileResult data_profile = 101; + * + * .google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs data_quality_configs = 202; + * * - * @return The dataProfile. + * @return The dataQualityConfigs. */ @java.lang.Override - public com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult getDataProfile() { - if (dataProfileBuilder_ == null) { - if (resultCase_ == 101) { - return (com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult) result_; + public com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs + getDataQualityConfigs() { + if (dataQualityConfigsBuilder_ == null) { + if (appliedConfigsCase_ == 202) { + return (com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs) + appliedConfigs_; } - return com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.getDefaultInstance(); + return com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs + .getDefaultInstance(); } else { - if (resultCase_ == 101) { - return dataProfileBuilder_.getMessage(); + if (appliedConfigsCase_ == 202) { + return dataQualityConfigsBuilder_.getMessage(); } - return com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.getDefaultInstance(); + return com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs + .getDefaultInstance(); } } /** * * *
-     * Data profile result for data profile type data scan.
+     * Applied configs for data quality type data scan.
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.DataProfileResult data_profile = 101; + * + * .google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs data_quality_configs = 202; + * */ - public Builder setDataProfile( - com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult value) { - if (dataProfileBuilder_ == null) { + public Builder setDataQualityConfigs( + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs value) { + if (dataQualityConfigsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - result_ = value; + appliedConfigs_ = value; onChanged(); } else { - dataProfileBuilder_.setMessage(value); + dataQualityConfigsBuilder_.setMessage(value); } - resultCase_ = 101; + appliedConfigsCase_ = 202; return this; } /** * * *
-     * Data profile result for data profile type data scan.
+     * Applied configs for data quality type data scan.
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.DataProfileResult data_profile = 101; + * + * .google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs data_quality_configs = 202; + * */ - public Builder setDataProfile( - com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.Builder builderForValue) { - if (dataProfileBuilder_ == null) { - result_ = builderForValue.build(); + public Builder setDataQualityConfigs( + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs.Builder + builderForValue) { + if (dataQualityConfigsBuilder_ == null) { + appliedConfigs_ = builderForValue.build(); onChanged(); } else { - dataProfileBuilder_.setMessage(builderForValue.build()); + dataQualityConfigsBuilder_.setMessage(builderForValue.build()); } - resultCase_ = 101; + appliedConfigsCase_ = 202; return this; } /** * * *
-     * Data profile result for data profile type data scan.
+     * Applied configs for data quality type data scan.
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.DataProfileResult data_profile = 101; + * + * .google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs data_quality_configs = 202; + * */ - public Builder mergeDataProfile( - com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult value) { - if (dataProfileBuilder_ == null) { - if (resultCase_ == 101 - && result_ - != com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult + public Builder mergeDataQualityConfigs( + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs value) { + if (dataQualityConfigsBuilder_ == null) { + if (appliedConfigsCase_ == 202 + && appliedConfigs_ + != com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs .getDefaultInstance()) { - result_ = - com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.newBuilder( - (com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult) result_) + appliedConfigs_ = + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs.newBuilder( + (com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs) + appliedConfigs_) .mergeFrom(value) .buildPartial(); } else { - result_ = value; + appliedConfigs_ = value; } onChanged(); } else { - if (resultCase_ == 101) { - dataProfileBuilder_.mergeFrom(value); + if (appliedConfigsCase_ == 202) { + dataQualityConfigsBuilder_.mergeFrom(value); } else { - dataProfileBuilder_.setMessage(value); + dataQualityConfigsBuilder_.setMessage(value); } } - resultCase_ = 101; + appliedConfigsCase_ = 202; return this; } /** * * *
-     * Data profile result for data profile type data scan.
+     * Applied configs for data quality type data scan.
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.DataProfileResult data_profile = 101; + * + * .google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs data_quality_configs = 202; + * */ - public Builder clearDataProfile() { - if (dataProfileBuilder_ == null) { - if (resultCase_ == 101) { - resultCase_ = 0; - result_ = null; + public Builder clearDataQualityConfigs() { + if (dataQualityConfigsBuilder_ == null) { + if (appliedConfigsCase_ == 202) { + appliedConfigsCase_ = 0; + appliedConfigs_ = null; onChanged(); } } else { - if (resultCase_ == 101) { - resultCase_ = 0; - result_ = null; + if (appliedConfigsCase_ == 202) { + appliedConfigsCase_ = 0; + appliedConfigs_ = null; } - dataProfileBuilder_.clear(); + dataQualityConfigsBuilder_.clear(); } return this; } @@ -4944,284 +9668,287 @@ public Builder clearDataProfile() { * * *
-     * Data profile result for data profile type data scan.
+     * Applied configs for data quality type data scan.
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.DataProfileResult data_profile = 101; + * + * .google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs data_quality_configs = 202; + * */ - public com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.Builder - getDataProfileBuilder() { - return getDataProfileFieldBuilder().getBuilder(); + public com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs.Builder + getDataQualityConfigsBuilder() { + return getDataQualityConfigsFieldBuilder().getBuilder(); } /** * * *
-     * Data profile result for data profile type data scan.
+     * Applied configs for data quality type data scan.
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.DataProfileResult data_profile = 101; + * + * .google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs data_quality_configs = 202; + * */ @java.lang.Override - public com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResultOrBuilder - getDataProfileOrBuilder() { - if ((resultCase_ == 101) && (dataProfileBuilder_ != null)) { - return dataProfileBuilder_.getMessageOrBuilder(); + public com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigsOrBuilder + getDataQualityConfigsOrBuilder() { + if ((appliedConfigsCase_ == 202) && (dataQualityConfigsBuilder_ != null)) { + return dataQualityConfigsBuilder_.getMessageOrBuilder(); } else { - if (resultCase_ == 101) { - return (com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult) result_; + if (appliedConfigsCase_ == 202) { + return (com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs) + appliedConfigs_; } - return com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.getDefaultInstance(); + return com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs + .getDefaultInstance(); } } /** * * *
-     * Data profile result for data profile type data scan.
+     * Applied configs for data quality type data scan.
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.DataProfileResult data_profile = 101; + * + * .google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs data_quality_configs = 202; + * */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult, - com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.Builder, - com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResultOrBuilder> - getDataProfileFieldBuilder() { - if (dataProfileBuilder_ == null) { - if (!(resultCase_ == 101)) { - result_ = - com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.getDefaultInstance(); + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs, + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs.Builder, + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigsOrBuilder> + getDataQualityConfigsFieldBuilder() { + if (dataQualityConfigsBuilder_ == null) { + if (!(appliedConfigsCase_ == 202)) { + appliedConfigs_ = + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs + .getDefaultInstance(); } - dataProfileBuilder_ = + dataQualityConfigsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult, - com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult.Builder, - com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResultOrBuilder>( - (com.google.cloud.dataplex.v1.DataScanEvent.DataProfileResult) result_, + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs, + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs.Builder, + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigsOrBuilder>( + (com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs) + appliedConfigs_, getParentForChildren(), isClean()); - result_ = null; + appliedConfigs_ = null; } - resultCase_ = 101; + appliedConfigsCase_ = 202; onChanged(); - return dataProfileBuilder_; + return dataQualityConfigsBuilder_; } + private com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult postScanActionsResult_; private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult, - com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.Builder, - com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResultOrBuilder> - dataQualityBuilder_; + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult, + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.Builder, + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResultOrBuilder> + postScanActionsResultBuilder_; /** * * *
-     * Data quality result for data quality type data scan.
+     * The result of post scan actions.
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.DataQualityResult data_quality = 102; + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult post_scan_actions_result = 11; + * * - * @return Whether the dataQuality field is set. + * @return Whether the postScanActionsResult field is set. */ - @java.lang.Override - public boolean hasDataQuality() { - return resultCase_ == 102; + public boolean hasPostScanActionsResult() { + return ((bitField0_ & 0x00008000) != 0); } /** * * *
-     * Data quality result for data quality type data scan.
+     * The result of post scan actions.
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.DataQualityResult data_quality = 102; + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult post_scan_actions_result = 11; + * * - * @return The dataQuality. + * @return The postScanActionsResult. */ - @java.lang.Override - public com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult getDataQuality() { - if (dataQualityBuilder_ == null) { - if (resultCase_ == 102) { - return (com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult) result_; - } - return com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.getDefaultInstance(); + public com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult + getPostScanActionsResult() { + if (postScanActionsResultBuilder_ == null) { + return postScanActionsResult_ == null + ? com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.getDefaultInstance() + : postScanActionsResult_; } else { - if (resultCase_ == 102) { - return dataQualityBuilder_.getMessage(); - } - return com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.getDefaultInstance(); + return postScanActionsResultBuilder_.getMessage(); } } /** * * *
-     * Data quality result for data quality type data scan.
+     * The result of post scan actions.
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.DataQualityResult data_quality = 102; + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult post_scan_actions_result = 11; + * */ - public Builder setDataQuality( - com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult value) { - if (dataQualityBuilder_ == null) { + public Builder setPostScanActionsResult( + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult value) { + if (postScanActionsResultBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - result_ = value; - onChanged(); + postScanActionsResult_ = value; } else { - dataQualityBuilder_.setMessage(value); + postScanActionsResultBuilder_.setMessage(value); } - resultCase_ = 102; + bitField0_ |= 0x00008000; + onChanged(); return this; } /** * * *
-     * Data quality result for data quality type data scan.
+     * The result of post scan actions.
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.DataQualityResult data_quality = 102; + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult post_scan_actions_result = 11; + * */ - public Builder setDataQuality( - com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.Builder builderForValue) { - if (dataQualityBuilder_ == null) { - result_ = builderForValue.build(); - onChanged(); + public Builder setPostScanActionsResult( + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.Builder builderForValue) { + if (postScanActionsResultBuilder_ == null) { + postScanActionsResult_ = builderForValue.build(); } else { - dataQualityBuilder_.setMessage(builderForValue.build()); + postScanActionsResultBuilder_.setMessage(builderForValue.build()); } - resultCase_ = 102; + bitField0_ |= 0x00008000; + onChanged(); return this; } /** * * *
-     * Data quality result for data quality type data scan.
+     * The result of post scan actions.
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.DataQualityResult data_quality = 102; - */ - public Builder mergeDataQuality( - com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult value) { - if (dataQualityBuilder_ == null) { - if (resultCase_ == 102 - && result_ - != com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult post_scan_actions_result = 11; + * + */ + public Builder mergePostScanActionsResult( + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult value) { + if (postScanActionsResultBuilder_ == null) { + if (((bitField0_ & 0x00008000) != 0) + && postScanActionsResult_ != null + && postScanActionsResult_ + != com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult .getDefaultInstance()) { - result_ = - com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.newBuilder( - (com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult) result_) - .mergeFrom(value) - .buildPartial(); + getPostScanActionsResultBuilder().mergeFrom(value); } else { - result_ = value; + postScanActionsResult_ = value; } - onChanged(); } else { - if (resultCase_ == 102) { - dataQualityBuilder_.mergeFrom(value); - } else { - dataQualityBuilder_.setMessage(value); - } + postScanActionsResultBuilder_.mergeFrom(value); } - resultCase_ = 102; + bitField0_ |= 0x00008000; + onChanged(); return this; } /** * * *
-     * Data quality result for data quality type data scan.
+     * The result of post scan actions.
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.DataQualityResult data_quality = 102; + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult post_scan_actions_result = 11; + * */ - public Builder clearDataQuality() { - if (dataQualityBuilder_ == null) { - if (resultCase_ == 102) { - resultCase_ = 0; - result_ = null; - onChanged(); - } - } else { - if (resultCase_ == 102) { - resultCase_ = 0; - result_ = null; - } - dataQualityBuilder_.clear(); + public Builder clearPostScanActionsResult() { + bitField0_ = (bitField0_ & ~0x00008000); + postScanActionsResult_ = null; + if (postScanActionsResultBuilder_ != null) { + postScanActionsResultBuilder_.dispose(); + postScanActionsResultBuilder_ = null; } + onChanged(); return this; } /** * * *
-     * Data quality result for data quality type data scan.
+     * The result of post scan actions.
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.DataQualityResult data_quality = 102; + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult post_scan_actions_result = 11; + * */ - public com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.Builder - getDataQualityBuilder() { - return getDataQualityFieldBuilder().getBuilder(); + public com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.Builder + getPostScanActionsResultBuilder() { + bitField0_ |= 0x00008000; + onChanged(); + return getPostScanActionsResultFieldBuilder().getBuilder(); } /** * * *
-     * Data quality result for data quality type data scan.
+     * The result of post scan actions.
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.DataQualityResult data_quality = 102; + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult post_scan_actions_result = 11; + * */ - @java.lang.Override - public com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResultOrBuilder - getDataQualityOrBuilder() { - if ((resultCase_ == 102) && (dataQualityBuilder_ != null)) { - return dataQualityBuilder_.getMessageOrBuilder(); + public com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResultOrBuilder + getPostScanActionsResultOrBuilder() { + if (postScanActionsResultBuilder_ != null) { + return postScanActionsResultBuilder_.getMessageOrBuilder(); } else { - if (resultCase_ == 102) { - return (com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult) result_; - } - return com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.getDefaultInstance(); + return postScanActionsResult_ == null + ? com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.getDefaultInstance() + : postScanActionsResult_; } } /** * * *
-     * Data quality result for data quality type data scan.
+     * The result of post scan actions.
      * 
* - * .google.cloud.dataplex.v1.DataScanEvent.DataQualityResult data_quality = 102; + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult post_scan_actions_result = 11; + * */ private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult, - com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.Builder, - com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResultOrBuilder> - getDataQualityFieldBuilder() { - if (dataQualityBuilder_ == null) { - if (!(resultCase_ == 102)) { - result_ = - com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.getDefaultInstance(); - } - dataQualityBuilder_ = + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult, + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.Builder, + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResultOrBuilder> + getPostScanActionsResultFieldBuilder() { + if (postScanActionsResultBuilder_ == null) { + postScanActionsResultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult, - com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult.Builder, - com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResultOrBuilder>( - (com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResult) result_, - getParentForChildren(), - isClean()); - result_ = null; + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult, + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult.Builder, + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResultOrBuilder>( + getPostScanActionsResult(), getParentForChildren(), isClean()); + postScanActionsResult_ = null; } - resultCase_ = 102; - onChanged(); - return dataQualityBuilder_; + return postScanActionsResultBuilder_; } @java.lang.Override diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataScanEventOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataScanEventOrBuilder.java index 7db758abc4ff..b1cf3b92a53e 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataScanEventOrBuilder.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataScanEventOrBuilder.java @@ -73,6 +73,41 @@ public interface DataScanEventOrBuilder */ com.google.protobuf.ByteString getJobIdBytes(); + /** + * + * + *
+   * The time when the data scan job was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 12; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * The time when the data scan job was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 12; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * The time when the data scan job was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 12; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + /** * * @@ -363,5 +398,133 @@ public interface DataScanEventOrBuilder */ com.google.cloud.dataplex.v1.DataScanEvent.DataQualityResultOrBuilder getDataQualityOrBuilder(); + /** + * + * + *
+   * Applied configs for data profile type data scan.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs data_profile_configs = 201; + * + * + * @return Whether the dataProfileConfigs field is set. + */ + boolean hasDataProfileConfigs(); + /** + * + * + *
+   * Applied configs for data profile type data scan.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs data_profile_configs = 201; + * + * + * @return The dataProfileConfigs. + */ + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs getDataProfileConfigs(); + /** + * + * + *
+   * Applied configs for data profile type data scan.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigs data_profile_configs = 201; + * + */ + com.google.cloud.dataplex.v1.DataScanEvent.DataProfileAppliedConfigsOrBuilder + getDataProfileConfigsOrBuilder(); + + /** + * + * + *
+   * Applied configs for data quality type data scan.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs data_quality_configs = 202; + * + * + * @return Whether the dataQualityConfigs field is set. + */ + boolean hasDataQualityConfigs(); + /** + * + * + *
+   * Applied configs for data quality type data scan.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs data_quality_configs = 202; + * + * + * @return The dataQualityConfigs. + */ + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs getDataQualityConfigs(); + /** + * + * + *
+   * Applied configs for data quality type data scan.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigs data_quality_configs = 202; + * + */ + com.google.cloud.dataplex.v1.DataScanEvent.DataQualityAppliedConfigsOrBuilder + getDataQualityConfigsOrBuilder(); + + /** + * + * + *
+   * The result of post scan actions.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult post_scan_actions_result = 11; + * + * + * @return Whether the postScanActionsResult field is set. + */ + boolean hasPostScanActionsResult(); + /** + * + * + *
+   * The result of post scan actions.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult post_scan_actions_result = 11; + * + * + * @return The postScanActionsResult. + */ + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult getPostScanActionsResult(); + /** + * + * + *
+   * The result of post scan actions.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResult post_scan_actions_result = 11; + * + */ + com.google.cloud.dataplex.v1.DataScanEvent.PostScanActionsResultOrBuilder + getPostScanActionsResultOrBuilder(); + com.google.cloud.dataplex.v1.DataScanEvent.ResultCase getResultCase(); + + com.google.cloud.dataplex.v1.DataScanEvent.AppliedConfigsCase getAppliedConfigsCase(); } diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataScansProto.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataScansProto.java index 8608ec5ec914..6a2147ff3eb3 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataScansProto.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataScansProto.java @@ -148,115 +148,116 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "lex.v1.GetDataScanJobRequest.DataScanJob" + "ViewB\004\342A\001\001\"J\n\017DataScanJobView\022\"\n\036DATA_SC" + "AN_JOB_VIEW_UNSPECIFIED\020\000\022\t\n\005BASIC\020\001\022\010\n\004" - + "FULL\020\n\"\207\001\n\027ListDataScanJobsRequest\0229\n\006pa" + + "FULL\020\n\"\235\001\n\027ListDataScanJobsRequest\0229\n\006pa" + "rent\030\001 \001(\tB)\342A\001\002\372A\"\n dataplex.googleapis" + ".com/DataScan\022\027\n\tpage_size\030\002 \001(\005B\004\342A\001\001\022\030" - + "\n\npage_token\030\003 \001(\tB\004\342A\001\001\"r\n\030ListDataScan" - + "JobsResponse\022=\n\016data_scan_jobs\030\001 \003(\0132%.g" - + "oogle.cloud.dataplex.v1.DataScanJob\022\027\n\017n" - + "ext_page_token\030\002 \001(\t\"\301\n\n\010DataScan\022\022\n\004nam" - + "e\030\001 \001(\tB\004\342A\001\003\022\021\n\003uid\030\002 \001(\tB\004\342A\001\003\022\031\n\013desc" - + "ription\030\003 \001(\tB\004\342A\001\001\022\032\n\014display_name\030\004 \001(" - + "\tB\004\342A\001\001\022D\n\006labels\030\005 \003(\0132..google.cloud.d" - + "ataplex.v1.DataScan.LabelsEntryB\004\342A\001\001\0224\n" - + "\005state\030\006 \001(\0162\037.google.cloud.dataplex.v1." - + "StateB\004\342A\001\003\0225\n\013create_time\030\007 \001(\0132\032.googl" - + "e.protobuf.TimestampB\004\342A\001\003\0225\n\013update_tim" - + "e\030\010 \001(\0132\032.google.protobuf.TimestampB\004\342A\001" - + "\003\0228\n\004data\030\t \001(\0132$.google.cloud.dataplex." - + "v1.DataSourceB\004\342A\001\002\022N\n\016execution_spec\030\n " - + "\001(\01320.google.cloud.dataplex.v1.DataScan." - + "ExecutionSpecB\004\342A\001\001\022R\n\020execution_status\030" - + "\013 \001(\01322.google.cloud.dataplex.v1.DataSca" - + "n.ExecutionStatusB\004\342A\001\003\022:\n\004type\030\014 \001(\0162&." - + "google.cloud.dataplex.v1.DataScanTypeB\004\342" - + "A\001\003\022F\n\021data_quality_spec\030d \001(\0132).google." - + "cloud.dataplex.v1.DataQualitySpecH\000\022F\n\021d" - + "ata_profile_spec\030e \001(\0132).google.cloud.da" - + "taplex.v1.DataProfileSpecH\000\022Q\n\023data_qual" - + "ity_result\030\310\001 \001(\0132+.google.cloud.dataple" - + "x.v1.DataQualityResultB\004\342A\001\003H\001\022Q\n\023data_p" - + "rofile_result\030\311\001 \001(\0132+.google.cloud.data" - + "plex.v1.DataProfileResultB\004\342A\001\003H\001\032o\n\rExe" - + "cutionSpec\0228\n\007trigger\030\001 \001(\0132!.google.clo" - + "ud.dataplex.v1.TriggerB\004\342A\001\001\022\025\n\005field\030d " - + "\001(\tB\004\342A\001\005H\000B\r\n\013incremental\032\205\001\n\017Execution" - + "Status\0229\n\025latest_job_start_time\030\004 \001(\0132\032." - + "google.protobuf.Timestamp\0227\n\023latest_job_" - + "end_time\030\005 \001(\0132\032.google.protobuf.Timesta" - + "mp\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" - + "\002 \001(\t:\0028\001:c\352A`\n dataplex.googleapis.com/" - + "DataScan\022\332A\006parent\202\323\344\223\002/\022-/v1/{p" - + "arent=projects/*/locations/*}/dataScans\022" - + "\257\001\n\013RunDataScan\022,.google.cloud.dataplex." - + "v1.RunDataScanRequest\032-.google.cloud.dat" - + "aplex.v1.RunDataScanResponse\"C\332A\004name\202\323\344" - + "\223\0026\"1/v1/{name=projects/*/locations/*/da" - + "taScans/*}:run:\001*\022\255\001\n\016GetDataScanJob\022/.g" - + "oogle.cloud.dataplex.v1.GetDataScanJobRe" - + "quest\032%.google.cloud.dataplex.v1.DataSca" - + "nJob\"C\332A\004name\202\323\344\223\0026\0224/v1/{name=projects/" - + "*/locations/*/dataScans/*/jobs/*}\022\300\001\n\020Li" - + "stDataScanJobs\0221.google.cloud.dataplex.v" - + "1.ListDataScanJobsRequest\0322.google.cloud" - + ".dataplex.v1.ListDataScanJobsResponse\"E\332" - + "A\006parent\202\323\344\223\0026\0224/v1/{parent=projects/*/l" - + "ocations/*/dataScans/*}/jobs\032K\312A\027dataple" - + "x.googleapis.com\322A.https://www.googleapi" - + "s.com/auth/cloud-platformBj\n\034com.google." - + "cloud.dataplex.v1B\016DataScansProtoP\001Z8clo" - + "ud.google.com/go/dataplex/apiv1/dataplex" - + "pb;dataplexpbb\006proto3" + + "\n\npage_token\030\003 \001(\tB\004\342A\001\001\022\024\n\006filter\030\004 \001(\t" + + "B\004\342A\001\001\"r\n\030ListDataScanJobsResponse\022=\n\016da" + + "ta_scan_jobs\030\001 \003(\0132%.google.cloud.datapl" + + "ex.v1.DataScanJob\022\027\n\017next_page_token\030\002 \001" + + "(\t\"\301\n\n\010DataScan\022\022\n\004name\030\001 \001(\tB\004\342A\001\003\022\021\n\003u" + + "id\030\002 \001(\tB\004\342A\001\003\022\031\n\013description\030\003 \001(\tB\004\342A\001" + + "\001\022\032\n\014display_name\030\004 \001(\tB\004\342A\001\001\022D\n\006labels\030" + + "\005 \003(\0132..google.cloud.dataplex.v1.DataSca" + + "n.LabelsEntryB\004\342A\001\001\0224\n\005state\030\006 \001(\0162\037.goo" + + "gle.cloud.dataplex.v1.StateB\004\342A\001\003\0225\n\013cre" + + "ate_time\030\007 \001(\0132\032.google.protobuf.Timesta" + + "mpB\004\342A\001\003\0225\n\013update_time\030\010 \001(\0132\032.google.p" + + "rotobuf.TimestampB\004\342A\001\003\0228\n\004data\030\t \001(\0132$." + + "google.cloud.dataplex.v1.DataSourceB\004\342A\001" + + "\002\022N\n\016execution_spec\030\n \001(\01320.google.cloud" + + ".dataplex.v1.DataScan.ExecutionSpecB\004\342A\001" + + "\001\022R\n\020execution_status\030\013 \001(\01322.google.clo" + + "ud.dataplex.v1.DataScan.ExecutionStatusB" + + "\004\342A\001\003\022:\n\004type\030\014 \001(\0162&.google.cloud.datap" + + "lex.v1.DataScanTypeB\004\342A\001\003\022F\n\021data_qualit" + + "y_spec\030d \001(\0132).google.cloud.dataplex.v1." + + "DataQualitySpecH\000\022F\n\021data_profile_spec\030e" + + " \001(\0132).google.cloud.dataplex.v1.DataProf" + + "ileSpecH\000\022Q\n\023data_quality_result\030\310\001 \001(\0132" + + "+.google.cloud.dataplex.v1.DataQualityRe" + + "sultB\004\342A\001\003H\001\022Q\n\023data_profile_result\030\311\001 \001" + + "(\0132+.google.cloud.dataplex.v1.DataProfil" + + "eResultB\004\342A\001\003H\001\032o\n\rExecutionSpec\0228\n\007trig" + + "ger\030\001 \001(\0132!.google.cloud.dataplex.v1.Tri" + + "ggerB\004\342A\001\001\022\025\n\005field\030d \001(\tB\004\342A\001\005H\000B\r\n\013inc" + + "remental\032\205\001\n\017ExecutionStatus\0229\n\025latest_j" + + "ob_start_time\030\004 \001(\0132\032.google.protobuf.Ti" + + "mestamp\0227\n\023latest_job_end_time\030\005 \001(\0132\032.g" + + "oogle.protobuf.Timestamp\032-\n\013LabelsEntry\022" + + "\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:c\352A`\n da" + + "taplex.googleapis.com/DataScan\022\332" + + "A\006parent\202\323\344\223\002/\022-/v1/{parent=projects/*/l" + + "ocations/*}/dataScans\022\257\001\n\013RunDataScan\022,." + + "google.cloud.dataplex.v1.RunDataScanRequ" + + "est\032-.google.cloud.dataplex.v1.RunDataSc" + + "anResponse\"C\332A\004name\202\323\344\223\0026\"1/v1/{name=pro" + + "jects/*/locations/*/dataScans/*}:run:\001*\022" + + "\255\001\n\016GetDataScanJob\022/.google.cloud.datapl" + + "ex.v1.GetDataScanJobRequest\032%.google.clo" + + "ud.dataplex.v1.DataScanJob\"C\332A\004name\202\323\344\223\002" + + "6\0224/v1/{name=projects/*/locations/*/data" + + "Scans/*/jobs/*}\022\300\001\n\020ListDataScanJobs\0221.g" + + "oogle.cloud.dataplex.v1.ListDataScanJobs" + + "Request\0322.google.cloud.dataplex.v1.ListD" + + "ataScanJobsResponse\"E\332A\006parent\202\323\344\223\0026\0224/v" + + "1/{parent=projects/*/locations/*/dataSca" + + "ns/*}/jobs\032K\312A\027dataplex.googleapis.com\322A" + + ".https://www.googleapis.com/auth/cloud-p" + + "latformBj\n\034com.google.cloud.dataplex.v1B" + + "\016DataScansProtoP\001Z8cloud.google.com/go/d" + + "ataplex/apiv1/dataplexpb;dataplexpbb\006pro" + + "to3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -354,7 +355,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataplex_v1_ListDataScanJobsRequest_descriptor, new java.lang.String[] { - "Parent", "PageSize", "PageToken", + "Parent", "PageSize", "PageToken", "Filter", }); internal_static_google_cloud_dataplex_v1_ListDataScanJobsResponse_descriptor = getDescriptor().getMessageTypes().get(10); diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataTaxonomy.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataTaxonomy.java new file mode 100644 index 000000000000..bd4c70d69184 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataTaxonomy.java @@ -0,0 +1,2484 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +/** + * + * + *
+ * DataTaxonomy represents a set of hierarchical DataAttributes resources,
+ * grouped with a common theme Eg: 'SensitiveDataTaxonomy' can have attributes
+ * to manage PII data. It is defined at project level.
+ * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DataTaxonomy} + */ +public final class DataTaxonomy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.DataTaxonomy) + DataTaxonomyOrBuilder { + private static final long serialVersionUID = 0L; + // Use DataTaxonomy.newBuilder() to construct. + private DataTaxonomy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DataTaxonomy() { + name_ = ""; + uid_ = ""; + description_ = ""; + displayName_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DataTaxonomy(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DataTaxonomy_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 8: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DataTaxonomy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataTaxonomy.class, + com.google.cloud.dataplex.v1.DataTaxonomy.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Output only. The relative resource name of the DataTaxonomy, of the form:
+   * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + /** + * + * + *
+   * Output only. The relative resource name of the DataTaxonomy, of the form:
+   * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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 UID_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object uid_ = ""; + /** + * + * + *
+   * Output only. System generated globally unique ID for the dataTaxonomy. This
+   * ID will be different if the DataTaxonomy is deleted and re-created with the
+   * same name.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + @java.lang.Override + public java.lang.String getUid() { + java.lang.Object ref = uid_; + 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(); + uid_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. System generated globally unique ID for the dataTaxonomy. This
+   * ID will be different if the DataTaxonomy is deleted and re-created with the
+   * same name.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + @java.lang.Override + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time when the DataTaxonomy was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.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 time when the DataTaxonomy was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.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 time when the DataTaxonomy was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The time when the DataTaxonomy was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The time when the DataTaxonomy was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The time when the DataTaxonomy was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; + /** + * + * + *
+   * Optional. Description of the DataTaxonomy.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + 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(); + description_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Description of the DataTaxonomy.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 6; + + @SuppressWarnings("serial") + private volatile java.lang.Object displayName_ = ""; + /** + * + * + *
+   * Optional. User friendly display name.
+   * 
+ * + * string display_name = 6 [(.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. User friendly display name.
+   * 
+ * + * string display_name = 6 [(.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 LABELS_FIELD_NUMBER = 8; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DataTaxonomy_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Optional. User-defined labels for the DataTaxonomy.
+   * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Optional. User-defined labels for the DataTaxonomy.
+   * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. User-defined labels for the DataTaxonomy.
+   * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. User-defined labels for the DataTaxonomy.
+   * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ATTRIBUTE_COUNT_FIELD_NUMBER = 9; + private int attributeCount_ = 0; + /** + * + * + *
+   * Output only. The number of attributes in the DataTaxonomy.
+   * 
+ * + * int32 attribute_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The attributeCount. + */ + @java.lang.Override + public int getAttributeCount() { + return attributeCount_; + } + + public static final int ETAG_FIELD_NUMBER = 10; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + /** + * + * + *
+   * This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 10; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 10; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLASS_COUNT_FIELD_NUMBER = 11; + private int classCount_ = 0; + /** + * + * + *
+   * Output only. The number of classes in the DataTaxonomy.
+   * 
+ * + * int32 class_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The classCount. + */ + @java.lang.Override + public int getClassCount() { + return classCount_; + } + + 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(uid_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uid_); + } + if (createTime_ != null) { + output.writeMessage(3, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(4, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, displayName_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 8); + if (attributeCount_ != 0) { + output.writeInt32(9, attributeCount_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, etag_); + } + if (classCount_ != 0) { + output.writeInt32(11, classCount_); + } + 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(uid_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uid_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, displayName_); + } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, labels__); + } + if (attributeCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(9, attributeCount_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, etag_); + } + if (classCount_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(11, classCount_); + } + 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.dataplex.v1.DataTaxonomy)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.DataTaxonomy other = + (com.google.cloud.dataplex.v1.DataTaxonomy) obj; + + if (!getName().equals(other.getName())) return false; + if (!getUid().equals(other.getUid())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getDescription().equals(other.getDescription())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (getAttributeCount() != other.getAttributeCount()) return false; + if (!getEtag().equals(other.getEtag())) return false; + if (getClassCount() != other.getClassCount()) 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) + UID_FIELD_NUMBER; + hash = (53 * hash) + getUid().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + ATTRIBUTE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getAttributeCount(); + hash = (37 * hash) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (37 * hash) + CLASS_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getClassCount(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.DataTaxonomy parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataTaxonomy 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.dataplex.v1.DataTaxonomy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataTaxonomy 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.dataplex.v1.DataTaxonomy parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DataTaxonomy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.DataTaxonomy parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataTaxonomy 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.dataplex.v1.DataTaxonomy parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataTaxonomy 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.dataplex.v1.DataTaxonomy parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DataTaxonomy 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.dataplex.v1.DataTaxonomy 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; + } + /** + * + * + *
+   * DataTaxonomy represents a set of hierarchical DataAttributes resources,
+   * grouped with a common theme Eg: 'SensitiveDataTaxonomy' can have attributes
+   * to manage PII data. It is defined at project level.
+   * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DataTaxonomy} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.DataTaxonomy) + com.google.cloud.dataplex.v1.DataTaxonomyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DataTaxonomy_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 8: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 8: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DataTaxonomy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DataTaxonomy.class, + com.google.cloud.dataplex.v1.DataTaxonomy.Builder.class); + } + + // Construct using com.google.cloud.dataplex.v1.DataTaxonomy.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + uid_ = ""; + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + description_ = ""; + displayName_ = ""; + internalGetMutableLabels().clear(); + attributeCount_ = 0; + etag_ = ""; + classCount_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DataTaxonomy_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataTaxonomy getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.DataTaxonomy.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataTaxonomy build() { + com.google.cloud.dataplex.v1.DataTaxonomy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DataTaxonomy buildPartial() { + com.google.cloud.dataplex.v1.DataTaxonomy result = + new com.google.cloud.dataplex.v1.DataTaxonomy(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dataplex.v1.DataTaxonomy result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.uid_ = uid_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.displayName_ = displayName_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.attributeCount_ = attributeCount_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.etag_ = etag_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.classCount_ = classCount_; + } + } + + @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.dataplex.v1.DataTaxonomy) { + return mergeFrom((com.google.cloud.dataplex.v1.DataTaxonomy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataplex.v1.DataTaxonomy other) { + if (other == com.google.cloud.dataplex.v1.DataTaxonomy.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getUid().isEmpty()) { + uid_ = other.uid_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + bitField0_ |= 0x00000010; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + bitField0_ |= 0x00000020; + onChanged(); + } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000040; + if (other.getAttributeCount() != 0) { + setAttributeCount(other.getAttributeCount()); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000100; + onChanged(); + } + if (other.getClassCount() != 0) { + setClassCount(other.getClassCount()); + } + 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(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + uid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 50: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 66: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000040; + break; + } // case 66 + case 72: + { + attributeCount_ = input.readInt32(); + bitField0_ |= 0x00000080; + break; + } // case 72 + case 82: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 82 + case 88: + { + classCount_ = input.readInt32(); + bitField0_ |= 0x00000200; + break; + } // case 88 + 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_ = ""; + /** + * + * + *
+     * Output only. The relative resource name of the DataTaxonomy, of the form:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + /** + * + * + *
+     * Output only. The relative resource name of the DataTaxonomy, of the form:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + } + } + /** + * + * + *
+     * Output only. The relative resource name of the DataTaxonomy, of the form:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The relative resource name of the DataTaxonomy, of the form:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The relative resource name of the DataTaxonomy, of the form:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object uid_ = ""; + /** + * + * + *
+     * Output only. System generated globally unique ID for the dataTaxonomy. This
+     * ID will be different if the DataTaxonomy is deleted and re-created with the
+     * same name.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + public java.lang.String getUid() { + java.lang.Object ref = uid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + uid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. System generated globally unique ID for the dataTaxonomy. This
+     * ID will be different if the DataTaxonomy is deleted and re-created with the
+     * same name.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + public com.google.protobuf.ByteString getUidBytes() { + java.lang.Object ref = uid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + uid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. System generated globally unique ID for the dataTaxonomy. This
+     * ID will be different if the DataTaxonomy is deleted and re-created with the
+     * same name.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The uid to set. + * @return This builder for chaining. + */ + public Builder setUid(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + uid_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. System generated globally unique ID for the dataTaxonomy. This
+     * ID will be different if the DataTaxonomy is deleted and re-created with the
+     * same name.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearUid() { + uid_ = getDefaultInstance().getUid(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. System generated globally unique ID for the dataTaxonomy. This
+     * ID will be different if the DataTaxonomy is deleted and re-created with the
+     * same name.
+     * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for uid to set. + * @return This builder for chaining. + */ + public Builder setUidBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + uid_ = value; + bitField0_ |= 0x00000002; + 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 time when the DataTaxonomy was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * + * + *
+     * Output only. The time when the DataTaxonomy was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.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 time when the DataTaxonomy was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.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; + } else { + createTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the DataTaxonomy was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the DataTaxonomy was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) + && createTime_ != null + && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getCreateTimeBuilder().mergeFrom(value); + } else { + createTime_ = value; + } + } else { + createTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the DataTaxonomy was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + bitField0_ = (bitField0_ & ~0x00000004); + createTime_ = null; + if (createTimeBuilder_ != null) { + createTimeBuilder_.dispose(); + createTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the DataTaxonomy was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time when the DataTaxonomy was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.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 time when the DataTaxonomy was created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 3 [(.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 updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The time when the DataTaxonomy was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * + * + *
+     * Output only. The time when the DataTaxonomy was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time when the DataTaxonomy was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + } else { + updateTimeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the DataTaxonomy was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the DataTaxonomy was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && updateTime_ != null + && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { + getUpdateTimeBuilder().mergeFrom(value); + } else { + updateTime_ = value; + } + } else { + updateTimeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the DataTaxonomy was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + bitField0_ = (bitField0_ & ~0x00000008); + updateTime_ = null; + if (updateTimeBuilder_ != null) { + updateTimeBuilder_.dispose(); + updateTimeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The time when the DataTaxonomy was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time when the DataTaxonomy was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The time when the DataTaxonomy was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Optional. Description of the DataTaxonomy.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Description of the DataTaxonomy.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Description of the DataTaxonomy.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Description of the DataTaxonomy.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Description of the DataTaxonomy.
+     * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + description_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Optional. User friendly display name.
+     * 
+ * + * string display_name = 6 [(.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. User friendly display name.
+     * 
+ * + * string display_name = 6 [(.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. User friendly display name.
+     * 
+ * + * string display_name = 6 [(.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; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User friendly display name.
+     * 
+ * + * string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + displayName_ = getDefaultInstance().getDisplayName(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. User friendly display name.
+     * 
+ * + * string display_name = 6 [(.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; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000040; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional. User-defined labels for the DataTaxonomy.
+     * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Optional. User-defined labels for the DataTaxonomy.
+     * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. User-defined labels for the DataTaxonomy.
+     * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. User-defined labels for the DataTaxonomy.
+     * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000040); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. User-defined labels for the DataTaxonomy.
+     * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000040; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional. User-defined labels for the DataTaxonomy.
+     * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000040; + return this; + } + /** + * + * + *
+     * Optional. User-defined labels for the DataTaxonomy.
+     * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000040; + return this; + } + + private int attributeCount_; + /** + * + * + *
+     * Output only. The number of attributes in the DataTaxonomy.
+     * 
+ * + * int32 attribute_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The attributeCount. + */ + @java.lang.Override + public int getAttributeCount() { + return attributeCount_; + } + /** + * + * + *
+     * Output only. The number of attributes in the DataTaxonomy.
+     * 
+ * + * int32 attribute_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The attributeCount to set. + * @return This builder for chaining. + */ + public Builder setAttributeCount(int value) { + + attributeCount_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The number of attributes in the DataTaxonomy.
+     * 
+ * + * int32 attribute_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearAttributeCount() { + bitField0_ = (bitField0_ & ~0x00000080); + attributeCount_ = 0; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 10; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 10; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 10; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * + * + *
+     * This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 10; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + /** + * + * + *
+     * This checksum is computed by the server based on the value of other
+     * fields, and may be sent on update and delete requests to ensure the
+     * client has an up-to-date value before proceeding.
+     * 
+ * + * string etag = 10; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + private int classCount_; + /** + * + * + *
+     * Output only. The number of classes in the DataTaxonomy.
+     * 
+ * + * int32 class_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The classCount. + */ + @java.lang.Override + public int getClassCount() { + return classCount_; + } + /** + * + * + *
+     * Output only. The number of classes in the DataTaxonomy.
+     * 
+ * + * int32 class_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The classCount to set. + * @return This builder for chaining. + */ + public Builder setClassCount(int value) { + + classCount_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The number of classes in the DataTaxonomy.
+     * 
+ * + * int32 class_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearClassCount() { + bitField0_ = (bitField0_ & ~0x00000200); + classCount_ = 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.dataplex.v1.DataTaxonomy) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.DataTaxonomy) + private static final com.google.cloud.dataplex.v1.DataTaxonomy DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.DataTaxonomy(); + } + + public static com.google.cloud.dataplex.v1.DataTaxonomy getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DataTaxonomy 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.dataplex.v1.DataTaxonomy getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataTaxonomyName.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataTaxonomyName.java new file mode 100644 index 000000000000..fc42697e71c6 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataTaxonomyName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2023 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.dataplex.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 DataTaxonomyName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_DATA_TAXONOMY_ID = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String dataTaxonomyId; + + @Deprecated + protected DataTaxonomyName() { + project = null; + location = null; + dataTaxonomyId = null; + } + + private DataTaxonomyName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + dataTaxonomyId = Preconditions.checkNotNull(builder.getDataTaxonomyId()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDataTaxonomyId() { + return dataTaxonomyId; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static DataTaxonomyName of(String project, String location, String dataTaxonomyId) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataTaxonomyId(dataTaxonomyId) + .build(); + } + + public static String format(String project, String location, String dataTaxonomyId) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataTaxonomyId(dataTaxonomyId) + .build() + .toString(); + } + + public static DataTaxonomyName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_DATA_TAXONOMY_ID.validatedMatch( + formattedString, "DataTaxonomyName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("data_taxonomy_id")); + } + + 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 (DataTaxonomyName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_DATA_TAXONOMY_ID.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 (dataTaxonomyId != null) { + fieldMapBuilder.put("data_taxonomy_id", dataTaxonomyId); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_DATA_TAXONOMY_ID.instantiate( + "project", project, "location", location, "data_taxonomy_id", dataTaxonomyId); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + DataTaxonomyName that = ((DataTaxonomyName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.dataTaxonomyId, that.dataTaxonomyId); + } + 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(dataTaxonomyId); + return h; + } + + /** Builder for projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}. */ + public static class Builder { + private String project; + private String location; + private String dataTaxonomyId; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDataTaxonomyId() { + return dataTaxonomyId; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setDataTaxonomyId(String dataTaxonomyId) { + this.dataTaxonomyId = dataTaxonomyId; + return this; + } + + private Builder(DataTaxonomyName dataTaxonomyName) { + this.project = dataTaxonomyName.project; + this.location = dataTaxonomyName.location; + this.dataTaxonomyId = dataTaxonomyName.dataTaxonomyId; + } + + public DataTaxonomyName build() { + return new DataTaxonomyName(this); + } + } +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataTaxonomyOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataTaxonomyOrBuilder.java new file mode 100644 index 000000000000..683fdaffb314 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataTaxonomyOrBuilder.java @@ -0,0 +1,324 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +public interface DataTaxonomyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.DataTaxonomy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The relative resource name of the DataTaxonomy, of the form:
+   * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. The relative resource name of the DataTaxonomy, of the form:
+   * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. System generated globally unique ID for the dataTaxonomy. This
+   * ID will be different if the DataTaxonomy is deleted and re-created with the
+   * same name.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The uid. + */ + java.lang.String getUid(); + /** + * + * + *
+   * Output only. System generated globally unique ID for the dataTaxonomy. This
+   * ID will be different if the DataTaxonomy is deleted and re-created with the
+   * same name.
+   * 
+ * + * string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for uid. + */ + com.google.protobuf.ByteString getUidBytes(); + + /** + * + * + *
+   * Output only. The time when the DataTaxonomy was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time when the DataTaxonomy was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time when the DataTaxonomy was created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time when the DataTaxonomy was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The time when the DataTaxonomy was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The time when the DataTaxonomy was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Description of the DataTaxonomy.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Optional. Description of the DataTaxonomy.
+   * 
+ * + * string description = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Optional. User friendly display name.
+   * 
+ * + * string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Optional. User friendly display name.
+   * 
+ * + * string display_name = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. User-defined labels for the DataTaxonomy.
+   * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. User-defined labels for the DataTaxonomy.
+   * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional. User-defined labels for the DataTaxonomy.
+   * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. User-defined labels for the DataTaxonomy.
+   * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. User-defined labels for the DataTaxonomy.
+   * 
+ * + * map<string, string> labels = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. The number of attributes in the DataTaxonomy.
+   * 
+ * + * int32 attribute_count = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The attributeCount. + */ + int getAttributeCount(); + + /** + * + * + *
+   * This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 10; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * This checksum is computed by the server based on the value of other
+   * fields, and may be sent on update and delete requests to ensure the
+   * client has an up-to-date value before proceeding.
+   * 
+ * + * string etag = 10; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); + + /** + * + * + *
+   * Output only. The number of classes in the DataTaxonomy.
+   * 
+ * + * int32 class_count = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The classCount. + */ + int getClassCount(); +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataTaxonomyProto.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataTaxonomyProto.java new file mode 100644 index 000000000000..e11b289c1163 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DataTaxonomyProto.java @@ -0,0 +1,651 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +public final class DataTaxonomyProto { + private DataTaxonomyProto() {} + + 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_dataplex_v1_DataTaxonomy_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_DataTaxonomy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_DataTaxonomy_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_DataTaxonomy_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_DataAttribute_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_DataAttribute_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_DataAttribute_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_DataAttribute_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_DataAttributeBinding_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_DataAttributeBinding_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_DataAttributeBinding_Path_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_DataAttributeBinding_Path_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_DataAttributeBinding_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_DataAttributeBinding_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_CreateDataTaxonomyRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_CreateDataTaxonomyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_UpdateDataTaxonomyRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_UpdateDataTaxonomyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_GetDataTaxonomyRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_GetDataTaxonomyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_ListDataTaxonomiesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_ListDataTaxonomiesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_ListDataTaxonomiesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_ListDataTaxonomiesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_DeleteDataTaxonomyRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_DeleteDataTaxonomyRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_CreateDataAttributeRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_CreateDataAttributeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_UpdateDataAttributeRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_UpdateDataAttributeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_GetDataAttributeRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_GetDataAttributeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_ListDataAttributesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_ListDataAttributesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_ListDataAttributesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_ListDataAttributesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_DeleteDataAttributeRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_DeleteDataAttributeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_CreateDataAttributeBindingRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_CreateDataAttributeBindingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_UpdateDataAttributeBindingRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_UpdateDataAttributeBindingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_GetDataAttributeBindingRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_GetDataAttributeBindingRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_ListDataAttributeBindingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_ListDataAttributeBindingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_ListDataAttributeBindingsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_ListDataAttributeBindingsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_DeleteDataAttributeBindingRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_DeleteDataAttributeBindingRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n,google/cloud/dataplex/v1/data_taxonomy" + + ".proto\022\030google.cloud.dataplex.v1\032\034google" + + "/api/annotations.proto\032\027google/api/clien" + + "t.proto\032\037google/api/field_behavior.proto" + + "\032\031google/api/resource.proto\032\'google/clou" + + "d/dataplex/v1/security.proto\032&google/clo" + + "ud/dataplex/v1/service.proto\032#google/lon" + + "grunning/operations.proto\032\033google/protob" + + "uf/empty.proto\032 google/protobuf/field_ma" + + "sk.proto\032\037google/protobuf/timestamp.prot" + + "o\"\272\004\n\014DataTaxonomy\022;\n\004name\030\001 \001(\tB-\342A\001\003\372A" + + "&\n$dataplex.googleapis.com/DataTaxonomy\022" + + "\021\n\003uid\030\002 \001(\tB\004\342A\001\003\0225\n\013create_time\030\003 \001(\0132" + + "\032.google.protobuf.TimestampB\004\342A\001\003\0225\n\013upd" + + "ate_time\030\004 \001(\0132\032.google.protobuf.Timesta" + + "mpB\004\342A\001\003\022\031\n\013description\030\005 \001(\tB\004\342A\001\001\022\032\n\014d" + + "isplay_name\030\006 \001(\tB\004\342A\001\001\022H\n\006labels\030\010 \003(\0132" + + "2.google.cloud.dataplex.v1.DataTaxonomy." + + "LabelsEntryB\004\342A\001\001\022\035\n\017attribute_count\030\t \001" + + "(\005B\004\342A\001\003\022\014\n\004etag\030\n \001(\t\022\031\n\013class_count\030\013 " + + "\001(\005B\004\342A\001\003\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n" + + "\005value\030\002 \001(\t:\0028\001:t\352Aq\n$dataplex.googleap" + + "is.com/DataTaxonomy\022Iprojects/{project}/" + + "locations/{location}/dataTaxonomies/{dat" + + "a_taxonomy_id}\"\237\006\n\rDataAttribute\022<\n\004name" + + "\030\001 \001(\tB.\342A\001\003\372A\'\n%dataplex.googleapis.com" + + "/DataAttribute\022\021\n\003uid\030\002 \001(\tB\004\342A\001\003\0225\n\013cre" + + "ate_time\030\003 \001(\0132\032.google.protobuf.Timesta" + + "mpB\004\342A\001\003\0225\n\013update_time\030\004 \001(\0132\032.google.p" + + "rotobuf.TimestampB\004\342A\001\003\022\031\n\013description\030\005" + + " \001(\tB\004\342A\001\001\022\032\n\014display_name\030\006 \001(\tB\004\342A\001\001\022I" + + "\n\006labels\030\007 \003(\01323.google.cloud.dataplex.v" + + "1.DataAttribute.LabelsEntryB\004\342A\001\001\022A\n\tpar" + + "ent_id\030\010 \001(\tB.\342A\001\001\372A\'\n%dataplex.googleap" + + "is.com/DataAttribute\022\035\n\017attribute_count\030" + + "\t \001(\005B\004\342A\001\003\022\014\n\004etag\030\n \001(\t\022P\n\024resource_ac" + + "cess_spec\030d \001(\0132,.google.cloud.dataplex." + + "v1.ResourceAccessSpecB\004\342A\001\001\022H\n\020data_acce" + + "ss_spec\030e \001(\0132(.google.cloud.dataplex.v1" + + ".DataAccessSpecB\004\342A\001\001\032-\n\013LabelsEntry\022\013\n\003" + + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:\221\001\352A\215\001\n%dat" + + "aplex.googleapis.com/DataAttribute\022dproj" + + "ects/{project}/locations/{location}/data" + + "Taxonomies/{dataTaxonomy}/attributes/{da" + + "ta_attribute_id}\"\321\006\n\024DataAttributeBindin" + + "g\022C\n\004name\030\001 \001(\tB5\342A\001\003\372A.\n,dataplex.googl" + + "eapis.com/DataAttributeBinding\022\021\n\003uid\030\002 " + + "\001(\tB\004\342A\001\003\0225\n\013create_time\030\003 \001(\0132\032.google." + + "protobuf.TimestampB\004\342A\001\003\0225\n\013update_time\030" + + "\004 \001(\0132\032.google.protobuf.TimestampB\004\342A\001\003\022" + + "\031\n\013description\030\005 \001(\tB\004\342A\001\001\022\032\n\014display_na" + + "me\030\006 \001(\tB\004\342A\001\001\022P\n\006labels\030\007 \003(\0132:.google." + + "cloud.dataplex.v1.DataAttributeBinding.L" + + "abelsEntryB\004\342A\001\001\022\014\n\004etag\030\010 \001(\t\022\031\n\010resour" + + "ce\030d \001(\tB\005\342A\002\001\005H\000\022B\n\nattributes\030n \003(\tB.\342" + + "A\001\001\372A\'\n%dataplex.googleapis.com/DataAttr" + + "ibute\022H\n\005paths\030x \003(\01323.google.cloud.data" + + "plex.v1.DataAttributeBinding.PathB\004\342A\001\001\032" + + "^\n\004Path\022\022\n\004name\030\001 \001(\tB\004\342A\001\002\022B\n\nattribute" + + "s\030\002 \003(\tB.\342A\001\001\372A\'\n%dataplex.googleapis.co" + + "m/DataAttribute\032-\n\013LabelsEntry\022\013\n\003key\030\001 " + + "\001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:\215\001\352A\211\001\n,dataplex." + + "googleapis.com/DataAttributeBinding\022Ypro" + + "jects/{project}/locations/{location}/dat" + + "aAttributeBindings/{data_attribute_bindi" + + "ng_id}B\024\n\022resource_reference\"\331\001\n\031CreateD" + + "ataTaxonomyRequest\022:\n\006parent\030\001 \001(\tB*\342A\001\002" + + "\372A#\n!locations.googleapis.com/Location\022\036" + + "\n\020data_taxonomy_id\030\002 \001(\tB\004\342A\001\002\022C\n\rdata_t" + + "axonomy\030\003 \001(\0132&.google.cloud.dataplex.v1" + + ".DataTaxonomyB\004\342A\001\002\022\033\n\rvalidate_only\030\004 \001" + + "(\010B\004\342A\001\001\"\264\001\n\031UpdateDataTaxonomyRequest\0225" + + "\n\013update_mask\030\001 \001(\0132\032.google.protobuf.Fi" + + "eldMaskB\004\342A\001\002\022C\n\rdata_taxonomy\030\002 \001(\0132&.g" + + "oogle.cloud.dataplex.v1.DataTaxonomyB\004\342A" + + "\001\002\022\033\n\rvalidate_only\030\003 \001(\010B\004\342A\001\001\"U\n\026GetDa" + + "taTaxonomyRequest\022;\n\004name\030\001 \001(\tB-\342A\001\002\372A&" + + "\n$dataplex.googleapis.com/DataTaxonomy\"\270" + + "\001\n\031ListDataTaxonomiesRequest\022:\n\006parent\030\001" + + " \001(\tB*\342A\001\002\372A#\n!locations.googleapis.com/" + + "Location\022\027\n\tpage_size\030\002 \001(\005B\004\342A\001\001\022\030\n\npag" + + "e_token\030\003 \001(\tB\004\342A\001\001\022\024\n\006filter\030\004 \001(\tB\004\342A\001" + + "\001\022\026\n\010order_by\030\005 \001(\tB\004\342A\001\001\"\225\001\n\032ListDataTa" + + "xonomiesResponse\022?\n\017data_taxonomies\030\001 \003(" + + "\0132&.google.cloud.dataplex.v1.DataTaxonom" + + "y\022\027\n\017next_page_token\030\002 \001(\t\022\035\n\025unreachabl" + + "e_locations\030\003 \003(\t\"l\n\031DeleteDataTaxonomyR" + + "equest\022;\n\004name\030\001 \001(\tB-\342A\001\002\372A&\n$dataplex." + + "googleapis.com/DataTaxonomy\022\022\n\004etag\030\002 \001(" + + "\tB\004\342A\001\001\"\340\001\n\032CreateDataAttributeRequest\022=" + + "\n\006parent\030\001 \001(\tB-\342A\001\002\372A&\n$dataplex.google" + + "apis.com/DataTaxonomy\022\037\n\021data_attribute_" + + "id\030\002 \001(\tB\004\342A\001\002\022E\n\016data_attribute\030\003 \001(\0132\'" + + ".google.cloud.dataplex.v1.DataAttributeB" + + "\004\342A\001\002\022\033\n\rvalidate_only\030\004 \001(\010B\004\342A\001\001\"\267\001\n\032U" + + "pdateDataAttributeRequest\0225\n\013update_mask" + + "\030\001 \001(\0132\032.google.protobuf.FieldMaskB\004\342A\001\002" + + "\022E\n\016data_attribute\030\002 \001(\0132\'.google.cloud." + + "dataplex.v1.DataAttributeB\004\342A\001\002\022\033\n\rvalid" + + "ate_only\030\003 \001(\010B\004\342A\001\001\"W\n\027GetDataAttribute" + + "Request\022<\n\004name\030\001 \001(\tB.\342A\001\002\372A\'\n%dataplex" + + ".googleapis.com/DataAttribute\"\273\001\n\031ListDa" + + "taAttributesRequest\022=\n\006parent\030\001 \001(\tB-\342A\001" + + "\002\372A&\n$dataplex.googleapis.com/DataTaxono" + + "my\022\027\n\tpage_size\030\002 \001(\005B\004\342A\001\001\022\030\n\npage_toke" + + "n\030\003 \001(\tB\004\342A\001\001\022\024\n\006filter\030\004 \001(\tB\004\342A\001\001\022\026\n\010o" + + "rder_by\030\005 \001(\tB\004\342A\001\001\"\226\001\n\032ListDataAttribut" + + "esResponse\022@\n\017data_attributes\030\001 \003(\0132\'.go" + + "ogle.cloud.dataplex.v1.DataAttribute\022\027\n\017" + + "next_page_token\030\002 \001(\t\022\035\n\025unreachable_loc" + + "ations\030\003 \003(\t\"n\n\032DeleteDataAttributeReque" + + "st\022<\n\004name\030\001 \001(\tB.\342A\001\002\372A\'\n%dataplex.goog" + + "leapis.com/DataAttribute\022\022\n\004etag\030\002 \001(\tB\004" + + "\342A\001\001\"\373\001\n!CreateDataAttributeBindingReque" + + "st\022:\n\006parent\030\001 \001(\tB*\342A\001\002\372A#\n!locations.g" + + "oogleapis.com/Location\022\'\n\031data_attribute" + + "_binding_id\030\002 \001(\tB\004\342A\001\002\022T\n\026data_attribut" + + "e_binding\030\003 \001(\0132..google.cloud.dataplex." + + "v1.DataAttributeBindingB\004\342A\001\002\022\033\n\rvalidat" + + "e_only\030\004 \001(\010B\004\342A\001\001\"\315\001\n!UpdateDataAttribu" + + "teBindingRequest\0225\n\013update_mask\030\001 \001(\0132\032." + + "google.protobuf.FieldMaskB\004\342A\001\002\022T\n\026data_" + + "attribute_binding\030\002 \001(\0132..google.cloud.d" + + "ataplex.v1.DataAttributeBindingB\004\342A\001\002\022\033\n" + + "\rvalidate_only\030\003 \001(\010B\004\342A\001\001\"e\n\036GetDataAtt" + + "ributeBindingRequest\022C\n\004name\030\001 \001(\tB5\342A\001\002" + + "\372A.\n,dataplex.googleapis.com/DataAttribu" + + "teBinding\"\277\001\n ListDataAttributeBindingsR" + + "equest\022:\n\006parent\030\001 \001(\tB*\342A\001\002\372A#\n!locatio" + + "ns.googleapis.com/Location\022\027\n\tpage_size\030" + + "\002 \001(\005B\004\342A\001\001\022\030\n\npage_token\030\003 \001(\tB\004\342A\001\001\022\024\n" + + "\006filter\030\004 \001(\tB\004\342A\001\001\022\026\n\010order_by\030\005 \001(\tB\004\342" + + "A\001\001\"\254\001\n!ListDataAttributeBindingsRespons" + + "e\022O\n\027data_attribute_bindings\030\001 \003(\0132..goo" + + "gle.cloud.dataplex.v1.DataAttributeBindi" + + "ng\022\027\n\017next_page_token\030\002 \001(\t\022\035\n\025unreachab" + + "le_locations\030\003 \003(\t\"|\n!DeleteDataAttribut" + + "eBindingRequest\022C\n\004name\030\001 \001(\tB5\342A\001\002\372A.\n," + + "dataplex.googleapis.com/DataAttributeBin" + + "ding\022\022\n\004etag\030\002 \001(\tB\004\342A\001\0022\213\035\n\023DataTaxonom" + + "yService\022\200\002\n\022CreateDataTaxonomy\0223.google" + + ".cloud.dataplex.v1.CreateDataTaxonomyReq" + + "uest\032\035.google.longrunning.Operation\"\225\001\312A" + + "!\n\014DataTaxonomy\022\021OperationMetadata\332A%par" + + "ent,data_taxonomy,data_taxonomy_id\202\323\344\223\002C" + + "\"2/v1/{parent=projects/*/locations/*}/da" + + "taTaxonomies:\rdata_taxonomy\022\202\002\n\022UpdateDa" + + "taTaxonomy\0223.google.cloud.dataplex.v1.Up" + + "dateDataTaxonomyRequest\032\035.google.longrun" + + "ning.Operation\"\227\001\312A!\n\014DataTaxonomy\022\021Oper" + + "ationMetadata\332A\031data_taxonomy,update_mas" + + "k\202\323\344\223\002Q2@/v1/{data_taxonomy.name=project" + + "s/*/locations/*/dataTaxonomies/*}:\rdata_" + + "taxonomy\022\330\001\n\022DeleteDataTaxonomy\0223.google" + + ".cloud.dataplex.v1.DeleteDataTaxonomyReq" + + "uest\032\035.google.longrunning.Operation\"n\312A*" + + "\n\025google.protobuf.Empty\022\021OperationMetada" + + "ta\332A\004name\202\323\344\223\0024*2/v1/{name=projects/*/lo" + + "cations/*/dataTaxonomies/*}\022\304\001\n\022ListData" + + "Taxonomies\0223.google.cloud.dataplex.v1.Li" + + "stDataTaxonomiesRequest\0324.google.cloud.d" + + "ataplex.v1.ListDataTaxonomiesResponse\"C\332" + + "A\006parent\202\323\344\223\0024\0222/v1/{parent=projects/*/l" + + "ocations/*}/dataTaxonomies\022\256\001\n\017GetDataTa" + + "xonomy\0220.google.cloud.dataplex.v1.GetDat" + + "aTaxonomyRequest\032&.google.cloud.dataplex" + + ".v1.DataTaxonomy\"A\332A\004name\202\323\344\223\0024\0222/v1/{na" + + "me=projects/*/locations/*/dataTaxonomies" + + "/*}\022\272\002\n\032CreateDataAttributeBinding\022;.goo" + + "gle.cloud.dataplex.v1.CreateDataAttribut" + + "eBindingRequest\032\035.google.longrunning.Ope" + + "ration\"\277\001\312A)\n\024DataAttributeBinding\022\021Oper" + + "ationMetadata\332A7parent,data_attribute_bi" + + "nding,data_attribute_binding_id\202\323\344\223\002S\"9/" + + "v1/{parent=projects/*/locations/*}/dataA" + + "ttributeBindings:\026data_attribute_binding" + + "\022\274\002\n\032UpdateDataAttributeBinding\022;.google" + + ".cloud.dataplex.v1.UpdateDataAttributeBi" + + "ndingRequest\032\035.google.longrunning.Operat" + + "ion\"\301\001\312A)\n\024DataAttributeBinding\022\021Operati" + + "onMetadata\332A\"data_attribute_binding,upda" + + "te_mask\202\323\344\223\002j2P/v1/{data_attribute_bindi" + + "ng.name=projects/*/locations/*/dataAttri" + + "buteBindings/*}:\026data_attribute_binding\022" + + "\357\001\n\032DeleteDataAttributeBinding\022;.google." + + "cloud.dataplex.v1.DeleteDataAttributeBin" + + "dingRequest\032\035.google.longrunning.Operati" + + "on\"u\312A*\n\025google.protobuf.Empty\022\021Operatio" + + "nMetadata\332A\004name\202\323\344\223\002;*9/v1/{name=projec" + + "ts/*/locations/*/dataAttributeBindings/*" + + "}\022\340\001\n\031ListDataAttributeBindings\022:.google" + + ".cloud.dataplex.v1.ListDataAttributeBind" + + "ingsRequest\032;.google.cloud.dataplex.v1.L" + + "istDataAttributeBindingsResponse\"J\332A\006par" + + "ent\202\323\344\223\002;\0229/v1/{parent=projects/*/locati" + + "ons/*}/dataAttributeBindings\022\315\001\n\027GetData" + + "AttributeBinding\0228.google.cloud.dataplex" + + ".v1.GetDataAttributeBindingRequest\032..goo" + + "gle.cloud.dataplex.v1.DataAttributeBindi" + + "ng\"H\332A\004name\202\323\344\223\002;\0229/v1/{name=projects/*/" + + "locations/*/dataAttributeBindings/*}\022\223\002\n" + + "\023CreateDataAttribute\0224.google.cloud.data" + + "plex.v1.CreateDataAttributeRequest\032\035.goo" + + "gle.longrunning.Operation\"\246\001\312A\"\n\rDataAtt" + + "ribute\022\021OperationMetadata\332A\'parent,data_" + + "attribute,data_attribute_id\202\323\344\223\002Q\"?/v1/{" + + "parent=projects/*/locations/*/dataTaxono" + + "mies/*}/attributes:\016data_attribute\022\225\002\n\023U" + + "pdateDataAttribute\0224.google.cloud.datapl" + + "ex.v1.UpdateDataAttributeRequest\032\035.googl" + + "e.longrunning.Operation\"\250\001\312A\"\n\rDataAttri" + + "bute\022\021OperationMetadata\332A\032data_attribute" + + ",update_mask\202\323\344\223\002`2N/v1/{data_attribute." + + "name=projects/*/locations/*/dataTaxonomi" + + "es/*/attributes/*}:\016data_attribute\022\347\001\n\023D" + + "eleteDataAttribute\0224.google.cloud.datapl" + + "ex.v1.DeleteDataAttributeRequest\032\035.googl" + + "e.longrunning.Operation\"{\312A*\n\025google.pro" + + "tobuf.Empty\022\021OperationMetadata\332A\004name\202\323\344" + + "\223\002A*?/v1/{name=projects/*/locations/*/da" + + "taTaxonomies/*/attributes/*}\022\321\001\n\022ListDat" + + "aAttributes\0223.google.cloud.dataplex.v1.L" + + "istDataAttributesRequest\0324.google.cloud." + + "dataplex.v1.ListDataAttributesResponse\"P" + + "\332A\006parent\202\323\344\223\002A\022?/v1/{parent=projects/*/" + + "locations/*/dataTaxonomies/*}/attributes" + + "\022\276\001\n\020GetDataAttribute\0221.google.cloud.dat" + + "aplex.v1.GetDataAttributeRequest\032\'.googl" + + "e.cloud.dataplex.v1.DataAttribute\"N\332A\004na" + + "me\202\323\344\223\002A\022?/v1/{name=projects/*/locations" + + "/*/dataTaxonomies/*/attributes/*}\032K\312A\027da" + + "taplex.googleapis.com\322A.https://www.goog" + + "leapis.com/auth/cloud-platformBm\n\034com.go" + + "ogle.cloud.dataplex.v1B\021DataTaxonomyProt" + + "oP\001Z8cloud.google.com/go/dataplex/apiv1/" + + "dataplexpb;dataplexpbb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.dataplex.v1.SecurityProto.getDescriptor(), + com.google.cloud.dataplex.v1.ServiceProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_dataplex_v1_DataTaxonomy_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dataplex_v1_DataTaxonomy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_DataTaxonomy_descriptor, + new java.lang.String[] { + "Name", + "Uid", + "CreateTime", + "UpdateTime", + "Description", + "DisplayName", + "Labels", + "AttributeCount", + "Etag", + "ClassCount", + }); + internal_static_google_cloud_dataplex_v1_DataTaxonomy_LabelsEntry_descriptor = + internal_static_google_cloud_dataplex_v1_DataTaxonomy_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_dataplex_v1_DataTaxonomy_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_DataTaxonomy_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_dataplex_v1_DataAttribute_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_dataplex_v1_DataAttribute_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_DataAttribute_descriptor, + new java.lang.String[] { + "Name", + "Uid", + "CreateTime", + "UpdateTime", + "Description", + "DisplayName", + "Labels", + "ParentId", + "AttributeCount", + "Etag", + "ResourceAccessSpec", + "DataAccessSpec", + }); + internal_static_google_cloud_dataplex_v1_DataAttribute_LabelsEntry_descriptor = + internal_static_google_cloud_dataplex_v1_DataAttribute_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_dataplex_v1_DataAttribute_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_DataAttribute_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_dataplex_v1_DataAttributeBinding_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_dataplex_v1_DataAttributeBinding_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_DataAttributeBinding_descriptor, + new java.lang.String[] { + "Name", + "Uid", + "CreateTime", + "UpdateTime", + "Description", + "DisplayName", + "Labels", + "Etag", + "Resource", + "Attributes", + "Paths", + "ResourceReference", + }); + internal_static_google_cloud_dataplex_v1_DataAttributeBinding_Path_descriptor = + internal_static_google_cloud_dataplex_v1_DataAttributeBinding_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dataplex_v1_DataAttributeBinding_Path_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_DataAttributeBinding_Path_descriptor, + new java.lang.String[] { + "Name", "Attributes", + }); + internal_static_google_cloud_dataplex_v1_DataAttributeBinding_LabelsEntry_descriptor = + internal_static_google_cloud_dataplex_v1_DataAttributeBinding_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_dataplex_v1_DataAttributeBinding_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_DataAttributeBinding_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_dataplex_v1_CreateDataTaxonomyRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_dataplex_v1_CreateDataTaxonomyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_CreateDataTaxonomyRequest_descriptor, + new java.lang.String[] { + "Parent", "DataTaxonomyId", "DataTaxonomy", "ValidateOnly", + }); + internal_static_google_cloud_dataplex_v1_UpdateDataTaxonomyRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_dataplex_v1_UpdateDataTaxonomyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_UpdateDataTaxonomyRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "DataTaxonomy", "ValidateOnly", + }); + internal_static_google_cloud_dataplex_v1_GetDataTaxonomyRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_dataplex_v1_GetDataTaxonomyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_GetDataTaxonomyRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_dataplex_v1_ListDataTaxonomiesRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_dataplex_v1_ListDataTaxonomiesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_ListDataTaxonomiesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_dataplex_v1_ListDataTaxonomiesResponse_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_dataplex_v1_ListDataTaxonomiesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_ListDataTaxonomiesResponse_descriptor, + new java.lang.String[] { + "DataTaxonomies", "NextPageToken", "UnreachableLocations", + }); + internal_static_google_cloud_dataplex_v1_DeleteDataTaxonomyRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_dataplex_v1_DeleteDataTaxonomyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_DeleteDataTaxonomyRequest_descriptor, + new java.lang.String[] { + "Name", "Etag", + }); + internal_static_google_cloud_dataplex_v1_CreateDataAttributeRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_dataplex_v1_CreateDataAttributeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_CreateDataAttributeRequest_descriptor, + new java.lang.String[] { + "Parent", "DataAttributeId", "DataAttribute", "ValidateOnly", + }); + internal_static_google_cloud_dataplex_v1_UpdateDataAttributeRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_dataplex_v1_UpdateDataAttributeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_UpdateDataAttributeRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "DataAttribute", "ValidateOnly", + }); + internal_static_google_cloud_dataplex_v1_GetDataAttributeRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_dataplex_v1_GetDataAttributeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_GetDataAttributeRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_dataplex_v1_ListDataAttributesRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_dataplex_v1_ListDataAttributesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_ListDataAttributesRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_dataplex_v1_ListDataAttributesResponse_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_dataplex_v1_ListDataAttributesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_ListDataAttributesResponse_descriptor, + new java.lang.String[] { + "DataAttributes", "NextPageToken", "UnreachableLocations", + }); + internal_static_google_cloud_dataplex_v1_DeleteDataAttributeRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_dataplex_v1_DeleteDataAttributeRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_DeleteDataAttributeRequest_descriptor, + new java.lang.String[] { + "Name", "Etag", + }); + internal_static_google_cloud_dataplex_v1_CreateDataAttributeBindingRequest_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_dataplex_v1_CreateDataAttributeBindingRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_CreateDataAttributeBindingRequest_descriptor, + new java.lang.String[] { + "Parent", "DataAttributeBindingId", "DataAttributeBinding", "ValidateOnly", + }); + internal_static_google_cloud_dataplex_v1_UpdateDataAttributeBindingRequest_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_dataplex_v1_UpdateDataAttributeBindingRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_UpdateDataAttributeBindingRequest_descriptor, + new java.lang.String[] { + "UpdateMask", "DataAttributeBinding", "ValidateOnly", + }); + internal_static_google_cloud_dataplex_v1_GetDataAttributeBindingRequest_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_dataplex_v1_GetDataAttributeBindingRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_GetDataAttributeBindingRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_dataplex_v1_ListDataAttributeBindingsRequest_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_dataplex_v1_ListDataAttributeBindingsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_ListDataAttributeBindingsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "OrderBy", + }); + internal_static_google_cloud_dataplex_v1_ListDataAttributeBindingsResponse_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_dataplex_v1_ListDataAttributeBindingsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_ListDataAttributeBindingsResponse_descriptor, + new java.lang.String[] { + "DataAttributeBindings", "NextPageToken", "UnreachableLocations", + }); + internal_static_google_cloud_dataplex_v1_DeleteDataAttributeBindingRequest_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_dataplex_v1_DeleteDataAttributeBindingRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_DeleteDataAttributeBindingRequest_descriptor, + new java.lang.String[] { + "Name", "Etag", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.dataplex.v1.SecurityProto.getDescriptor(); + com.google.cloud.dataplex.v1.ServiceProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteDataAttributeBindingRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteDataAttributeBindingRequest.java new file mode 100644 index 000000000000..129f2b6e757f --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteDataAttributeBindingRequest.java @@ -0,0 +1,856 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +/** + * + * + *
+ * Delete DataAttributeBinding request.
+ * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest} + */ +public final class DeleteDataAttributeBindingRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest) + DeleteDataAttributeBindingRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteDataAttributeBindingRequest.newBuilder() to construct. + private DeleteDataAttributeBindingRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteDataAttributeBindingRequest() { + name_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteDataAttributeBindingRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DeleteDataAttributeBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DeleteDataAttributeBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest.class, + com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The resource name of the DataAttributeBinding:
+   * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id}
+   * 
+ * + * + * 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 resource name of the DataAttributeBinding:
+   * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id}
+   * 
+ * + * + * 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 ETAG_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + /** + * + * + *
+   * Required. If the client provided etag value does not match the current etag
+   * value, the DeleteDataAttributeBindingRequest method returns an ABORTED
+   * error response. Etags must be used when calling the
+   * DeleteDataAttributeBinding.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * Required. If the client provided etag value does not match the current etag
+   * value, the DeleteDataAttributeBindingRequest method returns an ABORTED
+   * error response. Etags must be used when calling the
+   * DeleteDataAttributeBinding.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = 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_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, etag_); + } + 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(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, etag_); + } + 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.dataplex.v1.DeleteDataAttributeBindingRequest)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest other = + (com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getEtag().equals(other.getEtag())) 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) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest 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.dataplex.v1.DeleteDataAttributeBindingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest 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.dataplex.v1.DeleteDataAttributeBindingRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest 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.dataplex.v1.DeleteDataAttributeBindingRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest 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.dataplex.v1.DeleteDataAttributeBindingRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest 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.dataplex.v1.DeleteDataAttributeBindingRequest 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; + } + /** + * + * + *
+   * Delete DataAttributeBinding request.
+   * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest) + com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DeleteDataAttributeBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DeleteDataAttributeBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest.class, + com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest.Builder.class); + } + + // Construct using com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + etag_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DeleteDataAttributeBindingRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest + getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest build() { + com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest buildPartial() { + com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest result = + new com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.etag_ = etag_; + } + } + + @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.dataplex.v1.DeleteDataAttributeBindingRequest) { + return mergeFrom((com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest other) { + if (other + == com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000002; + 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(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + 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 name_ = ""; + /** + * + * + *
+     * Required. The resource name of the DataAttributeBinding:
+     * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id}
+     * 
+ * + * + * 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 resource name of the DataAttributeBinding:
+     * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id}
+     * 
+ * + * + * 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 resource name of the DataAttributeBinding:
+     * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id}
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the DataAttributeBinding:
+     * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the DataAttributeBinding:
+     * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id}
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * Required. If the client provided etag value does not match the current etag
+     * value, the DeleteDataAttributeBindingRequest method returns an ABORTED
+     * error response. Etags must be used when calling the
+     * DeleteDataAttributeBinding.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. If the client provided etag value does not match the current etag
+     * value, the DeleteDataAttributeBindingRequest method returns an ABORTED
+     * error response. Etags must be used when calling the
+     * DeleteDataAttributeBinding.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. If the client provided etag value does not match the current etag
+     * value, the DeleteDataAttributeBindingRequest method returns an ABORTED
+     * error response. Etags must be used when calling the
+     * DeleteDataAttributeBinding.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. If the client provided etag value does not match the current etag
+     * value, the DeleteDataAttributeBindingRequest method returns an ABORTED
+     * error response. Etags must be used when calling the
+     * DeleteDataAttributeBinding.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. If the client provided etag value does not match the current etag
+     * value, the DeleteDataAttributeBindingRequest method returns an ABORTED
+     * error response. Etags must be used when calling the
+     * DeleteDataAttributeBinding.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000002; + 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.dataplex.v1.DeleteDataAttributeBindingRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest) + private static final com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest(); + } + + public static com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteDataAttributeBindingRequest 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.dataplex.v1.DeleteDataAttributeBindingRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteDataAttributeBindingRequestOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteDataAttributeBindingRequestOrBuilder.java new file mode 100644 index 000000000000..7883babf4770 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteDataAttributeBindingRequestOrBuilder.java @@ -0,0 +1,87 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +public interface DeleteDataAttributeBindingRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the DataAttributeBinding:
+   * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the DataAttributeBinding:
+   * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. If the client provided etag value does not match the current etag
+   * value, the DeleteDataAttributeBindingRequest method returns an ABORTED
+   * error response. Etags must be used when calling the
+   * DeleteDataAttributeBinding.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Required. If the client provided etag value does not match the current etag
+   * value, the DeleteDataAttributeBindingRequest method returns an ABORTED
+   * error response. Etags must be used when calling the
+   * DeleteDataAttributeBinding.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteDataAttributeRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteDataAttributeRequest.java new file mode 100644 index 000000000000..a976a4fff393 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteDataAttributeRequest.java @@ -0,0 +1,835 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +/** + * + * + *
+ * Delete DataAttribute request.
+ * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DeleteDataAttributeRequest} + */ +public final class DeleteDataAttributeRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.DeleteDataAttributeRequest) + DeleteDataAttributeRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteDataAttributeRequest.newBuilder() to construct. + private DeleteDataAttributeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteDataAttributeRequest() { + name_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteDataAttributeRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DeleteDataAttributeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DeleteDataAttributeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DeleteDataAttributeRequest.class, + com.google.cloud.dataplex.v1.DeleteDataAttributeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The resource name of the DataAttribute:
+   * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+   * 
+ * + * + * 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 resource name of the DataAttribute:
+   * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+   * 
+ * + * + * 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 ETAG_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + /** + * + * + *
+   * Optional. If the client provided etag value does not match the current etag
+   * value, the DeleteDataAttribute method returns an ABORTED error response.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. If the client provided etag value does not match the current etag
+   * value, the DeleteDataAttribute method returns an ABORTED error response.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = 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_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, etag_); + } + 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(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, etag_); + } + 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.dataplex.v1.DeleteDataAttributeRequest)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.DeleteDataAttributeRequest other = + (com.google.cloud.dataplex.v1.DeleteDataAttributeRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getEtag().equals(other.getEtag())) 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) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.DeleteDataAttributeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DeleteDataAttributeRequest 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.dataplex.v1.DeleteDataAttributeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DeleteDataAttributeRequest 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.dataplex.v1.DeleteDataAttributeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DeleteDataAttributeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.DeleteDataAttributeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DeleteDataAttributeRequest 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.dataplex.v1.DeleteDataAttributeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DeleteDataAttributeRequest 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.dataplex.v1.DeleteDataAttributeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DeleteDataAttributeRequest 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.dataplex.v1.DeleteDataAttributeRequest 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; + } + /** + * + * + *
+   * Delete DataAttribute request.
+   * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DeleteDataAttributeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.DeleteDataAttributeRequest) + com.google.cloud.dataplex.v1.DeleteDataAttributeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DeleteDataAttributeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DeleteDataAttributeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DeleteDataAttributeRequest.class, + com.google.cloud.dataplex.v1.DeleteDataAttributeRequest.Builder.class); + } + + // Construct using com.google.cloud.dataplex.v1.DeleteDataAttributeRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + etag_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DeleteDataAttributeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DeleteDataAttributeRequest getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.DeleteDataAttributeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DeleteDataAttributeRequest build() { + com.google.cloud.dataplex.v1.DeleteDataAttributeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DeleteDataAttributeRequest buildPartial() { + com.google.cloud.dataplex.v1.DeleteDataAttributeRequest result = + new com.google.cloud.dataplex.v1.DeleteDataAttributeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dataplex.v1.DeleteDataAttributeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.etag_ = etag_; + } + } + + @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.dataplex.v1.DeleteDataAttributeRequest) { + return mergeFrom((com.google.cloud.dataplex.v1.DeleteDataAttributeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataplex.v1.DeleteDataAttributeRequest other) { + if (other == com.google.cloud.dataplex.v1.DeleteDataAttributeRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000002; + 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(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + 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 name_ = ""; + /** + * + * + *
+     * Required. The resource name of the DataAttribute:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+     * 
+ * + * + * 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 resource name of the DataAttribute:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+     * 
+ * + * + * 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 resource name of the DataAttribute:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the DataAttribute:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the DataAttribute:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * Optional. If the client provided etag value does not match the current etag
+     * value, the DeleteDataAttribute method returns an ABORTED error response.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. If the client provided etag value does not match the current etag
+     * value, the DeleteDataAttribute method returns an ABORTED error response.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. If the client provided etag value does not match the current etag
+     * value, the DeleteDataAttribute method returns an ABORTED error response.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If the client provided etag value does not match the current etag
+     * value, the DeleteDataAttribute method returns an ABORTED error response.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If the client provided etag value does not match the current etag
+     * value, the DeleteDataAttribute method returns an ABORTED error response.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000002; + 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.dataplex.v1.DeleteDataAttributeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.DeleteDataAttributeRequest) + private static final com.google.cloud.dataplex.v1.DeleteDataAttributeRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.DeleteDataAttributeRequest(); + } + + public static com.google.cloud.dataplex.v1.DeleteDataAttributeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteDataAttributeRequest 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.dataplex.v1.DeleteDataAttributeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteDataAttributeRequestOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteDataAttributeRequestOrBuilder.java new file mode 100644 index 000000000000..9567b0fa2c04 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteDataAttributeRequestOrBuilder.java @@ -0,0 +1,83 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +public interface DeleteDataAttributeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.DeleteDataAttributeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the DataAttribute:
+   * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the DataAttribute:
+   * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. If the client provided etag value does not match the current etag
+   * value, the DeleteDataAttribute method returns an ABORTED error response.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Optional. If the client provided etag value does not match the current etag
+   * value, the DeleteDataAttribute method returns an ABORTED error response.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteDataTaxonomyRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteDataTaxonomyRequest.java new file mode 100644 index 000000000000..74a59caff679 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteDataTaxonomyRequest.java @@ -0,0 +1,835 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +/** + * + * + *
+ * Delete DataTaxonomy request.
+ * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DeleteDataTaxonomyRequest} + */ +public final class DeleteDataTaxonomyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.DeleteDataTaxonomyRequest) + DeleteDataTaxonomyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteDataTaxonomyRequest.newBuilder() to construct. + private DeleteDataTaxonomyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteDataTaxonomyRequest() { + name_ = ""; + etag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteDataTaxonomyRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DeleteDataTaxonomyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DeleteDataTaxonomyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest.class, + com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The resource name of the DataTaxonomy:
+   * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+   * 
+ * + * + * 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 resource name of the DataTaxonomy:
+   * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+   * 
+ * + * + * 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 ETAG_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object etag_ = ""; + /** + * + * + *
+   * Optional. If the client provided etag value does not match the current etag
+   * value,the DeleteDataTaxonomy method returns an ABORTED error.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + @java.lang.Override + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + 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(); + etag_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. If the client provided etag value does not match the current etag
+   * value,the DeleteDataTaxonomy method returns an ABORTED error.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = 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_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, etag_); + } + 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(etag_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, etag_); + } + 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.dataplex.v1.DeleteDataTaxonomyRequest)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest other = + (com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getEtag().equals(other.getEtag())) 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) + ETAG_FIELD_NUMBER; + hash = (53 * hash) + getEtag().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest 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.dataplex.v1.DeleteDataTaxonomyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest 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.dataplex.v1.DeleteDataTaxonomyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest 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.dataplex.v1.DeleteDataTaxonomyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest 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.dataplex.v1.DeleteDataTaxonomyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest 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.dataplex.v1.DeleteDataTaxonomyRequest 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; + } + /** + * + * + *
+   * Delete DataTaxonomy request.
+   * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.DeleteDataTaxonomyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.DeleteDataTaxonomyRequest) + com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DeleteDataTaxonomyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DeleteDataTaxonomyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest.class, + com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest.Builder.class); + } + + // Construct using com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + etag_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_DeleteDataTaxonomyRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest build() { + com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest buildPartial() { + com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest result = + new com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.etag_ = etag_; + } + } + + @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.dataplex.v1.DeleteDataTaxonomyRequest) { + return mergeFrom((com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest other) { + if (other == com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getEtag().isEmpty()) { + etag_ = other.etag_; + bitField0_ |= 0x00000002; + 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(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + 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 name_ = ""; + /** + * + * + *
+     * Required. The resource name of the DataTaxonomy:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+     * 
+ * + * + * 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 resource name of the DataTaxonomy:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+     * 
+ * + * + * 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 resource name of the DataTaxonomy:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the DataTaxonomy:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the DataTaxonomy:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object etag_ = ""; + /** + * + * + *
+     * Optional. If the client provided etag value does not match the current etag
+     * value,the DeleteDataTaxonomy method returns an ABORTED error.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + public java.lang.String getEtag() { + java.lang.Object ref = etag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + etag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. If the client provided etag value does not match the current etag
+     * value,the DeleteDataTaxonomy method returns an ABORTED error.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + public com.google.protobuf.ByteString getEtagBytes() { + java.lang.Object ref = etag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + etag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. If the client provided etag value does not match the current etag
+     * value,the DeleteDataTaxonomy method returns an ABORTED error.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The etag to set. + * @return This builder for chaining. + */ + public Builder setEtag(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + etag_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If the client provided etag value does not match the current etag
+     * value,the DeleteDataTaxonomy method returns an ABORTED error.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearEtag() { + etag_ = getDefaultInstance().getEtag(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If the client provided etag value does not match the current etag
+     * value,the DeleteDataTaxonomy method returns an ABORTED error.
+     * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for etag to set. + * @return This builder for chaining. + */ + public Builder setEtagBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + etag_ = value; + bitField0_ |= 0x00000002; + 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.dataplex.v1.DeleteDataTaxonomyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.DeleteDataTaxonomyRequest) + private static final com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest(); + } + + public static com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteDataTaxonomyRequest 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.dataplex.v1.DeleteDataTaxonomyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteDataTaxonomyRequestOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteDataTaxonomyRequestOrBuilder.java new file mode 100644 index 000000000000..55abec19a218 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteDataTaxonomyRequestOrBuilder.java @@ -0,0 +1,83 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +public interface DeleteDataTaxonomyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.DeleteDataTaxonomyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the DataTaxonomy:
+   * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the DataTaxonomy:
+   * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. If the client provided etag value does not match the current etag
+   * value,the DeleteDataTaxonomy method returns an ABORTED error.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The etag. + */ + java.lang.String getEtag(); + /** + * + * + *
+   * Optional. If the client provided etag value does not match the current etag
+   * value,the DeleteDataTaxonomy method returns an ABORTED error.
+   * 
+ * + * string etag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for etag. + */ + com.google.protobuf.ByteString getEtagBytes(); +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetDataAttributeBindingRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetDataAttributeBindingRequest.java new file mode 100644 index 000000000000..fa4cfe88781a --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetDataAttributeBindingRequest.java @@ -0,0 +1,647 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +/** + * + * + *
+ * Get DataAttributeBinding request.
+ * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.GetDataAttributeBindingRequest} + */ +public final class GetDataAttributeBindingRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.GetDataAttributeBindingRequest) + GetDataAttributeBindingRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetDataAttributeBindingRequest.newBuilder() to construct. + private GetDataAttributeBindingRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetDataAttributeBindingRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetDataAttributeBindingRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_GetDataAttributeBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_GetDataAttributeBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest.class, + com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The resource name of the DataAttributeBinding:
+   * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id}
+   * 
+ * + * + * 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 resource name of the DataAttributeBinding:
+   * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id}
+   * 
+ * + * + * 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.dataplex.v1.GetDataAttributeBindingRequest)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest other = + (com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest) 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.dataplex.v1.GetDataAttributeBindingRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest 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.dataplex.v1.GetDataAttributeBindingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest 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.dataplex.v1.GetDataAttributeBindingRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest 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.dataplex.v1.GetDataAttributeBindingRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest 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.dataplex.v1.GetDataAttributeBindingRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest 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.dataplex.v1.GetDataAttributeBindingRequest 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; + } + /** + * + * + *
+   * Get DataAttributeBinding request.
+   * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.GetDataAttributeBindingRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.GetDataAttributeBindingRequest) + com.google.cloud.dataplex.v1.GetDataAttributeBindingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_GetDataAttributeBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_GetDataAttributeBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest.class, + com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest.Builder.class); + } + + // Construct using com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_GetDataAttributeBindingRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest build() { + com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest buildPartial() { + com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest result = + new com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.dataplex.v1.GetDataAttributeBindingRequest) { + return mergeFrom((com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest other) { + if (other == com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + 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(); + bitField0_ |= 0x00000001; + 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 int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the DataAttributeBinding:
+     * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id}
+     * 
+ * + * + * 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 resource name of the DataAttributeBinding:
+     * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id}
+     * 
+ * + * + * 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 resource name of the DataAttributeBinding:
+     * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id}
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the DataAttributeBinding:
+     * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the DataAttributeBinding:
+     * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id}
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + 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.dataplex.v1.GetDataAttributeBindingRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.GetDataAttributeBindingRequest) + private static final com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest(); + } + + public static com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDataAttributeBindingRequest 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.dataplex.v1.GetDataAttributeBindingRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetDataAttributeBindingRequestOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetDataAttributeBindingRequestOrBuilder.java new file mode 100644 index 000000000000..65c30a755cc0 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetDataAttributeBindingRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +public interface GetDataAttributeBindingRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.GetDataAttributeBindingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the DataAttributeBinding:
+   * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the DataAttributeBinding:
+   * projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id}
+   * 
+ * + * + * 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-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetDataAttributeRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetDataAttributeRequest.java new file mode 100644 index 000000000000..ad17aa4b7a09 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetDataAttributeRequest.java @@ -0,0 +1,645 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +/** + * + * + *
+ * Get DataAttribute request.
+ * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.GetDataAttributeRequest} + */ +public final class GetDataAttributeRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.GetDataAttributeRequest) + GetDataAttributeRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetDataAttributeRequest.newBuilder() to construct. + private GetDataAttributeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetDataAttributeRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetDataAttributeRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_GetDataAttributeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_GetDataAttributeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.GetDataAttributeRequest.class, + com.google.cloud.dataplex.v1.GetDataAttributeRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The resource name of the dataAttribute:
+   * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+   * 
+ * + * + * 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 resource name of the dataAttribute:
+   * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+   * 
+ * + * + * 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.dataplex.v1.GetDataAttributeRequest)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.GetDataAttributeRequest other = + (com.google.cloud.dataplex.v1.GetDataAttributeRequest) 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.dataplex.v1.GetDataAttributeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.GetDataAttributeRequest 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.dataplex.v1.GetDataAttributeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.GetDataAttributeRequest 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.dataplex.v1.GetDataAttributeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.GetDataAttributeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.GetDataAttributeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.GetDataAttributeRequest 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.dataplex.v1.GetDataAttributeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.GetDataAttributeRequest 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.dataplex.v1.GetDataAttributeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.GetDataAttributeRequest 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.dataplex.v1.GetDataAttributeRequest 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; + } + /** + * + * + *
+   * Get DataAttribute request.
+   * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.GetDataAttributeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.GetDataAttributeRequest) + com.google.cloud.dataplex.v1.GetDataAttributeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_GetDataAttributeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_GetDataAttributeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.GetDataAttributeRequest.class, + com.google.cloud.dataplex.v1.GetDataAttributeRequest.Builder.class); + } + + // Construct using com.google.cloud.dataplex.v1.GetDataAttributeRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_GetDataAttributeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.GetDataAttributeRequest getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.GetDataAttributeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.GetDataAttributeRequest build() { + com.google.cloud.dataplex.v1.GetDataAttributeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.GetDataAttributeRequest buildPartial() { + com.google.cloud.dataplex.v1.GetDataAttributeRequest result = + new com.google.cloud.dataplex.v1.GetDataAttributeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dataplex.v1.GetDataAttributeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.dataplex.v1.GetDataAttributeRequest) { + return mergeFrom((com.google.cloud.dataplex.v1.GetDataAttributeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataplex.v1.GetDataAttributeRequest other) { + if (other == com.google.cloud.dataplex.v1.GetDataAttributeRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + 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(); + bitField0_ |= 0x00000001; + 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 int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the dataAttribute:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+     * 
+ * + * + * 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 resource name of the dataAttribute:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+     * 
+ * + * + * 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 resource name of the dataAttribute:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the dataAttribute:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the dataAttribute:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + 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.dataplex.v1.GetDataAttributeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.GetDataAttributeRequest) + private static final com.google.cloud.dataplex.v1.GetDataAttributeRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.GetDataAttributeRequest(); + } + + public static com.google.cloud.dataplex.v1.GetDataAttributeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDataAttributeRequest 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.dataplex.v1.GetDataAttributeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetDataAttributeRequestOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetDataAttributeRequestOrBuilder.java new file mode 100644 index 000000000000..96c6a6a7b487 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetDataAttributeRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +public interface GetDataAttributeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.GetDataAttributeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the dataAttribute:
+   * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the dataAttribute:
+   * projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}
+   * 
+ * + * + * 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-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetDataTaxonomyRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetDataTaxonomyRequest.java new file mode 100644 index 000000000000..b6267debfc05 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetDataTaxonomyRequest.java @@ -0,0 +1,645 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +/** + * + * + *
+ * Get DataTaxonomy request.
+ * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.GetDataTaxonomyRequest} + */ +public final class GetDataTaxonomyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.GetDataTaxonomyRequest) + GetDataTaxonomyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetDataTaxonomyRequest.newBuilder() to construct. + private GetDataTaxonomyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetDataTaxonomyRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetDataTaxonomyRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_GetDataTaxonomyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_GetDataTaxonomyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.GetDataTaxonomyRequest.class, + com.google.cloud.dataplex.v1.GetDataTaxonomyRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * + * + *
+   * Required. The resource name of the DataTaxonomy:
+   * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+   * 
+ * + * + * 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 resource name of the DataTaxonomy:
+   * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+   * 
+ * + * + * 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.dataplex.v1.GetDataTaxonomyRequest)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.GetDataTaxonomyRequest other = + (com.google.cloud.dataplex.v1.GetDataTaxonomyRequest) 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.dataplex.v1.GetDataTaxonomyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.GetDataTaxonomyRequest 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.dataplex.v1.GetDataTaxonomyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.GetDataTaxonomyRequest 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.dataplex.v1.GetDataTaxonomyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.GetDataTaxonomyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.GetDataTaxonomyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.GetDataTaxonomyRequest 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.dataplex.v1.GetDataTaxonomyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.GetDataTaxonomyRequest 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.dataplex.v1.GetDataTaxonomyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.GetDataTaxonomyRequest 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.dataplex.v1.GetDataTaxonomyRequest 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; + } + /** + * + * + *
+   * Get DataTaxonomy request.
+   * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.GetDataTaxonomyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.GetDataTaxonomyRequest) + com.google.cloud.dataplex.v1.GetDataTaxonomyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_GetDataTaxonomyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_GetDataTaxonomyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.GetDataTaxonomyRequest.class, + com.google.cloud.dataplex.v1.GetDataTaxonomyRequest.Builder.class); + } + + // Construct using com.google.cloud.dataplex.v1.GetDataTaxonomyRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_GetDataTaxonomyRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.GetDataTaxonomyRequest getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.GetDataTaxonomyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.GetDataTaxonomyRequest build() { + com.google.cloud.dataplex.v1.GetDataTaxonomyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.GetDataTaxonomyRequest buildPartial() { + com.google.cloud.dataplex.v1.GetDataTaxonomyRequest result = + new com.google.cloud.dataplex.v1.GetDataTaxonomyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dataplex.v1.GetDataTaxonomyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + } + + @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.dataplex.v1.GetDataTaxonomyRequest) { + return mergeFrom((com.google.cloud.dataplex.v1.GetDataTaxonomyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataplex.v1.GetDataTaxonomyRequest other) { + if (other == com.google.cloud.dataplex.v1.GetDataTaxonomyRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + 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(); + bitField0_ |= 0x00000001; + 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 int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the DataTaxonomy:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+     * 
+ * + * + * 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 resource name of the DataTaxonomy:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+     * 
+ * + * + * 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 resource name of the DataTaxonomy:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the DataTaxonomy:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the DataTaxonomy:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + 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.dataplex.v1.GetDataTaxonomyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.GetDataTaxonomyRequest) + private static final com.google.cloud.dataplex.v1.GetDataTaxonomyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.GetDataTaxonomyRequest(); + } + + public static com.google.cloud.dataplex.v1.GetDataTaxonomyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetDataTaxonomyRequest 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.dataplex.v1.GetDataTaxonomyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetDataTaxonomyRequestOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetDataTaxonomyRequestOrBuilder.java new file mode 100644 index 000000000000..1666a3a4261f --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetDataTaxonomyRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +public interface GetDataTaxonomyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.GetDataTaxonomyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the DataTaxonomy:
+   * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the DataTaxonomy:
+   * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+   * 
+ * + * + * 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-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Job.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Job.java index e573d75953aa..ceda6c6c4ee1 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Job.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Job.java @@ -44,6 +44,7 @@ private Job() { service_ = 0; serviceJob_ = ""; message_ = ""; + trigger_ = 0; } @java.lang.Override @@ -57,6 +58,17 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { .internal_static_google_cloud_dataplex_v1_Job_descriptor; } + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 10: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { @@ -430,6 +442,165 @@ private State(int value) { // @@protoc_insertion_point(enum_scope:google.cloud.dataplex.v1.Job.State) } + /** + * + * + *
+   * Job execution trigger.
+   * 
+ * + * Protobuf enum {@code google.cloud.dataplex.v1.Job.Trigger} + */ + public enum Trigger implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The trigger is unspecified.
+     * 
+ * + * TRIGGER_UNSPECIFIED = 0; + */ + TRIGGER_UNSPECIFIED(0), + /** + * + * + *
+     * The job was triggered by Dataplex based on trigger spec from task
+     * definition.
+     * 
+ * + * TASK_CONFIG = 1; + */ + TASK_CONFIG(1), + /** + * + * + *
+     * The job was triggered by the explicit call of Task API.
+     * 
+ * + * RUN_REQUEST = 2; + */ + RUN_REQUEST(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The trigger is unspecified.
+     * 
+ * + * TRIGGER_UNSPECIFIED = 0; + */ + public static final int TRIGGER_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The job was triggered by Dataplex based on trigger spec from task
+     * definition.
+     * 
+ * + * TASK_CONFIG = 1; + */ + public static final int TASK_CONFIG_VALUE = 1; + /** + * + * + *
+     * The job was triggered by the explicit call of Task API.
+     * 
+ * + * RUN_REQUEST = 2; + */ + public static final int RUN_REQUEST_VALUE = 2; + + 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 Trigger 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 Trigger forNumber(int value) { + switch (value) { + case 0: + return TRIGGER_UNSPECIFIED; + case 1: + return TASK_CONFIG; + case 2: + return RUN_REQUEST; + 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 Trigger findValueByNumber(int number) { + return Trigger.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.dataplex.v1.Job.getDescriptor().getEnumTypes().get(2); + } + + private static final Trigger[] VALUES = values(); + + public static Trigger 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 Trigger(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dataplex.v1.Job.Trigger) + } + public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -837,6 +1008,207 @@ public com.google.protobuf.ByteString getMessageBytes() { } } + public static final int LABELS_FIELD_NUMBER = 10; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.dataplex.v1.TasksProto + .internal_static_google_cloud_dataplex_v1_Job_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Output only. User-defined labels for the task.
+   * 
+ * + * map<string, string> labels = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Output only. User-defined labels for the task.
+   * 
+ * + * map<string, string> labels = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Output only. User-defined labels for the task.
+   * 
+ * + * map<string, string> labels = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Output only. User-defined labels for the task.
+   * 
+ * + * map<string, string> labels = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int TRIGGER_FIELD_NUMBER = 11; + private int trigger_ = 0; + /** + * + * + *
+   * Output only. Job execution trigger.
+   * 
+ * + * + * .google.cloud.dataplex.v1.Job.Trigger trigger = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for trigger. + */ + @java.lang.Override + public int getTriggerValue() { + return trigger_; + } + /** + * + * + *
+   * Output only. Job execution trigger.
+   * 
+ * + * + * .google.cloud.dataplex.v1.Job.Trigger trigger = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The trigger. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.Job.Trigger getTrigger() { + com.google.cloud.dataplex.v1.Job.Trigger result = + com.google.cloud.dataplex.v1.Job.Trigger.forNumber(trigger_); + return result == null ? com.google.cloud.dataplex.v1.Job.Trigger.UNRECOGNIZED : result; + } + + public static final int EXECUTION_SPEC_FIELD_NUMBER = 100; + private com.google.cloud.dataplex.v1.Task.ExecutionSpec executionSpec_; + /** + * + * + *
+   * Output only. Spec related to how a task is executed.
+   * 
+ * + * + * .google.cloud.dataplex.v1.Task.ExecutionSpec execution_spec = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the executionSpec field is set. + */ + @java.lang.Override + public boolean hasExecutionSpec() { + return executionSpec_ != null; + } + /** + * + * + *
+   * Output only. Spec related to how a task is executed.
+   * 
+ * + * + * .google.cloud.dataplex.v1.Task.ExecutionSpec execution_spec = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The executionSpec. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.Task.ExecutionSpec getExecutionSpec() { + return executionSpec_ == null + ? com.google.cloud.dataplex.v1.Task.ExecutionSpec.getDefaultInstance() + : executionSpec_; + } + /** + * + * + *
+   * Output only. Spec related to how a task is executed.
+   * 
+ * + * + * .google.cloud.dataplex.v1.Task.ExecutionSpec execution_spec = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.Task.ExecutionSpecOrBuilder getExecutionSpecOrBuilder() { + return executionSpec_ == null + ? com.google.cloud.dataplex.v1.Task.ExecutionSpec.getDefaultInstance() + : executionSpec_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -878,6 +1250,14 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, message_); } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 10); + if (trigger_ != com.google.cloud.dataplex.v1.Job.Trigger.TRIGGER_UNSPECIFIED.getNumber()) { + output.writeEnum(11, trigger_); + } + if (executionSpec_ != null) { + output.writeMessage(100, getExecutionSpec()); + } getUnknownFields().writeTo(output); } @@ -914,6 +1294,22 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, message_); } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, labels__); + } + if (trigger_ != com.google.cloud.dataplex.v1.Job.Trigger.TRIGGER_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, trigger_); + } + if (executionSpec_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(100, getExecutionSpec()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -944,6 +1340,12 @@ public boolean equals(final java.lang.Object obj) { if (service_ != other.service_) return false; if (!getServiceJob().equals(other.getServiceJob())) return false; if (!getMessage().equals(other.getMessage())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (trigger_ != other.trigger_) return false; + if (hasExecutionSpec() != other.hasExecutionSpec()) return false; + if (hasExecutionSpec()) { + if (!getExecutionSpec().equals(other.getExecutionSpec())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -977,6 +1379,16 @@ public int hashCode() { hash = (53 * hash) + getServiceJob().hashCode(); hash = (37 * hash) + MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getMessage().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + hash = (37 * hash) + TRIGGER_FIELD_NUMBER; + hash = (53 * hash) + trigger_; + if (hasExecutionSpec()) { + hash = (37 * hash) + EXECUTION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getExecutionSpec().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1094,6 +1506,26 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { .internal_static_google_cloud_dataplex_v1_Job_descriptor; } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 10: + return internalGetLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 10: + return internalGetMutableLabels(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { @@ -1132,6 +1564,13 @@ public Builder clear() { service_ = 0; serviceJob_ = ""; message_ = ""; + internalGetMutableLabels().clear(); + trigger_ = 0; + executionSpec_ = null; + if (executionSpecBuilder_ != null) { + executionSpecBuilder_.dispose(); + executionSpecBuilder_ = null; + } return this; } @@ -1194,6 +1633,17 @@ private void buildPartial0(com.google.cloud.dataplex.v1.Job result) { if (((from_bitField0_ & 0x00000100) != 0)) { result.message_ = message_; } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.trigger_ = trigger_; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.executionSpec_ = + executionSpecBuilder_ == null ? executionSpec_ : executionSpecBuilder_.build(); + } } @java.lang.Override @@ -1276,6 +1726,14 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.Job other) { bitField0_ |= 0x00000100; onChanged(); } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000200; + if (other.trigger_ != 0) { + setTriggerValue(other.getTriggerValue()); + } + if (other.hasExecutionSpec()) { + mergeExecutionSpec(other.getExecutionSpec()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1356,6 +1814,30 @@ public Builder mergeFrom( bitField0_ |= 0x00000100; break; } // case 74 + case 82: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 88: + { + trigger_ = input.readEnum(); + bitField0_ |= 0x00000400; + break; + } // case 88 + case 802: + { + input.readMessage(getExecutionSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case 802 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2451,6 +2933,479 @@ public Builder setMessageBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000200; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Output only. User-defined labels for the task.
+     * 
+ * + * map<string, string> labels = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Output only. User-defined labels for the task.
+     * 
+ * + * map<string, string> labels = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Output only. User-defined labels for the task.
+     * 
+ * + * map<string, string> labels = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Output only. User-defined labels for the task.
+     * 
+ * + * map<string, string> labels = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000200); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Output only. User-defined labels for the task.
+     * 
+ * + * map<string, string> labels = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000200; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Output only. User-defined labels for the task.
+     * 
+ * + * map<string, string> labels = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000200; + return this; + } + /** + * + * + *
+     * Output only. User-defined labels for the task.
+     * 
+ * + * map<string, string> labels = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000200; + return this; + } + + private int trigger_ = 0; + /** + * + * + *
+     * Output only. Job execution trigger.
+     * 
+ * + * + * .google.cloud.dataplex.v1.Job.Trigger trigger = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for trigger. + */ + @java.lang.Override + public int getTriggerValue() { + return trigger_; + } + /** + * + * + *
+     * Output only. Job execution trigger.
+     * 
+ * + * + * .google.cloud.dataplex.v1.Job.Trigger trigger = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for trigger to set. + * @return This builder for chaining. + */ + public Builder setTriggerValue(int value) { + trigger_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Job execution trigger.
+     * 
+ * + * + * .google.cloud.dataplex.v1.Job.Trigger trigger = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The trigger. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.Job.Trigger getTrigger() { + com.google.cloud.dataplex.v1.Job.Trigger result = + com.google.cloud.dataplex.v1.Job.Trigger.forNumber(trigger_); + return result == null ? com.google.cloud.dataplex.v1.Job.Trigger.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. Job execution trigger.
+     * 
+ * + * + * .google.cloud.dataplex.v1.Job.Trigger trigger = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The trigger to set. + * @return This builder for chaining. + */ + public Builder setTrigger(com.google.cloud.dataplex.v1.Job.Trigger value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000400; + trigger_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Job execution trigger.
+     * 
+ * + * + * .google.cloud.dataplex.v1.Job.Trigger trigger = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearTrigger() { + bitField0_ = (bitField0_ & ~0x00000400); + trigger_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.dataplex.v1.Task.ExecutionSpec executionSpec_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.Task.ExecutionSpec, + com.google.cloud.dataplex.v1.Task.ExecutionSpec.Builder, + com.google.cloud.dataplex.v1.Task.ExecutionSpecOrBuilder> + executionSpecBuilder_; + /** + * + * + *
+     * Output only. Spec related to how a task is executed.
+     * 
+ * + * + * .google.cloud.dataplex.v1.Task.ExecutionSpec execution_spec = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the executionSpec field is set. + */ + public boolean hasExecutionSpec() { + return ((bitField0_ & 0x00000800) != 0); + } + /** + * + * + *
+     * Output only. Spec related to how a task is executed.
+     * 
+ * + * + * .google.cloud.dataplex.v1.Task.ExecutionSpec execution_spec = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The executionSpec. + */ + public com.google.cloud.dataplex.v1.Task.ExecutionSpec getExecutionSpec() { + if (executionSpecBuilder_ == null) { + return executionSpec_ == null + ? com.google.cloud.dataplex.v1.Task.ExecutionSpec.getDefaultInstance() + : executionSpec_; + } else { + return executionSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Spec related to how a task is executed.
+     * 
+ * + * + * .google.cloud.dataplex.v1.Task.ExecutionSpec execution_spec = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExecutionSpec(com.google.cloud.dataplex.v1.Task.ExecutionSpec value) { + if (executionSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + executionSpec_ = value; + } else { + executionSpecBuilder_.setMessage(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Spec related to how a task is executed.
+     * 
+ * + * + * .google.cloud.dataplex.v1.Task.ExecutionSpec execution_spec = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setExecutionSpec( + com.google.cloud.dataplex.v1.Task.ExecutionSpec.Builder builderForValue) { + if (executionSpecBuilder_ == null) { + executionSpec_ = builderForValue.build(); + } else { + executionSpecBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Spec related to how a task is executed.
+     * 
+ * + * + * .google.cloud.dataplex.v1.Task.ExecutionSpec execution_spec = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeExecutionSpec(com.google.cloud.dataplex.v1.Task.ExecutionSpec value) { + if (executionSpecBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0) + && executionSpec_ != null + && executionSpec_ + != com.google.cloud.dataplex.v1.Task.ExecutionSpec.getDefaultInstance()) { + getExecutionSpecBuilder().mergeFrom(value); + } else { + executionSpec_ = value; + } + } else { + executionSpecBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Spec related to how a task is executed.
+     * 
+ * + * + * .google.cloud.dataplex.v1.Task.ExecutionSpec execution_spec = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearExecutionSpec() { + bitField0_ = (bitField0_ & ~0x00000800); + executionSpec_ = null; + if (executionSpecBuilder_ != null) { + executionSpecBuilder_.dispose(); + executionSpecBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Spec related to how a task is executed.
+     * 
+ * + * + * .google.cloud.dataplex.v1.Task.ExecutionSpec execution_spec = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dataplex.v1.Task.ExecutionSpec.Builder getExecutionSpecBuilder() { + bitField0_ |= 0x00000800; + onChanged(); + return getExecutionSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Spec related to how a task is executed.
+     * 
+ * + * + * .google.cloud.dataplex.v1.Task.ExecutionSpec execution_spec = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.dataplex.v1.Task.ExecutionSpecOrBuilder getExecutionSpecOrBuilder() { + if (executionSpecBuilder_ != null) { + return executionSpecBuilder_.getMessageOrBuilder(); + } else { + return executionSpec_ == null + ? com.google.cloud.dataplex.v1.Task.ExecutionSpec.getDefaultInstance() + : executionSpec_; + } + } + /** + * + * + *
+     * Output only. Spec related to how a task is executed.
+     * 
+ * + * + * .google.cloud.dataplex.v1.Task.ExecutionSpec execution_spec = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.Task.ExecutionSpec, + com.google.cloud.dataplex.v1.Task.ExecutionSpec.Builder, + com.google.cloud.dataplex.v1.Task.ExecutionSpecOrBuilder> + getExecutionSpecFieldBuilder() { + if (executionSpecBuilder_ == null) { + executionSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.Task.ExecutionSpec, + com.google.cloud.dataplex.v1.Task.ExecutionSpec.Builder, + com.google.cloud.dataplex.v1.Task.ExecutionSpecOrBuilder>( + getExecutionSpec(), getParentForChildren(), isClean()); + executionSpec_ = null; + } + return executionSpecBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/JobEvent.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/JobEvent.java index 8f4c5e58b9dc..62dd334cc15b 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/JobEvent.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/JobEvent.java @@ -45,6 +45,7 @@ private JobEvent() { type_ = 0; service_ = 0; serviceJob_ = ""; + executionTrigger_ = 0; } @java.lang.Override @@ -561,6 +562,167 @@ private Service(int value) { // @@protoc_insertion_point(enum_scope:google.cloud.dataplex.v1.JobEvent.Service) } + /** + * + * + *
+   * Job Execution trigger.
+   * 
+ * + * Protobuf enum {@code google.cloud.dataplex.v1.JobEvent.ExecutionTrigger} + */ + public enum ExecutionTrigger implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * The job execution trigger is unspecified.
+     * 
+ * + * EXECUTION_TRIGGER_UNSPECIFIED = 0; + */ + EXECUTION_TRIGGER_UNSPECIFIED(0), + /** + * + * + *
+     * The job was triggered by Dataplex based on trigger spec from task
+     * definition.
+     * 
+ * + * TASK_CONFIG = 1; + */ + TASK_CONFIG(1), + /** + * + * + *
+     * The job was triggered by the explicit call of Task API.
+     * 
+ * + * RUN_REQUEST = 2; + */ + RUN_REQUEST(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * The job execution trigger is unspecified.
+     * 
+ * + * EXECUTION_TRIGGER_UNSPECIFIED = 0; + */ + public static final int EXECUTION_TRIGGER_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The job was triggered by Dataplex based on trigger spec from task
+     * definition.
+     * 
+ * + * TASK_CONFIG = 1; + */ + public static final int TASK_CONFIG_VALUE = 1; + /** + * + * + *
+     * The job was triggered by the explicit call of Task API.
+     * 
+ * + * RUN_REQUEST = 2; + */ + public static final int RUN_REQUEST_VALUE = 2; + + 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 ExecutionTrigger 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 ExecutionTrigger forNumber(int value) { + switch (value) { + case 0: + return EXECUTION_TRIGGER_UNSPECIFIED; + case 1: + return TASK_CONFIG; + case 2: + return RUN_REQUEST; + 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 ExecutionTrigger findValueByNumber(int number) { + return ExecutionTrigger.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.dataplex.v1.JobEvent.getDescriptor().getEnumTypes().get(3); + } + + private static final ExecutionTrigger[] VALUES = values(); + + public static ExecutionTrigger 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 ExecutionTrigger(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.dataplex.v1.JobEvent.ExecutionTrigger) + } + public static final int MESSAGE_FIELD_NUMBER = 1; @SuppressWarnings("serial") @@ -929,6 +1091,43 @@ public com.google.protobuf.ByteString getServiceJobBytes() { } } + public static final int EXECUTION_TRIGGER_FIELD_NUMBER = 11; + private int executionTrigger_ = 0; + /** + * + * + *
+   * Job execution trigger.
+   * 
+ * + * .google.cloud.dataplex.v1.JobEvent.ExecutionTrigger execution_trigger = 11; + * + * @return The enum numeric value on the wire for executionTrigger. + */ + @java.lang.Override + public int getExecutionTriggerValue() { + return executionTrigger_; + } + /** + * + * + *
+   * Job execution trigger.
+   * 
+ * + * .google.cloud.dataplex.v1.JobEvent.ExecutionTrigger execution_trigger = 11; + * + * @return The executionTrigger. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.JobEvent.ExecutionTrigger getExecutionTrigger() { + com.google.cloud.dataplex.v1.JobEvent.ExecutionTrigger result = + com.google.cloud.dataplex.v1.JobEvent.ExecutionTrigger.forNumber(executionTrigger_); + return result == null + ? com.google.cloud.dataplex.v1.JobEvent.ExecutionTrigger.UNRECOGNIZED + : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -970,6 +1169,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceJob_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, serviceJob_); } + if (executionTrigger_ + != com.google.cloud.dataplex.v1.JobEvent.ExecutionTrigger.EXECUTION_TRIGGER_UNSPECIFIED + .getNumber()) { + output.writeEnum(11, executionTrigger_); + } getUnknownFields().writeTo(output); } @@ -1006,6 +1210,11 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceJob_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, serviceJob_); } + if (executionTrigger_ + != com.google.cloud.dataplex.v1.JobEvent.ExecutionTrigger.EXECUTION_TRIGGER_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, executionTrigger_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -1036,6 +1245,7 @@ public boolean equals(final java.lang.Object obj) { if (type_ != other.type_) return false; if (service_ != other.service_) return false; if (!getServiceJob().equals(other.getServiceJob())) return false; + if (executionTrigger_ != other.executionTrigger_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1069,6 +1279,8 @@ public int hashCode() { hash = (53 * hash) + service_; hash = (37 * hash) + SERVICE_JOB_FIELD_NUMBER; hash = (53 * hash) + getServiceJob().hashCode(); + hash = (37 * hash) + EXECUTION_TRIGGER_FIELD_NUMBER; + hash = (53 * hash) + executionTrigger_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -1225,6 +1437,7 @@ public Builder clear() { type_ = 0; service_ = 0; serviceJob_ = ""; + executionTrigger_ = 0; return this; } @@ -1288,6 +1501,9 @@ private void buildPartial0(com.google.cloud.dataplex.v1.JobEvent result) { if (((from_bitField0_ & 0x00000100) != 0)) { result.serviceJob_ = serviceJob_; } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.executionTrigger_ = executionTrigger_; + } } @java.lang.Override @@ -1368,6 +1584,9 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.JobEvent other) { bitField0_ |= 0x00000100; onChanged(); } + if (other.executionTrigger_ != 0) { + setExecutionTriggerValue(other.getExecutionTriggerValue()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -1448,6 +1667,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000100; break; } // case 74 + case 88: + { + executionTrigger_ = input.readEnum(); + bitField0_ |= 0x00000200; + break; + } // case 88 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -2466,6 +2691,99 @@ public Builder setServiceJobBytes(com.google.protobuf.ByteString value) { return this; } + private int executionTrigger_ = 0; + /** + * + * + *
+     * Job execution trigger.
+     * 
+ * + * .google.cloud.dataplex.v1.JobEvent.ExecutionTrigger execution_trigger = 11; + * + * @return The enum numeric value on the wire for executionTrigger. + */ + @java.lang.Override + public int getExecutionTriggerValue() { + return executionTrigger_; + } + /** + * + * + *
+     * Job execution trigger.
+     * 
+ * + * .google.cloud.dataplex.v1.JobEvent.ExecutionTrigger execution_trigger = 11; + * + * @param value The enum numeric value on the wire for executionTrigger to set. + * @return This builder for chaining. + */ + public Builder setExecutionTriggerValue(int value) { + executionTrigger_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * + * + *
+     * Job execution trigger.
+     * 
+ * + * .google.cloud.dataplex.v1.JobEvent.ExecutionTrigger execution_trigger = 11; + * + * @return The executionTrigger. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.JobEvent.ExecutionTrigger getExecutionTrigger() { + com.google.cloud.dataplex.v1.JobEvent.ExecutionTrigger result = + com.google.cloud.dataplex.v1.JobEvent.ExecutionTrigger.forNumber(executionTrigger_); + return result == null + ? com.google.cloud.dataplex.v1.JobEvent.ExecutionTrigger.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Job execution trigger.
+     * 
+ * + * .google.cloud.dataplex.v1.JobEvent.ExecutionTrigger execution_trigger = 11; + * + * @param value The executionTrigger to set. + * @return This builder for chaining. + */ + public Builder setExecutionTrigger( + com.google.cloud.dataplex.v1.JobEvent.ExecutionTrigger value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000200; + executionTrigger_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Job execution trigger.
+     * 
+ * + * .google.cloud.dataplex.v1.JobEvent.ExecutionTrigger execution_trigger = 11; + * + * @return This builder for chaining. + */ + public Builder clearExecutionTrigger() { + bitField0_ = (bitField0_ & ~0x00000200); + executionTrigger_ = 0; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/JobEventOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/JobEventOrBuilder.java index 71b6b1f98571..c29d1e7bf5fd 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/JobEventOrBuilder.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/JobEventOrBuilder.java @@ -255,4 +255,29 @@ public interface JobEventOrBuilder * @return The bytes for serviceJob. */ com.google.protobuf.ByteString getServiceJobBytes(); + + /** + * + * + *
+   * Job execution trigger.
+   * 
+ * + * .google.cloud.dataplex.v1.JobEvent.ExecutionTrigger execution_trigger = 11; + * + * @return The enum numeric value on the wire for executionTrigger. + */ + int getExecutionTriggerValue(); + /** + * + * + *
+   * Job execution trigger.
+   * 
+ * + * .google.cloud.dataplex.v1.JobEvent.ExecutionTrigger execution_trigger = 11; + * + * @return The executionTrigger. + */ + com.google.cloud.dataplex.v1.JobEvent.ExecutionTrigger getExecutionTrigger(); } diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/JobOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/JobOrBuilder.java index b9dd72f92fac..f4b5d21b8dd7 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/JobOrBuilder.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/JobOrBuilder.java @@ -278,4 +278,137 @@ public interface JobOrBuilder * @return The bytes for message. */ com.google.protobuf.ByteString getMessageBytes(); + + /** + * + * + *
+   * Output only. User-defined labels for the task.
+   * 
+ * + * map<string, string> labels = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getLabelsCount(); + /** + * + * + *
+   * Output only. User-defined labels for the task.
+   * 
+ * + * map<string, string> labels = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Output only. User-defined labels for the task.
+   * 
+ * + * map<string, string> labels = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Output only. User-defined labels for the task.
+   * 
+ * + * map<string, string> labels = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Output only. User-defined labels for the task.
+   * 
+ * + * map<string, string> labels = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Output only. Job execution trigger.
+   * 
+ * + * + * .google.cloud.dataplex.v1.Job.Trigger trigger = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for trigger. + */ + int getTriggerValue(); + /** + * + * + *
+   * Output only. Job execution trigger.
+   * 
+ * + * + * .google.cloud.dataplex.v1.Job.Trigger trigger = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The trigger. + */ + com.google.cloud.dataplex.v1.Job.Trigger getTrigger(); + + /** + * + * + *
+   * Output only. Spec related to how a task is executed.
+   * 
+ * + * + * .google.cloud.dataplex.v1.Task.ExecutionSpec execution_spec = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the executionSpec field is set. + */ + boolean hasExecutionSpec(); + /** + * + * + *
+   * Output only. Spec related to how a task is executed.
+   * 
+ * + * + * .google.cloud.dataplex.v1.Task.ExecutionSpec execution_spec = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The executionSpec. + */ + com.google.cloud.dataplex.v1.Task.ExecutionSpec getExecutionSpec(); + /** + * + * + *
+   * Output only. Spec related to how a task is executed.
+   * 
+ * + * + * .google.cloud.dataplex.v1.Task.ExecutionSpec execution_spec = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.dataplex.v1.Task.ExecutionSpecOrBuilder getExecutionSpecOrBuilder(); } diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataAttributeBindingsRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataAttributeBindingsRequest.java new file mode 100644 index 000000000000..20dfb9357ad3 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataAttributeBindingsRequest.java @@ -0,0 +1,1351 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +/** + * + * + *
+ * List DataAttributeBindings request.
+ * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.ListDataAttributeBindingsRequest} + */ +public final class ListDataAttributeBindingsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.ListDataAttributeBindingsRequest) + ListDataAttributeBindingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDataAttributeBindingsRequest.newBuilder() to construct. + private ListDataAttributeBindingsRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDataAttributeBindingsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDataAttributeBindingsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_ListDataAttributeBindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_ListDataAttributeBindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest.class, + com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the Location:
+   * projects/{project_number}/locations/{location_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Location:
+   * projects/{project_number}/locations/{location_id}
+   * 
+ * + * + * 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_ = 0; + /** + * + * + *
+   * Optional. Maximum number of DataAttributeBindings to return. The service
+   * may return fewer than this value. If unspecified, at most 10
+   * DataAttributeBindings will be returned. The maximum value is 1000; values
+   * above 1000 will be coerced to 1000.
+   * 
+ * + * 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; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * Optional. Page token received from a previous `ListDataAttributeBindings`
+   * call. Provide this to retrieve the subsequent page. When paginating, all
+   * other parameters provided to `ListDataAttributeBindings` must match the
+   * call that provided the page token.
+   * 
+ * + * 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. Page token received from a previous `ListDataAttributeBindings`
+   * call. Provide this to retrieve the subsequent page. When paginating, all
+   * other parameters provided to `ListDataAttributeBindings` must match the
+   * call that provided the page token.
+   * 
+ * + * 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; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Optional. Filter request.
+   * Filter using resource: filter=resource:"resource-name"
+   * Filter using attribute: filter=attributes:"attribute-name"
+   * Filter using attribute in paths list:
+   * filter=paths.attributes:"attribute-name"
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Filter request.
+   * Filter using resource: filter=resource:"resource-name"
+   * Filter using attribute: filter=attributes:"attribute-name"
+   * Filter using attribute in paths list:
+   * filter=paths.attributes:"attribute-name"
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Optional. Order by fields for the result.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Order by fields for the result.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + 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.dataplex.v1.ListDataAttributeBindingsRequest)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest other = + (com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) 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 = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest 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.dataplex.v1.ListDataAttributeBindingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest 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.dataplex.v1.ListDataAttributeBindingsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest 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.dataplex.v1.ListDataAttributeBindingsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest 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.dataplex.v1.ListDataAttributeBindingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest 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.dataplex.v1.ListDataAttributeBindingsRequest 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; + } + /** + * + * + *
+   * List DataAttributeBindings request.
+   * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.ListDataAttributeBindingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.ListDataAttributeBindingsRequest) + com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_ListDataAttributeBindingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_ListDataAttributeBindingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest.class, + com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest.Builder.class); + } + + // Construct using com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_ListDataAttributeBindingsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest + getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest build() { + com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest buildPartial() { + com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest result = + new com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @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.dataplex.v1.ListDataAttributeBindingsRequest) { + return mergeFrom((com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest other) { + if (other + == com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + 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(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + 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 bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Location:
+     * projects/{project_number}/locations/{location_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location:
+     * projects/{project_number}/locations/{location_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Location:
+     * projects/{project_number}/locations/{location_id}
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location:
+     * projects/{project_number}/locations/{location_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Location:
+     * projects/{project_number}/locations/{location_id}
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. Maximum number of DataAttributeBindings to return. The service
+     * may return fewer than this value. If unspecified, at most 10
+     * DataAttributeBindings will be returned. The maximum value is 1000; values
+     * above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. Maximum number of DataAttributeBindings to return. The service
+     * may return fewer than this value. If unspecified, at most 10
+     * DataAttributeBindings will be returned. The maximum value is 1000; values
+     * above 1000 will be coerced to 1000.
+     * 
+ * + * 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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Maximum number of DataAttributeBindings to return. The service
+     * may return fewer than this value. If unspecified, at most 10
+     * DataAttributeBindings will be returned. The maximum value is 1000; values
+     * above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. Page token received from a previous `ListDataAttributeBindings`
+     * call. Provide this to retrieve the subsequent page. When paginating, all
+     * other parameters provided to `ListDataAttributeBindings` must match the
+     * call that provided the page token.
+     * 
+ * + * 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. Page token received from a previous `ListDataAttributeBindings`
+     * call. Provide this to retrieve the subsequent page. When paginating, all
+     * other parameters provided to `ListDataAttributeBindings` must match the
+     * call that provided the page token.
+     * 
+ * + * 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. Page token received from a previous `ListDataAttributeBindings`
+     * call. Provide this to retrieve the subsequent page. When paginating, all
+     * other parameters provided to `ListDataAttributeBindings` must match the
+     * call that provided the page token.
+     * 
+ * + * 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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Page token received from a previous `ListDataAttributeBindings`
+     * call. Provide this to retrieve the subsequent page. When paginating, all
+     * other parameters provided to `ListDataAttributeBindings` must match the
+     * call that provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Page token received from a previous `ListDataAttributeBindings`
+     * call. Provide this to retrieve the subsequent page. When paginating, all
+     * other parameters provided to `ListDataAttributeBindings` must match the
+     * call that provided the page token.
+     * 
+ * + * 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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. Filter request.
+     * Filter using resource: filter=resource:"resource-name"
+     * Filter using attribute: filter=attributes:"attribute-name"
+     * Filter using attribute in paths list:
+     * filter=paths.attributes:"attribute-name"
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Filter request.
+     * Filter using resource: filter=resource:"resource-name"
+     * Filter using attribute: filter=attributes:"attribute-name"
+     * Filter using attribute in paths list:
+     * filter=paths.attributes:"attribute-name"
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Filter request.
+     * Filter using resource: filter=resource:"resource-name"
+     * Filter using attribute: filter=attributes:"attribute-name"
+     * Filter using attribute in paths list:
+     * filter=paths.attributes:"attribute-name"
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Filter request.
+     * Filter using resource: filter=resource:"resource-name"
+     * Filter using attribute: filter=attributes:"attribute-name"
+     * Filter using attribute in paths list:
+     * filter=paths.attributes:"attribute-name"
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Filter request.
+     * Filter using resource: filter=resource:"resource-name"
+     * Filter using attribute: filter=attributes:"attribute-name"
+     * Filter using attribute in paths list:
+     * filter=paths.attributes:"attribute-name"
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Optional. Order by fields for the result.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Order by fields for the result.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Order by fields for the result.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Order by fields for the result.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Order by fields for the result.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + 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.dataplex.v1.ListDataAttributeBindingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.ListDataAttributeBindingsRequest) + private static final com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest(); + } + + public static com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDataAttributeBindingsRequest 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.dataplex.v1.ListDataAttributeBindingsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataAttributeBindingsRequestOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataAttributeBindingsRequestOrBuilder.java new file mode 100644 index 000000000000..619fd3bf4435 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataAttributeBindingsRequestOrBuilder.java @@ -0,0 +1,161 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +public interface ListDataAttributeBindingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.ListDataAttributeBindingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Location:
+   * projects/{project_number}/locations/{location_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Location:
+   * projects/{project_number}/locations/{location_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Maximum number of DataAttributeBindings to return. The service
+   * may return fewer than this value. If unspecified, at most 10
+   * DataAttributeBindings will be returned. The maximum value is 1000; values
+   * above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. Page token received from a previous `ListDataAttributeBindings`
+   * call. Provide this to retrieve the subsequent page. When paginating, all
+   * other parameters provided to `ListDataAttributeBindings` must match the
+   * call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. Page token received from a previous `ListDataAttributeBindings`
+   * call. Provide this to retrieve the subsequent page. When paginating, all
+   * other parameters provided to `ListDataAttributeBindings` must match the
+   * call that provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filter request.
+   * Filter using resource: filter=resource:"resource-name"
+   * Filter using attribute: filter=attributes:"attribute-name"
+   * Filter using attribute in paths list:
+   * filter=paths.attributes:"attribute-name"
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. Filter request.
+   * Filter using resource: filter=resource:"resource-name"
+   * Filter using attribute: filter=attributes:"attribute-name"
+   * Filter using attribute in paths list:
+   * filter=paths.attributes:"attribute-name"
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Order by fields for the result.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Optional. Order by fields for the result.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataAttributeBindingsResponse.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataAttributeBindingsResponse.java new file mode 100644 index 000000000000..67c593aea6bb --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataAttributeBindingsResponse.java @@ -0,0 +1,1453 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +/** + * + * + *
+ * List DataAttributeBindings response.
+ * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.ListDataAttributeBindingsResponse} + */ +public final class ListDataAttributeBindingsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.ListDataAttributeBindingsResponse) + ListDataAttributeBindingsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDataAttributeBindingsResponse.newBuilder() to construct. + private ListDataAttributeBindingsResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDataAttributeBindingsResponse() { + dataAttributeBindings_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachableLocations_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDataAttributeBindingsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_ListDataAttributeBindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_ListDataAttributeBindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse.class, + com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse.Builder.class); + } + + public static final int DATA_ATTRIBUTE_BINDINGS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List dataAttributeBindings_; + /** + * + * + *
+   * DataAttributeBindings under the given parent Location.
+   * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; + * + */ + @java.lang.Override + public java.util.List + getDataAttributeBindingsList() { + return dataAttributeBindings_; + } + /** + * + * + *
+   * DataAttributeBindings under the given parent Location.
+   * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; + * + */ + @java.lang.Override + public java.util.List + getDataAttributeBindingsOrBuilderList() { + return dataAttributeBindings_; + } + /** + * + * + *
+   * DataAttributeBindings under the given parent Location.
+   * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; + * + */ + @java.lang.Override + public int getDataAttributeBindingsCount() { + return dataAttributeBindings_.size(); + } + /** + * + * + *
+   * DataAttributeBindings under the given parent Location.
+   * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; + * + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataAttributeBinding getDataAttributeBindings(int index) { + return dataAttributeBindings_.get(index); + } + /** + * + * + *
+   * DataAttributeBindings under the given parent Location.
+   * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; + * + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataAttributeBindingOrBuilder + getDataAttributeBindingsOrBuilder(int index) { + return dataAttributeBindings_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * 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; + } + } + + public static final int UNREACHABLE_LOCATIONS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachableLocations_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable_locations = 3; + * + * @return A list containing the unreachableLocations. + */ + public com.google.protobuf.ProtocolStringList getUnreachableLocationsList() { + return unreachableLocations_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable_locations = 3; + * + * @return The count of unreachableLocations. + */ + public int getUnreachableLocationsCount() { + return unreachableLocations_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable_locations = 3; + * + * @param index The index of the element to return. + * @return The unreachableLocations at the given index. + */ + public java.lang.String getUnreachableLocations(int index) { + return unreachableLocations_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable_locations = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachableLocations at the given index. + */ + public com.google.protobuf.ByteString getUnreachableLocationsBytes(int index) { + return unreachableLocations_.getByteString(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 { + for (int i = 0; i < dataAttributeBindings_.size(); i++) { + output.writeMessage(1, dataAttributeBindings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachableLocations_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 3, unreachableLocations_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < dataAttributeBindings_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, dataAttributeBindings_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachableLocations_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachableLocations_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableLocationsList().size(); + } + 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.dataplex.v1.ListDataAttributeBindingsResponse)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse other = + (com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse) obj; + + if (!getDataAttributeBindingsList().equals(other.getDataAttributeBindingsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableLocationsList().equals(other.getUnreachableLocationsList())) 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 (getDataAttributeBindingsCount() > 0) { + hash = (37 * hash) + DATA_ATTRIBUTE_BINDINGS_FIELD_NUMBER; + hash = (53 * hash) + getDataAttributeBindingsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableLocationsCount() > 0) { + hash = (37 * hash) + UNREACHABLE_LOCATIONS_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableLocationsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse 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.dataplex.v1.ListDataAttributeBindingsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse 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.dataplex.v1.ListDataAttributeBindingsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse 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.dataplex.v1.ListDataAttributeBindingsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse 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.dataplex.v1.ListDataAttributeBindingsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse 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.dataplex.v1.ListDataAttributeBindingsResponse 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; + } + /** + * + * + *
+   * List DataAttributeBindings response.
+   * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.ListDataAttributeBindingsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.ListDataAttributeBindingsResponse) + com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_ListDataAttributeBindingsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_ListDataAttributeBindingsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse.class, + com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse.Builder.class); + } + + // Construct using com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (dataAttributeBindingsBuilder_ == null) { + dataAttributeBindings_ = java.util.Collections.emptyList(); + } else { + dataAttributeBindings_ = null; + dataAttributeBindingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachableLocations_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_ListDataAttributeBindingsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse + getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse build() { + com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse buildPartial() { + com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse result = + new com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse result) { + if (dataAttributeBindingsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dataAttributeBindings_ = java.util.Collections.unmodifiableList(dataAttributeBindings_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dataAttributeBindings_ = dataAttributeBindings_; + } else { + result.dataAttributeBindings_ = dataAttributeBindingsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachableLocations_.makeImmutable(); + result.unreachableLocations_ = unreachableLocations_; + } + } + + @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.dataplex.v1.ListDataAttributeBindingsResponse) { + return mergeFrom((com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse other) { + if (other + == com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse.getDefaultInstance()) + return this; + if (dataAttributeBindingsBuilder_ == null) { + if (!other.dataAttributeBindings_.isEmpty()) { + if (dataAttributeBindings_.isEmpty()) { + dataAttributeBindings_ = other.dataAttributeBindings_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDataAttributeBindingsIsMutable(); + dataAttributeBindings_.addAll(other.dataAttributeBindings_); + } + onChanged(); + } + } else { + if (!other.dataAttributeBindings_.isEmpty()) { + if (dataAttributeBindingsBuilder_.isEmpty()) { + dataAttributeBindingsBuilder_.dispose(); + dataAttributeBindingsBuilder_ = null; + dataAttributeBindings_ = other.dataAttributeBindings_; + bitField0_ = (bitField0_ & ~0x00000001); + dataAttributeBindingsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDataAttributeBindingsFieldBuilder() + : null; + } else { + dataAttributeBindingsBuilder_.addAllMessages(other.dataAttributeBindings_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachableLocations_.isEmpty()) { + if (unreachableLocations_.isEmpty()) { + unreachableLocations_ = other.unreachableLocations_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableLocationsIsMutable(); + unreachableLocations_.addAll(other.unreachableLocations_); + } + 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.dataplex.v1.DataAttributeBinding m = + input.readMessage( + com.google.cloud.dataplex.v1.DataAttributeBinding.parser(), + extensionRegistry); + if (dataAttributeBindingsBuilder_ == null) { + ensureDataAttributeBindingsIsMutable(); + dataAttributeBindings_.add(m); + } else { + dataAttributeBindingsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableLocationsIsMutable(); + unreachableLocations_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List + dataAttributeBindings_ = java.util.Collections.emptyList(); + + private void ensureDataAttributeBindingsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dataAttributeBindings_ = + new java.util.ArrayList( + dataAttributeBindings_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dataplex.v1.DataAttributeBinding, + com.google.cloud.dataplex.v1.DataAttributeBinding.Builder, + com.google.cloud.dataplex.v1.DataAttributeBindingOrBuilder> + dataAttributeBindingsBuilder_; + + /** + * + * + *
+     * DataAttributeBindings under the given parent Location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; + * + */ + public java.util.List + getDataAttributeBindingsList() { + if (dataAttributeBindingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(dataAttributeBindings_); + } else { + return dataAttributeBindingsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * DataAttributeBindings under the given parent Location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; + * + */ + public int getDataAttributeBindingsCount() { + if (dataAttributeBindingsBuilder_ == null) { + return dataAttributeBindings_.size(); + } else { + return dataAttributeBindingsBuilder_.getCount(); + } + } + /** + * + * + *
+     * DataAttributeBindings under the given parent Location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; + * + */ + public com.google.cloud.dataplex.v1.DataAttributeBinding getDataAttributeBindings(int index) { + if (dataAttributeBindingsBuilder_ == null) { + return dataAttributeBindings_.get(index); + } else { + return dataAttributeBindingsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * DataAttributeBindings under the given parent Location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; + * + */ + public Builder setDataAttributeBindings( + int index, com.google.cloud.dataplex.v1.DataAttributeBinding value) { + if (dataAttributeBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataAttributeBindingsIsMutable(); + dataAttributeBindings_.set(index, value); + onChanged(); + } else { + dataAttributeBindingsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * DataAttributeBindings under the given parent Location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; + * + */ + public Builder setDataAttributeBindings( + int index, com.google.cloud.dataplex.v1.DataAttributeBinding.Builder builderForValue) { + if (dataAttributeBindingsBuilder_ == null) { + ensureDataAttributeBindingsIsMutable(); + dataAttributeBindings_.set(index, builderForValue.build()); + onChanged(); + } else { + dataAttributeBindingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * DataAttributeBindings under the given parent Location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; + * + */ + public Builder addDataAttributeBindings( + com.google.cloud.dataplex.v1.DataAttributeBinding value) { + if (dataAttributeBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataAttributeBindingsIsMutable(); + dataAttributeBindings_.add(value); + onChanged(); + } else { + dataAttributeBindingsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * DataAttributeBindings under the given parent Location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; + * + */ + public Builder addDataAttributeBindings( + int index, com.google.cloud.dataplex.v1.DataAttributeBinding value) { + if (dataAttributeBindingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataAttributeBindingsIsMutable(); + dataAttributeBindings_.add(index, value); + onChanged(); + } else { + dataAttributeBindingsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * DataAttributeBindings under the given parent Location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; + * + */ + public Builder addDataAttributeBindings( + com.google.cloud.dataplex.v1.DataAttributeBinding.Builder builderForValue) { + if (dataAttributeBindingsBuilder_ == null) { + ensureDataAttributeBindingsIsMutable(); + dataAttributeBindings_.add(builderForValue.build()); + onChanged(); + } else { + dataAttributeBindingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * DataAttributeBindings under the given parent Location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; + * + */ + public Builder addDataAttributeBindings( + int index, com.google.cloud.dataplex.v1.DataAttributeBinding.Builder builderForValue) { + if (dataAttributeBindingsBuilder_ == null) { + ensureDataAttributeBindingsIsMutable(); + dataAttributeBindings_.add(index, builderForValue.build()); + onChanged(); + } else { + dataAttributeBindingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * DataAttributeBindings under the given parent Location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; + * + */ + public Builder addAllDataAttributeBindings( + java.lang.Iterable values) { + if (dataAttributeBindingsBuilder_ == null) { + ensureDataAttributeBindingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataAttributeBindings_); + onChanged(); + } else { + dataAttributeBindingsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * DataAttributeBindings under the given parent Location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; + * + */ + public Builder clearDataAttributeBindings() { + if (dataAttributeBindingsBuilder_ == null) { + dataAttributeBindings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dataAttributeBindingsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * DataAttributeBindings under the given parent Location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; + * + */ + public Builder removeDataAttributeBindings(int index) { + if (dataAttributeBindingsBuilder_ == null) { + ensureDataAttributeBindingsIsMutable(); + dataAttributeBindings_.remove(index); + onChanged(); + } else { + dataAttributeBindingsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * DataAttributeBindings under the given parent Location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; + * + */ + public com.google.cloud.dataplex.v1.DataAttributeBinding.Builder + getDataAttributeBindingsBuilder(int index) { + return getDataAttributeBindingsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * DataAttributeBindings under the given parent Location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; + * + */ + public com.google.cloud.dataplex.v1.DataAttributeBindingOrBuilder + getDataAttributeBindingsOrBuilder(int index) { + if (dataAttributeBindingsBuilder_ == null) { + return dataAttributeBindings_.get(index); + } else { + return dataAttributeBindingsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * DataAttributeBindings under the given parent Location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; + * + */ + public java.util.List + getDataAttributeBindingsOrBuilderList() { + if (dataAttributeBindingsBuilder_ != null) { + return dataAttributeBindingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dataAttributeBindings_); + } + } + /** + * + * + *
+     * DataAttributeBindings under the given parent Location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; + * + */ + public com.google.cloud.dataplex.v1.DataAttributeBinding.Builder + addDataAttributeBindingsBuilder() { + return getDataAttributeBindingsFieldBuilder() + .addBuilder(com.google.cloud.dataplex.v1.DataAttributeBinding.getDefaultInstance()); + } + /** + * + * + *
+     * DataAttributeBindings under the given parent Location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; + * + */ + public com.google.cloud.dataplex.v1.DataAttributeBinding.Builder + addDataAttributeBindingsBuilder(int index) { + return getDataAttributeBindingsFieldBuilder() + .addBuilder( + index, com.google.cloud.dataplex.v1.DataAttributeBinding.getDefaultInstance()); + } + /** + * + * + *
+     * DataAttributeBindings under the given parent Location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; + * + */ + public java.util.List + getDataAttributeBindingsBuilderList() { + return getDataAttributeBindingsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dataplex.v1.DataAttributeBinding, + com.google.cloud.dataplex.v1.DataAttributeBinding.Builder, + com.google.cloud.dataplex.v1.DataAttributeBindingOrBuilder> + getDataAttributeBindingsFieldBuilder() { + if (dataAttributeBindingsBuilder_ == null) { + dataAttributeBindingsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dataplex.v1.DataAttributeBinding, + com.google.cloud.dataplex.v1.DataAttributeBinding.Builder, + com.google.cloud.dataplex.v1.DataAttributeBindingOrBuilder>( + dataAttributeBindings_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + dataAttributeBindings_ = null; + } + return dataAttributeBindingsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachableLocations_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableLocationsIsMutable() { + if (!unreachableLocations_.isModifiable()) { + unreachableLocations_ = new com.google.protobuf.LazyStringArrayList(unreachableLocations_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable_locations = 3; + * + * @return A list containing the unreachableLocations. + */ + public com.google.protobuf.ProtocolStringList getUnreachableLocationsList() { + unreachableLocations_.makeImmutable(); + return unreachableLocations_; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable_locations = 3; + * + * @return The count of unreachableLocations. + */ + public int getUnreachableLocationsCount() { + return unreachableLocations_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable_locations = 3; + * + * @param index The index of the element to return. + * @return The unreachableLocations at the given index. + */ + public java.lang.String getUnreachableLocations(int index) { + return unreachableLocations_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable_locations = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachableLocations at the given index. + */ + public com.google.protobuf.ByteString getUnreachableLocationsBytes(int index) { + return unreachableLocations_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable_locations = 3; + * + * @param index The index to set the value at. + * @param value The unreachableLocations to set. + * @return This builder for chaining. + */ + public Builder setUnreachableLocations(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableLocationsIsMutable(); + unreachableLocations_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable_locations = 3; + * + * @param value The unreachableLocations to add. + * @return This builder for chaining. + */ + public Builder addUnreachableLocations(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableLocationsIsMutable(); + unreachableLocations_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable_locations = 3; + * + * @param values The unreachableLocations to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachableLocations(java.lang.Iterable values) { + ensureUnreachableLocationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachableLocations_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable_locations = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachableLocations() { + unreachableLocations_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable_locations = 3; + * + * @param value The bytes of the unreachableLocations to add. + * @return This builder for chaining. + */ + public Builder addUnreachableLocationsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableLocationsIsMutable(); + unreachableLocations_.add(value); + bitField0_ |= 0x00000004; + 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.dataplex.v1.ListDataAttributeBindingsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.ListDataAttributeBindingsResponse) + private static final com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse(); + } + + public static com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDataAttributeBindingsResponse 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.dataplex.v1.ListDataAttributeBindingsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataAttributeBindingsResponseOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataAttributeBindingsResponseOrBuilder.java new file mode 100644 index 000000000000..78114259130e --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataAttributeBindingsResponseOrBuilder.java @@ -0,0 +1,161 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +public interface ListDataAttributeBindingsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.ListDataAttributeBindingsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * DataAttributeBindings under the given parent Location.
+   * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; + * + */ + java.util.List getDataAttributeBindingsList(); + /** + * + * + *
+   * DataAttributeBindings under the given parent Location.
+   * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; + * + */ + com.google.cloud.dataplex.v1.DataAttributeBinding getDataAttributeBindings(int index); + /** + * + * + *
+   * DataAttributeBindings under the given parent Location.
+   * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; + * + */ + int getDataAttributeBindingsCount(); + /** + * + * + *
+   * DataAttributeBindings under the given parent Location.
+   * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; + * + */ + java.util.List + getDataAttributeBindingsOrBuilderList(); + /** + * + * + *
+   * DataAttributeBindings under the given parent Location.
+   * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_bindings = 1; + * + */ + com.google.cloud.dataplex.v1.DataAttributeBindingOrBuilder getDataAttributeBindingsOrBuilder( + int index); + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable_locations = 3; + * + * @return A list containing the unreachableLocations. + */ + java.util.List getUnreachableLocationsList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable_locations = 3; + * + * @return The count of unreachableLocations. + */ + int getUnreachableLocationsCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable_locations = 3; + * + * @param index The index of the element to return. + * @return The unreachableLocations at the given index. + */ + java.lang.String getUnreachableLocations(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable_locations = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachableLocations at the given index. + */ + com.google.protobuf.ByteString getUnreachableLocationsBytes(int index); +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataAttributesRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataAttributesRequest.java new file mode 100644 index 000000000000..67383b8c5ed5 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataAttributesRequest.java @@ -0,0 +1,1318 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +/** + * + * + *
+ * List DataAttributes request.
+ * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.ListDataAttributesRequest} + */ +public final class ListDataAttributesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.ListDataAttributesRequest) + ListDataAttributesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDataAttributesRequest.newBuilder() to construct. + private ListDataAttributesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDataAttributesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDataAttributesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_ListDataAttributesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_ListDataAttributesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.ListDataAttributesRequest.class, + com.google.cloud.dataplex.v1.ListDataAttributesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the DataTaxonomy:
+   * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the DataTaxonomy:
+   * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+   * 
+ * + * + * 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_ = 0; + /** + * + * + *
+   * Optional. Maximum number of DataAttributes to return. The service may
+   * return fewer than this value. If unspecified, at most 10 dataAttributes
+   * will be returned. The maximum value is 1000; values above 1000 will be
+   * coerced to 1000.
+   * 
+ * + * 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; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * Optional. Page token received from a previous `ListDataAttributes` call.
+   * Provide this to retrieve the subsequent page. When paginating, all other
+   * parameters provided to `ListDataAttributes` must match the call that
+   * provided the page token.
+   * 
+ * + * 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. Page token received from a previous `ListDataAttributes` call.
+   * Provide this to retrieve the subsequent page. When paginating, all other
+   * parameters provided to `ListDataAttributes` must match the call that
+   * provided the page token.
+   * 
+ * + * 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; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Optional. Filter request.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Filter request.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Optional. Order by fields for the result.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Order by fields for the result.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + 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.dataplex.v1.ListDataAttributesRequest)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.ListDataAttributesRequest other = + (com.google.cloud.dataplex.v1.ListDataAttributesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) 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 = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.ListDataAttributesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.ListDataAttributesRequest 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.dataplex.v1.ListDataAttributesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.ListDataAttributesRequest 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.dataplex.v1.ListDataAttributesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.ListDataAttributesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.ListDataAttributesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.ListDataAttributesRequest 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.dataplex.v1.ListDataAttributesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.ListDataAttributesRequest 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.dataplex.v1.ListDataAttributesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.ListDataAttributesRequest 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.dataplex.v1.ListDataAttributesRequest 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; + } + /** + * + * + *
+   * List DataAttributes request.
+   * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.ListDataAttributesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.ListDataAttributesRequest) + com.google.cloud.dataplex.v1.ListDataAttributesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_ListDataAttributesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_ListDataAttributesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.ListDataAttributesRequest.class, + com.google.cloud.dataplex.v1.ListDataAttributesRequest.Builder.class); + } + + // Construct using com.google.cloud.dataplex.v1.ListDataAttributesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_ListDataAttributesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.ListDataAttributesRequest getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.ListDataAttributesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.ListDataAttributesRequest build() { + com.google.cloud.dataplex.v1.ListDataAttributesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.ListDataAttributesRequest buildPartial() { + com.google.cloud.dataplex.v1.ListDataAttributesRequest result = + new com.google.cloud.dataplex.v1.ListDataAttributesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dataplex.v1.ListDataAttributesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @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.dataplex.v1.ListDataAttributesRequest) { + return mergeFrom((com.google.cloud.dataplex.v1.ListDataAttributesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataplex.v1.ListDataAttributesRequest other) { + if (other == com.google.cloud.dataplex.v1.ListDataAttributesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + 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(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + 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 bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the DataTaxonomy:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the DataTaxonomy:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the DataTaxonomy:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the DataTaxonomy:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the DataTaxonomy:
+     * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. Maximum number of DataAttributes to return. The service may
+     * return fewer than this value. If unspecified, at most 10 dataAttributes
+     * will be returned. The maximum value is 1000; values above 1000 will be
+     * coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. Maximum number of DataAttributes to return. The service may
+     * return fewer than this value. If unspecified, at most 10 dataAttributes
+     * will be returned. The maximum value is 1000; values above 1000 will be
+     * coerced to 1000.
+     * 
+ * + * 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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Maximum number of DataAttributes to return. The service may
+     * return fewer than this value. If unspecified, at most 10 dataAttributes
+     * will be returned. The maximum value is 1000; values above 1000 will be
+     * coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. Page token received from a previous `ListDataAttributes` call.
+     * Provide this to retrieve the subsequent page. When paginating, all other
+     * parameters provided to `ListDataAttributes` must match the call that
+     * provided the page token.
+     * 
+ * + * 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. Page token received from a previous `ListDataAttributes` call.
+     * Provide this to retrieve the subsequent page. When paginating, all other
+     * parameters provided to `ListDataAttributes` must match the call that
+     * provided the page token.
+     * 
+ * + * 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. Page token received from a previous `ListDataAttributes` call.
+     * Provide this to retrieve the subsequent page. When paginating, all other
+     * parameters provided to `ListDataAttributes` must match the call that
+     * provided the page token.
+     * 
+ * + * 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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Page token received from a previous `ListDataAttributes` call.
+     * Provide this to retrieve the subsequent page. When paginating, all other
+     * parameters provided to `ListDataAttributes` must match the call that
+     * provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Page token received from a previous `ListDataAttributes` call.
+     * Provide this to retrieve the subsequent page. When paginating, all other
+     * parameters provided to `ListDataAttributes` must match the call that
+     * provided the page token.
+     * 
+ * + * 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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. Filter request.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Filter request.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Filter request.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Filter request.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Filter request.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Optional. Order by fields for the result.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Order by fields for the result.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Order by fields for the result.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Order by fields for the result.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Order by fields for the result.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + 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.dataplex.v1.ListDataAttributesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.ListDataAttributesRequest) + private static final com.google.cloud.dataplex.v1.ListDataAttributesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.ListDataAttributesRequest(); + } + + public static com.google.cloud.dataplex.v1.ListDataAttributesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDataAttributesRequest 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.dataplex.v1.ListDataAttributesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataAttributesRequestOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataAttributesRequestOrBuilder.java new file mode 100644 index 000000000000..5f9a51a113e9 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataAttributesRequestOrBuilder.java @@ -0,0 +1,153 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +public interface ListDataAttributesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.ListDataAttributesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the DataTaxonomy:
+   * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the DataTaxonomy:
+   * projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Maximum number of DataAttributes to return. The service may
+   * return fewer than this value. If unspecified, at most 10 dataAttributes
+   * will be returned. The maximum value is 1000; values above 1000 will be
+   * coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. Page token received from a previous `ListDataAttributes` call.
+   * Provide this to retrieve the subsequent page. When paginating, all other
+   * parameters provided to `ListDataAttributes` must match the call that
+   * provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. Page token received from a previous `ListDataAttributes` call.
+   * Provide this to retrieve the subsequent page. When paginating, all other
+   * parameters provided to `ListDataAttributes` must match the call that
+   * provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filter request.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. Filter request.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Order by fields for the result.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Optional. Order by fields for the result.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataAttributesResponse.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataAttributesResponse.java new file mode 100644 index 000000000000..071837389be9 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataAttributesResponse.java @@ -0,0 +1,1409 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +/** + * + * + *
+ * List DataAttributes response.
+ * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.ListDataAttributesResponse} + */ +public final class ListDataAttributesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.ListDataAttributesResponse) + ListDataAttributesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDataAttributesResponse.newBuilder() to construct. + private ListDataAttributesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDataAttributesResponse() { + dataAttributes_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachableLocations_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDataAttributesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_ListDataAttributesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_ListDataAttributesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.ListDataAttributesResponse.class, + com.google.cloud.dataplex.v1.ListDataAttributesResponse.Builder.class); + } + + public static final int DATA_ATTRIBUTES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List dataAttributes_; + /** + * + * + *
+   * DataAttributes under the given parent DataTaxonomy.
+   * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; + */ + @java.lang.Override + public java.util.List getDataAttributesList() { + return dataAttributes_; + } + /** + * + * + *
+   * DataAttributes under the given parent DataTaxonomy.
+   * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; + */ + @java.lang.Override + public java.util.List + getDataAttributesOrBuilderList() { + return dataAttributes_; + } + /** + * + * + *
+   * DataAttributes under the given parent DataTaxonomy.
+   * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; + */ + @java.lang.Override + public int getDataAttributesCount() { + return dataAttributes_.size(); + } + /** + * + * + *
+   * DataAttributes under the given parent DataTaxonomy.
+   * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataAttribute getDataAttributes(int index) { + return dataAttributes_.get(index); + } + /** + * + * + *
+   * DataAttributes under the given parent DataTaxonomy.
+   * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataAttributeOrBuilder getDataAttributesOrBuilder(int index) { + return dataAttributes_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * 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; + } + } + + public static final int UNREACHABLE_LOCATIONS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachableLocations_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable_locations = 3; + * + * @return A list containing the unreachableLocations. + */ + public com.google.protobuf.ProtocolStringList getUnreachableLocationsList() { + return unreachableLocations_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable_locations = 3; + * + * @return The count of unreachableLocations. + */ + public int getUnreachableLocationsCount() { + return unreachableLocations_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable_locations = 3; + * + * @param index The index of the element to return. + * @return The unreachableLocations at the given index. + */ + public java.lang.String getUnreachableLocations(int index) { + return unreachableLocations_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable_locations = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachableLocations at the given index. + */ + public com.google.protobuf.ByteString getUnreachableLocationsBytes(int index) { + return unreachableLocations_.getByteString(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 { + for (int i = 0; i < dataAttributes_.size(); i++) { + output.writeMessage(1, dataAttributes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachableLocations_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 3, unreachableLocations_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < dataAttributes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, dataAttributes_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachableLocations_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachableLocations_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableLocationsList().size(); + } + 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.dataplex.v1.ListDataAttributesResponse)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.ListDataAttributesResponse other = + (com.google.cloud.dataplex.v1.ListDataAttributesResponse) obj; + + if (!getDataAttributesList().equals(other.getDataAttributesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableLocationsList().equals(other.getUnreachableLocationsList())) 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 (getDataAttributesCount() > 0) { + hash = (37 * hash) + DATA_ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getDataAttributesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableLocationsCount() > 0) { + hash = (37 * hash) + UNREACHABLE_LOCATIONS_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableLocationsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.ListDataAttributesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.ListDataAttributesResponse 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.dataplex.v1.ListDataAttributesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.ListDataAttributesResponse 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.dataplex.v1.ListDataAttributesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.ListDataAttributesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.ListDataAttributesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.ListDataAttributesResponse 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.dataplex.v1.ListDataAttributesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.ListDataAttributesResponse 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.dataplex.v1.ListDataAttributesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.ListDataAttributesResponse 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.dataplex.v1.ListDataAttributesResponse 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; + } + /** + * + * + *
+   * List DataAttributes response.
+   * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.ListDataAttributesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.ListDataAttributesResponse) + com.google.cloud.dataplex.v1.ListDataAttributesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_ListDataAttributesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_ListDataAttributesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.ListDataAttributesResponse.class, + com.google.cloud.dataplex.v1.ListDataAttributesResponse.Builder.class); + } + + // Construct using com.google.cloud.dataplex.v1.ListDataAttributesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (dataAttributesBuilder_ == null) { + dataAttributes_ = java.util.Collections.emptyList(); + } else { + dataAttributes_ = null; + dataAttributesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachableLocations_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_ListDataAttributesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.ListDataAttributesResponse getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.ListDataAttributesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.ListDataAttributesResponse build() { + com.google.cloud.dataplex.v1.ListDataAttributesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.ListDataAttributesResponse buildPartial() { + com.google.cloud.dataplex.v1.ListDataAttributesResponse result = + new com.google.cloud.dataplex.v1.ListDataAttributesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dataplex.v1.ListDataAttributesResponse result) { + if (dataAttributesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dataAttributes_ = java.util.Collections.unmodifiableList(dataAttributes_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dataAttributes_ = dataAttributes_; + } else { + result.dataAttributes_ = dataAttributesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dataplex.v1.ListDataAttributesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachableLocations_.makeImmutable(); + result.unreachableLocations_ = unreachableLocations_; + } + } + + @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.dataplex.v1.ListDataAttributesResponse) { + return mergeFrom((com.google.cloud.dataplex.v1.ListDataAttributesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataplex.v1.ListDataAttributesResponse other) { + if (other == com.google.cloud.dataplex.v1.ListDataAttributesResponse.getDefaultInstance()) + return this; + if (dataAttributesBuilder_ == null) { + if (!other.dataAttributes_.isEmpty()) { + if (dataAttributes_.isEmpty()) { + dataAttributes_ = other.dataAttributes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDataAttributesIsMutable(); + dataAttributes_.addAll(other.dataAttributes_); + } + onChanged(); + } + } else { + if (!other.dataAttributes_.isEmpty()) { + if (dataAttributesBuilder_.isEmpty()) { + dataAttributesBuilder_.dispose(); + dataAttributesBuilder_ = null; + dataAttributes_ = other.dataAttributes_; + bitField0_ = (bitField0_ & ~0x00000001); + dataAttributesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDataAttributesFieldBuilder() + : null; + } else { + dataAttributesBuilder_.addAllMessages(other.dataAttributes_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachableLocations_.isEmpty()) { + if (unreachableLocations_.isEmpty()) { + unreachableLocations_ = other.unreachableLocations_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableLocationsIsMutable(); + unreachableLocations_.addAll(other.unreachableLocations_); + } + 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.dataplex.v1.DataAttribute m = + input.readMessage( + com.google.cloud.dataplex.v1.DataAttribute.parser(), extensionRegistry); + if (dataAttributesBuilder_ == null) { + ensureDataAttributesIsMutable(); + dataAttributes_.add(m); + } else { + dataAttributesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableLocationsIsMutable(); + unreachableLocations_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List dataAttributes_ = + java.util.Collections.emptyList(); + + private void ensureDataAttributesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dataAttributes_ = + new java.util.ArrayList(dataAttributes_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dataplex.v1.DataAttribute, + com.google.cloud.dataplex.v1.DataAttribute.Builder, + com.google.cloud.dataplex.v1.DataAttributeOrBuilder> + dataAttributesBuilder_; + + /** + * + * + *
+     * DataAttributes under the given parent DataTaxonomy.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; + */ + public java.util.List getDataAttributesList() { + if (dataAttributesBuilder_ == null) { + return java.util.Collections.unmodifiableList(dataAttributes_); + } else { + return dataAttributesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * DataAttributes under the given parent DataTaxonomy.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; + */ + public int getDataAttributesCount() { + if (dataAttributesBuilder_ == null) { + return dataAttributes_.size(); + } else { + return dataAttributesBuilder_.getCount(); + } + } + /** + * + * + *
+     * DataAttributes under the given parent DataTaxonomy.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; + */ + public com.google.cloud.dataplex.v1.DataAttribute getDataAttributes(int index) { + if (dataAttributesBuilder_ == null) { + return dataAttributes_.get(index); + } else { + return dataAttributesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * DataAttributes under the given parent DataTaxonomy.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; + */ + public Builder setDataAttributes(int index, com.google.cloud.dataplex.v1.DataAttribute value) { + if (dataAttributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataAttributesIsMutable(); + dataAttributes_.set(index, value); + onChanged(); + } else { + dataAttributesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * DataAttributes under the given parent DataTaxonomy.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; + */ + public Builder setDataAttributes( + int index, com.google.cloud.dataplex.v1.DataAttribute.Builder builderForValue) { + if (dataAttributesBuilder_ == null) { + ensureDataAttributesIsMutable(); + dataAttributes_.set(index, builderForValue.build()); + onChanged(); + } else { + dataAttributesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * DataAttributes under the given parent DataTaxonomy.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; + */ + public Builder addDataAttributes(com.google.cloud.dataplex.v1.DataAttribute value) { + if (dataAttributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataAttributesIsMutable(); + dataAttributes_.add(value); + onChanged(); + } else { + dataAttributesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * DataAttributes under the given parent DataTaxonomy.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; + */ + public Builder addDataAttributes(int index, com.google.cloud.dataplex.v1.DataAttribute value) { + if (dataAttributesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataAttributesIsMutable(); + dataAttributes_.add(index, value); + onChanged(); + } else { + dataAttributesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * DataAttributes under the given parent DataTaxonomy.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; + */ + public Builder addDataAttributes( + com.google.cloud.dataplex.v1.DataAttribute.Builder builderForValue) { + if (dataAttributesBuilder_ == null) { + ensureDataAttributesIsMutable(); + dataAttributes_.add(builderForValue.build()); + onChanged(); + } else { + dataAttributesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * DataAttributes under the given parent DataTaxonomy.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; + */ + public Builder addDataAttributes( + int index, com.google.cloud.dataplex.v1.DataAttribute.Builder builderForValue) { + if (dataAttributesBuilder_ == null) { + ensureDataAttributesIsMutable(); + dataAttributes_.add(index, builderForValue.build()); + onChanged(); + } else { + dataAttributesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * DataAttributes under the given parent DataTaxonomy.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; + */ + public Builder addAllDataAttributes( + java.lang.Iterable values) { + if (dataAttributesBuilder_ == null) { + ensureDataAttributesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataAttributes_); + onChanged(); + } else { + dataAttributesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * DataAttributes under the given parent DataTaxonomy.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; + */ + public Builder clearDataAttributes() { + if (dataAttributesBuilder_ == null) { + dataAttributes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dataAttributesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * DataAttributes under the given parent DataTaxonomy.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; + */ + public Builder removeDataAttributes(int index) { + if (dataAttributesBuilder_ == null) { + ensureDataAttributesIsMutable(); + dataAttributes_.remove(index); + onChanged(); + } else { + dataAttributesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * DataAttributes under the given parent DataTaxonomy.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; + */ + public com.google.cloud.dataplex.v1.DataAttribute.Builder getDataAttributesBuilder(int index) { + return getDataAttributesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * DataAttributes under the given parent DataTaxonomy.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; + */ + public com.google.cloud.dataplex.v1.DataAttributeOrBuilder getDataAttributesOrBuilder( + int index) { + if (dataAttributesBuilder_ == null) { + return dataAttributes_.get(index); + } else { + return dataAttributesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * DataAttributes under the given parent DataTaxonomy.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; + */ + public java.util.List + getDataAttributesOrBuilderList() { + if (dataAttributesBuilder_ != null) { + return dataAttributesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dataAttributes_); + } + } + /** + * + * + *
+     * DataAttributes under the given parent DataTaxonomy.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; + */ + public com.google.cloud.dataplex.v1.DataAttribute.Builder addDataAttributesBuilder() { + return getDataAttributesFieldBuilder() + .addBuilder(com.google.cloud.dataplex.v1.DataAttribute.getDefaultInstance()); + } + /** + * + * + *
+     * DataAttributes under the given parent DataTaxonomy.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; + */ + public com.google.cloud.dataplex.v1.DataAttribute.Builder addDataAttributesBuilder(int index) { + return getDataAttributesFieldBuilder() + .addBuilder(index, com.google.cloud.dataplex.v1.DataAttribute.getDefaultInstance()); + } + /** + * + * + *
+     * DataAttributes under the given parent DataTaxonomy.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; + */ + public java.util.List + getDataAttributesBuilderList() { + return getDataAttributesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dataplex.v1.DataAttribute, + com.google.cloud.dataplex.v1.DataAttribute.Builder, + com.google.cloud.dataplex.v1.DataAttributeOrBuilder> + getDataAttributesFieldBuilder() { + if (dataAttributesBuilder_ == null) { + dataAttributesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dataplex.v1.DataAttribute, + com.google.cloud.dataplex.v1.DataAttribute.Builder, + com.google.cloud.dataplex.v1.DataAttributeOrBuilder>( + dataAttributes_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + dataAttributes_ = null; + } + return dataAttributesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachableLocations_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableLocationsIsMutable() { + if (!unreachableLocations_.isModifiable()) { + unreachableLocations_ = new com.google.protobuf.LazyStringArrayList(unreachableLocations_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable_locations = 3; + * + * @return A list containing the unreachableLocations. + */ + public com.google.protobuf.ProtocolStringList getUnreachableLocationsList() { + unreachableLocations_.makeImmutable(); + return unreachableLocations_; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable_locations = 3; + * + * @return The count of unreachableLocations. + */ + public int getUnreachableLocationsCount() { + return unreachableLocations_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable_locations = 3; + * + * @param index The index of the element to return. + * @return The unreachableLocations at the given index. + */ + public java.lang.String getUnreachableLocations(int index) { + return unreachableLocations_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable_locations = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachableLocations at the given index. + */ + public com.google.protobuf.ByteString getUnreachableLocationsBytes(int index) { + return unreachableLocations_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable_locations = 3; + * + * @param index The index to set the value at. + * @param value The unreachableLocations to set. + * @return This builder for chaining. + */ + public Builder setUnreachableLocations(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableLocationsIsMutable(); + unreachableLocations_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable_locations = 3; + * + * @param value The unreachableLocations to add. + * @return This builder for chaining. + */ + public Builder addUnreachableLocations(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableLocationsIsMutable(); + unreachableLocations_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable_locations = 3; + * + * @param values The unreachableLocations to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachableLocations(java.lang.Iterable values) { + ensureUnreachableLocationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachableLocations_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable_locations = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachableLocations() { + unreachableLocations_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable_locations = 3; + * + * @param value The bytes of the unreachableLocations to add. + * @return This builder for chaining. + */ + public Builder addUnreachableLocationsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableLocationsIsMutable(); + unreachableLocations_.add(value); + bitField0_ |= 0x00000004; + 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.dataplex.v1.ListDataAttributesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.ListDataAttributesResponse) + private static final com.google.cloud.dataplex.v1.ListDataAttributesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.ListDataAttributesResponse(); + } + + public static com.google.cloud.dataplex.v1.ListDataAttributesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDataAttributesResponse 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.dataplex.v1.ListDataAttributesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataAttributesResponseOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataAttributesResponseOrBuilder.java new file mode 100644 index 000000000000..e2911a87108b --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataAttributesResponseOrBuilder.java @@ -0,0 +1,155 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +public interface ListDataAttributesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.ListDataAttributesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * DataAttributes under the given parent DataTaxonomy.
+   * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; + */ + java.util.List getDataAttributesList(); + /** + * + * + *
+   * DataAttributes under the given parent DataTaxonomy.
+   * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; + */ + com.google.cloud.dataplex.v1.DataAttribute getDataAttributes(int index); + /** + * + * + *
+   * DataAttributes under the given parent DataTaxonomy.
+   * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; + */ + int getDataAttributesCount(); + /** + * + * + *
+   * DataAttributes under the given parent DataTaxonomy.
+   * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; + */ + java.util.List + getDataAttributesOrBuilderList(); + /** + * + * + *
+   * DataAttributes under the given parent DataTaxonomy.
+   * 
+ * + * repeated .google.cloud.dataplex.v1.DataAttribute data_attributes = 1; + */ + com.google.cloud.dataplex.v1.DataAttributeOrBuilder getDataAttributesOrBuilder(int index); + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable_locations = 3; + * + * @return A list containing the unreachableLocations. + */ + java.util.List getUnreachableLocationsList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable_locations = 3; + * + * @return The count of unreachableLocations. + */ + int getUnreachableLocationsCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable_locations = 3; + * + * @param index The index of the element to return. + * @return The unreachableLocations at the given index. + */ + java.lang.String getUnreachableLocations(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable_locations = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachableLocations at the given index. + */ + com.google.protobuf.ByteString getUnreachableLocationsBytes(int index); +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataScanJobsRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataScanJobsRequest.java index a76846688521..3fe683a12926 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataScanJobsRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataScanJobsRequest.java @@ -40,6 +40,7 @@ private ListDataScanJobsRequest(com.google.protobuf.GeneratedMessageV3.Builder + * Optional. An expression for filtering the results of the ListDataScanJobs + * request. + * + * If unspecified, all datascan jobs will be returned. Multiple filters can be + * applied (with `AND`, `OR` logical operators). Filters are case-sensitive. + * + * Allowed fields are: + * + * - `start_time` + * - `end_time` + * + * `start_time` and `end_time` expect RFC-3339 formatted strings (e.g. + * 2018-10-08T18:30:00-07:00). + * + * For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < + * 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between + * specified start and end times. + *
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An expression for filtering the results of the ListDataScanJobs
+   * request.
+   *
+   * If unspecified, all datascan jobs will be returned. Multiple filters can be
+   * applied (with `AND`, `OR` logical operators). Filters are case-sensitive.
+   *
+   * Allowed fields are:
+   *
+   * - `start_time`
+   * - `end_time`
+   *
+   * `start_time` and `end_time` expect RFC-3339 formatted strings (e.g.
+   * 2018-10-08T18:30:00-07:00).
+   *
+   * For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time <
+   * 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between
+   * specified start and end times.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -225,6 +309,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } getUnknownFields().writeTo(output); } @@ -243,6 +330,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -262,6 +352,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -279,6 +370,8 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -421,6 +514,7 @@ public Builder clear() { parent_ = ""; pageSize_ = 0; pageToken_ = ""; + filter_ = ""; return this; } @@ -466,6 +560,9 @@ private void buildPartial0(com.google.cloud.dataplex.v1.ListDataScanJobsRequest if (((from_bitField0_ & 0x00000004) != 0)) { result.pageToken_ = pageToken_; } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } } @java.lang.Override @@ -527,6 +624,11 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.ListDataScanJobsRequest ot bitField0_ |= 0x00000004; onChanged(); } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -571,6 +673,12 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -904,6 +1012,192 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { return this; } + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. An expression for filtering the results of the ListDataScanJobs
+     * request.
+     *
+     * If unspecified, all datascan jobs will be returned. Multiple filters can be
+     * applied (with `AND`, `OR` logical operators). Filters are case-sensitive.
+     *
+     * Allowed fields are:
+     *
+     * - `start_time`
+     * - `end_time`
+     *
+     * `start_time` and `end_time` expect RFC-3339 formatted strings (e.g.
+     * 2018-10-08T18:30:00-07:00).
+     *
+     * For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time <
+     * 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between
+     * specified start and end times.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An expression for filtering the results of the ListDataScanJobs
+     * request.
+     *
+     * If unspecified, all datascan jobs will be returned. Multiple filters can be
+     * applied (with `AND`, `OR` logical operators). Filters are case-sensitive.
+     *
+     * Allowed fields are:
+     *
+     * - `start_time`
+     * - `end_time`
+     *
+     * `start_time` and `end_time` expect RFC-3339 formatted strings (e.g.
+     * 2018-10-08T18:30:00-07:00).
+     *
+     * For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time <
+     * 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between
+     * specified start and end times.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An expression for filtering the results of the ListDataScanJobs
+     * request.
+     *
+     * If unspecified, all datascan jobs will be returned. Multiple filters can be
+     * applied (with `AND`, `OR` logical operators). Filters are case-sensitive.
+     *
+     * Allowed fields are:
+     *
+     * - `start_time`
+     * - `end_time`
+     *
+     * `start_time` and `end_time` expect RFC-3339 formatted strings (e.g.
+     * 2018-10-08T18:30:00-07:00).
+     *
+     * For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time <
+     * 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between
+     * specified start and end times.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An expression for filtering the results of the ListDataScanJobs
+     * request.
+     *
+     * If unspecified, all datascan jobs will be returned. Multiple filters can be
+     * applied (with `AND`, `OR` logical operators). Filters are case-sensitive.
+     *
+     * Allowed fields are:
+     *
+     * - `start_time`
+     * - `end_time`
+     *
+     * `start_time` and `end_time` expect RFC-3339 formatted strings (e.g.
+     * 2018-10-08T18:30:00-07:00).
+     *
+     * For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time <
+     * 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between
+     * specified start and end times.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An expression for filtering the results of the ListDataScanJobs
+     * request.
+     *
+     * If unspecified, all datascan jobs will be returned. Multiple filters can be
+     * applied (with `AND`, `OR` logical operators). Filters are case-sensitive.
+     *
+     * Allowed fields are:
+     *
+     * - `start_time`
+     * - `end_time`
+     *
+     * `start_time` and `end_time` expect RFC-3339 formatted strings (e.g.
+     * 2018-10-08T18:30:00-07:00).
+     *
+     * For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time <
+     * 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between
+     * specified start and end times.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataScanJobsRequestOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataScanJobsRequestOrBuilder.java index 5d8b660158b7..50bc7f0b7644 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataScanJobsRequestOrBuilder.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataScanJobsRequestOrBuilder.java @@ -104,4 +104,61 @@ public interface ListDataScanJobsRequestOrBuilder * @return The bytes for pageToken. */ com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. An expression for filtering the results of the ListDataScanJobs
+   * request.
+   *
+   * If unspecified, all datascan jobs will be returned. Multiple filters can be
+   * applied (with `AND`, `OR` logical operators). Filters are case-sensitive.
+   *
+   * Allowed fields are:
+   *
+   * - `start_time`
+   * - `end_time`
+   *
+   * `start_time` and `end_time` expect RFC-3339 formatted strings (e.g.
+   * 2018-10-08T18:30:00-07:00).
+   *
+   * For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time <
+   * 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between
+   * specified start and end times.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. An expression for filtering the results of the ListDataScanJobs
+   * request.
+   *
+   * If unspecified, all datascan jobs will be returned. Multiple filters can be
+   * applied (with `AND`, `OR` logical operators). Filters are case-sensitive.
+   *
+   * Allowed fields are:
+   *
+   * - `start_time`
+   * - `end_time`
+   *
+   * `start_time` and `end_time` expect RFC-3339 formatted strings (e.g.
+   * 2018-10-08T18:30:00-07:00).
+   *
+   * For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time <
+   * 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between
+   * specified start and end times.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); } diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataTaxonomiesRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataTaxonomiesRequest.java new file mode 100644 index 000000000000..fe9de6b8c494 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataTaxonomiesRequest.java @@ -0,0 +1,1325 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +/** + * + * + *
+ * List DataTaxonomies request.
+ * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.ListDataTaxonomiesRequest} + */ +public final class ListDataTaxonomiesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.ListDataTaxonomiesRequest) + ListDataTaxonomiesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDataTaxonomiesRequest.newBuilder() to construct. + private ListDataTaxonomiesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDataTaxonomiesRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDataTaxonomiesRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_ListDataTaxonomiesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_ListDataTaxonomiesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest.class, + com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+   * Required. The resource name of the DataTaxonomy location, of the form:
+   * projects/{project_number}/locations/{location_id}
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the DataTaxonomy location, of the form:
+   * projects/{project_number}/locations/{location_id}
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * 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_ = 0; + /** + * + * + *
+   * Optional. Maximum number of DataTaxonomies to return. The service may
+   * return fewer than this value. If unspecified, at most 10 DataTaxonomies
+   * will be returned. The maximum value is 1000; values above 1000 will be
+   * coerced to 1000.
+   * 
+ * + * 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; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + /** + * + * + *
+   * Optional. Page token received from a previous ` ListDataTaxonomies` call.
+   * Provide this to retrieve the subsequent page. When paginating, all other
+   * parameters provided to ` ListDataTaxonomies` must match the call that
+   * provided the page token.
+   * 
+ * + * 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. Page token received from a previous ` ListDataTaxonomies` call.
+   * Provide this to retrieve the subsequent page. When paginating, all other
+   * parameters provided to ` ListDataTaxonomies` must match the call that
+   * provided the page token.
+   * 
+ * + * 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; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + /** + * + * + *
+   * Optional. Filter request.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Filter request.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORDER_BY_FIELD_NUMBER = 5; + + @SuppressWarnings("serial") + private volatile java.lang.Object orderBy_ = ""; + /** + * + * + *
+   * Optional. Order by fields for the result.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + @java.lang.Override + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + 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(); + orderBy_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Order by fields for the result.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, orderBy_); + } + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(orderBy_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, orderBy_); + } + 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.dataplex.v1.ListDataTaxonomiesRequest)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest other = + (com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getOrderBy().equals(other.getOrderBy())) 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 = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest 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.dataplex.v1.ListDataTaxonomiesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest 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.dataplex.v1.ListDataTaxonomiesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest 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.dataplex.v1.ListDataTaxonomiesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest 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.dataplex.v1.ListDataTaxonomiesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest 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.dataplex.v1.ListDataTaxonomiesRequest 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; + } + /** + * + * + *
+   * List DataTaxonomies request.
+   * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.ListDataTaxonomiesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.ListDataTaxonomiesRequest) + com.google.cloud.dataplex.v1.ListDataTaxonomiesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_ListDataTaxonomiesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_ListDataTaxonomiesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest.class, + com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest.Builder.class); + } + + // Construct using com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + orderBy_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_ListDataTaxonomiesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest build() { + com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest buildPartial() { + com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest result = + new com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.orderBy_ = orderBy_; + } + } + + @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.dataplex.v1.ListDataTaxonomiesRequest) { + return mergeFrom((com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest other) { + if (other == com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + bitField0_ |= 0x00000010; + 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(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + 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 bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the DataTaxonomy location, of the form:
+     * projects/{project_number}/locations/{location_id}
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the DataTaxonomy location, of the form:
+     * projects/{project_number}/locations/{location_id}
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the DataTaxonomy location, of the form:
+     * projects/{project_number}/locations/{location_id}
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the DataTaxonomy location, of the form:
+     * projects/{project_number}/locations/{location_id}
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the DataTaxonomy location, of the form:
+     * projects/{project_number}/locations/{location_id}
+     * where `location_id` refers to a GCP region.
+     * 
+ * + * + * 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; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. Maximum number of DataTaxonomies to return. The service may
+     * return fewer than this value. If unspecified, at most 10 DataTaxonomies
+     * will be returned. The maximum value is 1000; values above 1000 will be
+     * coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. Maximum number of DataTaxonomies to return. The service may
+     * return fewer than this value. If unspecified, at most 10 DataTaxonomies
+     * will be returned. The maximum value is 1000; values above 1000 will be
+     * coerced to 1000.
+     * 
+ * + * 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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Maximum number of DataTaxonomies to return. The service may
+     * return fewer than this value. If unspecified, at most 10 DataTaxonomies
+     * will be returned. The maximum value is 1000; values above 1000 will be
+     * coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. Page token received from a previous ` ListDataTaxonomies` call.
+     * Provide this to retrieve the subsequent page. When paginating, all other
+     * parameters provided to ` ListDataTaxonomies` must match the call that
+     * provided the page token.
+     * 
+ * + * 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. Page token received from a previous ` ListDataTaxonomies` call.
+     * Provide this to retrieve the subsequent page. When paginating, all other
+     * parameters provided to ` ListDataTaxonomies` must match the call that
+     * provided the page token.
+     * 
+ * + * 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. Page token received from a previous ` ListDataTaxonomies` call.
+     * Provide this to retrieve the subsequent page. When paginating, all other
+     * parameters provided to ` ListDataTaxonomies` must match the call that
+     * provided the page token.
+     * 
+ * + * 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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Page token received from a previous ` ListDataTaxonomies` call.
+     * Provide this to retrieve the subsequent page. When paginating, all other
+     * parameters provided to ` ListDataTaxonomies` must match the call that
+     * provided the page token.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Page token received from a previous ` ListDataTaxonomies` call.
+     * Provide this to retrieve the subsequent page. When paginating, all other
+     * parameters provided to ` ListDataTaxonomies` must match the call that
+     * provided the page token.
+     * 
+ * + * 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; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. Filter request.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Filter request.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Filter request.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Filter request.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Filter request.
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + * + * + *
+     * Optional. Order by fields for the result.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + public java.lang.String getOrderBy() { + java.lang.Object ref = orderBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orderBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Order by fields for the result.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + public com.google.protobuf.ByteString getOrderByBytes() { + java.lang.Object ref = orderBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orderBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Order by fields for the result.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + orderBy_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Order by fields for the result.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOrderBy() { + orderBy_ = getDefaultInstance().getOrderBy(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Order by fields for the result.
+     * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for orderBy to set. + * @return This builder for chaining. + */ + public Builder setOrderByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + orderBy_ = value; + bitField0_ |= 0x00000010; + 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.dataplex.v1.ListDataTaxonomiesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.ListDataTaxonomiesRequest) + private static final com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest(); + } + + public static com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDataTaxonomiesRequest 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.dataplex.v1.ListDataTaxonomiesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataTaxonomiesRequestOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataTaxonomiesRequestOrBuilder.java new file mode 100644 index 000000000000..ab714c286b16 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataTaxonomiesRequestOrBuilder.java @@ -0,0 +1,155 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +public interface ListDataTaxonomiesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.ListDataTaxonomiesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the DataTaxonomy location, of the form:
+   * projects/{project_number}/locations/{location_id}
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the DataTaxonomy location, of the form:
+   * projects/{project_number}/locations/{location_id}
+   * where `location_id` refers to a GCP region.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Maximum number of DataTaxonomies to return. The service may
+   * return fewer than this value. If unspecified, at most 10 DataTaxonomies
+   * will be returned. The maximum value is 1000; values above 1000 will be
+   * coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. Page token received from a previous ` ListDataTaxonomies` call.
+   * Provide this to retrieve the subsequent page. When paginating, all other
+   * parameters provided to ` ListDataTaxonomies` must match the call that
+   * provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. Page token received from a previous ` ListDataTaxonomies` call.
+   * Provide this to retrieve the subsequent page. When paginating, all other
+   * parameters provided to ` ListDataTaxonomies` must match the call that
+   * provided the page token.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. Filter request.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. Filter request.
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. Order by fields for the result.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The orderBy. + */ + java.lang.String getOrderBy(); + /** + * + * + *
+   * Optional. Order by fields for the result.
+   * 
+ * + * string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for orderBy. + */ + com.google.protobuf.ByteString getOrderByBytes(); +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataTaxonomiesResponse.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataTaxonomiesResponse.java new file mode 100644 index 000000000000..499015b05747 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataTaxonomiesResponse.java @@ -0,0 +1,1409 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +/** + * + * + *
+ * List DataTaxonomies response.
+ * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.ListDataTaxonomiesResponse} + */ +public final class ListDataTaxonomiesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.ListDataTaxonomiesResponse) + ListDataTaxonomiesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListDataTaxonomiesResponse.newBuilder() to construct. + private ListDataTaxonomiesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListDataTaxonomiesResponse() { + dataTaxonomies_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + unreachableLocations_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListDataTaxonomiesResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_ListDataTaxonomiesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_ListDataTaxonomiesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse.class, + com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse.Builder.class); + } + + public static final int DATA_TAXONOMIES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List dataTaxonomies_; + /** + * + * + *
+   * DataTaxonomies under the given parent location.
+   * 
+ * + * repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; + */ + @java.lang.Override + public java.util.List getDataTaxonomiesList() { + return dataTaxonomies_; + } + /** + * + * + *
+   * DataTaxonomies under the given parent location.
+   * 
+ * + * repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; + */ + @java.lang.Override + public java.util.List + getDataTaxonomiesOrBuilderList() { + return dataTaxonomies_; + } + /** + * + * + *
+   * DataTaxonomies under the given parent location.
+   * 
+ * + * repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; + */ + @java.lang.Override + public int getDataTaxonomiesCount() { + return dataTaxonomies_.size(); + } + /** + * + * + *
+   * DataTaxonomies under the given parent location.
+   * 
+ * + * repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataTaxonomy getDataTaxonomies(int index) { + return dataTaxonomies_.get(index); + } + /** + * + * + *
+   * DataTaxonomies under the given parent location.
+   * 
+ * + * repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataTaxonomyOrBuilder getDataTaxonomiesOrBuilder(int index) { + return dataTaxonomies_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * 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; + } + } + + public static final int UNREACHABLE_LOCATIONS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList unreachableLocations_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable_locations = 3; + * + * @return A list containing the unreachableLocations. + */ + public com.google.protobuf.ProtocolStringList getUnreachableLocationsList() { + return unreachableLocations_; + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable_locations = 3; + * + * @return The count of unreachableLocations. + */ + public int getUnreachableLocationsCount() { + return unreachableLocations_.size(); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable_locations = 3; + * + * @param index The index of the element to return. + * @return The unreachableLocations at the given index. + */ + public java.lang.String getUnreachableLocations(int index) { + return unreachableLocations_.get(index); + } + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable_locations = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachableLocations at the given index. + */ + public com.google.protobuf.ByteString getUnreachableLocationsBytes(int index) { + return unreachableLocations_.getByteString(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 { + for (int i = 0; i < dataTaxonomies_.size(); i++) { + output.writeMessage(1, dataTaxonomies_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + for (int i = 0; i < unreachableLocations_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 3, unreachableLocations_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < dataTaxonomies_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, dataTaxonomies_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + { + int dataSize = 0; + for (int i = 0; i < unreachableLocations_.size(); i++) { + dataSize += computeStringSizeNoTag(unreachableLocations_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnreachableLocationsList().size(); + } + 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.dataplex.v1.ListDataTaxonomiesResponse)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse other = + (com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse) obj; + + if (!getDataTaxonomiesList().equals(other.getDataTaxonomiesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!getUnreachableLocationsList().equals(other.getUnreachableLocationsList())) 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 (getDataTaxonomiesCount() > 0) { + hash = (37 * hash) + DATA_TAXONOMIES_FIELD_NUMBER; + hash = (53 * hash) + getDataTaxonomiesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + if (getUnreachableLocationsCount() > 0) { + hash = (37 * hash) + UNREACHABLE_LOCATIONS_FIELD_NUMBER; + hash = (53 * hash) + getUnreachableLocationsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse 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.dataplex.v1.ListDataTaxonomiesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse 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.dataplex.v1.ListDataTaxonomiesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse 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.dataplex.v1.ListDataTaxonomiesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse 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.dataplex.v1.ListDataTaxonomiesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse 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.dataplex.v1.ListDataTaxonomiesResponse 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; + } + /** + * + * + *
+   * List DataTaxonomies response.
+   * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.ListDataTaxonomiesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.ListDataTaxonomiesResponse) + com.google.cloud.dataplex.v1.ListDataTaxonomiesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_ListDataTaxonomiesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_ListDataTaxonomiesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse.class, + com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse.Builder.class); + } + + // Construct using com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (dataTaxonomiesBuilder_ == null) { + dataTaxonomies_ = java.util.Collections.emptyList(); + } else { + dataTaxonomies_ = null; + dataTaxonomiesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + unreachableLocations_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_ListDataTaxonomiesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse build() { + com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse buildPartial() { + com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse result = + new com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse result) { + if (dataTaxonomiesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + dataTaxonomies_ = java.util.Collections.unmodifiableList(dataTaxonomies_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.dataTaxonomies_ = dataTaxonomies_; + } else { + result.dataTaxonomies_ = dataTaxonomiesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + unreachableLocations_.makeImmutable(); + result.unreachableLocations_ = unreachableLocations_; + } + } + + @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.dataplex.v1.ListDataTaxonomiesResponse) { + return mergeFrom((com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse other) { + if (other == com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse.getDefaultInstance()) + return this; + if (dataTaxonomiesBuilder_ == null) { + if (!other.dataTaxonomies_.isEmpty()) { + if (dataTaxonomies_.isEmpty()) { + dataTaxonomies_ = other.dataTaxonomies_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDataTaxonomiesIsMutable(); + dataTaxonomies_.addAll(other.dataTaxonomies_); + } + onChanged(); + } + } else { + if (!other.dataTaxonomies_.isEmpty()) { + if (dataTaxonomiesBuilder_.isEmpty()) { + dataTaxonomiesBuilder_.dispose(); + dataTaxonomiesBuilder_ = null; + dataTaxonomies_ = other.dataTaxonomies_; + bitField0_ = (bitField0_ & ~0x00000001); + dataTaxonomiesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDataTaxonomiesFieldBuilder() + : null; + } else { + dataTaxonomiesBuilder_.addAllMessages(other.dataTaxonomies_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.unreachableLocations_.isEmpty()) { + if (unreachableLocations_.isEmpty()) { + unreachableLocations_ = other.unreachableLocations_; + bitField0_ |= 0x00000004; + } else { + ensureUnreachableLocationsIsMutable(); + unreachableLocations_.addAll(other.unreachableLocations_); + } + 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.dataplex.v1.DataTaxonomy m = + input.readMessage( + com.google.cloud.dataplex.v1.DataTaxonomy.parser(), extensionRegistry); + if (dataTaxonomiesBuilder_ == null) { + ensureDataTaxonomiesIsMutable(); + dataTaxonomies_.add(m); + } else { + dataTaxonomiesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachableLocationsIsMutable(); + unreachableLocations_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private java.util.List dataTaxonomies_ = + java.util.Collections.emptyList(); + + private void ensureDataTaxonomiesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + dataTaxonomies_ = + new java.util.ArrayList(dataTaxonomies_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dataplex.v1.DataTaxonomy, + com.google.cloud.dataplex.v1.DataTaxonomy.Builder, + com.google.cloud.dataplex.v1.DataTaxonomyOrBuilder> + dataTaxonomiesBuilder_; + + /** + * + * + *
+     * DataTaxonomies under the given parent location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; + */ + public java.util.List getDataTaxonomiesList() { + if (dataTaxonomiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(dataTaxonomies_); + } else { + return dataTaxonomiesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * DataTaxonomies under the given parent location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; + */ + public int getDataTaxonomiesCount() { + if (dataTaxonomiesBuilder_ == null) { + return dataTaxonomies_.size(); + } else { + return dataTaxonomiesBuilder_.getCount(); + } + } + /** + * + * + *
+     * DataTaxonomies under the given parent location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; + */ + public com.google.cloud.dataplex.v1.DataTaxonomy getDataTaxonomies(int index) { + if (dataTaxonomiesBuilder_ == null) { + return dataTaxonomies_.get(index); + } else { + return dataTaxonomiesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * DataTaxonomies under the given parent location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; + */ + public Builder setDataTaxonomies(int index, com.google.cloud.dataplex.v1.DataTaxonomy value) { + if (dataTaxonomiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataTaxonomiesIsMutable(); + dataTaxonomies_.set(index, value); + onChanged(); + } else { + dataTaxonomiesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * DataTaxonomies under the given parent location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; + */ + public Builder setDataTaxonomies( + int index, com.google.cloud.dataplex.v1.DataTaxonomy.Builder builderForValue) { + if (dataTaxonomiesBuilder_ == null) { + ensureDataTaxonomiesIsMutable(); + dataTaxonomies_.set(index, builderForValue.build()); + onChanged(); + } else { + dataTaxonomiesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * DataTaxonomies under the given parent location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; + */ + public Builder addDataTaxonomies(com.google.cloud.dataplex.v1.DataTaxonomy value) { + if (dataTaxonomiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataTaxonomiesIsMutable(); + dataTaxonomies_.add(value); + onChanged(); + } else { + dataTaxonomiesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * DataTaxonomies under the given parent location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; + */ + public Builder addDataTaxonomies(int index, com.google.cloud.dataplex.v1.DataTaxonomy value) { + if (dataTaxonomiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataTaxonomiesIsMutable(); + dataTaxonomies_.add(index, value); + onChanged(); + } else { + dataTaxonomiesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * DataTaxonomies under the given parent location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; + */ + public Builder addDataTaxonomies( + com.google.cloud.dataplex.v1.DataTaxonomy.Builder builderForValue) { + if (dataTaxonomiesBuilder_ == null) { + ensureDataTaxonomiesIsMutable(); + dataTaxonomies_.add(builderForValue.build()); + onChanged(); + } else { + dataTaxonomiesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * DataTaxonomies under the given parent location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; + */ + public Builder addDataTaxonomies( + int index, com.google.cloud.dataplex.v1.DataTaxonomy.Builder builderForValue) { + if (dataTaxonomiesBuilder_ == null) { + ensureDataTaxonomiesIsMutable(); + dataTaxonomies_.add(index, builderForValue.build()); + onChanged(); + } else { + dataTaxonomiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * DataTaxonomies under the given parent location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; + */ + public Builder addAllDataTaxonomies( + java.lang.Iterable values) { + if (dataTaxonomiesBuilder_ == null) { + ensureDataTaxonomiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, dataTaxonomies_); + onChanged(); + } else { + dataTaxonomiesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * DataTaxonomies under the given parent location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; + */ + public Builder clearDataTaxonomies() { + if (dataTaxonomiesBuilder_ == null) { + dataTaxonomies_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + dataTaxonomiesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * DataTaxonomies under the given parent location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; + */ + public Builder removeDataTaxonomies(int index) { + if (dataTaxonomiesBuilder_ == null) { + ensureDataTaxonomiesIsMutable(); + dataTaxonomies_.remove(index); + onChanged(); + } else { + dataTaxonomiesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * DataTaxonomies under the given parent location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; + */ + public com.google.cloud.dataplex.v1.DataTaxonomy.Builder getDataTaxonomiesBuilder(int index) { + return getDataTaxonomiesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * DataTaxonomies under the given parent location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; + */ + public com.google.cloud.dataplex.v1.DataTaxonomyOrBuilder getDataTaxonomiesOrBuilder( + int index) { + if (dataTaxonomiesBuilder_ == null) { + return dataTaxonomies_.get(index); + } else { + return dataTaxonomiesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * DataTaxonomies under the given parent location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; + */ + public java.util.List + getDataTaxonomiesOrBuilderList() { + if (dataTaxonomiesBuilder_ != null) { + return dataTaxonomiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(dataTaxonomies_); + } + } + /** + * + * + *
+     * DataTaxonomies under the given parent location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; + */ + public com.google.cloud.dataplex.v1.DataTaxonomy.Builder addDataTaxonomiesBuilder() { + return getDataTaxonomiesFieldBuilder() + .addBuilder(com.google.cloud.dataplex.v1.DataTaxonomy.getDefaultInstance()); + } + /** + * + * + *
+     * DataTaxonomies under the given parent location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; + */ + public com.google.cloud.dataplex.v1.DataTaxonomy.Builder addDataTaxonomiesBuilder(int index) { + return getDataTaxonomiesFieldBuilder() + .addBuilder(index, com.google.cloud.dataplex.v1.DataTaxonomy.getDefaultInstance()); + } + /** + * + * + *
+     * DataTaxonomies under the given parent location.
+     * 
+ * + * repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; + */ + public java.util.List + getDataTaxonomiesBuilderList() { + return getDataTaxonomiesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dataplex.v1.DataTaxonomy, + com.google.cloud.dataplex.v1.DataTaxonomy.Builder, + com.google.cloud.dataplex.v1.DataTaxonomyOrBuilder> + getDataTaxonomiesFieldBuilder() { + if (dataTaxonomiesBuilder_ == null) { + dataTaxonomiesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.dataplex.v1.DataTaxonomy, + com.google.cloud.dataplex.v1.DataTaxonomy.Builder, + com.google.cloud.dataplex.v1.DataTaxonomyOrBuilder>( + dataTaxonomies_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + dataTaxonomies_ = null; + } + return dataTaxonomiesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Token to retrieve the next page of results, or empty if there are no more
+     * results in the list.
+     * 
+ * + * 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; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList unreachableLocations_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureUnreachableLocationsIsMutable() { + if (!unreachableLocations_.isModifiable()) { + unreachableLocations_ = new com.google.protobuf.LazyStringArrayList(unreachableLocations_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable_locations = 3; + * + * @return A list containing the unreachableLocations. + */ + public com.google.protobuf.ProtocolStringList getUnreachableLocationsList() { + unreachableLocations_.makeImmutable(); + return unreachableLocations_; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable_locations = 3; + * + * @return The count of unreachableLocations. + */ + public int getUnreachableLocationsCount() { + return unreachableLocations_.size(); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable_locations = 3; + * + * @param index The index of the element to return. + * @return The unreachableLocations at the given index. + */ + public java.lang.String getUnreachableLocations(int index) { + return unreachableLocations_.get(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable_locations = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachableLocations at the given index. + */ + public com.google.protobuf.ByteString getUnreachableLocationsBytes(int index) { + return unreachableLocations_.getByteString(index); + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable_locations = 3; + * + * @param index The index to set the value at. + * @param value The unreachableLocations to set. + * @return This builder for chaining. + */ + public Builder setUnreachableLocations(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableLocationsIsMutable(); + unreachableLocations_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable_locations = 3; + * + * @param value The unreachableLocations to add. + * @return This builder for chaining. + */ + public Builder addUnreachableLocations(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnreachableLocationsIsMutable(); + unreachableLocations_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable_locations = 3; + * + * @param values The unreachableLocations to add. + * @return This builder for chaining. + */ + public Builder addAllUnreachableLocations(java.lang.Iterable values) { + ensureUnreachableLocationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unreachableLocations_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable_locations = 3; + * + * @return This builder for chaining. + */ + public Builder clearUnreachableLocations() { + unreachableLocations_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Locations that could not be reached.
+     * 
+ * + * repeated string unreachable_locations = 3; + * + * @param value The bytes of the unreachableLocations to add. + * @return This builder for chaining. + */ + public Builder addUnreachableLocationsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnreachableLocationsIsMutable(); + unreachableLocations_.add(value); + bitField0_ |= 0x00000004; + 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.dataplex.v1.ListDataTaxonomiesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.ListDataTaxonomiesResponse) + private static final com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse(); + } + + public static com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListDataTaxonomiesResponse 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.dataplex.v1.ListDataTaxonomiesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataTaxonomiesResponseOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataTaxonomiesResponseOrBuilder.java new file mode 100644 index 000000000000..170641f225f4 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListDataTaxonomiesResponseOrBuilder.java @@ -0,0 +1,155 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +public interface ListDataTaxonomiesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.ListDataTaxonomiesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * DataTaxonomies under the given parent location.
+   * 
+ * + * repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; + */ + java.util.List getDataTaxonomiesList(); + /** + * + * + *
+   * DataTaxonomies under the given parent location.
+   * 
+ * + * repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; + */ + com.google.cloud.dataplex.v1.DataTaxonomy getDataTaxonomies(int index); + /** + * + * + *
+   * DataTaxonomies under the given parent location.
+   * 
+ * + * repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; + */ + int getDataTaxonomiesCount(); + /** + * + * + *
+   * DataTaxonomies under the given parent location.
+   * 
+ * + * repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; + */ + java.util.List + getDataTaxonomiesOrBuilderList(); + /** + * + * + *
+   * DataTaxonomies under the given parent location.
+   * 
+ * + * repeated .google.cloud.dataplex.v1.DataTaxonomy data_taxonomies = 1; + */ + com.google.cloud.dataplex.v1.DataTaxonomyOrBuilder getDataTaxonomiesOrBuilder(int index); + + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token to retrieve the next page of results, or empty if there are no more
+   * results in the list.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable_locations = 3; + * + * @return A list containing the unreachableLocations. + */ + java.util.List getUnreachableLocationsList(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable_locations = 3; + * + * @return The count of unreachableLocations. + */ + int getUnreachableLocationsCount(); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable_locations = 3; + * + * @param index The index of the element to return. + * @return The unreachableLocations at the given index. + */ + java.lang.String getUnreachableLocations(int index); + /** + * + * + *
+   * Locations that could not be reached.
+   * 
+ * + * repeated string unreachable_locations = 3; + * + * @param index The index of the value to return. + * @return The bytes of the unreachableLocations at the given index. + */ + com.google.protobuf.ByteString getUnreachableLocationsBytes(int index); +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/LogsProto.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/LogsProto.java index 48714380fa71..c336fa9c5356 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/LogsProto.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/LogsProto.java @@ -79,6 +79,26 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dataplex_v1_DataScanEvent_DataQualityResult_DimensionPassedEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dataplex_v1_DataScanEvent_DataQualityResult_DimensionPassedEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_DataScanEvent_DataProfileAppliedConfigs_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_DataScanEvent_DataProfileAppliedConfigs_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_DataScanEvent_DataQualityAppliedConfigs_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_DataScanEvent_DataQualityAppliedConfigs_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_DataScanEvent_PostScanActionsResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_DataScanEvent_PostScanActionsResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_DataScanEvent_PostScanActionsResult_BigQueryExportResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_DataScanEvent_PostScanActionsResult_BigQueryExportResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_DataQualityScanRuleResult_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_DataQualityScanRuleResult_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -121,7 +141,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ARTITION_CREATED\020\005\022\025\n\021PARTITION_UPDATED\020" + "\006\022\025\n\021PARTITION_DELETED\020\007\"A\n\nEntityType\022\033" + "\n\027ENTITY_TYPE_UNSPECIFIED\020\000\022\t\n\005TABLE\020\001\022\013" - + "\n\007FILESET\020\002B\t\n\007details\"\234\004\n\010JobEvent\022\017\n\007m" + + "\n\007FILESET\020\002B\t\n\007details\"\305\005\n\010JobEvent\022\017\n\007m" + "essage\030\001 \001(\t\022\016\n\006job_id\030\002 \001(\t\022.\n\nstart_ti" + "me\030\003 \001(\0132\032.google.protobuf.Timestamp\022,\n\010" + "end_time\030\004 \001(\0132\032.google.protobuf.Timesta" @@ -130,61 +150,111 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "type\030\007 \001(\0162\'.google.cloud.dataplex.v1.Jo" + "bEvent.Type\022;\n\007service\030\010 \001(\0162*.google.cl" + "oud.dataplex.v1.JobEvent.Service\022\023\n\013serv" - + "ice_job\030\t \001(\t\"5\n\004Type\022\024\n\020TYPE_UNSPECIFIE" + + "ice_job\030\t \001(\t\022N\n\021execution_trigger\030\013 \001(\016" + + "23.google.cloud.dataplex.v1.JobEvent.Exe" + + "cutionTrigger\"5\n\004Type\022\024\n\020TYPE_UNSPECIFIE" + "D\020\000\022\t\n\005SPARK\020\001\022\014\n\010NOTEBOOK\020\002\"U\n\005State\022\025\n" + "\021STATE_UNSPECIFIED\020\000\022\r\n\tSUCCEEDED\020\001\022\n\n\006F" + "AILED\020\002\022\r\n\tCANCELLED\020\003\022\013\n\007ABORTED\020\004\"0\n\007S" + "ervice\022\027\n\023SERVICE_UNSPECIFIED\020\000\022\014\n\010DATAP" - + "ROC\020\001\"\275\005\n\014SessionEvent\022\017\n\007message\030\001 \001(\t\022" - + "\017\n\007user_id\030\002 \001(\t\022\022\n\nsession_id\030\003 \001(\t\022>\n\004" - + "type\030\004 \001(\01620.google.cloud.dataplex.v1.Se" - + "ssionEvent.EventType\022C\n\005query\030\005 \001(\01322.go" - + "ogle.cloud.dataplex.v1.SessionEvent.Quer" - + "yDetailH\000\022\027\n\017event_succeeded\030\006 \001(\010\022\034\n\024fa" - + "st_startup_enabled\030\007 \001(\010\0226\n\023unassigned_d" - + "uration\030\010 \001(\0132\031.google.protobuf.Duration" - + "\032\243\002\n\013QueryDetail\022\020\n\010query_id\030\001 \001(\t\022\022\n\nqu" - + "ery_text\030\002 \001(\t\022I\n\006engine\030\003 \001(\01629.google." - + "cloud.dataplex.v1.SessionEvent.QueryDeta" - + "il.Engine\022+\n\010duration\030\004 \001(\0132\031.google.pro" - + "tobuf.Duration\022\031\n\021result_size_bytes\030\005 \001(" - + "\003\022\034\n\024data_processed_bytes\030\006 \001(\003\"=\n\006Engin" - + "e\022\026\n\022ENGINE_UNSPECIFIED\020\000\022\r\n\tSPARK_SQL\020\001" - + "\022\014\n\010BIGQUERY\020\002\"S\n\tEventType\022\032\n\026EVENT_TYP" - + "E_UNSPECIFIED\020\000\022\t\n\005START\020\001\022\010\n\004STOP\020\002\022\t\n\005" - + "QUERY\020\003\022\n\n\006CREATE\020\004B\010\n\006detail\"\210\t\n\rDataSc" - + "anEvent\022\023\n\013data_source\030\001 \001(\t\022\016\n\006job_id\030\002" - + " \001(\t\022.\n\nstart_time\030\003 \001(\0132\032.google.protob" - + "uf.Timestamp\022,\n\010end_time\030\004 \001(\0132\032.google." - + "protobuf.Timestamp\022>\n\004type\030\005 \001(\01620.googl" - + "e.cloud.dataplex.v1.DataScanEvent.ScanTy" - + "pe\022<\n\005state\030\006 \001(\0162-.google.cloud.dataple" - + "x.v1.DataScanEvent.State\022\017\n\007message\030\007 \001(" - + "\t\022\024\n\014spec_version\030\010 \001(\t\022@\n\007trigger\030\t \001(\016" - + "2/.google.cloud.dataplex.v1.DataScanEven" - + "t.Trigger\022<\n\005scope\030\n \001(\0162-.google.cloud." - + "dataplex.v1.DataScanEvent.Scope\022Q\n\014data_" - + "profile\030e \001(\01329.google.cloud.dataplex.v1" - + ".DataScanEvent.DataProfileResultH\000\022Q\n\014da" - + "ta_quality\030f \001(\01329.google.cloud.dataplex" - + ".v1.DataScanEvent.DataQualityResultH\000\032&\n" - + "\021DataProfileResult\022\021\n\trow_count\030\001 \001(\003\032\330\001" - + "\n\021DataQualityResult\022\021\n\trow_count\030\001 \001(\003\022\016" - + "\n\006passed\030\002 \001(\010\022h\n\020dimension_passed\030\003 \003(\013" - + "2N.google.cloud.dataplex.v1.DataScanEven" - + "t.DataQualityResult.DimensionPassedEntry" - + "\0326\n\024DimensionPassedEntry\022\013\n\003key\030\001 \001(\t\022\r\n" - + "\005value\030\002 \001(\010:\0028\001\"I\n\010ScanType\022\031\n\025SCAN_TYP" - + "E_UNSPECIFIED\020\000\022\020\n\014DATA_PROFILE\020\001\022\020\n\014DAT" - + "A_QUALITY\020\002\"U\n\005State\022\025\n\021STATE_UNSPECIFIE" - + "D\020\000\022\013\n\007STARTED\020\001\022\r\n\tSUCCEEDED\020\002\022\n\n\006FAILE" - + "D\020\003\022\r\n\tCANCELLED\020\004\"?\n\007Trigger\022\027\n\023TRIGGER" - + "_UNSPECIFIED\020\000\022\r\n\tON_DEMAND\020\001\022\014\n\010SCHEDUL" - + "E\020\002\"9\n\005Scope\022\025\n\021SCOPE_UNSPECIFIED\020\000\022\010\n\004F" - + "ULL\020\001\022\017\n\013INCREMENTAL\020\002B\010\n\006resultBe\n\034com." - + "google.cloud.dataplex.v1B\tLogsProtoP\001Z8c" - + "loud.google.com/go/dataplex/apiv1/datapl" - + "expb;dataplexpbb\006proto3" + + "ROC\020\001\"W\n\020ExecutionTrigger\022!\n\035EXECUTION_T" + + "RIGGER_UNSPECIFIED\020\000\022\017\n\013TASK_CONFIG\020\001\022\017\n" + + "\013RUN_REQUEST\020\002\"\275\005\n\014SessionEvent\022\017\n\007messa" + + "ge\030\001 \001(\t\022\017\n\007user_id\030\002 \001(\t\022\022\n\nsession_id\030" + + "\003 \001(\t\022>\n\004type\030\004 \001(\01620.google.cloud.datap" + + "lex.v1.SessionEvent.EventType\022C\n\005query\030\005" + + " \001(\01322.google.cloud.dataplex.v1.SessionE" + + "vent.QueryDetailH\000\022\027\n\017event_succeeded\030\006 " + + "\001(\010\022\034\n\024fast_startup_enabled\030\007 \001(\010\0226\n\023una" + + "ssigned_duration\030\010 \001(\0132\031.google.protobuf" + + ".Duration\032\243\002\n\013QueryDetail\022\020\n\010query_id\030\001 " + + "\001(\t\022\022\n\nquery_text\030\002 \001(\t\022I\n\006engine\030\003 \001(\0162" + + "9.google.cloud.dataplex.v1.SessionEvent." + + "QueryDetail.Engine\022+\n\010duration\030\004 \001(\0132\031.g" + + "oogle.protobuf.Duration\022\031\n\021result_size_b" + + "ytes\030\005 \001(\003\022\034\n\024data_processed_bytes\030\006 \001(\003" + + "\"=\n\006Engine\022\026\n\022ENGINE_UNSPECIFIED\020\000\022\r\n\tSP" + + "ARK_SQL\020\001\022\014\n\010BIGQUERY\020\002\"S\n\tEventType\022\032\n\026" + + "EVENT_TYPE_UNSPECIFIED\020\000\022\t\n\005START\020\001\022\010\n\004S" + + "TOP\020\002\022\t\n\005QUERY\020\003\022\n\n\006CREATE\020\004B\010\n\006detail\"\257" + + "\020\n\rDataScanEvent\022\023\n\013data_source\030\001 \001(\t\022\016\n" + + "\006job_id\030\002 \001(\t\022/\n\013create_time\030\014 \001(\0132\032.goo" + + "gle.protobuf.Timestamp\022.\n\nstart_time\030\003 \001" + + "(\0132\032.google.protobuf.Timestamp\022,\n\010end_ti" + + "me\030\004 \001(\0132\032.google.protobuf.Timestamp\022>\n\004" + + "type\030\005 \001(\01620.google.cloud.dataplex.v1.Da" + + "taScanEvent.ScanType\022<\n\005state\030\006 \001(\0162-.go" + + "ogle.cloud.dataplex.v1.DataScanEvent.Sta" + + "te\022\017\n\007message\030\007 \001(\t\022\024\n\014spec_version\030\010 \001(" + + "\t\022@\n\007trigger\030\t \001(\0162/.google.cloud.datapl" + + "ex.v1.DataScanEvent.Trigger\022<\n\005scope\030\n \001" + + "(\0162-.google.cloud.dataplex.v1.DataScanEv" + + "ent.Scope\022Q\n\014data_profile\030e \001(\01329.google" + + ".cloud.dataplex.v1.DataScanEvent.DataPro" + + "fileResultH\000\022Q\n\014data_quality\030f \001(\01329.goo" + + "gle.cloud.dataplex.v1.DataScanEvent.Data" + + "QualityResultH\000\022b\n\024data_profile_configs\030" + + "\311\001 \001(\0132A.google.cloud.dataplex.v1.DataSc" + + "anEvent.DataProfileAppliedConfigsH\001\022b\n\024d" + + "ata_quality_configs\030\312\001 \001(\0132A.google.clou" + + "d.dataplex.v1.DataScanEvent.DataQualityA" + + "ppliedConfigsH\001\022_\n\030post_scan_actions_res" + + "ult\030\013 \001(\0132=.google.cloud.dataplex.v1.Dat" + + "aScanEvent.PostScanActionsResult\032&\n\021Data" + + "ProfileResult\022\021\n\trow_count\030\001 \001(\003\032\330\001\n\021Dat" + + "aQualityResult\022\021\n\trow_count\030\001 \001(\003\022\016\n\006pas" + + "sed\030\002 \001(\010\022h\n\020dimension_passed\030\003 \003(\0132N.go" + + "ogle.cloud.dataplex.v1.DataScanEvent.Dat" + + "aQualityResult.DimensionPassedEntry\0326\n\024D" + + "imensionPassedEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" + + "e\030\002 \001(\010:\0028\001\032p\n\031DataProfileAppliedConfigs" + + "\022\030\n\020sampling_percent\030\001 \001(\002\022\032\n\022row_filter" + + "_applied\030\002 \001(\010\022\035\n\025column_filter_applied\030" + + "\003 \001(\010\032Q\n\031DataQualityAppliedConfigs\022\030\n\020sa" + + "mpling_percent\030\001 \001(\002\022\032\n\022row_filter_appli" + + "ed\030\002 \001(\010\032\346\002\n\025PostScanActionsResult\022r\n\026bi" + + "gquery_export_result\030\001 \001(\0132R.google.clou" + + "d.dataplex.v1.DataScanEvent.PostScanActi" + + "onsResult.BigQueryExportResult\032\330\001\n\024BigQu" + + "eryExportResult\022g\n\005state\030\001 \001(\0162X.google." + + "cloud.dataplex.v1.DataScanEvent.PostScan" + + "ActionsResult.BigQueryExportResult.State" + + "\022\017\n\007message\030\002 \001(\t\"F\n\005State\022\025\n\021STATE_UNSP" + + "ECIFIED\020\000\022\r\n\tSUCCEEDED\020\001\022\n\n\006FAILED\020\002\022\013\n\007" + + "SKIPPED\020\003\"I\n\010ScanType\022\031\n\025SCAN_TYPE_UNSPE" + + "CIFIED\020\000\022\020\n\014DATA_PROFILE\020\001\022\020\n\014DATA_QUALI" + + "TY\020\002\"b\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007" + + "STARTED\020\001\022\r\n\tSUCCEEDED\020\002\022\n\n\006FAILED\020\003\022\r\n\t" + + "CANCELLED\020\004\022\013\n\007CREATED\020\005\"?\n\007Trigger\022\027\n\023T" + + "RIGGER_UNSPECIFIED\020\000\022\r\n\tON_DEMAND\020\001\022\014\n\010S" + + "CHEDULE\020\002\"9\n\005Scope\022\025\n\021SCOPE_UNSPECIFIED\020" + + "\000\022\010\n\004FULL\020\001\022\017\n\013INCREMENTAL\020\002B\010\n\006resultB\020" + + "\n\016appliedConfigs\"\351\006\n\031DataQualityScanRule" + + "Result\022\016\n\006job_id\030\001 \001(\t\022\023\n\013data_source\030\002 " + + "\001(\t\022\016\n\006column\030\003 \001(\t\022\021\n\trule_name\030\004 \001(\t\022O" + + "\n\trule_type\030\005 \001(\0162<.google.cloud.dataple" + + "x.v1.DataQualityScanRuleResult.RuleType\022" + + "Z\n\016evalution_type\030\006 \001(\0162B.google.cloud.d" + + "ataplex.v1.DataQualityScanRuleResult.Eva" + + "luationType\022\026\n\016rule_dimension\030\007 \001(\t\022\031\n\021t" + + "hreshold_percent\030\010 \001(\001\022J\n\006result\030\t \001(\0162:" + + ".google.cloud.dataplex.v1.DataQualitySca" + + "nRuleResult.Result\022\033\n\023evaluated_row_coun" + + "t\030\n \001(\003\022\030\n\020passed_row_count\030\013 \001(\003\022\026\n\016nul" + + "l_row_count\030\014 \001(\003\"\377\001\n\010RuleType\022\031\n\025RULE_T" + + "YPE_UNSPECIFIED\020\000\022\030\n\024NON_NULL_EXPECTATIO" + + "N\020\001\022\025\n\021RANGE_EXPECTATION\020\002\022\025\n\021REGEX_EXPE" + + "CTATION\020\003\022\035\n\031ROW_CONDITION_EXPECTATION\020\004" + + "\022\023\n\017SET_EXPECTATION\020\005\022\037\n\033STATISTIC_RANGE" + + "_EXPECTATION\020\006\022\037\n\033TABLE_CONDITION_EXPECT" + + "ATION\020\007\022\032\n\026UNIQUENESS_EXPECTATION\020\010\"M\n\016E" + + "valuationType\022\037\n\033EVALUATION_TYPE_UNSPECI" + + "FIED\020\000\022\013\n\007PER_ROW\020\001\022\r\n\tAGGREGATE\020\002\"8\n\006Re" + + "sult\022\026\n\022RESULT_UNSPECIFIED\020\000\022\n\n\006PASSED\020\001" + + "\022\n\n\006FAILED\020\002Be\n\034com.google.cloud.dataple" + + "x.v1B\tLogsProtoP\001Z8cloud.google.com/go/d" + + "ataplex/apiv1/dataplexpb;dataplexpbb\006pro" + + "to3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -269,6 +339,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Type", "Service", "ServiceJob", + "ExecutionTrigger", }); internal_static_google_cloud_dataplex_v1_SessionEvent_descriptor = getDescriptor().getMessageTypes().get(2); @@ -302,6 +373,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "DataSource", "JobId", + "CreateTime", "StartTime", "EndTime", "Type", @@ -312,7 +384,11 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Scope", "DataProfile", "DataQuality", + "DataProfileConfigs", + "DataQualityConfigs", + "PostScanActionsResult", "Result", + "AppliedConfigs", }); internal_static_google_cloud_dataplex_v1_DataScanEvent_DataProfileResult_descriptor = internal_static_google_cloud_dataplex_v1_DataScanEvent_descriptor.getNestedTypes().get(0); @@ -340,6 +416,59 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_dataplex_v1_DataScanEvent_DataProfileAppliedConfigs_descriptor = + internal_static_google_cloud_dataplex_v1_DataScanEvent_descriptor.getNestedTypes().get(2); + internal_static_google_cloud_dataplex_v1_DataScanEvent_DataProfileAppliedConfigs_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_DataScanEvent_DataProfileAppliedConfigs_descriptor, + new java.lang.String[] { + "SamplingPercent", "RowFilterApplied", "ColumnFilterApplied", + }); + internal_static_google_cloud_dataplex_v1_DataScanEvent_DataQualityAppliedConfigs_descriptor = + internal_static_google_cloud_dataplex_v1_DataScanEvent_descriptor.getNestedTypes().get(3); + internal_static_google_cloud_dataplex_v1_DataScanEvent_DataQualityAppliedConfigs_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_DataScanEvent_DataQualityAppliedConfigs_descriptor, + new java.lang.String[] { + "SamplingPercent", "RowFilterApplied", + }); + internal_static_google_cloud_dataplex_v1_DataScanEvent_PostScanActionsResult_descriptor = + internal_static_google_cloud_dataplex_v1_DataScanEvent_descriptor.getNestedTypes().get(4); + internal_static_google_cloud_dataplex_v1_DataScanEvent_PostScanActionsResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_DataScanEvent_PostScanActionsResult_descriptor, + new java.lang.String[] { + "BigqueryExportResult", + }); + internal_static_google_cloud_dataplex_v1_DataScanEvent_PostScanActionsResult_BigQueryExportResult_descriptor = + internal_static_google_cloud_dataplex_v1_DataScanEvent_PostScanActionsResult_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_dataplex_v1_DataScanEvent_PostScanActionsResult_BigQueryExportResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_DataScanEvent_PostScanActionsResult_BigQueryExportResult_descriptor, + new java.lang.String[] { + "State", "Message", + }); + internal_static_google_cloud_dataplex_v1_DataQualityScanRuleResult_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_dataplex_v1_DataQualityScanRuleResult_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_DataQualityScanRuleResult_descriptor, + new java.lang.String[] { + "JobId", + "DataSource", + "Column", + "RuleName", + "RuleType", + "EvalutionType", + "RuleDimension", + "ThresholdPercent", + "Result", + "EvaluatedRowCount", + "PassedRowCount", + "NullRowCount", + }); com.google.api.ResourceProto.getDescriptor(); com.google.protobuf.DurationProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ResourceAccessSpec.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ResourceAccessSpec.java new file mode 100644 index 000000000000..499452ba92ac --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ResourceAccessSpec.java @@ -0,0 +1,1303 @@ +/* + * Copyright 2023 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/dataplex/v1/security.proto + +package com.google.cloud.dataplex.v1; + +/** + * + * + *
+ * ResourceAccessSpec holds the access control configuration to be enforced
+ * on the resources, for example, Cloud Storage bucket, BigQuery dataset,
+ * BigQuery table.
+ * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.ResourceAccessSpec} + */ +public final class ResourceAccessSpec extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.ResourceAccessSpec) + ResourceAccessSpecOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResourceAccessSpec.newBuilder() to construct. + private ResourceAccessSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ResourceAccessSpec() { + readers_ = com.google.protobuf.LazyStringArrayList.emptyList(); + writers_ = com.google.protobuf.LazyStringArrayList.emptyList(); + owners_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ResourceAccessSpec(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.SecurityProto + .internal_static_google_cloud_dataplex_v1_ResourceAccessSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.SecurityProto + .internal_static_google_cloud_dataplex_v1_ResourceAccessSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.ResourceAccessSpec.class, + com.google.cloud.dataplex.v1.ResourceAccessSpec.Builder.class); + } + + public static final int READERS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList readers_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Optional. The format of strings follows the pattern followed by IAM in the
+   * bindings. user:{email}, serviceAccount:{email} group:{email}.
+   * The set of principals to be granted reader role on the resource.
+   * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the readers. + */ + public com.google.protobuf.ProtocolStringList getReadersList() { + return readers_; + } + /** + * + * + *
+   * Optional. The format of strings follows the pattern followed by IAM in the
+   * bindings. user:{email}, serviceAccount:{email} group:{email}.
+   * The set of principals to be granted reader role on the resource.
+   * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of readers. + */ + public int getReadersCount() { + return readers_.size(); + } + /** + * + * + *
+   * Optional. The format of strings follows the pattern followed by IAM in the
+   * bindings. user:{email}, serviceAccount:{email} group:{email}.
+   * The set of principals to be granted reader role on the resource.
+   * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The readers at the given index. + */ + public java.lang.String getReaders(int index) { + return readers_.get(index); + } + /** + * + * + *
+   * Optional. The format of strings follows the pattern followed by IAM in the
+   * bindings. user:{email}, serviceAccount:{email} group:{email}.
+   * The set of principals to be granted reader role on the resource.
+   * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the readers at the given index. + */ + public com.google.protobuf.ByteString getReadersBytes(int index) { + return readers_.getByteString(index); + } + + public static final int WRITERS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList writers_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Optional. The set of principals to be granted writer role on the resource.
+   * 
+ * + * repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the writers. + */ + public com.google.protobuf.ProtocolStringList getWritersList() { + return writers_; + } + /** + * + * + *
+   * Optional. The set of principals to be granted writer role on the resource.
+   * 
+ * + * repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of writers. + */ + public int getWritersCount() { + return writers_.size(); + } + /** + * + * + *
+   * Optional. The set of principals to be granted writer role on the resource.
+   * 
+ * + * repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The writers at the given index. + */ + public java.lang.String getWriters(int index) { + return writers_.get(index); + } + /** + * + * + *
+   * Optional. The set of principals to be granted writer role on the resource.
+   * 
+ * + * repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the writers at the given index. + */ + public com.google.protobuf.ByteString getWritersBytes(int index) { + return writers_.getByteString(index); + } + + public static final int OWNERS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList owners_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+   * Optional. The set of principals to be granted owner role on the resource.
+   * 
+ * + * repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the owners. + */ + public com.google.protobuf.ProtocolStringList getOwnersList() { + return owners_; + } + /** + * + * + *
+   * Optional. The set of principals to be granted owner role on the resource.
+   * 
+ * + * repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of owners. + */ + public int getOwnersCount() { + return owners_.size(); + } + /** + * + * + *
+   * Optional. The set of principals to be granted owner role on the resource.
+   * 
+ * + * repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The owners at the given index. + */ + public java.lang.String getOwners(int index) { + return owners_.get(index); + } + /** + * + * + *
+   * Optional. The set of principals to be granted owner role on the resource.
+   * 
+ * + * repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the owners at the given index. + */ + public com.google.protobuf.ByteString getOwnersBytes(int index) { + return owners_.getByteString(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 { + for (int i = 0; i < readers_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, readers_.getRaw(i)); + } + for (int i = 0; i < writers_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, writers_.getRaw(i)); + } + for (int i = 0; i < owners_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, owners_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < readers_.size(); i++) { + dataSize += computeStringSizeNoTag(readers_.getRaw(i)); + } + size += dataSize; + size += 1 * getReadersList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < writers_.size(); i++) { + dataSize += computeStringSizeNoTag(writers_.getRaw(i)); + } + size += dataSize; + size += 1 * getWritersList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < owners_.size(); i++) { + dataSize += computeStringSizeNoTag(owners_.getRaw(i)); + } + size += dataSize; + size += 1 * getOwnersList().size(); + } + 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.dataplex.v1.ResourceAccessSpec)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.ResourceAccessSpec other = + (com.google.cloud.dataplex.v1.ResourceAccessSpec) obj; + + if (!getReadersList().equals(other.getReadersList())) return false; + if (!getWritersList().equals(other.getWritersList())) return false; + if (!getOwnersList().equals(other.getOwnersList())) 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 (getReadersCount() > 0) { + hash = (37 * hash) + READERS_FIELD_NUMBER; + hash = (53 * hash) + getReadersList().hashCode(); + } + if (getWritersCount() > 0) { + hash = (37 * hash) + WRITERS_FIELD_NUMBER; + hash = (53 * hash) + getWritersList().hashCode(); + } + if (getOwnersCount() > 0) { + hash = (37 * hash) + OWNERS_FIELD_NUMBER; + hash = (53 * hash) + getOwnersList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.ResourceAccessSpec parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.ResourceAccessSpec 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.dataplex.v1.ResourceAccessSpec parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.ResourceAccessSpec 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.dataplex.v1.ResourceAccessSpec parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.ResourceAccessSpec parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.ResourceAccessSpec parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.ResourceAccessSpec 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.dataplex.v1.ResourceAccessSpec parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.ResourceAccessSpec 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.dataplex.v1.ResourceAccessSpec parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.ResourceAccessSpec 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.dataplex.v1.ResourceAccessSpec 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; + } + /** + * + * + *
+   * ResourceAccessSpec holds the access control configuration to be enforced
+   * on the resources, for example, Cloud Storage bucket, BigQuery dataset,
+   * BigQuery table.
+   * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.ResourceAccessSpec} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.ResourceAccessSpec) + com.google.cloud.dataplex.v1.ResourceAccessSpecOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.SecurityProto + .internal_static_google_cloud_dataplex_v1_ResourceAccessSpec_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.SecurityProto + .internal_static_google_cloud_dataplex_v1_ResourceAccessSpec_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.ResourceAccessSpec.class, + com.google.cloud.dataplex.v1.ResourceAccessSpec.Builder.class); + } + + // Construct using com.google.cloud.dataplex.v1.ResourceAccessSpec.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + readers_ = com.google.protobuf.LazyStringArrayList.emptyList(); + writers_ = com.google.protobuf.LazyStringArrayList.emptyList(); + owners_ = com.google.protobuf.LazyStringArrayList.emptyList(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.SecurityProto + .internal_static_google_cloud_dataplex_v1_ResourceAccessSpec_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.ResourceAccessSpec getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.ResourceAccessSpec.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.ResourceAccessSpec build() { + com.google.cloud.dataplex.v1.ResourceAccessSpec result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.ResourceAccessSpec buildPartial() { + com.google.cloud.dataplex.v1.ResourceAccessSpec result = + new com.google.cloud.dataplex.v1.ResourceAccessSpec(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dataplex.v1.ResourceAccessSpec result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + readers_.makeImmutable(); + result.readers_ = readers_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + writers_.makeImmutable(); + result.writers_ = writers_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + owners_.makeImmutable(); + result.owners_ = owners_; + } + } + + @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.dataplex.v1.ResourceAccessSpec) { + return mergeFrom((com.google.cloud.dataplex.v1.ResourceAccessSpec) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataplex.v1.ResourceAccessSpec other) { + if (other == com.google.cloud.dataplex.v1.ResourceAccessSpec.getDefaultInstance()) + return this; + if (!other.readers_.isEmpty()) { + if (readers_.isEmpty()) { + readers_ = other.readers_; + bitField0_ |= 0x00000001; + } else { + ensureReadersIsMutable(); + readers_.addAll(other.readers_); + } + onChanged(); + } + if (!other.writers_.isEmpty()) { + if (writers_.isEmpty()) { + writers_ = other.writers_; + bitField0_ |= 0x00000002; + } else { + ensureWritersIsMutable(); + writers_.addAll(other.writers_); + } + onChanged(); + } + if (!other.owners_.isEmpty()) { + if (owners_.isEmpty()) { + owners_ = other.owners_; + bitField0_ |= 0x00000004; + } else { + ensureOwnersIsMutable(); + owners_.addAll(other.owners_); + } + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureReadersIsMutable(); + readers_.add(s); + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureWritersIsMutable(); + writers_.add(s); + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureOwnersIsMutable(); + owners_.add(s); + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList readers_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureReadersIsMutable() { + if (!readers_.isModifiable()) { + readers_ = new com.google.protobuf.LazyStringArrayList(readers_); + } + bitField0_ |= 0x00000001; + } + /** + * + * + *
+     * Optional. The format of strings follows the pattern followed by IAM in the
+     * bindings. user:{email}, serviceAccount:{email} group:{email}.
+     * The set of principals to be granted reader role on the resource.
+     * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the readers. + */ + public com.google.protobuf.ProtocolStringList getReadersList() { + readers_.makeImmutable(); + return readers_; + } + /** + * + * + *
+     * Optional. The format of strings follows the pattern followed by IAM in the
+     * bindings. user:{email}, serviceAccount:{email} group:{email}.
+     * The set of principals to be granted reader role on the resource.
+     * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of readers. + */ + public int getReadersCount() { + return readers_.size(); + } + /** + * + * + *
+     * Optional. The format of strings follows the pattern followed by IAM in the
+     * bindings. user:{email}, serviceAccount:{email} group:{email}.
+     * The set of principals to be granted reader role on the resource.
+     * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The readers at the given index. + */ + public java.lang.String getReaders(int index) { + return readers_.get(index); + } + /** + * + * + *
+     * Optional. The format of strings follows the pattern followed by IAM in the
+     * bindings. user:{email}, serviceAccount:{email} group:{email}.
+     * The set of principals to be granted reader role on the resource.
+     * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the readers at the given index. + */ + public com.google.protobuf.ByteString getReadersBytes(int index) { + return readers_.getByteString(index); + } + /** + * + * + *
+     * Optional. The format of strings follows the pattern followed by IAM in the
+     * bindings. user:{email}, serviceAccount:{email} group:{email}.
+     * The set of principals to be granted reader role on the resource.
+     * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The readers to set. + * @return This builder for chaining. + */ + public Builder setReaders(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReadersIsMutable(); + readers_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The format of strings follows the pattern followed by IAM in the
+     * bindings. user:{email}, serviceAccount:{email} group:{email}.
+     * The set of principals to be granted reader role on the resource.
+     * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The readers to add. + * @return This builder for chaining. + */ + public Builder addReaders(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureReadersIsMutable(); + readers_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The format of strings follows the pattern followed by IAM in the
+     * bindings. user:{email}, serviceAccount:{email} group:{email}.
+     * The set of principals to be granted reader role on the resource.
+     * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The readers to add. + * @return This builder for chaining. + */ + public Builder addAllReaders(java.lang.Iterable values) { + ensureReadersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, readers_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The format of strings follows the pattern followed by IAM in the
+     * bindings. user:{email}, serviceAccount:{email} group:{email}.
+     * The set of principals to be granted reader role on the resource.
+     * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearReaders() { + readers_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The format of strings follows the pattern followed by IAM in the
+     * bindings. user:{email}, serviceAccount:{email} group:{email}.
+     * The set of principals to be granted reader role on the resource.
+     * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the readers to add. + * @return This builder for chaining. + */ + public Builder addReadersBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureReadersIsMutable(); + readers_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList writers_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureWritersIsMutable() { + if (!writers_.isModifiable()) { + writers_ = new com.google.protobuf.LazyStringArrayList(writers_); + } + bitField0_ |= 0x00000002; + } + /** + * + * + *
+     * Optional. The set of principals to be granted writer role on the resource.
+     * 
+ * + * repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the writers. + */ + public com.google.protobuf.ProtocolStringList getWritersList() { + writers_.makeImmutable(); + return writers_; + } + /** + * + * + *
+     * Optional. The set of principals to be granted writer role on the resource.
+     * 
+ * + * repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of writers. + */ + public int getWritersCount() { + return writers_.size(); + } + /** + * + * + *
+     * Optional. The set of principals to be granted writer role on the resource.
+     * 
+ * + * repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The writers at the given index. + */ + public java.lang.String getWriters(int index) { + return writers_.get(index); + } + /** + * + * + *
+     * Optional. The set of principals to be granted writer role on the resource.
+     * 
+ * + * repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the writers at the given index. + */ + public com.google.protobuf.ByteString getWritersBytes(int index) { + return writers_.getByteString(index); + } + /** + * + * + *
+     * Optional. The set of principals to be granted writer role on the resource.
+     * 
+ * + * repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The writers to set. + * @return This builder for chaining. + */ + public Builder setWriters(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureWritersIsMutable(); + writers_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The set of principals to be granted writer role on the resource.
+     * 
+ * + * repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The writers to add. + * @return This builder for chaining. + */ + public Builder addWriters(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureWritersIsMutable(); + writers_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The set of principals to be granted writer role on the resource.
+     * 
+ * + * repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The writers to add. + * @return This builder for chaining. + */ + public Builder addAllWriters(java.lang.Iterable values) { + ensureWritersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, writers_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The set of principals to be granted writer role on the resource.
+     * 
+ * + * repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearWriters() { + writers_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The set of principals to be granted writer role on the resource.
+     * 
+ * + * repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the writers to add. + * @return This builder for chaining. + */ + public Builder addWritersBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureWritersIsMutable(); + writers_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList owners_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + + private void ensureOwnersIsMutable() { + if (!owners_.isModifiable()) { + owners_ = new com.google.protobuf.LazyStringArrayList(owners_); + } + bitField0_ |= 0x00000004; + } + /** + * + * + *
+     * Optional. The set of principals to be granted owner role on the resource.
+     * 
+ * + * repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the owners. + */ + public com.google.protobuf.ProtocolStringList getOwnersList() { + owners_.makeImmutable(); + return owners_; + } + /** + * + * + *
+     * Optional. The set of principals to be granted owner role on the resource.
+     * 
+ * + * repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of owners. + */ + public int getOwnersCount() { + return owners_.size(); + } + /** + * + * + *
+     * Optional. The set of principals to be granted owner role on the resource.
+     * 
+ * + * repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The owners at the given index. + */ + public java.lang.String getOwners(int index) { + return owners_.get(index); + } + /** + * + * + *
+     * Optional. The set of principals to be granted owner role on the resource.
+     * 
+ * + * repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the owners at the given index. + */ + public com.google.protobuf.ByteString getOwnersBytes(int index) { + return owners_.getByteString(index); + } + /** + * + * + *
+     * Optional. The set of principals to be granted owner role on the resource.
+     * 
+ * + * repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index to set the value at. + * @param value The owners to set. + * @return This builder for chaining. + */ + public Builder setOwners(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOwnersIsMutable(); + owners_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The set of principals to be granted owner role on the resource.
+     * 
+ * + * repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The owners to add. + * @return This builder for chaining. + */ + public Builder addOwners(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureOwnersIsMutable(); + owners_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The set of principals to be granted owner role on the resource.
+     * 
+ * + * repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param values The owners to add. + * @return This builder for chaining. + */ + public Builder addAllOwners(java.lang.Iterable values) { + ensureOwnersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, owners_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The set of principals to be granted owner role on the resource.
+     * 
+ * + * repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOwners() { + owners_ = com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + ; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The set of principals to be granted owner role on the resource.
+     * 
+ * + * repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes of the owners to add. + * @return This builder for chaining. + */ + public Builder addOwnersBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureOwnersIsMutable(); + owners_.add(value); + bitField0_ |= 0x00000004; + 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.dataplex.v1.ResourceAccessSpec) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.ResourceAccessSpec) + private static final com.google.cloud.dataplex.v1.ResourceAccessSpec DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.ResourceAccessSpec(); + } + + public static com.google.cloud.dataplex.v1.ResourceAccessSpec getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResourceAccessSpec 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.dataplex.v1.ResourceAccessSpec getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ResourceAccessSpecOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ResourceAccessSpecOrBuilder.java new file mode 100644 index 000000000000..3bcb9bd52428 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ResourceAccessSpecOrBuilder.java @@ -0,0 +1,186 @@ +/* + * Copyright 2023 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/dataplex/v1/security.proto + +package com.google.cloud.dataplex.v1; + +public interface ResourceAccessSpecOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.ResourceAccessSpec) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. The format of strings follows the pattern followed by IAM in the
+   * bindings. user:{email}, serviceAccount:{email} group:{email}.
+   * The set of principals to be granted reader role on the resource.
+   * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the readers. + */ + java.util.List getReadersList(); + /** + * + * + *
+   * Optional. The format of strings follows the pattern followed by IAM in the
+   * bindings. user:{email}, serviceAccount:{email} group:{email}.
+   * The set of principals to be granted reader role on the resource.
+   * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of readers. + */ + int getReadersCount(); + /** + * + * + *
+   * Optional. The format of strings follows the pattern followed by IAM in the
+   * bindings. user:{email}, serviceAccount:{email} group:{email}.
+   * The set of principals to be granted reader role on the resource.
+   * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The readers at the given index. + */ + java.lang.String getReaders(int index); + /** + * + * + *
+   * Optional. The format of strings follows the pattern followed by IAM in the
+   * bindings. user:{email}, serviceAccount:{email} group:{email}.
+   * The set of principals to be granted reader role on the resource.
+   * 
+ * + * repeated string readers = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the readers at the given index. + */ + com.google.protobuf.ByteString getReadersBytes(int index); + + /** + * + * + *
+   * Optional. The set of principals to be granted writer role on the resource.
+   * 
+ * + * repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the writers. + */ + java.util.List getWritersList(); + /** + * + * + *
+   * Optional. The set of principals to be granted writer role on the resource.
+   * 
+ * + * repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of writers. + */ + int getWritersCount(); + /** + * + * + *
+   * Optional. The set of principals to be granted writer role on the resource.
+   * 
+ * + * repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The writers at the given index. + */ + java.lang.String getWriters(int index); + /** + * + * + *
+   * Optional. The set of principals to be granted writer role on the resource.
+   * 
+ * + * repeated string writers = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the writers at the given index. + */ + com.google.protobuf.ByteString getWritersBytes(int index); + + /** + * + * + *
+   * Optional. The set of principals to be granted owner role on the resource.
+   * 
+ * + * repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return A list containing the owners. + */ + java.util.List getOwnersList(); + /** + * + * + *
+   * Optional. The set of principals to be granted owner role on the resource.
+   * 
+ * + * repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The count of owners. + */ + int getOwnersCount(); + /** + * + * + *
+   * Optional. The set of principals to be granted owner role on the resource.
+   * 
+ * + * repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the element to return. + * @return The owners at the given index. + */ + java.lang.String getOwners(int index); + /** + * + * + *
+   * Optional. The set of principals to be granted owner role on the resource.
+   * 
+ * + * repeated string owners = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param index The index of the value to return. + * @return The bytes of the owners at the given index. + */ + com.google.protobuf.ByteString getOwnersBytes(int index); +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/RunTaskRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/RunTaskRequest.java index 7e862fbef04e..0cafcbe8dc62 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/RunTaskRequest.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/RunTaskRequest.java @@ -44,6 +44,19 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { .internal_static_google_cloud_dataplex_v1_RunTaskRequest_descriptor; } + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetLabels(); + case 4: + return internalGetArgs(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { @@ -111,6 +124,258 @@ public com.google.protobuf.ByteString getNameBytes() { } } + public static final int LABELS_FIELD_NUMBER = 3; + + private static final class LabelsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.dataplex.v1.ServiceProto + .internal_static_google_cloud_dataplex_v1_RunTaskRequest_LabelsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+   * Optional. User-defined labels for the task. If the map is left empty, the
+   * task will run with existing labels from task definition. If the map
+   * contains an entry with a new key, the same will be added to existing set of
+   * labels. If the map contains an entry with an existing label key in task
+   * definition, the task will run with new label value for that entry. Clearing
+   * an existing label will require label value to be explicitly set to a hyphen
+   * "-". The label value cannot be empty.
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+   * Optional. User-defined labels for the task. If the map is left empty, the
+   * task will run with existing labels from task definition. If the map
+   * contains an entry with a new key, the same will be added to existing set of
+   * labels. If the map contains an entry with an existing label key in task
+   * definition, the task will run with new label value for that entry. Clearing
+   * an existing label will require label value to be explicitly set to a hyphen
+   * "-". The label value cannot be empty.
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+   * Optional. User-defined labels for the task. If the map is left empty, the
+   * task will run with existing labels from task definition. If the map
+   * contains an entry with a new key, the same will be added to existing set of
+   * labels. If the map contains an entry with an existing label key in task
+   * definition, the task will run with new label value for that entry. Clearing
+   * an existing label will require label value to be explicitly set to a hyphen
+   * "-". The label value cannot be empty.
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. User-defined labels for the task. If the map is left empty, the
+   * task will run with existing labels from task definition. If the map
+   * contains an entry with a new key, the same will be added to existing set of
+   * labels. If the map contains an entry with an existing label key in task
+   * definition, the task will run with new label value for that entry. Clearing
+   * an existing label will require label value to be explicitly set to a hyphen
+   * "-". The label value cannot be empty.
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ARGS_FIELD_NUMBER = 4; + + private static final class ArgsDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.cloud.dataplex.v1.ServiceProto + .internal_static_google_cloud_dataplex_v1_RunTaskRequest_ArgsEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + + @SuppressWarnings("serial") + private com.google.protobuf.MapField args_; + + private com.google.protobuf.MapField internalGetArgs() { + if (args_ == null) { + return com.google.protobuf.MapField.emptyMapField(ArgsDefaultEntryHolder.defaultEntry); + } + return args_; + } + + public int getArgsCount() { + return internalGetArgs().getMap().size(); + } + /** + * + * + *
+   * Optional. Execution spec arguments. If the map is left empty, the task will
+   * run with existing execution spec args from task definition. If the map
+   * contains an entry with a new key, the same will be added to existing set of
+   * args. If the map contains an entry with an existing arg key in task
+   * definition, the task will run with new arg value for that entry. Clearing
+   * an existing arg will require arg value to be explicitly set to a hyphen
+   * "-". The arg value cannot be empty.
+   * 
+ * + * map<string, string> args = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsArgs(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetArgs().getMap().containsKey(key); + } + /** Use {@link #getArgsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getArgs() { + return getArgsMap(); + } + /** + * + * + *
+   * Optional. Execution spec arguments. If the map is left empty, the task will
+   * run with existing execution spec args from task definition. If the map
+   * contains an entry with a new key, the same will be added to existing set of
+   * args. If the map contains an entry with an existing arg key in task
+   * definition, the task will run with new arg value for that entry. Clearing
+   * an existing arg will require arg value to be explicitly set to a hyphen
+   * "-". The arg value cannot be empty.
+   * 
+ * + * map<string, string> args = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getArgsMap() { + return internalGetArgs().getMap(); + } + /** + * + * + *
+   * Optional. Execution spec arguments. If the map is left empty, the task will
+   * run with existing execution spec args from task definition. If the map
+   * contains an entry with a new key, the same will be added to existing set of
+   * args. If the map contains an entry with an existing arg key in task
+   * definition, the task will run with new arg value for that entry. Clearing
+   * an existing arg will require arg value to be explicitly set to a hyphen
+   * "-". The arg value cannot be empty.
+   * 
+ * + * map<string, string> args = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getArgsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetArgs().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. Execution spec arguments. If the map is left empty, the task will
+   * run with existing execution spec args from task definition. If the map
+   * contains an entry with a new key, the same will be added to existing set of
+   * args. If the map contains an entry with an existing arg key in task
+   * definition, the task will run with new arg value for that entry. Clearing
+   * an existing arg will require arg value to be explicitly set to a hyphen
+   * "-". The arg value cannot be empty.
+   * 
+ * + * map<string, string> args = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getArgsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetArgs().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -128,6 +393,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 3); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetArgs(), ArgsDefaultEntryHolder.defaultEntry, 4); getUnknownFields().writeTo(output); } @@ -140,6 +409,26 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } + for (java.util.Map.Entry entry : + internalGetLabels().getMap().entrySet()) { + com.google.protobuf.MapEntry labels__ = + LabelsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, labels__); + } + for (java.util.Map.Entry entry : + internalGetArgs().getMap().entrySet()) { + com.google.protobuf.MapEntry args__ = + ArgsDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, args__); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -157,6 +446,8 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.dataplex.v1.RunTaskRequest) obj; if (!getName().equals(other.getName())) return false; + if (!internalGetLabels().equals(other.internalGetLabels())) return false; + if (!internalGetArgs().equals(other.internalGetArgs())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -170,6 +461,14 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); + if (!internalGetLabels().getMap().isEmpty()) { + hash = (37 * hash) + LABELS_FIELD_NUMBER; + hash = (53 * hash) + internalGetLabels().hashCode(); + } + if (!internalGetArgs().getMap().isEmpty()) { + hash = (37 * hash) + ARGS_FIELD_NUMBER; + hash = (53 * hash) + internalGetArgs().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -280,6 +579,30 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { .internal_static_google_cloud_dataplex_v1_RunTaskRequest_descriptor; } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetLabels(); + case 4: + return internalGetArgs(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 3: + return internalGetMutableLabels(); + case 4: + return internalGetMutableArgs(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { @@ -302,6 +625,8 @@ public Builder clear() { super.clear(); bitField0_ = 0; name_ = ""; + internalGetMutableLabels().clear(); + internalGetMutableArgs().clear(); return this; } @@ -341,6 +666,14 @@ private void buildPartial0(com.google.cloud.dataplex.v1.RunTaskRequest result) { if (((from_bitField0_ & 0x00000001) != 0)) { result.name_ = name_; } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.labels_ = internalGetLabels(); + result.labels_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.args_ = internalGetArgs(); + result.args_.makeImmutable(); + } } @java.lang.Override @@ -393,6 +726,10 @@ public Builder mergeFrom(com.google.cloud.dataplex.v1.RunTaskRequest other) { bitField0_ |= 0x00000001; onChanged(); } + internalGetMutableLabels().mergeFrom(other.internalGetLabels()); + bitField0_ |= 0x00000002; + internalGetMutableArgs().mergeFrom(other.internalGetArgs()); + bitField0_ |= 0x00000004; this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -425,6 +762,27 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 10 + case 26: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 26 + case 34: + { + com.google.protobuf.MapEntry args__ = + input.readMessage( + ArgsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableArgs().getMutableMap().put(args__.getKey(), args__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -565,6 +923,416 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { return this; } + private com.google.protobuf.MapField labels_; + + private com.google.protobuf.MapField internalGetLabels() { + if (labels_ == null) { + return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); + } + return labels_; + } + + private com.google.protobuf.MapField + internalGetMutableLabels() { + if (labels_ == null) { + labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); + } + if (!labels_.isMutable()) { + labels_ = labels_.copy(); + } + bitField0_ |= 0x00000002; + onChanged(); + return labels_; + } + + public int getLabelsCount() { + return internalGetLabels().getMap().size(); + } + /** + * + * + *
+     * Optional. User-defined labels for the task. If the map is left empty, the
+     * task will run with existing labels from task definition. If the map
+     * contains an entry with a new key, the same will be added to existing set of
+     * labels. If the map contains an entry with an existing label key in task
+     * definition, the task will run with new label value for that entry. Clearing
+     * an existing label will require label value to be explicitly set to a hyphen
+     * "-". The label value cannot be empty.
+     * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetLabels().getMap().containsKey(key); + } + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getLabels() { + return getLabelsMap(); + } + /** + * + * + *
+     * Optional. User-defined labels for the task. If the map is left empty, the
+     * task will run with existing labels from task definition. If the map
+     * contains an entry with a new key, the same will be added to existing set of
+     * labels. If the map contains an entry with an existing label key in task
+     * definition, the task will run with new label value for that entry. Clearing
+     * an existing label will require label value to be explicitly set to a hyphen
+     * "-". The label value cannot be empty.
+     * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getLabelsMap() { + return internalGetLabels().getMap(); + } + /** + * + * + *
+     * Optional. User-defined labels for the task. If the map is left empty, the
+     * task will run with existing labels from task definition. If the map
+     * contains an entry with a new key, the same will be added to existing set of
+     * labels. If the map contains an entry with an existing label key in task
+     * definition, the task will run with new label value for that entry. Clearing
+     * an existing label will require label value to be explicitly set to a hyphen
+     * "-". The label value cannot be empty.
+     * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. User-defined labels for the task. If the map is left empty, the
+     * task will run with existing labels from task definition. If the map
+     * contains an entry with a new key, the same will be added to existing set of
+     * labels. If the map contains an entry with an existing label key in task
+     * definition, the task will run with new label value for that entry. Clearing
+     * an existing label will require label value to be explicitly set to a hyphen
+     * "-". The label value cannot be empty.
+     * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getLabelsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetLabels().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearLabels() { + bitField0_ = (bitField0_ & ~0x00000002); + internalGetMutableLabels().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. User-defined labels for the task. If the map is left empty, the
+     * task will run with existing labels from task definition. If the map
+     * contains an entry with a new key, the same will be added to existing set of
+     * labels. If the map contains an entry with an existing label key in task
+     * definition, the task will run with new label value for that entry. Clearing
+     * an existing label will require label value to be explicitly set to a hyphen
+     * "-". The label value cannot be empty.
+     * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeLabels(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableLabels().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableLabels() { + bitField0_ |= 0x00000002; + return internalGetMutableLabels().getMutableMap(); + } + /** + * + * + *
+     * Optional. User-defined labels for the task. If the map is left empty, the
+     * task will run with existing labels from task definition. If the map
+     * contains an entry with a new key, the same will be added to existing set of
+     * labels. If the map contains an entry with an existing label key in task
+     * definition, the task will run with new label value for that entry. Clearing
+     * an existing label will require label value to be explicitly set to a hyphen
+     * "-". The label value cannot be empty.
+     * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putLabels(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableLabels().getMutableMap().put(key, value); + bitField0_ |= 0x00000002; + return this; + } + /** + * + * + *
+     * Optional. User-defined labels for the task. If the map is left empty, the
+     * task will run with existing labels from task definition. If the map
+     * contains an entry with a new key, the same will be added to existing set of
+     * labels. If the map contains an entry with an existing label key in task
+     * definition, the task will run with new label value for that entry. Clearing
+     * an existing label will require label value to be explicitly set to a hyphen
+     * "-". The label value cannot be empty.
+     * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllLabels(java.util.Map values) { + internalGetMutableLabels().getMutableMap().putAll(values); + bitField0_ |= 0x00000002; + return this; + } + + private com.google.protobuf.MapField args_; + + private com.google.protobuf.MapField internalGetArgs() { + if (args_ == null) { + return com.google.protobuf.MapField.emptyMapField(ArgsDefaultEntryHolder.defaultEntry); + } + return args_; + } + + private com.google.protobuf.MapField + internalGetMutableArgs() { + if (args_ == null) { + args_ = com.google.protobuf.MapField.newMapField(ArgsDefaultEntryHolder.defaultEntry); + } + if (!args_.isMutable()) { + args_ = args_.copy(); + } + bitField0_ |= 0x00000004; + onChanged(); + return args_; + } + + public int getArgsCount() { + return internalGetArgs().getMap().size(); + } + /** + * + * + *
+     * Optional. Execution spec arguments. If the map is left empty, the task will
+     * run with existing execution spec args from task definition. If the map
+     * contains an entry with a new key, the same will be added to existing set of
+     * args. If the map contains an entry with an existing arg key in task
+     * definition, the task will run with new arg value for that entry. Clearing
+     * an existing arg will require arg value to be explicitly set to a hyphen
+     * "-". The arg value cannot be empty.
+     * 
+ * + * map<string, string> args = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public boolean containsArgs(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + return internalGetArgs().getMap().containsKey(key); + } + /** Use {@link #getArgsMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getArgs() { + return getArgsMap(); + } + /** + * + * + *
+     * Optional. Execution spec arguments. If the map is left empty, the task will
+     * run with existing execution spec args from task definition. If the map
+     * contains an entry with a new key, the same will be added to existing set of
+     * args. If the map contains an entry with an existing arg key in task
+     * definition, the task will run with new arg value for that entry. Clearing
+     * an existing arg will require arg value to be explicitly set to a hyphen
+     * "-". The arg value cannot be empty.
+     * 
+ * + * map<string, string> args = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.util.Map getArgsMap() { + return internalGetArgs().getMap(); + } + /** + * + * + *
+     * Optional. Execution spec arguments. If the map is left empty, the task will
+     * run with existing execution spec args from task definition. If the map
+     * contains an entry with a new key, the same will be added to existing set of
+     * args. If the map contains an entry with an existing arg key in task
+     * definition, the task will run with new arg value for that entry. Clearing
+     * an existing arg will require arg value to be explicitly set to a hyphen
+     * "-". The arg value cannot be empty.
+     * 
+ * + * map<string, string> args = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public /* nullable */ java.lang.String getArgsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetArgs().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. Execution spec arguments. If the map is left empty, the task will
+     * run with existing execution spec args from task definition. If the map
+     * contains an entry with a new key, the same will be added to existing set of
+     * args. If the map contains an entry with an existing arg key in task
+     * definition, the task will run with new arg value for that entry. Clearing
+     * an existing arg will require arg value to be explicitly set to a hyphen
+     * "-". The arg value cannot be empty.
+     * 
+ * + * map<string, string> args = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public java.lang.String getArgsOrThrow(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + java.util.Map map = internalGetArgs().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearArgs() { + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableArgs().getMutableMap().clear(); + return this; + } + /** + * + * + *
+     * Optional. Execution spec arguments. If the map is left empty, the task will
+     * run with existing execution spec args from task definition. If the map
+     * contains an entry with a new key, the same will be added to existing set of
+     * args. If the map contains an entry with an existing arg key in task
+     * definition, the task will run with new arg value for that entry. Clearing
+     * an existing arg will require arg value to be explicitly set to a hyphen
+     * "-". The arg value cannot be empty.
+     * 
+ * + * map<string, string> args = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder removeArgs(java.lang.String key) { + if (key == null) { + throw new NullPointerException("map key"); + } + internalGetMutableArgs().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutableArgs() { + bitField0_ |= 0x00000004; + return internalGetMutableArgs().getMutableMap(); + } + /** + * + * + *
+     * Optional. Execution spec arguments. If the map is left empty, the task will
+     * run with existing execution spec args from task definition. If the map
+     * contains an entry with a new key, the same will be added to existing set of
+     * args. If the map contains an entry with an existing arg key in task
+     * definition, the task will run with new arg value for that entry. Clearing
+     * an existing arg will require arg value to be explicitly set to a hyphen
+     * "-". The arg value cannot be empty.
+     * 
+ * + * map<string, string> args = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putArgs(java.lang.String key, java.lang.String value) { + if (key == null) { + throw new NullPointerException("map key"); + } + if (value == null) { + throw new NullPointerException("map value"); + } + internalGetMutableArgs().getMutableMap().put(key, value); + bitField0_ |= 0x00000004; + return this; + } + /** + * + * + *
+     * Optional. Execution spec arguments. If the map is left empty, the task will
+     * run with existing execution spec args from task definition. If the map
+     * contains an entry with a new key, the same will be added to existing set of
+     * args. If the map contains an entry with an existing arg key in task
+     * definition, the task will run with new arg value for that entry. Clearing
+     * an existing arg will require arg value to be explicitly set to a hyphen
+     * "-". The arg value cannot be empty.
+     * 
+ * + * map<string, string> args = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder putAllArgs(java.util.Map values) { + internalGetMutableArgs().getMutableMap().putAll(values); + bitField0_ |= 0x00000004; + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/RunTaskRequestOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/RunTaskRequestOrBuilder.java index cb6601f67b9a..8d081df16956 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/RunTaskRequestOrBuilder.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/RunTaskRequestOrBuilder.java @@ -53,4 +53,180 @@ public interface RunTaskRequestOrBuilder * @return The bytes for name. */ com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. User-defined labels for the task. If the map is left empty, the
+   * task will run with existing labels from task definition. If the map
+   * contains an entry with a new key, the same will be added to existing set of
+   * labels. If the map contains an entry with an existing label key in task
+   * definition, the task will run with new label value for that entry. Clearing
+   * an existing label will require label value to be explicitly set to a hyphen
+   * "-". The label value cannot be empty.
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getLabelsCount(); + /** + * + * + *
+   * Optional. User-defined labels for the task. If the map is left empty, the
+   * task will run with existing labels from task definition. If the map
+   * contains an entry with a new key, the same will be added to existing set of
+   * labels. If the map contains an entry with an existing label key in task
+   * definition, the task will run with new label value for that entry. Clearing
+   * an existing label will require label value to be explicitly set to a hyphen
+   * "-". The label value cannot be empty.
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsLabels(java.lang.String key); + /** Use {@link #getLabelsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getLabels(); + /** + * + * + *
+   * Optional. User-defined labels for the task. If the map is left empty, the
+   * task will run with existing labels from task definition. If the map
+   * contains an entry with a new key, the same will be added to existing set of
+   * labels. If the map contains an entry with an existing label key in task
+   * definition, the task will run with new label value for that entry. Clearing
+   * an existing label will require label value to be explicitly set to a hyphen
+   * "-". The label value cannot be empty.
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getLabelsMap(); + /** + * + * + *
+   * Optional. User-defined labels for the task. If the map is left empty, the
+   * task will run with existing labels from task definition. If the map
+   * contains an entry with a new key, the same will be added to existing set of
+   * labels. If the map contains an entry with an existing label key in task
+   * definition, the task will run with new label value for that entry. Clearing
+   * an existing label will require label value to be explicitly set to a hyphen
+   * "-". The label value cannot be empty.
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getLabelsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. User-defined labels for the task. If the map is left empty, the
+   * task will run with existing labels from task definition. If the map
+   * contains an entry with a new key, the same will be added to existing set of
+   * labels. If the map contains an entry with an existing label key in task
+   * definition, the task will run with new label value for that entry. Clearing
+   * an existing label will require label value to be explicitly set to a hyphen
+   * "-". The label value cannot be empty.
+   * 
+ * + * map<string, string> labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getLabelsOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. Execution spec arguments. If the map is left empty, the task will
+   * run with existing execution spec args from task definition. If the map
+   * contains an entry with a new key, the same will be added to existing set of
+   * args. If the map contains an entry with an existing arg key in task
+   * definition, the task will run with new arg value for that entry. Clearing
+   * an existing arg will require arg value to be explicitly set to a hyphen
+   * "-". The arg value cannot be empty.
+   * 
+ * + * map<string, string> args = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + int getArgsCount(); + /** + * + * + *
+   * Optional. Execution spec arguments. If the map is left empty, the task will
+   * run with existing execution spec args from task definition. If the map
+   * contains an entry with a new key, the same will be added to existing set of
+   * args. If the map contains an entry with an existing arg key in task
+   * definition, the task will run with new arg value for that entry. Clearing
+   * an existing arg will require arg value to be explicitly set to a hyphen
+   * "-". The arg value cannot be empty.
+   * 
+ * + * map<string, string> args = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + boolean containsArgs(java.lang.String key); + /** Use {@link #getArgsMap()} instead. */ + @java.lang.Deprecated + java.util.Map getArgs(); + /** + * + * + *
+   * Optional. Execution spec arguments. If the map is left empty, the task will
+   * run with existing execution spec args from task definition. If the map
+   * contains an entry with a new key, the same will be added to existing set of
+   * args. If the map contains an entry with an existing arg key in task
+   * definition, the task will run with new arg value for that entry. Clearing
+   * an existing arg will require arg value to be explicitly set to a hyphen
+   * "-". The arg value cannot be empty.
+   * 
+ * + * map<string, string> args = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.util.Map getArgsMap(); + /** + * + * + *
+   * Optional. Execution spec arguments. If the map is left empty, the task will
+   * run with existing execution spec args from task definition. If the map
+   * contains an entry with a new key, the same will be added to existing set of
+   * args. If the map contains an entry with an existing arg key in task
+   * definition, the task will run with new arg value for that entry. Clearing
+   * an existing arg will require arg value to be explicitly set to a hyphen
+   * "-". The arg value cannot be empty.
+   * 
+ * + * map<string, string> args = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + /* nullable */ + java.lang.String getArgsOrDefault( + java.lang.String key, + /* nullable */ + java.lang.String defaultValue); + /** + * + * + *
+   * Optional. Execution spec arguments. If the map is left empty, the task will
+   * run with existing execution spec args from task definition. If the map
+   * contains an entry with a new key, the same will be added to existing set of
+   * args. If the map contains an entry with an existing arg key in task
+   * definition, the task will run with new arg value for that entry. Clearing
+   * an existing arg will require arg value to be explicitly set to a hyphen
+   * "-". The arg value cannot be empty.
+   * 
+ * + * map<string, string> args = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + java.lang.String getArgsOrThrow(java.lang.String key); } diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/SecurityProto.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/SecurityProto.java new file mode 100644 index 000000000000..1f7be5f8cccc --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/SecurityProto.java @@ -0,0 +1,88 @@ +/* + * Copyright 2023 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/dataplex/v1/security.proto + +package com.google.cloud.dataplex.v1; + +public final class SecurityProto { + private SecurityProto() {} + + 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_dataplex_v1_ResourceAccessSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_ResourceAccessSpec_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_DataAccessSpec_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_DataAccessSpec_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n\'google/cloud/dataplex/v1/security.prot" + + "o\022\030google.cloud.dataplex.v1\032\037google/api/" + + "field_behavior.proto\"X\n\022ResourceAccessSp" + + "ec\022\025\n\007readers\030\001 \003(\tB\004\342A\001\001\022\025\n\007writers\030\002 \003" + + "(\tB\004\342A\001\001\022\024\n\006owners\030\003 \003(\tB\004\342A\001\001\"\'\n\016DataAc" + + "cessSpec\022\025\n\007readers\030\001 \003(\tB\004\342A\001\001Bi\n\034com.g" + + "oogle.cloud.dataplex.v1B\rSecurityProtoP\001" + + "Z8cloud.google.com/go/dataplex/apiv1/dat" + + "aplexpb;dataplexpbb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + }); + internal_static_google_cloud_dataplex_v1_ResourceAccessSpec_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_dataplex_v1_ResourceAccessSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_ResourceAccessSpec_descriptor, + new java.lang.String[] { + "Readers", "Writers", "Owners", + }); + internal_static_google_cloud_dataplex_v1_DataAccessSpec_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_dataplex_v1_DataAccessSpec_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_DataAccessSpec_descriptor, + new java.lang.String[] { + "Readers", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ServiceProto.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ServiceProto.java index 92df59ea79ec..36932bbbe8d7 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ServiceProto.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ServiceProto.java @@ -151,6 +151,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dataplex_v1_RunTaskRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dataplex_v1_RunTaskRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_RunTaskRequest_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_RunTaskRequest_LabelsEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_RunTaskRequest_ArgsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_RunTaskRequest_ArgsEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_dataplex_v1_RunTaskResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -316,210 +324,216 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "_locations\030\003 \003(\t\"E\n\016GetTaskRequest\0223\n\004na" + "me\030\001 \001(\tB%\342A\001\002\372A\036\n\034dataplex.googleapis.c" + "om/Task\"C\n\rGetJobRequest\0222\n\004name\030\001 \001(\tB$" - + "\342A\001\002\372A\035\n\033dataplex.googleapis.com/Job\"E\n\016" - + "RunTaskRequest\0223\n\004name\030\001 \001(\tB%\342A\001\002\372A\036\n\034d" - + "ataplex.googleapis.com/Task\"=\n\017RunTaskRe" - + "sponse\022*\n\003job\030\001 \001(\0132\035.google.cloud.datap" - + "lex.v1.Job\"{\n\017ListJobsRequest\0225\n\006parent\030" - + "\001 \001(\tB%\342A\001\002\372A\036\n\034dataplex.googleapis.com/" - + "Task\022\027\n\tpage_size\030\002 \001(\005B\004\342A\001\001\022\030\n\npage_to" - + "ken\030\003 \001(\tB\004\342A\001\001\"X\n\020ListJobsResponse\022+\n\004j" - + "obs\030\001 \003(\0132\035.google.cloud.dataplex.v1.Job" - + "\022\027\n\017next_page_token\030\002 \001(\t\"F\n\020CancelJobRe" - + "quest\0222\n\004name\030\001 \001(\tB$\342A\001\002\372A\035\n\033dataplex.g" - + "oogleapis.com/Job\"\316\001\n\030CreateEnvironmentR" - + "equest\0225\n\006parent\030\001 \001(\tB%\342A\001\002\372A\036\n\034dataple" - + "x.googleapis.com/Lake\022\034\n\016environment_id\030" - + "\002 \001(\tB\004\342A\001\002\022@\n\013environment\030\003 \001(\0132%.googl" - + "e.cloud.dataplex.v1.EnvironmentB\004\342A\001\002\022\033\n" - + "\rvalidate_only\030\004 \001(\010B\004\342A\001\001\"\260\001\n\030UpdateEnv" - + "ironmentRequest\0225\n\013update_mask\030\001 \001(\0132\032.g" - + "oogle.protobuf.FieldMaskB\004\342A\001\002\022@\n\013enviro" - + "nment\030\002 \001(\0132%.google.cloud.dataplex.v1.E" - + "nvironmentB\004\342A\001\002\022\033\n\rvalidate_only\030\003 \001(\010B" - + "\004\342A\001\001\"V\n\030DeleteEnvironmentRequest\022:\n\004nam" - + "e\030\001 \001(\tB,\342A\001\002\372A%\n#dataplex.googleapis.co" - + "m/Environment\"\261\001\n\027ListEnvironmentsReques" - + "t\0225\n\006parent\030\001 \001(\tB%\342A\001\002\372A\036\n\034dataplex.goo" - + "gleapis.com/Lake\022\027\n\tpage_size\030\002 \001(\005B\004\342A\001" - + "\001\022\030\n\npage_token\030\003 \001(\tB\004\342A\001\001\022\024\n\006filter\030\004 " - + "\001(\tB\004\342A\001\001\022\026\n\010order_by\030\005 \001(\tB\004\342A\001\001\"p\n\030Lis" - + "tEnvironmentsResponse\022;\n\014environments\030\001 " - + "\003(\0132%.google.cloud.dataplex.v1.Environme" - + "nt\022\027\n\017next_page_token\030\002 \001(\t\"S\n\025GetEnviro" - + "nmentRequest\022:\n\004name\030\001 \001(\tB,\342A\001\002\372A%\n#dat" - + "aplex.googleapis.com/Environment\"\234\001\n\023Lis" - + "tSessionsRequest\022<\n\006parent\030\001 \001(\tB,\342A\001\002\372A" - + "%\n#dataplex.googleapis.com/Environment\022\027" - + "\n\tpage_size\030\002 \001(\005B\004\342A\001\001\022\030\n\npage_token\030\003 " - + "\001(\tB\004\342A\001\001\022\024\n\006filter\030\004 \001(\tB\004\342A\001\001\"d\n\024ListS" - + "essionsResponse\0223\n\010sessions\030\001 \003(\0132!.goog" - + "le.cloud.dataplex.v1.Session\022\027\n\017next_pag" - + "e_token\030\002 \001(\t2\2542\n\017DataplexService\022\303\001\n\nCr" - + "eateLake\022+.google.cloud.dataplex.v1.Crea" - + "teLakeRequest\032\035.google.longrunning.Opera" - + "tion\"i\312A\031\n\004Lake\022\021OperationMetadata\332A\023par" - + "ent,lake,lake_id\202\323\344\223\0021\")/v1/{parent=proj" - + "ects/*/locations/*}/lakes:\004lake\022\305\001\n\nUpda" - + "teLake\022+.google.cloud.dataplex.v1.Update" - + "LakeRequest\032\035.google.longrunning.Operati" - + "on\"k\312A\031\n\004Lake\022\021OperationMetadata\332A\020lake," - + "update_mask\202\323\344\223\00262./v1/{lake.name=projec" - + "ts/*/locations/*/lakes/*}:\004lake\022\277\001\n\nDele" - + "teLake\022+.google.cloud.dataplex.v1.Delete" - + "LakeRequest\032\035.google.longrunning.Operati" - + "on\"e\312A*\n\025google.protobuf.Empty\022\021Operatio" - + "nMetadata\332A\004name\202\323\344\223\002+*)/v1/{name=projec" - + "ts/*/locations/*/lakes/*}\022\240\001\n\tListLakes\022" - + "*.google.cloud.dataplex.v1.ListLakesRequ" - + "est\032+.google.cloud.dataplex.v1.ListLakes" - + "Response\":\332A\006parent\202\323\344\223\002+\022)/v1/{parent=p" - + "rojects/*/locations/*}/lakes\022\215\001\n\007GetLake" - + "\022(.google.cloud.dataplex.v1.GetLakeReque" - + "st\032\036.google.cloud.dataplex.v1.Lake\"8\332A\004n" - + "ame\202\323\344\223\002+\022)/v1/{name=projects/*/location" - + "s/*/lakes/*}\022\270\001\n\017ListLakeActions\0220.googl" - + "e.cloud.dataplex.v1.ListLakeActionsReque" - + "st\032-.google.cloud.dataplex.v1.ListAction" - + "sResponse\"D\332A\006parent\202\323\344\223\0025\0223/v1/{parent=" - + "projects/*/locations/*/lakes/*}/actions\022" - + "\313\001\n\nCreateZone\022+.google.cloud.dataplex.v" - + "1.CreateZoneRequest\032\035.google.longrunning" - + ".Operation\"q\312A\031\n\004Zone\022\021OperationMetadata" - + "\332A\023parent,zone,zone_id\202\323\344\223\0029\"1/v1/{paren" - + "t=projects/*/locations/*/lakes/*}/zones:" - + "\004zone\022\315\001\n\nUpdateZone\022+.google.cloud.data" - + "plex.v1.UpdateZoneRequest\032\035.google.longr" - + "unning.Operation\"s\312A\031\n\004Zone\022\021OperationMe" - + "tadata\332A\020zone,update_mask\202\323\344\223\002>26/v1/{zo" - + "ne.name=projects/*/locations/*/lakes/*/z" - + "ones/*}:\004zone\022\307\001\n\nDeleteZone\022+.google.cl" - + "oud.dataplex.v1.DeleteZoneRequest\032\035.goog" - + "le.longrunning.Operation\"m\312A*\n\025google.pr" - + "otobuf.Empty\022\021OperationMetadata\332A\004name\202\323" - + "\344\223\0023*1/v1/{name=projects/*/locations/*/l" - + "akes/*/zones/*}\022\250\001\n\tListZones\022*.google.c" - + "loud.dataplex.v1.ListZonesRequest\032+.goog" - + "le.cloud.dataplex.v1.ListZonesResponse\"B" - + "\332A\006parent\202\323\344\223\0023\0221/v1/{parent=projects/*/" - + "locations/*/lakes/*}/zones\022\225\001\n\007GetZone\022(" - + ".google.cloud.dataplex.v1.GetZoneRequest" - + "\032\036.google.cloud.dataplex.v1.Zone\"@\332A\004nam" - + "e\202\323\344\223\0023\0221/v1/{name=projects/*/locations/" - + "*/lakes/*/zones/*}\022\300\001\n\017ListZoneActions\0220" - + ".google.cloud.dataplex.v1.ListZoneAction" - + "sRequest\032-.google.cloud.dataplex.v1.List" - + "ActionsResponse\"L\332A\006parent\202\323\344\223\002=\022;/v1/{p" - + "arent=projects/*/locations/*/lakes/*/zon" - + "es/*}/actions\022\332\001\n\013CreateAsset\022,.google.c" - + "loud.dataplex.v1.CreateAssetRequest\032\035.go" - + "ogle.longrunning.Operation\"~\312A\032\n\005Asset\022\021" - + "OperationMetadata\332A\025parent,asset,asset_i" - + "d\202\323\344\223\002C\":/v1/{parent=projects/*/location" - + "s/*/lakes/*/zones/*}/assets:\005asset\022\335\001\n\013U" - + "pdateAsset\022,.google.cloud.dataplex.v1.Up" - + "dateAssetRequest\032\035.google.longrunning.Op" - + "eration\"\200\001\312A\032\n\005Asset\022\021OperationMetadata\332" - + "A\021asset,update_mask\202\323\344\223\002I2@/v1/{asset.na" - + "me=projects/*/locations/*/lakes/*/zones/" - + "*/assets/*}:\005asset\022\322\001\n\013DeleteAsset\022,.goo" - + "gle.cloud.dataplex.v1.DeleteAssetRequest" - + "\032\035.google.longrunning.Operation\"v\312A*\n\025go" - + "ogle.protobuf.Empty\022\021OperationMetadata\332A" - + "\004name\202\323\344\223\002<*:/v1/{name=projects/*/locati" - + "ons/*/lakes/*/zones/*/assets/*}\022\264\001\n\nList" - + "Assets\022+.google.cloud.dataplex.v1.ListAs" - + "setsRequest\032,.google.cloud.dataplex.v1.L" - + "istAssetsResponse\"K\332A\006parent\202\323\344\223\002<\022:/v1/" - + "{parent=projects/*/locations/*/lakes/*/z" - + "ones/*}/assets\022\241\001\n\010GetAsset\022).google.clo" - + "ud.dataplex.v1.GetAssetRequest\032\037.google." - + "cloud.dataplex.v1.Asset\"I\332A\004name\202\323\344\223\002<\022:" - + "/v1/{name=projects/*/locations/*/lakes/*" - + "/zones/*/assets/*}\022\313\001\n\020ListAssetActions\022" - + "1.google.cloud.dataplex.v1.ListAssetActi" - + "onsRequest\032-.google.cloud.dataplex.v1.Li" - + "stActionsResponse\"U\332A\006parent\202\323\344\223\002F\022D/v1/" - + "{parent=projects/*/locations/*/lakes/*/z" - + "ones/*/assets/*}/actions\022\313\001\n\nCreateTask\022" - + "+.google.cloud.dataplex.v1.CreateTaskReq" - + "uest\032\035.google.longrunning.Operation\"q\312A\031" - + "\n\004Task\022\021OperationMetadata\332A\023parent,task," - + "task_id\202\323\344\223\0029\"1/v1/{parent=projects/*/lo" - + "cations/*/lakes/*}/tasks:\004task\022\315\001\n\nUpdat" - + "eTask\022+.google.cloud.dataplex.v1.UpdateT" - + "askRequest\032\035.google.longrunning.Operatio" - + "n\"s\312A\031\n\004Task\022\021OperationMetadata\332A\020task,u" - + "pdate_mask\202\323\344\223\002>26/v1/{task.name=project" - + "s/*/locations/*/lakes/*/tasks/*}:\004task\022\307" - + "\001\n\nDeleteTask\022+.google.cloud.dataplex.v1" - + ".DeleteTaskRequest\032\035.google.longrunning." - + "Operation\"m\312A*\n\025google.protobuf.Empty\022\021O" - + "perationMetadata\332A\004name\202\323\344\223\0023*1/v1/{name" - + "=projects/*/locations/*/lakes/*/tasks/*}" - + "\022\250\001\n\tListTasks\022*.google.cloud.dataplex.v" - + "1.ListTasksRequest\032+.google.cloud.datapl" - + "ex.v1.ListTasksResponse\"B\332A\006parent\202\323\344\223\0023" - + "\0221/v1/{parent=projects/*/locations/*/lak" - + "es/*}/tasks\022\225\001\n\007GetTask\022(.google.cloud.d" - + "ataplex.v1.GetTaskRequest\032\036.google.cloud" - + ".dataplex.v1.Task\"@\332A\004name\202\323\344\223\0023\0221/v1/{n" - + "ame=projects/*/locations/*/lakes/*/tasks" - + "/*}\022\254\001\n\010ListJobs\022).google.cloud.dataplex" - + ".v1.ListJobsRequest\032*.google.cloud.datap" - + "lex.v1.ListJobsResponse\"I\332A\006parent\202\323\344\223\002:" - + "\0228/v1/{parent=projects/*/locations/*/lak" - + "es/*/tasks/*}/jobs\022\247\001\n\007RunTask\022(.google." - + "cloud.dataplex.v1.RunTaskRequest\032).googl" - + "e.cloud.dataplex.v1.RunTaskResponse\"G\332A\004" - + "name\202\323\344\223\002:\"5/v1/{name=projects/*/locatio" - + "ns/*/lakes/*/tasks/*}:run:\001*\022\231\001\n\006GetJob\022" - + "\'.google.cloud.dataplex.v1.GetJobRequest" - + "\032\035.google.cloud.dataplex.v1.Job\"G\332A\004name" - + "\202\323\344\223\002:\0228/v1/{name=projects/*/locations/*" - + "/lakes/*/tasks/*/jobs/*}\022\242\001\n\tCancelJob\022*" - + ".google.cloud.dataplex.v1.CancelJobReque" - + "st\032\026.google.protobuf.Empty\"Q\332A\004name\202\323\344\223\002" - + "D\"?/v1/{name=projects/*/locations/*/lake" - + "s/*/tasks/*/jobs/*}:cancel:\001*\022\375\001\n\021Create" - + "Environment\0222.google.cloud.dataplex.v1.C" - + "reateEnvironmentRequest\032\035.google.longrun" - + "ning.Operation\"\224\001\312A \n\013Environment\022\021Opera" - + "tionMetadata\332A!parent,environment,enviro" - + "nment_id\202\323\344\223\002G\"8/v1/{parent=projects/*/l" - + "ocations/*/lakes/*}/environments:\013enviro" - + "nment\022\377\001\n\021UpdateEnvironment\0222.google.clo" - + "ud.dataplex.v1.UpdateEnvironmentRequest\032" - + "\035.google.longrunning.Operation\"\226\001\312A \n\013En" - + "vironment\022\021OperationMetadata\332A\027environme" - + "nt,update_mask\202\323\344\223\002S2D/v1/{environment.n" - + "ame=projects/*/locations/*/lakes/*/envir" - + "onments/*}:\013environment\022\334\001\n\021DeleteEnviro" - + "nment\0222.google.cloud.dataplex.v1.DeleteE" - + "nvironmentRequest\032\035.google.longrunning.O" - + "peration\"t\312A*\n\025google.protobuf.Empty\022\021Op" - + "erationMetadata\332A\004name\202\323\344\223\002:*8/v1/{name=" - + "projects/*/locations/*/lakes/*/environme" - + "nts/*}\022\304\001\n\020ListEnvironments\0221.google.clo" - + "ud.dataplex.v1.ListEnvironmentsRequest\0322" - + ".google.cloud.dataplex.v1.ListEnvironmen" - + "tsResponse\"I\332A\006parent\202\323\344\223\002:\0228/v1/{parent" - + "=projects/*/locations/*/lakes/*}/environ" - + "ments\022\261\001\n\016GetEnvironment\022/.google.cloud." - + "dataplex.v1.GetEnvironmentRequest\032%.goog" - + "le.cloud.dataplex.v1.Environment\"G\332A\004nam" + + "\342A\001\002\372A\035\n\033dataplex.googleapis.com/Job\"\265\002\n" + + "\016RunTaskRequest\0223\n\004name\030\001 \001(\tB%\342A\001\002\372A\036\n\034" + + "dataplex.googleapis.com/Task\022J\n\006labels\030\003" + + " \003(\01324.google.cloud.dataplex.v1.RunTaskR" + + "equest.LabelsEntryB\004\342A\001\001\022F\n\004args\030\004 \003(\01322" + + ".google.cloud.dataplex.v1.RunTaskRequest" + + ".ArgsEntryB\004\342A\001\001\032-\n\013LabelsEntry\022\013\n\003key\030\001" + + " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\032+\n\tArgsEntry\022\013\n\003" + + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"=\n\017RunTaskR" + + "esponse\022*\n\003job\030\001 \001(\0132\035.google.cloud.data" + + "plex.v1.Job\"{\n\017ListJobsRequest\0225\n\006parent" + + "\030\001 \001(\tB%\342A\001\002\372A\036\n\034dataplex.googleapis.com" + + "/Task\022\027\n\tpage_size\030\002 \001(\005B\004\342A\001\001\022\030\n\npage_t" + + "oken\030\003 \001(\tB\004\342A\001\001\"X\n\020ListJobsResponse\022+\n\004" + + "jobs\030\001 \003(\0132\035.google.cloud.dataplex.v1.Jo" + + "b\022\027\n\017next_page_token\030\002 \001(\t\"F\n\020CancelJobR" + + "equest\0222\n\004name\030\001 \001(\tB$\342A\001\002\372A\035\n\033dataplex." + + "googleapis.com/Job\"\316\001\n\030CreateEnvironment" + + "Request\0225\n\006parent\030\001 \001(\tB%\342A\001\002\372A\036\n\034datapl" + + "ex.googleapis.com/Lake\022\034\n\016environment_id" + + "\030\002 \001(\tB\004\342A\001\002\022@\n\013environment\030\003 \001(\0132%.goog" + + "le.cloud.dataplex.v1.EnvironmentB\004\342A\001\002\022\033" + + "\n\rvalidate_only\030\004 \001(\010B\004\342A\001\001\"\260\001\n\030UpdateEn" + + "vironmentRequest\0225\n\013update_mask\030\001 \001(\0132\032." + + "google.protobuf.FieldMaskB\004\342A\001\002\022@\n\013envir" + + "onment\030\002 \001(\0132%.google.cloud.dataplex.v1." + + "EnvironmentB\004\342A\001\002\022\033\n\rvalidate_only\030\003 \001(\010" + + "B\004\342A\001\001\"V\n\030DeleteEnvironmentRequest\022:\n\004na" + + "me\030\001 \001(\tB,\342A\001\002\372A%\n#dataplex.googleapis.c" + + "om/Environment\"\261\001\n\027ListEnvironmentsReque" + + "st\0225\n\006parent\030\001 \001(\tB%\342A\001\002\372A\036\n\034dataplex.go" + + "ogleapis.com/Lake\022\027\n\tpage_size\030\002 \001(\005B\004\342A" + + "\001\001\022\030\n\npage_token\030\003 \001(\tB\004\342A\001\001\022\024\n\006filter\030\004" + + " \001(\tB\004\342A\001\001\022\026\n\010order_by\030\005 \001(\tB\004\342A\001\001\"p\n\030Li" + + "stEnvironmentsResponse\022;\n\014environments\030\001" + + " \003(\0132%.google.cloud.dataplex.v1.Environm" + + "ent\022\027\n\017next_page_token\030\002 \001(\t\"S\n\025GetEnvir" + + "onmentRequest\022:\n\004name\030\001 \001(\tB,\342A\001\002\372A%\n#da" + + "taplex.googleapis.com/Environment\"\234\001\n\023Li" + + "stSessionsRequest\022<\n\006parent\030\001 \001(\tB,\342A\001\002\372" + + "A%\n#dataplex.googleapis.com/Environment\022" + + "\027\n\tpage_size\030\002 \001(\005B\004\342A\001\001\022\030\n\npage_token\030\003" + + " \001(\tB\004\342A\001\001\022\024\n\006filter\030\004 \001(\tB\004\342A\001\001\"d\n\024List" + + "SessionsResponse\0223\n\010sessions\030\001 \003(\0132!.goo" + + "gle.cloud.dataplex.v1.Session\022\027\n\017next_pa" + + "ge_token\030\002 \001(\t2\2542\n\017DataplexService\022\303\001\n\nC" + + "reateLake\022+.google.cloud.dataplex.v1.Cre" + + "ateLakeRequest\032\035.google.longrunning.Oper" + + "ation\"i\312A\031\n\004Lake\022\021OperationMetadata\332A\023pa" + + "rent,lake,lake_id\202\323\344\223\0021\")/v1/{parent=pro" + + "jects/*/locations/*}/lakes:\004lake\022\305\001\n\nUpd" + + "ateLake\022+.google.cloud.dataplex.v1.Updat" + + "eLakeRequest\032\035.google.longrunning.Operat" + + "ion\"k\312A\031\n\004Lake\022\021OperationMetadata\332A\020lake" + + ",update_mask\202\323\344\223\00262./v1/{lake.name=proje" + + "cts/*/locations/*/lakes/*}:\004lake\022\277\001\n\nDel" + + "eteLake\022+.google.cloud.dataplex.v1.Delet" + + "eLakeRequest\032\035.google.longrunning.Operat" + + "ion\"e\312A*\n\025google.protobuf.Empty\022\021Operati" + + "onMetadata\332A\004name\202\323\344\223\002+*)/v1/{name=proje" + + "cts/*/locations/*/lakes/*}\022\240\001\n\tListLakes" + + "\022*.google.cloud.dataplex.v1.ListLakesReq" + + "uest\032+.google.cloud.dataplex.v1.ListLake" + + "sResponse\":\332A\006parent\202\323\344\223\002+\022)/v1/{parent=" + + "projects/*/locations/*}/lakes\022\215\001\n\007GetLak" + + "e\022(.google.cloud.dataplex.v1.GetLakeRequ" + + "est\032\036.google.cloud.dataplex.v1.Lake\"8\332A\004" + + "name\202\323\344\223\002+\022)/v1/{name=projects/*/locatio" + + "ns/*/lakes/*}\022\270\001\n\017ListLakeActions\0220.goog" + + "le.cloud.dataplex.v1.ListLakeActionsRequ" + + "est\032-.google.cloud.dataplex.v1.ListActio" + + "nsResponse\"D\332A\006parent\202\323\344\223\0025\0223/v1/{parent" + + "=projects/*/locations/*/lakes/*}/actions" + + "\022\313\001\n\nCreateZone\022+.google.cloud.dataplex." + + "v1.CreateZoneRequest\032\035.google.longrunnin" + + "g.Operation\"q\312A\031\n\004Zone\022\021OperationMetadat" + + "a\332A\023parent,zone,zone_id\202\323\344\223\0029\"1/v1/{pare" + + "nt=projects/*/locations/*/lakes/*}/zones" + + ":\004zone\022\315\001\n\nUpdateZone\022+.google.cloud.dat" + + "aplex.v1.UpdateZoneRequest\032\035.google.long" + + "running.Operation\"s\312A\031\n\004Zone\022\021OperationM" + + "etadata\332A\020zone,update_mask\202\323\344\223\002>26/v1/{z" + + "one.name=projects/*/locations/*/lakes/*/" + + "zones/*}:\004zone\022\307\001\n\nDeleteZone\022+.google.c" + + "loud.dataplex.v1.DeleteZoneRequest\032\035.goo" + + "gle.longrunning.Operation\"m\312A*\n\025google.p" + + "rotobuf.Empty\022\021OperationMetadata\332A\004name\202" + + "\323\344\223\0023*1/v1/{name=projects/*/locations/*/" + + "lakes/*/zones/*}\022\250\001\n\tListZones\022*.google." + + "cloud.dataplex.v1.ListZonesRequest\032+.goo" + + "gle.cloud.dataplex.v1.ListZonesResponse\"" + + "B\332A\006parent\202\323\344\223\0023\0221/v1/{parent=projects/*" + + "/locations/*/lakes/*}/zones\022\225\001\n\007GetZone\022" + + "(.google.cloud.dataplex.v1.GetZoneReques" + + "t\032\036.google.cloud.dataplex.v1.Zone\"@\332A\004na" + + "me\202\323\344\223\0023\0221/v1/{name=projects/*/locations" + + "/*/lakes/*/zones/*}\022\300\001\n\017ListZoneActions\022" + + "0.google.cloud.dataplex.v1.ListZoneActio" + + "nsRequest\032-.google.cloud.dataplex.v1.Lis" + + "tActionsResponse\"L\332A\006parent\202\323\344\223\002=\022;/v1/{" + + "parent=projects/*/locations/*/lakes/*/zo" + + "nes/*}/actions\022\332\001\n\013CreateAsset\022,.google." + + "cloud.dataplex.v1.CreateAssetRequest\032\035.g" + + "oogle.longrunning.Operation\"~\312A\032\n\005Asset\022" + + "\021OperationMetadata\332A\025parent,asset,asset_" + + "id\202\323\344\223\002C\":/v1/{parent=projects/*/locatio" + + "ns/*/lakes/*/zones/*}/assets:\005asset\022\335\001\n\013" + + "UpdateAsset\022,.google.cloud.dataplex.v1.U" + + "pdateAssetRequest\032\035.google.longrunning.O" + + "peration\"\200\001\312A\032\n\005Asset\022\021OperationMetadata" + + "\332A\021asset,update_mask\202\323\344\223\002I2@/v1/{asset.n" + + "ame=projects/*/locations/*/lakes/*/zones" + + "/*/assets/*}:\005asset\022\322\001\n\013DeleteAsset\022,.go" + + "ogle.cloud.dataplex.v1.DeleteAssetReques" + + "t\032\035.google.longrunning.Operation\"v\312A*\n\025g" + + "oogle.protobuf.Empty\022\021OperationMetadata\332" + + "A\004name\202\323\344\223\002<*:/v1/{name=projects/*/locat" + + "ions/*/lakes/*/zones/*/assets/*}\022\264\001\n\nLis" + + "tAssets\022+.google.cloud.dataplex.v1.ListA" + + "ssetsRequest\032,.google.cloud.dataplex.v1." + + "ListAssetsResponse\"K\332A\006parent\202\323\344\223\002<\022:/v1" + + "/{parent=projects/*/locations/*/lakes/*/" + + "zones/*}/assets\022\241\001\n\010GetAsset\022).google.cl" + + "oud.dataplex.v1.GetAssetRequest\032\037.google" + + ".cloud.dataplex.v1.Asset\"I\332A\004name\202\323\344\223\002<\022" + + ":/v1/{name=projects/*/locations/*/lakes/" + + "*/zones/*/assets/*}\022\313\001\n\020ListAssetActions" + + "\0221.google.cloud.dataplex.v1.ListAssetAct" + + "ionsRequest\032-.google.cloud.dataplex.v1.L" + + "istActionsResponse\"U\332A\006parent\202\323\344\223\002F\022D/v1" + + "/{parent=projects/*/locations/*/lakes/*/" + + "zones/*/assets/*}/actions\022\313\001\n\nCreateTask" + + "\022+.google.cloud.dataplex.v1.CreateTaskRe" + + "quest\032\035.google.longrunning.Operation\"q\312A" + + "\031\n\004Task\022\021OperationMetadata\332A\023parent,task" + + ",task_id\202\323\344\223\0029\"1/v1/{parent=projects/*/l" + + "ocations/*/lakes/*}/tasks:\004task\022\315\001\n\nUpda" + + "teTask\022+.google.cloud.dataplex.v1.Update" + + "TaskRequest\032\035.google.longrunning.Operati" + + "on\"s\312A\031\n\004Task\022\021OperationMetadata\332A\020task," + + "update_mask\202\323\344\223\002>26/v1/{task.name=projec" + + "ts/*/locations/*/lakes/*/tasks/*}:\004task\022" + + "\307\001\n\nDeleteTask\022+.google.cloud.dataplex.v" + + "1.DeleteTaskRequest\032\035.google.longrunning" + + ".Operation\"m\312A*\n\025google.protobuf.Empty\022\021" + + "OperationMetadata\332A\004name\202\323\344\223\0023*1/v1/{nam" + + "e=projects/*/locations/*/lakes/*/tasks/*" + + "}\022\250\001\n\tListTasks\022*.google.cloud.dataplex." + + "v1.ListTasksRequest\032+.google.cloud.datap" + + "lex.v1.ListTasksResponse\"B\332A\006parent\202\323\344\223\002" + + "3\0221/v1/{parent=projects/*/locations/*/la" + + "kes/*}/tasks\022\225\001\n\007GetTask\022(.google.cloud." + + "dataplex.v1.GetTaskRequest\032\036.google.clou" + + "d.dataplex.v1.Task\"@\332A\004name\202\323\344\223\0023\0221/v1/{" + + "name=projects/*/locations/*/lakes/*/task" + + "s/*}\022\254\001\n\010ListJobs\022).google.cloud.dataple" + + "x.v1.ListJobsRequest\032*.google.cloud.data" + + "plex.v1.ListJobsResponse\"I\332A\006parent\202\323\344\223\002" + + ":\0228/v1/{parent=projects/*/locations/*/la" + + "kes/*/tasks/*}/jobs\022\247\001\n\007RunTask\022(.google" + + ".cloud.dataplex.v1.RunTaskRequest\032).goog" + + "le.cloud.dataplex.v1.RunTaskResponse\"G\332A" + + "\004name\202\323\344\223\002:\"5/v1/{name=projects/*/locati" + + "ons/*/lakes/*/tasks/*}:run:\001*\022\231\001\n\006GetJob" + + "\022\'.google.cloud.dataplex.v1.GetJobReques" + + "t\032\035.google.cloud.dataplex.v1.Job\"G\332A\004nam" + "e\202\323\344\223\002:\0228/v1/{name=projects/*/locations/" - + "*/lakes/*/environments/*}\022\303\001\n\014ListSessio" - + "ns\022-.google.cloud.dataplex.v1.ListSessio" - + "nsRequest\032..google.cloud.dataplex.v1.Lis" - + "tSessionsResponse\"T\332A\006parent\202\323\344\223\002E\022C/v1/" - + "{parent=projects/*/locations/*/lakes/*/e" - + "nvironments/*}/sessions\032K\312A\027dataplex.goo" - + "gleapis.com\322A.https://www.googleapis.com" - + "/auth/cloud-platformBh\n\034com.google.cloud" - + ".dataplex.v1B\014ServiceProtoP\001Z8cloud.goog" - + "le.com/go/dataplex/apiv1/dataplexpb;data" - + "plexpbb\006proto3" + + "*/lakes/*/tasks/*/jobs/*}\022\242\001\n\tCancelJob\022" + + "*.google.cloud.dataplex.v1.CancelJobRequ" + + "est\032\026.google.protobuf.Empty\"Q\332A\004name\202\323\344\223" + + "\002D\"?/v1/{name=projects/*/locations/*/lak" + + "es/*/tasks/*/jobs/*}:cancel:\001*\022\375\001\n\021Creat" + + "eEnvironment\0222.google.cloud.dataplex.v1." + + "CreateEnvironmentRequest\032\035.google.longru" + + "nning.Operation\"\224\001\312A \n\013Environment\022\021Oper" + + "ationMetadata\332A!parent,environment,envir" + + "onment_id\202\323\344\223\002G\"8/v1/{parent=projects/*/" + + "locations/*/lakes/*}/environments:\013envir" + + "onment\022\377\001\n\021UpdateEnvironment\0222.google.cl" + + "oud.dataplex.v1.UpdateEnvironmentRequest" + + "\032\035.google.longrunning.Operation\"\226\001\312A \n\013E" + + "nvironment\022\021OperationMetadata\332A\027environm" + + "ent,update_mask\202\323\344\223\002S2D/v1/{environment." + + "name=projects/*/locations/*/lakes/*/envi" + + "ronments/*}:\013environment\022\334\001\n\021DeleteEnvir" + + "onment\0222.google.cloud.dataplex.v1.Delete" + + "EnvironmentRequest\032\035.google.longrunning." + + "Operation\"t\312A*\n\025google.protobuf.Empty\022\021O" + + "perationMetadata\332A\004name\202\323\344\223\002:*8/v1/{name" + + "=projects/*/locations/*/lakes/*/environm" + + "ents/*}\022\304\001\n\020ListEnvironments\0221.google.cl" + + "oud.dataplex.v1.ListEnvironmentsRequest\032" + + "2.google.cloud.dataplex.v1.ListEnvironme" + + "ntsResponse\"I\332A\006parent\202\323\344\223\002:\0228/v1/{paren" + + "t=projects/*/locations/*/lakes/*}/enviro" + + "nments\022\261\001\n\016GetEnvironment\022/.google.cloud" + + ".dataplex.v1.GetEnvironmentRequest\032%.goo" + + "gle.cloud.dataplex.v1.Environment\"G\332A\004na" + + "me\202\323\344\223\002:\0228/v1/{name=projects/*/locations" + + "/*/lakes/*/environments/*}\022\303\001\n\014ListSessi" + + "ons\022-.google.cloud.dataplex.v1.ListSessi" + + "onsRequest\032..google.cloud.dataplex.v1.Li" + + "stSessionsResponse\"T\332A\006parent\202\323\344\223\002E\022C/v1" + + "/{parent=projects/*/locations/*/lakes/*/" + + "environments/*}/sessions\032K\312A\027dataplex.go" + + "ogleapis.com\322A.https://www.googleapis.co" + + "m/auth/cloud-platformBh\n\034com.google.clou" + + "d.dataplex.v1B\014ServiceProtoP\001Z8cloud.goo" + + "gle.com/go/dataplex/apiv1/dataplexpb;dat" + + "aplexpbb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -789,7 +803,23 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_dataplex_v1_RunTaskRequest_descriptor, new java.lang.String[] { - "Name", + "Name", "Labels", "Args", + }); + internal_static_google_cloud_dataplex_v1_RunTaskRequest_LabelsEntry_descriptor = + internal_static_google_cloud_dataplex_v1_RunTaskRequest_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_dataplex_v1_RunTaskRequest_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_RunTaskRequest_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_dataplex_v1_RunTaskRequest_ArgsEntry_descriptor = + internal_static_google_cloud_dataplex_v1_RunTaskRequest_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_dataplex_v1_RunTaskRequest_ArgsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_RunTaskRequest_ArgsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", }); internal_static_google_cloud_dataplex_v1_RunTaskResponse_descriptor = getDescriptor().getMessageTypes().get(31); diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/TasksProto.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/TasksProto.java index 8e6323325a88..55fb99fc03c7 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/TasksProto.java +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/TasksProto.java @@ -83,6 +83,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_dataplex_v1_Job_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_dataplex_v1_Job_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_dataplex_v1_Job_LabelsEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_dataplex_v1_Job_LabelsEntry_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -170,7 +174,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\001(\t:\0028\001:d\352Aa\n\034dataplex.googleapis.com/Ta" + "sk\022Aprojects/{project}/locations/{locati" + "on}/lakes/{lake}/tasks/{task}B\010\n\006config\"" - + "\221\005\n\003Job\0222\n\004name\030\001 \001(\tB$\342A\001\003\372A\035\n\033dataplex" + + "\321\007\n\003Job\0222\n\004name\030\001 \001(\tB$\342A\001\003\372A\035\n\033dataplex" + ".googleapis.com/Job\022\021\n\003uid\030\002 \001(\tB\004\342A\001\003\0224" + "\n\nstart_time\030\003 \001(\0132\032.google.protobuf.Tim" + "estampB\004\342A\001\003\0222\n\010end_time\030\004 \001(\0132\032.google." @@ -179,11 +183,19 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\001\003\022\031\n\013retry_count\030\006 \001(\rB\004\342A\001\003\022<\n\007service" + "\030\007 \001(\0162%.google.cloud.dataplex.v1.Job.Se" + "rviceB\004\342A\001\003\022\031\n\013service_job\030\010 \001(\tB\004\342A\001\003\022\025" - + "\n\007message\030\t \001(\tB\004\342A\001\003\"0\n\007Service\022\027\n\023SERV" - + "ICE_UNSPECIFIED\020\000\022\014\n\010DATAPROC\020\001\"r\n\005State" - + "\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007RUNNING\020\001\022\016\n\n" - + "CANCELLING\020\002\022\r\n\tCANCELLED\020\003\022\r\n\tSUCCEEDED" - + "\020\004\022\n\n\006FAILED\020\005\022\013\n\007ABORTED\020\006:n\352Ak\n\033datapl" + + "\n\007message\030\t \001(\tB\004\342A\001\003\022?\n\006labels\030\n \003(\0132)." + + "google.cloud.dataplex.v1.Job.LabelsEntry" + + "B\004\342A\001\003\022<\n\007trigger\030\013 \001(\0162%.google.cloud.d" + + "ataplex.v1.Job.TriggerB\004\342A\001\003\022J\n\016executio" + + "n_spec\030d \001(\0132,.google.cloud.dataplex.v1." + + "Task.ExecutionSpecB\004\342A\001\003\032-\n\013LabelsEntry\022" + + "\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"0\n\007Servi" + + "ce\022\027\n\023SERVICE_UNSPECIFIED\020\000\022\014\n\010DATAPROC\020" + + "\001\"r\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007RUN" + + "NING\020\001\022\016\n\nCANCELLING\020\002\022\r\n\tCANCELLED\020\003\022\r\n" + + "\tSUCCEEDED\020\004\022\n\n\006FAILED\020\005\022\013\n\007ABORTED\020\006\"D\n" + + "\007Trigger\022\027\n\023TRIGGER_UNSPECIFIED\020\000\022\017\n\013TAS" + + "K_CONFIG\020\001\022\017\n\013RUN_REQUEST\020\002:n\352Ak\n\033datapl" + "ex.googleapis.com/Job\022Lprojects/{project" + "}/locations/{location}/lakes/{lake}/task" + "s/{task}/jobs/{job}Bf\n\034com.google.cloud." @@ -351,6 +363,17 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Service", "ServiceJob", "Message", + "Labels", + "Trigger", + "ExecutionSpec", + }); + internal_static_google_cloud_dataplex_v1_Job_LabelsEntry_descriptor = + internal_static_google_cloud_dataplex_v1_Job_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_dataplex_v1_Job_LabelsEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_dataplex_v1_Job_LabelsEntry_descriptor, + new java.lang.String[] { + "Key", "Value", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateDataAttributeBindingRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateDataAttributeBindingRequest.java new file mode 100644 index 000000000000..faebd0cf1b7e --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateDataAttributeBindingRequest.java @@ -0,0 +1,1118 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +/** + * + * + *
+ * Update DataAttributeBinding request.
+ * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest} + */ +public final class UpdateDataAttributeBindingRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest) + UpdateDataAttributeBindingRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateDataAttributeBindingRequest.newBuilder() to construct. + private UpdateDataAttributeBindingRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateDataAttributeBindingRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateDataAttributeBindingRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_UpdateDataAttributeBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_UpdateDataAttributeBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest.class, + com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. Mask of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. Mask of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. Mask of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int DATA_ATTRIBUTE_BINDING_FIELD_NUMBER = 2; + private com.google.cloud.dataplex.v1.DataAttributeBinding dataAttributeBinding_; + /** + * + * + *
+   * Required. Only fields specified in `update_mask` are updated.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataAttributeBinding field is set. + */ + @java.lang.Override + public boolean hasDataAttributeBinding() { + return dataAttributeBinding_ != null; + } + /** + * + * + *
+   * Required. Only fields specified in `update_mask` are updated.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataAttributeBinding. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataAttributeBinding getDataAttributeBinding() { + return dataAttributeBinding_ == null + ? com.google.cloud.dataplex.v1.DataAttributeBinding.getDefaultInstance() + : dataAttributeBinding_; + } + /** + * + * + *
+   * Required. Only fields specified in `update_mask` are updated.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataAttributeBindingOrBuilder + getDataAttributeBindingOrBuilder() { + return dataAttributeBinding_ == null + ? com.google.cloud.dataplex.v1.DataAttributeBinding.getDefaultInstance() + : dataAttributeBinding_; + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 3; + private boolean validateOnly_ = false; + /** + * + * + *
+   * Optional. Only validate the request, but do not perform mutations.
+   * The default is false.
+   * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + 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 (updateMask_ != null) { + output.writeMessage(1, getUpdateMask()); + } + if (dataAttributeBinding_ != null) { + output.writeMessage(2, getDataAttributeBinding()); + } + if (validateOnly_ != false) { + output.writeBool(3, validateOnly_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (dataAttributeBinding_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDataAttributeBinding()); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, validateOnly_); + } + 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.dataplex.v1.UpdateDataAttributeBindingRequest)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest other = + (com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasDataAttributeBinding() != other.hasDataAttributeBinding()) return false; + if (hasDataAttributeBinding()) { + if (!getDataAttributeBinding().equals(other.getDataAttributeBinding())) return false; + } + if (getValidateOnly() != other.getValidateOnly()) 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 (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasDataAttributeBinding()) { + hash = (37 * hash) + DATA_ATTRIBUTE_BINDING_FIELD_NUMBER; + hash = (53 * hash) + getDataAttributeBinding().hashCode(); + } + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest 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.dataplex.v1.UpdateDataAttributeBindingRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest 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.dataplex.v1.UpdateDataAttributeBindingRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest 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.dataplex.v1.UpdateDataAttributeBindingRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest 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.dataplex.v1.UpdateDataAttributeBindingRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest 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.dataplex.v1.UpdateDataAttributeBindingRequest 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; + } + /** + * + * + *
+   * Update DataAttributeBinding request.
+   * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest) + com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_UpdateDataAttributeBindingRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_UpdateDataAttributeBindingRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest.class, + com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest.Builder.class); + } + + // Construct using com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + dataAttributeBinding_ = null; + if (dataAttributeBindingBuilder_ != null) { + dataAttributeBindingBuilder_.dispose(); + dataAttributeBindingBuilder_ = null; + } + validateOnly_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_UpdateDataAttributeBindingRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest + getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest build() { + com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest buildPartial() { + com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest result = + new com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dataAttributeBinding_ = + dataAttributeBindingBuilder_ == null + ? dataAttributeBinding_ + : dataAttributeBindingBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.validateOnly_ = validateOnly_; + } + } + + @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.dataplex.v1.UpdateDataAttributeBindingRequest) { + return mergeFrom((com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest other) { + if (other + == com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasDataAttributeBinding()) { + mergeDataAttributeBinding(other.getDataAttributeBinding()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + 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(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage( + getDataAttributeBindingFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000004; + 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 int bitField0_; + + 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_; + /** + * + * + *
+     * Required. Mask of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. Mask of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @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(); + } + } + /** + * + * + *
+     * Required. Mask of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Mask of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. Mask of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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 com.google.cloud.dataplex.v1.DataAttributeBinding dataAttributeBinding_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataAttributeBinding, + com.google.cloud.dataplex.v1.DataAttributeBinding.Builder, + com.google.cloud.dataplex.v1.DataAttributeBindingOrBuilder> + dataAttributeBindingBuilder_; + /** + * + * + *
+     * Required. Only fields specified in `update_mask` are updated.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataAttributeBinding field is set. + */ + public boolean hasDataAttributeBinding() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. Only fields specified in `update_mask` are updated.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataAttributeBinding. + */ + public com.google.cloud.dataplex.v1.DataAttributeBinding getDataAttributeBinding() { + if (dataAttributeBindingBuilder_ == null) { + return dataAttributeBinding_ == null + ? com.google.cloud.dataplex.v1.DataAttributeBinding.getDefaultInstance() + : dataAttributeBinding_; + } else { + return dataAttributeBindingBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Only fields specified in `update_mask` are updated.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataAttributeBinding( + com.google.cloud.dataplex.v1.DataAttributeBinding value) { + if (dataAttributeBindingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataAttributeBinding_ = value; + } else { + dataAttributeBindingBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Only fields specified in `update_mask` are updated.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataAttributeBinding( + com.google.cloud.dataplex.v1.DataAttributeBinding.Builder builderForValue) { + if (dataAttributeBindingBuilder_ == null) { + dataAttributeBinding_ = builderForValue.build(); + } else { + dataAttributeBindingBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Only fields specified in `update_mask` are updated.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDataAttributeBinding( + com.google.cloud.dataplex.v1.DataAttributeBinding value) { + if (dataAttributeBindingBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && dataAttributeBinding_ != null + && dataAttributeBinding_ + != com.google.cloud.dataplex.v1.DataAttributeBinding.getDefaultInstance()) { + getDataAttributeBindingBuilder().mergeFrom(value); + } else { + dataAttributeBinding_ = value; + } + } else { + dataAttributeBindingBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Only fields specified in `update_mask` are updated.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDataAttributeBinding() { + bitField0_ = (bitField0_ & ~0x00000002); + dataAttributeBinding_ = null; + if (dataAttributeBindingBuilder_ != null) { + dataAttributeBindingBuilder_.dispose(); + dataAttributeBindingBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Only fields specified in `update_mask` are updated.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dataplex.v1.DataAttributeBinding.Builder + getDataAttributeBindingBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getDataAttributeBindingFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Only fields specified in `update_mask` are updated.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dataplex.v1.DataAttributeBindingOrBuilder + getDataAttributeBindingOrBuilder() { + if (dataAttributeBindingBuilder_ != null) { + return dataAttributeBindingBuilder_.getMessageOrBuilder(); + } else { + return dataAttributeBinding_ == null + ? com.google.cloud.dataplex.v1.DataAttributeBinding.getDefaultInstance() + : dataAttributeBinding_; + } + } + /** + * + * + *
+     * Required. Only fields specified in `update_mask` are updated.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataAttributeBinding, + com.google.cloud.dataplex.v1.DataAttributeBinding.Builder, + com.google.cloud.dataplex.v1.DataAttributeBindingOrBuilder> + getDataAttributeBindingFieldBuilder() { + if (dataAttributeBindingBuilder_ == null) { + dataAttributeBindingBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataAttributeBinding, + com.google.cloud.dataplex.v1.DataAttributeBinding.Builder, + com.google.cloud.dataplex.v1.DataAttributeBindingOrBuilder>( + getDataAttributeBinding(), getParentForChildren(), isClean()); + dataAttributeBinding_ = null; + } + return dataAttributeBindingBuilder_; + } + + private boolean validateOnly_; + /** + * + * + *
+     * Optional. Only validate the request, but do not perform mutations.
+     * The default is false.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * Optional. Only validate the request, but do not perform mutations.
+     * The default is false.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Only validate the request, but do not perform mutations.
+     * The default is false.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000004); + validateOnly_ = 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.dataplex.v1.UpdateDataAttributeBindingRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest) + private static final com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest(); + } + + public static com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateDataAttributeBindingRequest 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.dataplex.v1.UpdateDataAttributeBindingRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateDataAttributeBindingRequestOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateDataAttributeBindingRequestOrBuilder.java new file mode 100644 index 000000000000..50b33d550432 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateDataAttributeBindingRequestOrBuilder.java @@ -0,0 +1,118 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +public interface UpdateDataAttributeBindingRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Mask of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. Mask of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. Mask of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. Only fields specified in `update_mask` are updated.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataAttributeBinding field is set. + */ + boolean hasDataAttributeBinding(); + /** + * + * + *
+   * Required. Only fields specified in `update_mask` are updated.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataAttributeBinding. + */ + com.google.cloud.dataplex.v1.DataAttributeBinding getDataAttributeBinding(); + /** + * + * + *
+   * Required. Only fields specified in `update_mask` are updated.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataAttributeBinding data_attribute_binding = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dataplex.v1.DataAttributeBindingOrBuilder getDataAttributeBindingOrBuilder(); + + /** + * + * + *
+   * Optional. Only validate the request, but do not perform mutations.
+   * The default is false.
+   * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateDataAttributeRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateDataAttributeRequest.java new file mode 100644 index 000000000000..caa15913dae0 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateDataAttributeRequest.java @@ -0,0 +1,1101 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +/** + * + * + *
+ * Update DataAttribute request.
+ * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.UpdateDataAttributeRequest} + */ +public final class UpdateDataAttributeRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.UpdateDataAttributeRequest) + UpdateDataAttributeRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateDataAttributeRequest.newBuilder() to construct. + private UpdateDataAttributeRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateDataAttributeRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateDataAttributeRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_UpdateDataAttributeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_UpdateDataAttributeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.UpdateDataAttributeRequest.class, + com.google.cloud.dataplex.v1.UpdateDataAttributeRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. Mask of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. Mask of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. Mask of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int DATA_ATTRIBUTE_FIELD_NUMBER = 2; + private com.google.cloud.dataplex.v1.DataAttribute dataAttribute_; + /** + * + * + *
+   * Required. Only fields specified in `update_mask` are updated.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataAttribute data_attribute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataAttribute field is set. + */ + @java.lang.Override + public boolean hasDataAttribute() { + return dataAttribute_ != null; + } + /** + * + * + *
+   * Required. Only fields specified in `update_mask` are updated.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataAttribute data_attribute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataAttribute. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataAttribute getDataAttribute() { + return dataAttribute_ == null + ? com.google.cloud.dataplex.v1.DataAttribute.getDefaultInstance() + : dataAttribute_; + } + /** + * + * + *
+   * Required. Only fields specified in `update_mask` are updated.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataAttribute data_attribute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataAttributeOrBuilder getDataAttributeOrBuilder() { + return dataAttribute_ == null + ? com.google.cloud.dataplex.v1.DataAttribute.getDefaultInstance() + : dataAttribute_; + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 3; + private boolean validateOnly_ = false; + /** + * + * + *
+   * Optional. Only validate the request, but do not perform mutations.
+   * The default is false.
+   * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + 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 (updateMask_ != null) { + output.writeMessage(1, getUpdateMask()); + } + if (dataAttribute_ != null) { + output.writeMessage(2, getDataAttribute()); + } + if (validateOnly_ != false) { + output.writeBool(3, validateOnly_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (dataAttribute_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDataAttribute()); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, validateOnly_); + } + 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.dataplex.v1.UpdateDataAttributeRequest)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.UpdateDataAttributeRequest other = + (com.google.cloud.dataplex.v1.UpdateDataAttributeRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasDataAttribute() != other.hasDataAttribute()) return false; + if (hasDataAttribute()) { + if (!getDataAttribute().equals(other.getDataAttribute())) return false; + } + if (getValidateOnly() != other.getValidateOnly()) 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 (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasDataAttribute()) { + hash = (37 * hash) + DATA_ATTRIBUTE_FIELD_NUMBER; + hash = (53 * hash) + getDataAttribute().hashCode(); + } + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.UpdateDataAttributeRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.UpdateDataAttributeRequest 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.dataplex.v1.UpdateDataAttributeRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.UpdateDataAttributeRequest 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.dataplex.v1.UpdateDataAttributeRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.UpdateDataAttributeRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.UpdateDataAttributeRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.UpdateDataAttributeRequest 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.dataplex.v1.UpdateDataAttributeRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.UpdateDataAttributeRequest 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.dataplex.v1.UpdateDataAttributeRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.UpdateDataAttributeRequest 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.dataplex.v1.UpdateDataAttributeRequest 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; + } + /** + * + * + *
+   * Update DataAttribute request.
+   * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.UpdateDataAttributeRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.UpdateDataAttributeRequest) + com.google.cloud.dataplex.v1.UpdateDataAttributeRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_UpdateDataAttributeRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_UpdateDataAttributeRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.UpdateDataAttributeRequest.class, + com.google.cloud.dataplex.v1.UpdateDataAttributeRequest.Builder.class); + } + + // Construct using com.google.cloud.dataplex.v1.UpdateDataAttributeRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + dataAttribute_ = null; + if (dataAttributeBuilder_ != null) { + dataAttributeBuilder_.dispose(); + dataAttributeBuilder_ = null; + } + validateOnly_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_UpdateDataAttributeRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.UpdateDataAttributeRequest getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.UpdateDataAttributeRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.UpdateDataAttributeRequest build() { + com.google.cloud.dataplex.v1.UpdateDataAttributeRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.UpdateDataAttributeRequest buildPartial() { + com.google.cloud.dataplex.v1.UpdateDataAttributeRequest result = + new com.google.cloud.dataplex.v1.UpdateDataAttributeRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dataplex.v1.UpdateDataAttributeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dataAttribute_ = + dataAttributeBuilder_ == null ? dataAttribute_ : dataAttributeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.validateOnly_ = validateOnly_; + } + } + + @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.dataplex.v1.UpdateDataAttributeRequest) { + return mergeFrom((com.google.cloud.dataplex.v1.UpdateDataAttributeRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataplex.v1.UpdateDataAttributeRequest other) { + if (other == com.google.cloud.dataplex.v1.UpdateDataAttributeRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasDataAttribute()) { + mergeDataAttribute(other.getDataAttribute()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + 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(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getDataAttributeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000004; + 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 int bitField0_; + + 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_; + /** + * + * + *
+     * Required. Mask of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. Mask of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @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(); + } + } + /** + * + * + *
+     * Required. Mask of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Mask of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. Mask of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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 com.google.cloud.dataplex.v1.DataAttribute dataAttribute_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataAttribute, + com.google.cloud.dataplex.v1.DataAttribute.Builder, + com.google.cloud.dataplex.v1.DataAttributeOrBuilder> + dataAttributeBuilder_; + /** + * + * + *
+     * Required. Only fields specified in `update_mask` are updated.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttribute data_attribute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataAttribute field is set. + */ + public boolean hasDataAttribute() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. Only fields specified in `update_mask` are updated.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttribute data_attribute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataAttribute. + */ + public com.google.cloud.dataplex.v1.DataAttribute getDataAttribute() { + if (dataAttributeBuilder_ == null) { + return dataAttribute_ == null + ? com.google.cloud.dataplex.v1.DataAttribute.getDefaultInstance() + : dataAttribute_; + } else { + return dataAttributeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Only fields specified in `update_mask` are updated.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttribute data_attribute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataAttribute(com.google.cloud.dataplex.v1.DataAttribute value) { + if (dataAttributeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataAttribute_ = value; + } else { + dataAttributeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Only fields specified in `update_mask` are updated.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttribute data_attribute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataAttribute( + com.google.cloud.dataplex.v1.DataAttribute.Builder builderForValue) { + if (dataAttributeBuilder_ == null) { + dataAttribute_ = builderForValue.build(); + } else { + dataAttributeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Only fields specified in `update_mask` are updated.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttribute data_attribute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDataAttribute(com.google.cloud.dataplex.v1.DataAttribute value) { + if (dataAttributeBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && dataAttribute_ != null + && dataAttribute_ != com.google.cloud.dataplex.v1.DataAttribute.getDefaultInstance()) { + getDataAttributeBuilder().mergeFrom(value); + } else { + dataAttribute_ = value; + } + } else { + dataAttributeBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Only fields specified in `update_mask` are updated.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttribute data_attribute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDataAttribute() { + bitField0_ = (bitField0_ & ~0x00000002); + dataAttribute_ = null; + if (dataAttributeBuilder_ != null) { + dataAttributeBuilder_.dispose(); + dataAttributeBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Only fields specified in `update_mask` are updated.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttribute data_attribute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dataplex.v1.DataAttribute.Builder getDataAttributeBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getDataAttributeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Only fields specified in `update_mask` are updated.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttribute data_attribute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dataplex.v1.DataAttributeOrBuilder getDataAttributeOrBuilder() { + if (dataAttributeBuilder_ != null) { + return dataAttributeBuilder_.getMessageOrBuilder(); + } else { + return dataAttribute_ == null + ? com.google.cloud.dataplex.v1.DataAttribute.getDefaultInstance() + : dataAttribute_; + } + } + /** + * + * + *
+     * Required. Only fields specified in `update_mask` are updated.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataAttribute data_attribute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataAttribute, + com.google.cloud.dataplex.v1.DataAttribute.Builder, + com.google.cloud.dataplex.v1.DataAttributeOrBuilder> + getDataAttributeFieldBuilder() { + if (dataAttributeBuilder_ == null) { + dataAttributeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataAttribute, + com.google.cloud.dataplex.v1.DataAttribute.Builder, + com.google.cloud.dataplex.v1.DataAttributeOrBuilder>( + getDataAttribute(), getParentForChildren(), isClean()); + dataAttribute_ = null; + } + return dataAttributeBuilder_; + } + + private boolean validateOnly_; + /** + * + * + *
+     * Optional. Only validate the request, but do not perform mutations.
+     * The default is false.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * Optional. Only validate the request, but do not perform mutations.
+     * The default is false.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Only validate the request, but do not perform mutations.
+     * The default is false.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000004); + validateOnly_ = 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.dataplex.v1.UpdateDataAttributeRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.UpdateDataAttributeRequest) + private static final com.google.cloud.dataplex.v1.UpdateDataAttributeRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.UpdateDataAttributeRequest(); + } + + public static com.google.cloud.dataplex.v1.UpdateDataAttributeRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateDataAttributeRequest 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.dataplex.v1.UpdateDataAttributeRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateDataAttributeRequestOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateDataAttributeRequestOrBuilder.java new file mode 100644 index 000000000000..cbdfedeefbc3 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateDataAttributeRequestOrBuilder.java @@ -0,0 +1,118 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +public interface UpdateDataAttributeRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.UpdateDataAttributeRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Mask of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. Mask of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. Mask of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. Only fields specified in `update_mask` are updated.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataAttribute data_attribute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataAttribute field is set. + */ + boolean hasDataAttribute(); + /** + * + * + *
+   * Required. Only fields specified in `update_mask` are updated.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataAttribute data_attribute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataAttribute. + */ + com.google.cloud.dataplex.v1.DataAttribute getDataAttribute(); + /** + * + * + *
+   * Required. Only fields specified in `update_mask` are updated.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataAttribute data_attribute = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dataplex.v1.DataAttributeOrBuilder getDataAttributeOrBuilder(); + + /** + * + * + *
+   * Optional. Only validate the request, but do not perform mutations.
+   * The default is false.
+   * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateDataTaxonomyRequest.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateDataTaxonomyRequest.java new file mode 100644 index 000000000000..cb2f9999592b --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateDataTaxonomyRequest.java @@ -0,0 +1,1101 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +/** + * + * + *
+ * Update DataTaxonomy request.
+ * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.UpdateDataTaxonomyRequest} + */ +public final class UpdateDataTaxonomyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.dataplex.v1.UpdateDataTaxonomyRequest) + UpdateDataTaxonomyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateDataTaxonomyRequest.newBuilder() to construct. + private UpdateDataTaxonomyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateDataTaxonomyRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateDataTaxonomyRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_UpdateDataTaxonomyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_UpdateDataTaxonomyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest.class, + com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest.Builder.class); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 1; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. Mask of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. Mask of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. Mask of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + + public static final int DATA_TAXONOMY_FIELD_NUMBER = 2; + private com.google.cloud.dataplex.v1.DataTaxonomy dataTaxonomy_; + /** + * + * + *
+   * Required. Only fields specified in `update_mask` are updated.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataTaxonomy field is set. + */ + @java.lang.Override + public boolean hasDataTaxonomy() { + return dataTaxonomy_ != null; + } + /** + * + * + *
+   * Required. Only fields specified in `update_mask` are updated.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataTaxonomy. + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataTaxonomy getDataTaxonomy() { + return dataTaxonomy_ == null + ? com.google.cloud.dataplex.v1.DataTaxonomy.getDefaultInstance() + : dataTaxonomy_; + } + /** + * + * + *
+   * Required. Only fields specified in `update_mask` are updated.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.dataplex.v1.DataTaxonomyOrBuilder getDataTaxonomyOrBuilder() { + return dataTaxonomy_ == null + ? com.google.cloud.dataplex.v1.DataTaxonomy.getDefaultInstance() + : dataTaxonomy_; + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 3; + private boolean validateOnly_ = false; + /** + * + * + *
+   * Optional. Only validate the request, but do not perform mutations.
+   * The default is false.
+   * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + 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 (updateMask_ != null) { + output.writeMessage(1, getUpdateMask()); + } + if (dataTaxonomy_ != null) { + output.writeMessage(2, getDataTaxonomy()); + } + if (validateOnly_ != false) { + output.writeBool(3, validateOnly_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUpdateMask()); + } + if (dataTaxonomy_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDataTaxonomy()); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, validateOnly_); + } + 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.dataplex.v1.UpdateDataTaxonomyRequest)) { + return super.equals(obj); + } + com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest other = + (com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest) obj; + + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (hasDataTaxonomy() != other.hasDataTaxonomy()) return false; + if (hasDataTaxonomy()) { + if (!getDataTaxonomy().equals(other.getDataTaxonomy())) return false; + } + if (getValidateOnly() != other.getValidateOnly()) 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 (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + if (hasDataTaxonomy()) { + hash = (37 * hash) + DATA_TAXONOMY_FIELD_NUMBER; + hash = (53 * hash) + getDataTaxonomy().hashCode(); + } + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest 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.dataplex.v1.UpdateDataTaxonomyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest 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.dataplex.v1.UpdateDataTaxonomyRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest 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.dataplex.v1.UpdateDataTaxonomyRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest 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.dataplex.v1.UpdateDataTaxonomyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest 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.dataplex.v1.UpdateDataTaxonomyRequest 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; + } + /** + * + * + *
+   * Update DataTaxonomy request.
+   * 
+ * + * Protobuf type {@code google.cloud.dataplex.v1.UpdateDataTaxonomyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.dataplex.v1.UpdateDataTaxonomyRequest) + com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_UpdateDataTaxonomyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_UpdateDataTaxonomyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest.class, + com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest.Builder.class); + } + + // Construct using com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + dataTaxonomy_ = null; + if (dataTaxonomyBuilder_ != null) { + dataTaxonomyBuilder_.dispose(); + dataTaxonomyBuilder_ = null; + } + validateOnly_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.dataplex.v1.DataTaxonomyProto + .internal_static_google_cloud_dataplex_v1_UpdateDataTaxonomyRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest getDefaultInstanceForType() { + return com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest build() { + com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest buildPartial() { + com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest result = + new com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updateMask_ = updateMaskBuilder_ == null ? updateMask_ : updateMaskBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dataTaxonomy_ = + dataTaxonomyBuilder_ == null ? dataTaxonomy_ : dataTaxonomyBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.validateOnly_ = validateOnly_; + } + } + + @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.dataplex.v1.UpdateDataTaxonomyRequest) { + return mergeFrom((com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest other) { + if (other == com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest.getDefaultInstance()) + return this; + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + if (other.hasDataTaxonomy()) { + mergeDataTaxonomy(other.getDataTaxonomy()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + 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(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + input.readMessage(getDataTaxonomyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000004; + 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 int bitField0_; + + 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_; + /** + * + * + *
+     * Required. Mask of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * + * + *
+     * Required. Mask of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @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(); + } + } + /** + * + * + *
+     * Required. Mask of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + } else { + updateMaskBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) + && updateMask_ != null + && updateMask_ != com.google.protobuf.FieldMask.getDefaultInstance()) { + getUpdateMaskBuilder().mergeFrom(value); + } else { + updateMask_ = value; + } + } else { + updateMaskBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + bitField0_ = (bitField0_ & ~0x00000001); + updateMask_ = null; + if (updateMaskBuilder_ != null) { + updateMaskBuilder_.dispose(); + updateMaskBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Mask of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Mask of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. Mask of fields to update.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + 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 com.google.cloud.dataplex.v1.DataTaxonomy dataTaxonomy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataTaxonomy, + com.google.cloud.dataplex.v1.DataTaxonomy.Builder, + com.google.cloud.dataplex.v1.DataTaxonomyOrBuilder> + dataTaxonomyBuilder_; + /** + * + * + *
+     * Required. Only fields specified in `update_mask` are updated.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataTaxonomy field is set. + */ + public boolean hasDataTaxonomy() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * + * + *
+     * Required. Only fields specified in `update_mask` are updated.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataTaxonomy. + */ + public com.google.cloud.dataplex.v1.DataTaxonomy getDataTaxonomy() { + if (dataTaxonomyBuilder_ == null) { + return dataTaxonomy_ == null + ? com.google.cloud.dataplex.v1.DataTaxonomy.getDefaultInstance() + : dataTaxonomy_; + } else { + return dataTaxonomyBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Only fields specified in `update_mask` are updated.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataTaxonomy(com.google.cloud.dataplex.v1.DataTaxonomy value) { + if (dataTaxonomyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dataTaxonomy_ = value; + } else { + dataTaxonomyBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Only fields specified in `update_mask` are updated.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDataTaxonomy( + com.google.cloud.dataplex.v1.DataTaxonomy.Builder builderForValue) { + if (dataTaxonomyBuilder_ == null) { + dataTaxonomy_ = builderForValue.build(); + } else { + dataTaxonomyBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Only fields specified in `update_mask` are updated.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDataTaxonomy(com.google.cloud.dataplex.v1.DataTaxonomy value) { + if (dataTaxonomyBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) + && dataTaxonomy_ != null + && dataTaxonomy_ != com.google.cloud.dataplex.v1.DataTaxonomy.getDefaultInstance()) { + getDataTaxonomyBuilder().mergeFrom(value); + } else { + dataTaxonomy_ = value; + } + } else { + dataTaxonomyBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Only fields specified in `update_mask` are updated.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDataTaxonomy() { + bitField0_ = (bitField0_ & ~0x00000002); + dataTaxonomy_ = null; + if (dataTaxonomyBuilder_ != null) { + dataTaxonomyBuilder_.dispose(); + dataTaxonomyBuilder_ = null; + } + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Only fields specified in `update_mask` are updated.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dataplex.v1.DataTaxonomy.Builder getDataTaxonomyBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getDataTaxonomyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Only fields specified in `update_mask` are updated.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.dataplex.v1.DataTaxonomyOrBuilder getDataTaxonomyOrBuilder() { + if (dataTaxonomyBuilder_ != null) { + return dataTaxonomyBuilder_.getMessageOrBuilder(); + } else { + return dataTaxonomy_ == null + ? com.google.cloud.dataplex.v1.DataTaxonomy.getDefaultInstance() + : dataTaxonomy_; + } + } + /** + * + * + *
+     * Required. Only fields specified in `update_mask` are updated.
+     * 
+ * + * + * .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataTaxonomy, + com.google.cloud.dataplex.v1.DataTaxonomy.Builder, + com.google.cloud.dataplex.v1.DataTaxonomyOrBuilder> + getDataTaxonomyFieldBuilder() { + if (dataTaxonomyBuilder_ == null) { + dataTaxonomyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.dataplex.v1.DataTaxonomy, + com.google.cloud.dataplex.v1.DataTaxonomy.Builder, + com.google.cloud.dataplex.v1.DataTaxonomyOrBuilder>( + getDataTaxonomy(), getParentForChildren(), isClean()); + dataTaxonomy_ = null; + } + return dataTaxonomyBuilder_; + } + + private boolean validateOnly_; + /** + * + * + *
+     * Optional. Only validate the request, but do not perform mutations.
+     * The default is false.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * Optional. Only validate the request, but do not perform mutations.
+     * The default is false.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Only validate the request, but do not perform mutations.
+     * The default is false.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + bitField0_ = (bitField0_ & ~0x00000004); + validateOnly_ = 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.dataplex.v1.UpdateDataTaxonomyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.dataplex.v1.UpdateDataTaxonomyRequest) + private static final com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest(); + } + + public static com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateDataTaxonomyRequest 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.dataplex.v1.UpdateDataTaxonomyRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateDataTaxonomyRequestOrBuilder.java b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateDataTaxonomyRequestOrBuilder.java new file mode 100644 index 000000000000..e5423272ff4d --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateDataTaxonomyRequestOrBuilder.java @@ -0,0 +1,118 @@ +/* + * Copyright 2023 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/dataplex/v1/data_taxonomy.proto + +package com.google.cloud.dataplex.v1; + +public interface UpdateDataTaxonomyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.dataplex.v1.UpdateDataTaxonomyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Mask of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. Mask of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. Mask of fields to update.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); + + /** + * + * + *
+   * Required. Only fields specified in `update_mask` are updated.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the dataTaxonomy field is set. + */ + boolean hasDataTaxonomy(); + /** + * + * + *
+   * Required. Only fields specified in `update_mask` are updated.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The dataTaxonomy. + */ + com.google.cloud.dataplex.v1.DataTaxonomy getDataTaxonomy(); + /** + * + * + *
+   * Required. Only fields specified in `update_mask` are updated.
+   * 
+ * + * + * .google.cloud.dataplex.v1.DataTaxonomy data_taxonomy = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.dataplex.v1.DataTaxonomyOrBuilder getDataTaxonomyOrBuilder(); + + /** + * + * + *
+   * Optional. Only validate the request, but do not perform mutations.
+   * The default is false.
+   * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/data_profile.proto b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/data_profile.proto index eca8edb423b0..b34ed8600e5a 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/data_profile.proto +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/data_profile.proto @@ -17,6 +17,7 @@ syntax = "proto3"; package google.cloud.dataplex.v1; import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/dataplex/v1/processing.proto"; option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; @@ -25,7 +26,70 @@ option java_outer_classname = "DataProfileProto"; option java_package = "com.google.cloud.dataplex.v1"; // DataProfileScan related setting. -message DataProfileSpec {} +message DataProfileSpec { + // The configuration of post scan actions of DataProfileScan job. + message PostScanActions { + // The configuration of BigQuery export post scan action. + message BigQueryExport { + // Optional. The BigQuery table to export DataProfileScan results to. + // Format: + // projects/{project}/datasets/{dataset}/tables/{table} + string results_table = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "bigquery.googleapis.com/Table" + } + ]; + } + + // Optional. If set, results will be exported to the provided BigQuery + // table. + BigQueryExport bigquery_export = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // The specification for fields to include or exclude in data profile scan. + message SelectedFields { + // Optional. Expected input is a list of fully qualified names of fields as + // in the schema. + // + // Only top-level field names for nested fields are supported. + // For instance, if 'x' is of nested field type, listing 'x' is supported + // but 'x.y.z' is not supported. Here 'y' and 'y.z' are nested fields of + // 'x'. + repeated string field_names = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. The percentage of the records to be selected from the dataset for + // DataScan. + // + // * Value can range between 0.0 and 100.0 with up to 3 significant decimal + // digits. + // * Sampling is not applied if `sampling_percent` is not specified, 0 or + // 100. + float sampling_percent = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A filter applied to all rows in a single DataScan job. + // The filter needs to be a valid SQL expression for a WHERE clause in + // BigQuery standard SQL syntax. + // Example: col1 >= 0 AND col2 < 10 + string row_filter = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Actions to take upon job completion.. + PostScanActions post_scan_actions = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The fields to include in data profile. + // + // If not specified, all fields at the time of profile scan job execution are + // included, except for ones listed in `exclude_fields`. + SelectedFields include_fields = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The fields to exclude from data profile. + // + // If specified, the fields will be excluded from data profile, regardless of + // `include_fields` value. + SelectedFields exclude_fields = 6 [(google.api.field_behavior) = OPTIONAL]; +} // DataProfileResult defines the output of DataProfileScan. Each field of the // table will have field type specific profile result. @@ -71,8 +135,9 @@ message DataProfileResult { // below this point. The third quartile (Q3) splits off the highest // 25% of data from the lowest 75%. It is known as the upper or 75th // empirical quartile, as 75% of the data lies below this point. - // Here, the quartiles is provided as an ordered list of quartile - // values for the scanned data, occurring in order Q1, median, Q3. + // Here, the quartiles is provided as an ordered list of approximate + // quartile values for the scanned data, occurring in order Q1, + // median, Q3. repeated int64 quartiles = 6; // Maximum of non-null values in the scanned data. NaN, if the field @@ -119,6 +184,10 @@ message DataProfileResult { // Count of the corresponding value in the scanned data. int64 count = 2; + + // Ratio of the corresponding value in the field against the total + // number of rows in the scanned data. + double ratio = 3; } // Ratio of rows with null value against total scanned rows. @@ -129,10 +198,11 @@ message DataProfileResult { // with REPEATABLE mode. double distinct_ratio = 3; - // The list of top N non-null values and number of times they occur in - // the scanned data. N is 10 or equal to the number of distinct values - // in the field, whichever is smaller. Not available for complex - // non-groupable field type RECORD and fields with REPEATABLE mode. + // The list of top N non-null values, frequency and ratio with which + // they occur in the scanned data. N is 10 or equal to the number of + // distinct values in the field, whichever is smaller. Not available for + // complex non-groupable field type RECORD and fields with REPEATABLE + // mode. repeated TopNValue top_n_values = 4; // Structural and profile information for specific field type. Not @@ -174,6 +244,38 @@ message DataProfileResult { repeated Field fields = 2; } + // The result of post scan actions of DataProfileScan job. + message PostScanActionsResult { + // The result of BigQuery export post scan action. + message BigQueryExportResult { + // Execution state for the exporting. + enum State { + // The exporting state is unspecified. + STATE_UNSPECIFIED = 0; + + // The exporting completed successfully. + SUCCEEDED = 1; + + // The exporting is no longer running due to an error. + FAILED = 2; + + // The exporting is skipped due to no valid scan result to export + // (usually caused by scan failed). + SKIPPED = 3; + } + + // Output only. Execution state for the BigQuery exporting. + State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the BigQuery exporting. + string message = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The result of BigQuery export post scan action. + BigQueryExportResult bigquery_export_result = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + // The count of rows scanned. int64 row_count = 3; @@ -182,4 +284,8 @@ message DataProfileResult { // The data scanned for this result. ScannedData scanned_data = 5; + + // Output only. The result of post scan actions. + PostScanActionsResult post_scan_actions_result = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/data_quality.proto b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/data_quality.proto index b53ee61f5d81..c81582414ce0 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/data_quality.proto +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/data_quality.proto @@ -17,22 +17,98 @@ syntax = "proto3"; package google.cloud.dataplex.v1; import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/cloud/dataplex/v1/processing.proto"; option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; option java_multiple_files = true; option java_outer_classname = "DataQualityProto"; option java_package = "com.google.cloud.dataplex.v1"; +option (google.api.resource_definition) = { + type: "bigquery.googleapis.com/Table" + pattern: "projects/{project}/datasets/{dataset}/tables/{table}" +}; // DataQualityScan related setting. message DataQualitySpec { - // The list of rules to evaluate against a data source. At least one rule is - // required. - repeated DataQualityRule rules = 1; + // The configuration of post scan actions of DataQualityScan. + message PostScanActions { + // The configuration of BigQuery export post scan action. + message BigQueryExport { + // Optional. The BigQuery table to export DataQualityScan results to. + // Format: + // projects/{project}/datasets/{dataset}/tables/{table} + string results_table = 1 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "bigquery.googleapis.com/Table" + } + ]; + } + + // Optional. If set, results will be exported to the provided BigQuery + // table. + BigQueryExport bigquery_export = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. The list of rules to evaluate against a data source. At least one + // rule is required. + repeated DataQualityRule rules = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The percentage of the records to be selected from the dataset for + // DataScan. + // + // * Value can range between 0.0 and 100.0 with up to 3 significant decimal + // digits. + // * Sampling is not applied if `sampling_percent` is not specified, 0 or + // 100. + float sampling_percent = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A filter applied to all rows in a single DataScan job. + // The filter needs to be a valid SQL expression for a WHERE clause in + // BigQuery standard SQL syntax. + // Example: col1 >= 0 AND col2 < 10 + string row_filter = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Actions to take upon job completion. + PostScanActions post_scan_actions = 6 + [(google.api.field_behavior) = OPTIONAL]; } // The output of a DataQualityScan. message DataQualityResult { + // The result of post scan actions of DataQualityScan job. + message PostScanActionsResult { + // The result of BigQuery export post scan action. + message BigQueryExportResult { + // Execution state for the exporting. + enum State { + // The exporting state is unspecified. + STATE_UNSPECIFIED = 0; + + // The exporting completed successfully. + SUCCEEDED = 1; + + // The exporting is no longer running due to an error. + FAILED = 2; + + // The exporting is skipped due to no valid scan result to export + // (usually caused by scan failed). + SKIPPED = 3; + } + + // Output only. Execution state for the BigQuery exporting. + State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Additional information about the BigQuery exporting. + string message = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Output only. The result of BigQuery export post scan action. + BigQueryExportResult bigquery_export_result = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + // Overall data quality result -- `true` if all rules passed. bool passed = 5; @@ -47,6 +123,10 @@ message DataQualityResult { // The data scanned for this result. ScannedData scanned_data = 7; + + // Output only. The result of post scan actions. + PostScanActionsResult post_scan_actions_result = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // DataQualityRuleResult provides a more detailed, per-rule view of the results. @@ -57,8 +137,9 @@ message DataQualityRuleResult { // Whether the rule passed or failed. bool passed = 7; - // The number of rows a rule was evaluated against. This field is only valid - // for ColumnMap type rules. + // The number of rows a rule was evaluated against. + // + // This field is only valid for row-level type rules. // // Evaluated count can be configured to either // @@ -69,18 +150,21 @@ message DataQualityRuleResult { int64 evaluated_count = 9; // The number of rows which passed a rule evaluation. - // This field is only valid for ColumnMap type rules. + // + // This field is only valid for row-level type rules. int64 passed_count = 8; // The number of rows with null values in the specified column. int64 null_count = 5; // The ratio of **passed_count / evaluated_count**. - // This field is only valid for ColumnMap type rules. + // + // This field is only valid for row-level type rules. double pass_ratio = 6; // The query to find rows that did not pass this rule. - // Only applies to ColumnMap and RowCondition rules. + // + // This field is only valid for row-level type rules. string failing_rows_query = 10; } @@ -123,14 +207,14 @@ message DataQualityRule { // Evaluates whether each column value is contained by a specified set. message SetExpectation { - // Expected values for the column value. - repeated string values = 1; + // Optional. Expected values for the column value. + repeated string values = 1 [(google.api.field_behavior) = OPTIONAL]; } // Evaluates whether each column value matches a specified regex. message RegexExpectation { - // A regular expression the column value is expected to match. - string regex = 1; + // Optional. A regular expression the column value is expected to match. + string regex = 1 [(google.api.field_behavior) = OPTIONAL]; } // Evaluates whether the column has duplicates. @@ -154,32 +238,32 @@ message DataQualityRule { MAX = 3; } - // The aggregate metric to evaluate. - ColumnStatistic statistic = 1; + // Optional. The aggregate metric to evaluate. + ColumnStatistic statistic = 1 [(google.api.field_behavior) = OPTIONAL]; - // The minimum column statistic value allowed for a row to pass this - // validation. + // Optional. The minimum column statistic value allowed for a row to pass + // this validation. // // At least one of `min_value` and `max_value` need to be provided. - string min_value = 2; + string min_value = 2 [(google.api.field_behavior) = OPTIONAL]; - // The maximum column statistic value allowed for a row to pass this - // validation. + // Optional. The maximum column statistic value allowed for a row to pass + // this validation. // // At least one of `min_value` and `max_value` need to be provided. - string max_value = 3; + string max_value = 3 [(google.api.field_behavior) = OPTIONAL]; - // Whether column statistic needs to be strictly greater than ('>') - // the minimum, or if equality is allowed. + // Optional. Whether column statistic needs to be strictly greater than + // ('>') the minimum, or if equality is allowed. // // Only relevant if a `min_value` has been defined. Default = false. - bool strict_min_enabled = 4; + bool strict_min_enabled = 4 [(google.api.field_behavior) = OPTIONAL]; - // Whether column statistic needs to be strictly lesser than ('<') the - // maximum, or if equality is allowed. + // Optional. Whether column statistic needs to be strictly lesser than ('<') + // the maximum, or if equality is allowed. // // Only relevant if a `max_value` has been defined. Default = false. - bool strict_max_enabled = 5; + bool strict_max_enabled = 5 [(google.api.field_behavior) = OPTIONAL]; } // Evaluates whether each row passes the specified condition. @@ -189,8 +273,8 @@ message DataQualityRule { // // Example: col1 >= 0 AND col2 < 10 message RowConditionExpectation { - // The SQL expression. - string sql_expression = 1; + // Optional. The SQL expression. + string sql_expression = 1 [(google.api.field_behavior) = OPTIONAL]; } // Evaluates whether the provided expression is true. @@ -200,39 +284,40 @@ message DataQualityRule { // // Example: MIN(col1) >= 0 message TableConditionExpectation { - // The SQL expression. - string sql_expression = 1; + // Optional. The SQL expression. + string sql_expression = 1 [(google.api.field_behavior) = OPTIONAL]; } // The rule-specific configuration. oneof rule_type { - // ColumnMap rule which evaluates whether each column value lies between a + // Row-level rule which evaluates whether each column value lies between a // specified range. RangeExpectation range_expectation = 1; - // ColumnMap rule which evaluates whether each column value is null. + // Row-level rule which evaluates whether each column value is null. NonNullExpectation non_null_expectation = 2; - // ColumnMap rule which evaluates whether each column value is contained by + // Row-level rule which evaluates whether each column value is contained by // a specified set. SetExpectation set_expectation = 3; - // ColumnMap rule which evaluates whether each column value matches a + // Row-level rule which evaluates whether each column value matches a // specified regex. RegexExpectation regex_expectation = 4; - // ColumnAggregate rule which evaluates whether the column has duplicates. + // Row-level rule which evaluates whether each column value is unique. UniquenessExpectation uniqueness_expectation = 100; - // ColumnAggregate rule which evaluates whether the column aggregate + // Aggregate rule which evaluates whether the column aggregate // statistic lies between a specified range. StatisticRangeExpectation statistic_range_expectation = 101; - // Table rule which evaluates whether each row passes the specified - // condition. + // Row-level rule which evaluates whether each row in a table passes the + // specified condition. RowConditionExpectation row_condition_expectation = 200; - // Table rule which evaluates whether the provided expression is true. + // Aggregate rule which evaluates whether the provided expression is true + // for a table. TableConditionExpectation table_condition_expectation = 201; } @@ -243,7 +328,7 @@ message DataQualityRule { // `ignore_null` is `true`. In that case, such `null` rows are trivially // considered passing. // - // Only applicable to ColumnMap rules. + // This field is only valid for row-level type rules. bool ignore_null = 501 [(google.api.field_behavior) = OPTIONAL]; // Required. The dimension a rule belongs to. Results are also aggregated at @@ -255,5 +340,21 @@ message DataQualityRule { // pass this rule, with a range of [0.0, 1.0]. // // 0 indicates default value (i.e. 1.0). + // + // This field is only valid for row-level type rules. double threshold = 503 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A mutable name for the rule. + // + // * The name must contain only letters (a-z, A-Z), numbers (0-9), or + // hyphens (-). + // * The maximum length is 63 characters. + // * Must start with a letter. + // * Must end with a number or a letter. + string name = 504 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Description of the rule. + // + // * The maximum length is 1,024 characters. + string description = 505 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/data_taxonomy.proto b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/data_taxonomy.proto new file mode 100644 index 000000000000..feb150dca0d6 --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/data_taxonomy.proto @@ -0,0 +1,793 @@ +// Copyright 2023 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.dataplex.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/dataplex/v1/security.proto"; +import "google/cloud/dataplex/v1/service.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; +option java_multiple_files = true; +option java_outer_classname = "DataTaxonomyProto"; +option java_package = "com.google.cloud.dataplex.v1"; + +// DataTaxonomyService enables attribute-based governance. The resources +// currently offered include DataTaxonomy and DataAttribute. +service DataTaxonomyService { + option (google.api.default_host) = "dataplex.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Create a DataTaxonomy resource. + rpc CreateDataTaxonomy(CreateDataTaxonomyRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/dataTaxonomies" + body: "data_taxonomy" + }; + option (google.api.method_signature) = + "parent,data_taxonomy,data_taxonomy_id"; + option (google.longrunning.operation_info) = { + response_type: "DataTaxonomy" + metadata_type: "OperationMetadata" + }; + } + + // Updates a DataTaxonomy resource. + rpc UpdateDataTaxonomy(UpdateDataTaxonomyRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{data_taxonomy.name=projects/*/locations/*/dataTaxonomies/*}" + body: "data_taxonomy" + }; + option (google.api.method_signature) = "data_taxonomy,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "DataTaxonomy" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a DataTaxonomy resource. All attributes within the DataTaxonomy + // must be deleted before the DataTaxonomy can be deleted. + rpc DeleteDataTaxonomy(DeleteDataTaxonomyRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/dataTaxonomies/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists DataTaxonomy resources in a project and location. + rpc ListDataTaxonomies(ListDataTaxonomiesRequest) + returns (ListDataTaxonomiesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/dataTaxonomies" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves a DataTaxonomy resource. + rpc GetDataTaxonomy(GetDataTaxonomyRequest) returns (DataTaxonomy) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/dataTaxonomies/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Create a DataAttributeBinding resource. + rpc CreateDataAttributeBinding(CreateDataAttributeBindingRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/dataAttributeBindings" + body: "data_attribute_binding" + }; + option (google.api.method_signature) = + "parent,data_attribute_binding,data_attribute_binding_id"; + option (google.longrunning.operation_info) = { + response_type: "DataAttributeBinding" + metadata_type: "OperationMetadata" + }; + } + + // Updates a DataAttributeBinding resource. + rpc UpdateDataAttributeBinding(UpdateDataAttributeBindingRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{data_attribute_binding.name=projects/*/locations/*/dataAttributeBindings/*}" + body: "data_attribute_binding" + }; + option (google.api.method_signature) = "data_attribute_binding,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "DataAttributeBinding" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a DataAttributeBinding resource. All attributes within the + // DataAttributeBinding must be deleted before the DataAttributeBinding can be + // deleted. + rpc DeleteDataAttributeBinding(DeleteDataAttributeBindingRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/dataAttributeBindings/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists DataAttributeBinding resources in a project and location. + rpc ListDataAttributeBindings(ListDataAttributeBindingsRequest) + returns (ListDataAttributeBindingsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/dataAttributeBindings" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves a DataAttributeBinding resource. + rpc GetDataAttributeBinding(GetDataAttributeBindingRequest) + returns (DataAttributeBinding) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/dataAttributeBindings/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Create a DataAttribute resource. + rpc CreateDataAttribute(CreateDataAttributeRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/dataTaxonomies/*}/attributes" + body: "data_attribute" + }; + option (google.api.method_signature) = + "parent,data_attribute,data_attribute_id"; + option (google.longrunning.operation_info) = { + response_type: "DataAttribute" + metadata_type: "OperationMetadata" + }; + } + + // Updates a DataAttribute resource. + rpc UpdateDataAttribute(UpdateDataAttributeRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{data_attribute.name=projects/*/locations/*/dataTaxonomies/*/attributes/*}" + body: "data_attribute" + }; + option (google.api.method_signature) = "data_attribute,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "DataAttribute" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a Data Attribute resource. + rpc DeleteDataAttribute(DeleteDataAttributeRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/dataTaxonomies/*/attributes/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists Data Attribute resources in a DataTaxonomy. + rpc ListDataAttributes(ListDataAttributesRequest) + returns (ListDataAttributesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/dataTaxonomies/*}/attributes" + }; + option (google.api.method_signature) = "parent"; + } + + // Retrieves a Data Attribute resource. + rpc GetDataAttribute(GetDataAttributeRequest) returns (DataAttribute) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/dataTaxonomies/*/attributes/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// DataTaxonomy represents a set of hierarchical DataAttributes resources, +// grouped with a common theme Eg: 'SensitiveDataTaxonomy' can have attributes +// to manage PII data. It is defined at project level. +message DataTaxonomy { + option (google.api.resource) = { + type: "dataplex.googleapis.com/DataTaxonomy" + pattern: "projects/{project}/locations/{location}/dataTaxonomies/{data_taxonomy_id}" + }; + + // Output only. The relative resource name of the DataTaxonomy, of the form: + // projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataTaxonomy" + } + ]; + + // Output only. System generated globally unique ID for the dataTaxonomy. This + // ID will be different if the DataTaxonomy is deleted and re-created with the + // same name. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the DataTaxonomy was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the DataTaxonomy was last updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Description of the DataTaxonomy. + string description = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User friendly display name. + string display_name = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User-defined labels for the DataTaxonomy. + map labels = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The number of attributes in the DataTaxonomy. + int32 attribute_count = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 10; + + // Output only. The number of classes in the DataTaxonomy. + int32 class_count = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Denotes one dataAttribute in a dataTaxonomy, for example, PII. +// DataAttribute resources can be defined in a hierarchy. +// A single dataAttribute resource can contain specs of multiple types +// +// ``` +// PII +// - ResourceAccessSpec : +// - readers :foo@bar.com +// - DataAccessSpec : +// - readers :bar@foo.com +// ``` +message DataAttribute { + option (google.api.resource) = { + type: "dataplex.googleapis.com/DataAttribute" + pattern: "projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}" + }; + + // Output only. The relative resource name of the dataAttribute, of the form: + // projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}. + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataAttribute" + } + ]; + + // Output only. System generated globally unique ID for the DataAttribute. + // This ID will be different if the DataAttribute is deleted and re-created + // with the same name. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the DataAttribute was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the DataAttribute was last updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Description of the DataAttribute. + string description = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User friendly display name. + string display_name = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User-defined labels for the DataAttribute. + map labels = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The ID of the parent DataAttribute resource, should belong to the + // same data taxonomy. Circular dependency in parent chain is not valid. + // Maximum depth of the hierarchy allowed is 4. + // [a -> b -> c -> d -> e, depth = 4] + string parent_id = 8 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataAttribute" + } + ]; + + // Output only. The number of child attributes present for this attribute. + int32 attribute_count = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + string etag = 10; + + // Optional. Specified when applied to a resource (eg: Cloud Storage bucket, + // BigQuery dataset, BigQuery table). + ResourceAccessSpec resource_access_spec = 100 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Specified when applied to data stored on the resource (eg: rows, + // columns in BigQuery Tables). + DataAccessSpec data_access_spec = 101 + [(google.api.field_behavior) = OPTIONAL]; +} + +// DataAttributeBinding represents binding of attributes to resources. Eg: Bind +// 'CustomerInfo' entity with 'PII' attribute. +message DataAttributeBinding { + option (google.api.resource) = { + type: "dataplex.googleapis.com/DataAttributeBinding" + pattern: "projects/{project}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id}" + }; + + // Represents a subresource of the given resource, and associated bindings + // with it. Currently supported subresources are column and partition schema + // fields within a table. + message Path { + // Required. The name identifier of the path. + // Nested columns should be of the form: 'address.city'. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. List of attributes to be associated with the path of the + // resource, provided in the form: + // projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + repeated string attributes = 2 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataAttribute" + } + ]; + } + + // Output only. The relative resource name of the Data Attribute Binding, of + // the form: + // projects/{project_number}/locations/{location}/dataAttributeBindings/{data_attribute_binding_id} + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataAttributeBinding" + } + ]; + + // Output only. System generated globally unique ID for the + // DataAttributeBinding. This ID will be different if the DataAttributeBinding + // is deleted and re-created with the same name. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the DataAttributeBinding was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time when the DataAttributeBinding was last updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Description of the DataAttributeBinding. + string description = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User friendly display name. + string display_name = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. User-defined labels for the DataAttributeBinding. + map labels = 7 [(google.api.field_behavior) = OPTIONAL]; + + // This checksum is computed by the server based on the value of other + // fields, and may be sent on update and delete requests to ensure the + // client has an up-to-date value before proceeding. + // Etags must be used when calling the DeleteDataAttributeBinding and the + // UpdateDataAttributeBinding method. + string etag = 8; + + // The reference to the resource that is associated to attributes, or + // the query to match resources and associate attributes. + oneof resource_reference { + // Optional. Immutable. The resource name of the resource that is associated + // to attributes. Presently, only entity resource is supported in the form: + // projects/{project}/locations/{location}/lakes/{lake}/zones/{zone}/entities/{entity_id} + // Must belong in the same project and region as the attribute binding, and + // there can only exist one active binding for a resource. + string resource = 100 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.field_behavior) = IMMUTABLE + ]; + } + + // Optional. List of attributes to be associated with the resource, provided + // in the form: + // projects/{project}/locations/{location}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + repeated string attributes = 110 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataAttribute" + } + ]; + + // Optional. The list of paths for items within the associated resource (eg. + // columns and partitions within a table) along with attribute bindings. + repeated Path paths = 120 [(google.api.field_behavior) = OPTIONAL]; +} + +// Create DataTaxonomy request. +message CreateDataTaxonomyRequest { + // Required. The resource name of the data taxonomy location, of the form: + // projects/{project_number}/locations/{location_id} + // where `location_id` refers to a GCP region. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. DataTaxonomy identifier. + // * Must contain only lowercase letters, numbers and hyphens. + // * Must start with a letter. + // * Must be between 1-63 characters. + // * Must end with a number or a letter. + // * Must be unique within the Project. + string data_taxonomy_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. DataTaxonomy resource. + DataTaxonomy data_taxonomy = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Update DataTaxonomy request. +message UpdateDataTaxonomyRequest { + // Required. Mask of fields to update. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Only fields specified in `update_mask` are updated. + DataTaxonomy data_taxonomy = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Get DataTaxonomy request. +message GetDataTaxonomyRequest { + // Required. The resource name of the DataTaxonomy: + // projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataTaxonomy" + } + ]; +} + +// List DataTaxonomies request. +message ListDataTaxonomiesRequest { + // Required. The resource name of the DataTaxonomy location, of the form: + // projects/{project_number}/locations/{location_id} + // where `location_id` refers to a GCP region. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. Maximum number of DataTaxonomies to return. The service may + // return fewer than this value. If unspecified, at most 10 DataTaxonomies + // will be returned. The maximum value is 1000; values above 1000 will be + // coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous ` ListDataTaxonomies` call. + // Provide this to retrieve the subsequent page. When paginating, all other + // parameters provided to ` ListDataTaxonomies` must match the call that + // provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Order by fields for the result. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// List DataTaxonomies response. +message ListDataTaxonomiesResponse { + // DataTaxonomies under the given parent location. + repeated DataTaxonomy data_taxonomies = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable_locations = 3; +} + +// Delete DataTaxonomy request. +message DeleteDataTaxonomyRequest { + // Required. The resource name of the DataTaxonomy: + // projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataTaxonomy" + } + ]; + + // Optional. If the client provided etag value does not match the current etag + // value,the DeleteDataTaxonomy method returns an ABORTED error. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Create DataAttribute request. +message CreateDataAttributeRequest { + // Required. The resource name of the parent data taxonomy + // projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataTaxonomy" + } + ]; + + // Required. DataAttribute identifier. + // * Must contain only lowercase letters, numbers and hyphens. + // * Must start with a letter. + // * Must be between 1-63 characters. + // * Must end with a number or a letter. + // * Must be unique within the DataTaxonomy. + string data_attribute_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. DataAttribute resource. + DataAttribute data_attribute = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Update DataAttribute request. +message UpdateDataAttributeRequest { + // Required. Mask of fields to update. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Only fields specified in `update_mask` are updated. + DataAttribute data_attribute = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Get DataAttribute request. +message GetDataAttributeRequest { + // Required. The resource name of the dataAttribute: + // projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataAttribute" + } + ]; +} + +// List DataAttributes request. +message ListDataAttributesRequest { + // Required. The resource name of the DataTaxonomy: + // projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataTaxonomy" + } + ]; + + // Optional. Maximum number of DataAttributes to return. The service may + // return fewer than this value. If unspecified, at most 10 dataAttributes + // will be returned. The maximum value is 1000; values above 1000 will be + // coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListDataAttributes` call. + // Provide this to retrieve the subsequent page. When paginating, all other + // parameters provided to `ListDataAttributes` must match the call that + // provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Order by fields for the result. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// List DataAttributes response. +message ListDataAttributesResponse { + // DataAttributes under the given parent DataTaxonomy. + repeated DataAttribute data_attributes = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable_locations = 3; +} + +// Delete DataAttribute request. +message DeleteDataAttributeRequest { + // Required. The resource name of the DataAttribute: + // projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataAttribute" + } + ]; + + // Optional. If the client provided etag value does not match the current etag + // value, the DeleteDataAttribute method returns an ABORTED error response. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Create DataAttributeBinding request. +message CreateDataAttributeBindingRequest { + // Required. The resource name of the parent data taxonomy + // projects/{project_number}/locations/{location_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. DataAttributeBinding identifier. + // * Must contain only lowercase letters, numbers and hyphens. + // * Must start with a letter. + // * Must be between 1-63 characters. + // * Must end with a number or a letter. + // * Must be unique within the Location. + string data_attribute_binding_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. DataAttributeBinding resource. + DataAttributeBinding data_attribute_binding = 3 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Update DataAttributeBinding request. +message UpdateDataAttributeBindingRequest { + // Required. Mask of fields to update. + google.protobuf.FieldMask update_mask = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Only fields specified in `update_mask` are updated. + DataAttributeBinding data_attribute_binding = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Only validate the request, but do not perform mutations. + // The default is false. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Get DataAttributeBinding request. +message GetDataAttributeBindingRequest { + // Required. The resource name of the DataAttributeBinding: + // projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataAttributeBinding" + } + ]; +} + +// List DataAttributeBindings request. +message ListDataAttributeBindingsRequest { + // Required. The resource name of the Location: + // projects/{project_number}/locations/{location_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. Maximum number of DataAttributeBindings to return. The service + // may return fewer than this value. If unspecified, at most 10 + // DataAttributeBindings will be returned. The maximum value is 1000; values + // above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token received from a previous `ListDataAttributeBindings` + // call. Provide this to retrieve the subsequent page. When paginating, all + // other parameters provided to `ListDataAttributeBindings` must match the + // call that provided the page token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Filter request. + // Filter using resource: filter=resource:"resource-name" + // Filter using attribute: filter=attributes:"attribute-name" + // Filter using attribute in paths list: + // filter=paths.attributes:"attribute-name" + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Order by fields for the result. + string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// List DataAttributeBindings response. +message ListDataAttributeBindingsResponse { + // DataAttributeBindings under the given parent Location. + repeated DataAttributeBinding data_attribute_bindings = 1; + + // Token to retrieve the next page of results, or empty if there are no more + // results in the list. + string next_page_token = 2; + + // Locations that could not be reached. + repeated string unreachable_locations = 3; +} + +// Delete DataAttributeBinding request. +message DeleteDataAttributeBindingRequest { + // Required. The resource name of the DataAttributeBinding: + // projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dataplex.googleapis.com/DataAttributeBinding" + } + ]; + + // Required. If the client provided etag value does not match the current etag + // value, the DeleteDataAttributeBindingRequest method returns an ABORTED + // error response. Etags must be used when calling the + // DeleteDataAttributeBinding. + string etag = 2 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/datascans.proto b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/datascans.proto index 78cb037242d8..a1a752c8a2fb 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/datascans.proto +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/datascans.proto @@ -336,6 +336,25 @@ message ListDataScanJobsRequest { // parameters provided to `ListDataScanJobs` must match the call that provided // the page token. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An expression for filtering the results of the ListDataScanJobs + // request. + // + // If unspecified, all datascan jobs will be returned. Multiple filters can be + // applied (with `AND`, `OR` logical operators). Filters are case-sensitive. + // + // Allowed fields are: + // + // - `start_time` + // - `end_time` + // + // `start_time` and `end_time` expect RFC-3339 formatted strings (e.g. + // 2018-10-08T18:30:00-07:00). + // + // For instance, 'start_time > 2018-10-08T00:00:00.123456789Z AND end_time < + // 2018-10-09T00:00:00.123456789Z' limits results to DataScanJobs between + // specified start and end times. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; } // List DataScanJobs response. diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/logs.proto b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/logs.proto index e167a5c099bb..191327b37503 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/logs.proto +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/logs.proto @@ -186,6 +186,19 @@ message JobEvent { DATAPROC = 1; } + // Job Execution trigger. + enum ExecutionTrigger { + // The job execution trigger is unspecified. + EXECUTION_TRIGGER_UNSPECIFIED = 0; + + // The job was triggered by Dataplex based on trigger spec from task + // definition. + TASK_CONFIG = 1; + + // The job was triggered by the explicit call of Task API. + RUN_REQUEST = 2; + } + // The log message. string message = 1; @@ -212,6 +225,9 @@ message JobEvent { // The reference to the job within the service. string service_job = 9; + + // Job execution trigger. + ExecutionTrigger execution_trigger = 11; } // These messages contain information about sessions within an environment. @@ -301,6 +317,7 @@ message SessionEvent { // These messages contain information about the execution of a datascan. // The monitored resource is 'DataScan' +// Next ID: 13 message DataScanEvent { // The type of the data scan. enum ScanType { @@ -319,17 +336,20 @@ message DataScanEvent { // Unspecified job state. STATE_UNSPECIFIED = 0; - // Data scan started. + // Data scan job started. STARTED = 1; - // Data scan successfully completed. + // Data scan job successfully completed. SUCCEEDED = 2; - // Data scan was unsuccessful. + // Data scan job was unsuccessful. FAILED = 3; - // Data scan was cancelled. + // Data scan job was cancelled. CANCELLED = 4; + + // Data scan job was createed. + CREATED = 5; } // The trigger type for the data scan. @@ -377,12 +397,74 @@ message DataScanEvent { map dimension_passed = 3; } + // Applied configs for data profile type data scan job. + message DataProfileAppliedConfigs { + // The percentage of the records selected from the dataset for DataScan. + // + // * Value ranges between 0.0 and 100.0. + // * Value 0.0 or 100.0 imply that sampling was not applied. + float sampling_percent = 1; + + // Boolean indicating whether a row filter was applied in the DataScan job. + bool row_filter_applied = 2; + + // Boolean indicating whether a column filter was applied in the DataScan + // job. + bool column_filter_applied = 3; + } + + // Applied configs for data quality type data scan job. + message DataQualityAppliedConfigs { + // The percentage of the records selected from the dataset for DataScan. + // + // * Value ranges between 0.0 and 100.0. + // * Value 0.0 or 100.0 imply that sampling was not applied. + float sampling_percent = 1; + + // Boolean indicating whether a row filter was applied in the DataScan job. + bool row_filter_applied = 2; + } + + // Post scan actions result for data scan job. + message PostScanActionsResult { + // The result of BigQuery export post scan action. + message BigQueryExportResult { + // Execution state for the exporting. + enum State { + // The exporting state is unspecified. + STATE_UNSPECIFIED = 0; + + // The exporting completed successfully. + SUCCEEDED = 1; + + // The exporting is no longer running due to an error. + FAILED = 2; + + // The exporting is skipped due to no valid scan result to export + // (usually caused by scan failed). + SKIPPED = 3; + } + + // Execution state for the BigQuery exporting. + State state = 1; + + // Additional information about the BigQuery exporting. + string message = 2; + } + + // The result of BigQuery export post scan action. + BigQueryExportResult bigquery_export_result = 1; + } + // The data source of the data scan string data_source = 1; // The identifier of the specific data scan job this log entry is for. string job_id = 2; + // The time when the data scan job was created. + google.protobuf.Timestamp create_time = 12; + // The time when the data scan job started to run. google.protobuf.Timestamp start_time = 3; @@ -415,4 +497,120 @@ message DataScanEvent { // Data quality result for data quality type data scan. DataQualityResult data_quality = 102; } + + // The applied configs in the data scan job. + oneof appliedConfigs { + // Applied configs for data profile type data scan. + DataProfileAppliedConfigs data_profile_configs = 201; + + // Applied configs for data quality type data scan. + DataQualityAppliedConfigs data_quality_configs = 202; + } + + // The result of post scan actions. + PostScanActionsResult post_scan_actions_result = 11; +} + +// Information about the result of a data quality rule for data quality scan. +// The monitored resource is 'DataScan'. +message DataQualityScanRuleResult { + // The type of the data quality rule. + enum RuleType { + // An unspecified rule type. + RULE_TYPE_UNSPECIFIED = 0; + + // Please see + // https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#nonnullexpectation. + NON_NULL_EXPECTATION = 1; + + // Please see + // https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#rangeexpectation. + RANGE_EXPECTATION = 2; + + // Please see + // https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#regexexpectation. + REGEX_EXPECTATION = 3; + + // Please see + // https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#rowconditionexpectation. + ROW_CONDITION_EXPECTATION = 4; + + // Please see + // https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#setexpectation. + SET_EXPECTATION = 5; + + // Please see + // https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#statisticrangeexpectation. + STATISTIC_RANGE_EXPECTATION = 6; + + // Please see + // https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#tableconditionexpectation. + TABLE_CONDITION_EXPECTATION = 7; + + // Please see + // https://cloud.google.com/dataplex/docs/reference/rest/v1/DataQualityRule#uniquenessexpectation. + UNIQUENESS_EXPECTATION = 8; + } + + // The evaluation type of the data quality rule. + enum EvaluationType { + // An unspecified evaluation type. + EVALUATION_TYPE_UNSPECIFIED = 0; + + // The rule evaluation is done at per row level. + PER_ROW = 1; + + // The rule evaluation is done for an aggregate of rows. + AGGREGATE = 2; + } + + // Whether the data quality rule passed or failed. + enum Result { + // An unspecified result. + RESULT_UNSPECIFIED = 0; + + // The data quality rule passed. + PASSED = 1; + + // The data quality rule failed. + FAILED = 2; + } + + // Identifier of the specific data scan job this log entry is for. + string job_id = 1; + + // The data source of the data scan (e.g. BigQuery table name). + string data_source = 2; + + // The column which this rule is evaluated against. + string column = 3; + + // The name of the data quality rule. + string rule_name = 4; + + // The type of the data quality rule. + RuleType rule_type = 5; + + // The evaluation type of the data quality rule. + EvaluationType evalution_type = 6; + + // The dimension of the data quality rule. + string rule_dimension = 7; + + // The passing threshold ([0.0, 100.0]) of the data quality rule. + double threshold_percent = 8; + + // The result of the data quality rule. + Result result = 9; + + // The number of rows evaluated against the data quality rule. + // This field is only valid for rules of PER_ROW evaluation type. + int64 evaluated_row_count = 10; + + // The number of rows which passed a rule evaluation. + // This field is only valid for rules of PER_ROW evaluation type. + int64 passed_row_count = 11; + + // The number of rows with null values in the specified column. + int64 null_row_count = 12; } diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/security.proto b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/security.proto new file mode 100644 index 000000000000..97851c61b21e --- /dev/null +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/security.proto @@ -0,0 +1,53 @@ +// Copyright 2023 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.dataplex.v1; + +import "google/api/field_behavior.proto"; + +option go_package = "cloud.google.com/go/dataplex/apiv1/dataplexpb;dataplexpb"; +option java_multiple_files = true; +option java_outer_classname = "SecurityProto"; +option java_package = "com.google.cloud.dataplex.v1"; + +// ResourceAccessSpec holds the access control configuration to be enforced +// on the resources, for example, Cloud Storage bucket, BigQuery dataset, +// BigQuery table. +message ResourceAccessSpec { + // Optional. The format of strings follows the pattern followed by IAM in the + // bindings. user:{email}, serviceAccount:{email} group:{email}. + // The set of principals to be granted reader role on the resource. + repeated string readers = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The set of principals to be granted writer role on the resource. + repeated string writers = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The set of principals to be granted owner role on the resource. + repeated string owners = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// DataAccessSpec holds the access control configuration to be enforced on data +// stored within resources (eg: rows, columns in BigQuery Tables). When +// associated with data, the data is only accessible to +// principals explicitly granted access through the DataAccessSpec. Principals +// with access to the containing resource are not implicitly granted access. +message DataAccessSpec { + // Optional. The format of strings follows the pattern followed by IAM in the + // bindings. user:{email}, serviceAccount:{email} group:{email}. + // The set of principals to be granted reader role on data + // stored within resources. + repeated string readers = 1 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/service.proto b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/service.proto index 3be1b3690533..8972d65922f9 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/service.proto +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/service.proto @@ -907,6 +907,24 @@ message RunTaskRequest { (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { type: "dataplex.googleapis.com/Task" } ]; + + // Optional. User-defined labels for the task. If the map is left empty, the + // task will run with existing labels from task definition. If the map + // contains an entry with a new key, the same will be added to existing set of + // labels. If the map contains an entry with an existing label key in task + // definition, the task will run with new label value for that entry. Clearing + // an existing label will require label value to be explicitly set to a hyphen + // "-". The label value cannot be empty. + map labels = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Execution spec arguments. If the map is left empty, the task will + // run with existing execution spec args from task definition. If the map + // contains an entry with a new key, the same will be added to existing set of + // args. If the map contains an entry with an existing arg key in task + // definition, the task will run with new arg value for that entry. Clearing + // an existing arg will require arg value to be explicitly set to a hyphen + // "-". The arg value cannot be empty. + map args = 4 [(google.api.field_behavior) = OPTIONAL]; } message RunTaskResponse { diff --git a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/tasks.proto b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/tasks.proto index afc71f89c167..9333e44021fc 100644 --- a/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/tasks.proto +++ b/java-dataplex/proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/tasks.proto @@ -363,6 +363,19 @@ message Job { ABORTED = 6; } + // Job execution trigger. + enum Trigger { + // The trigger is unspecified. + TRIGGER_UNSPECIFIED = 0; + + // The job was triggered by Dataplex based on trigger spec from task + // definition. + TASK_CONFIG = 1; + + // The job was triggered by the explicit call of Task API. + RUN_REQUEST = 2; + } + // Output only. The relative resource name of the job, of the form: // `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{task_id}/jobs/{job_id}`. string name = 1 [ @@ -397,4 +410,14 @@ message Job { // Output only. Additional information about the current state. string message = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. User-defined labels for the task. + map labels = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Job execution trigger. + Trigger trigger = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Spec related to how a task is executed. + Task.ExecutionSpec execution_spec = 100 + [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/dataplexservice/runtask/AsyncRunTask.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/dataplexservice/runtask/AsyncRunTask.java index 6b41c5b5f5e7..3160858237fb 100644 --- a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/dataplexservice/runtask/AsyncRunTask.java +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/dataplexservice/runtask/AsyncRunTask.java @@ -22,6 +22,7 @@ import com.google.cloud.dataplex.v1.RunTaskRequest; import com.google.cloud.dataplex.v1.RunTaskResponse; import com.google.cloud.dataplex.v1.TaskName; +import java.util.HashMap; public class AsyncRunTask { @@ -39,6 +40,8 @@ public static void asyncRunTask() throws Exception { RunTaskRequest request = RunTaskRequest.newBuilder() .setName(TaskName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[TASK]").toString()) + .putAllLabels(new HashMap()) + .putAllArgs(new HashMap()) .build(); ApiFuture future = dataplexServiceClient.runTaskCallable().futureCall(request); diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/dataplexservice/runtask/SyncRunTask.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/dataplexservice/runtask/SyncRunTask.java index 1f2f7b11b7a7..3dd868e94dd1 100644 --- a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/dataplexservice/runtask/SyncRunTask.java +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/dataplexservice/runtask/SyncRunTask.java @@ -21,6 +21,7 @@ import com.google.cloud.dataplex.v1.RunTaskRequest; import com.google.cloud.dataplex.v1.RunTaskResponse; import com.google.cloud.dataplex.v1.TaskName; +import java.util.HashMap; public class SyncRunTask { @@ -38,6 +39,8 @@ public static void syncRunTask() throws Exception { RunTaskRequest request = RunTaskRequest.newBuilder() .setName(TaskName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[TASK]").toString()) + .putAllLabels(new HashMap()) + .putAllArgs(new HashMap()) .build(); RunTaskResponse response = dataplexServiceClient.runTask(request); } diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datascanservice/listdatascanjobs/AsyncListDataScanJobs.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datascanservice/listdatascanjobs/AsyncListDataScanJobs.java index e0631d599263..fc717b73cd0a 100644 --- a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datascanservice/listdatascanjobs/AsyncListDataScanJobs.java +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datascanservice/listdatascanjobs/AsyncListDataScanJobs.java @@ -41,6 +41,7 @@ public static void asyncListDataScanJobs() throws Exception { .setParent(DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") .build(); ApiFuture future = dataScanServiceClient.listDataScanJobsPagedCallable().futureCall(request); diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datascanservice/listdatascanjobs/AsyncListDataScanJobsPaged.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datascanservice/listdatascanjobs/AsyncListDataScanJobsPaged.java index e66b94afcd6f..fcd654489e1b 100644 --- a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datascanservice/listdatascanjobs/AsyncListDataScanJobsPaged.java +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datascanservice/listdatascanjobs/AsyncListDataScanJobsPaged.java @@ -42,6 +42,7 @@ public static void asyncListDataScanJobsPaged() throws Exception { .setParent(DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") .build(); while (true) { ListDataScanJobsResponse response = diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datascanservice/listdatascanjobs/SyncListDataScanJobs.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datascanservice/listdatascanjobs/SyncListDataScanJobs.java index 608056facda4..fa36db8f81f6 100644 --- a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datascanservice/listdatascanjobs/SyncListDataScanJobs.java +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datascanservice/listdatascanjobs/SyncListDataScanJobs.java @@ -40,6 +40,7 @@ public static void syncListDataScanJobs() throws Exception { .setParent(DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") .build(); for (DataScanJob element : dataScanServiceClient.listDataScanJobs(request).iterateAll()) { // doThingsWith(element); diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/create/SyncCreateSetCredentialsProvider.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..c9697589baec --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceSettings; +import com.google.cloud.dataplex.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // 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 + DataTaxonomyServiceSettings dataTaxonomyServiceSettings = + DataTaxonomyServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + DataTaxonomyServiceClient dataTaxonomyServiceClient = + DataTaxonomyServiceClient.create(dataTaxonomyServiceSettings); + } +} +// [END dataplex_v1_generated_DataTaxonomyService_Create_SetCredentialsProvider_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/create/SyncCreateSetCredentialsProvider1.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 000000000000..8ba8fedfca8d --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,41 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_Create_SetCredentialsProvider1_sync] +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceSettings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // 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 + DataTaxonomyServiceSettings dataTaxonomyServiceSettings = + DataTaxonomyServiceSettings.newHttpJsonBuilder().build(); + DataTaxonomyServiceClient dataTaxonomyServiceClient = + DataTaxonomyServiceClient.create(dataTaxonomyServiceSettings); + } +} +// [END dataplex_v1_generated_DataTaxonomyService_Create_SetCredentialsProvider1_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/create/SyncCreateSetEndpoint.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..3ba4a9022592 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_Create_SetEndpoint_sync] +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceSettings; +import com.google.cloud.dataplex.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // 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 + DataTaxonomyServiceSettings dataTaxonomyServiceSettings = + DataTaxonomyServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + DataTaxonomyServiceClient dataTaxonomyServiceClient = + DataTaxonomyServiceClient.create(dataTaxonomyServiceSettings); + } +} +// [END dataplex_v1_generated_DataTaxonomyService_Create_SetEndpoint_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdataattribute/AsyncCreateDataAttribute.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdataattribute/AsyncCreateDataAttribute.java new file mode 100644 index 000000000000..8d62848d5e10 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdataattribute/AsyncCreateDataAttribute.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dataplex.v1.CreateDataAttributeRequest; +import com.google.cloud.dataplex.v1.DataAttribute; +import com.google.cloud.dataplex.v1.DataTaxonomyName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.longrunning.Operation; + +public class AsyncCreateDataAttribute { + + public static void main(String[] args) throws Exception { + asyncCreateDataAttribute(); + } + + public static void asyncCreateDataAttribute() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + CreateDataAttributeRequest request = + CreateDataAttributeRequest.newBuilder() + .setParent( + DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString()) + .setDataAttributeId("dataAttributeId-44128563") + .setDataAttribute(DataAttribute.newBuilder().build()) + .setValidateOnly(true) + .build(); + ApiFuture future = + dataTaxonomyServiceClient.createDataAttributeCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_async] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdataattribute/AsyncCreateDataAttributeLRO.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdataattribute/AsyncCreateDataAttributeLRO.java new file mode 100644 index 000000000000..b1cb7dad10e4 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdataattribute/AsyncCreateDataAttributeLRO.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.dataplex.v1.CreateDataAttributeRequest; +import com.google.cloud.dataplex.v1.DataAttribute; +import com.google.cloud.dataplex.v1.DataTaxonomyName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.OperationMetadata; + +public class AsyncCreateDataAttributeLRO { + + public static void main(String[] args) throws Exception { + asyncCreateDataAttributeLRO(); + } + + public static void asyncCreateDataAttributeLRO() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + CreateDataAttributeRequest request = + CreateDataAttributeRequest.newBuilder() + .setParent( + DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString()) + .setDataAttributeId("dataAttributeId-44128563") + .setDataAttribute(DataAttribute.newBuilder().build()) + .setValidateOnly(true) + .build(); + OperationFuture future = + dataTaxonomyServiceClient.createDataAttributeOperationCallable().futureCall(request); + // Do something. + DataAttribute response = future.get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_LRO_async] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdataattribute/SyncCreateDataAttribute.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdataattribute/SyncCreateDataAttribute.java new file mode 100644 index 000000000000..436511034798 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdataattribute/SyncCreateDataAttribute.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_sync] +import com.google.cloud.dataplex.v1.CreateDataAttributeRequest; +import com.google.cloud.dataplex.v1.DataAttribute; +import com.google.cloud.dataplex.v1.DataTaxonomyName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; + +public class SyncCreateDataAttribute { + + public static void main(String[] args) throws Exception { + syncCreateDataAttribute(); + } + + public static void syncCreateDataAttribute() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + CreateDataAttributeRequest request = + CreateDataAttributeRequest.newBuilder() + .setParent( + DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString()) + .setDataAttributeId("dataAttributeId-44128563") + .setDataAttribute(DataAttribute.newBuilder().build()) + .setValidateOnly(true) + .build(); + DataAttribute response = dataTaxonomyServiceClient.createDataAttributeAsync(request).get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdataattribute/SyncCreateDataAttributeDatataxonomynameDataattributeString.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdataattribute/SyncCreateDataAttributeDatataxonomynameDataattributeString.java new file mode 100644 index 000000000000..c47b3c7c508e --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdataattribute/SyncCreateDataAttributeDatataxonomynameDataattributeString.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_DatataxonomynameDataattributeString_sync] +import com.google.cloud.dataplex.v1.DataAttribute; +import com.google.cloud.dataplex.v1.DataTaxonomyName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; + +public class SyncCreateDataAttributeDatataxonomynameDataattributeString { + + public static void main(String[] args) throws Exception { + syncCreateDataAttributeDatataxonomynameDataattributeString(); + } + + public static void syncCreateDataAttributeDatataxonomynameDataattributeString() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + DataTaxonomyName parent = + DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]"); + DataAttribute dataAttribute = DataAttribute.newBuilder().build(); + String dataAttributeId = "dataAttributeId-44128563"; + DataAttribute response = + dataTaxonomyServiceClient + .createDataAttributeAsync(parent, dataAttribute, dataAttributeId) + .get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_DatataxonomynameDataattributeString_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdataattribute/SyncCreateDataAttributeStringDataattributeString.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdataattribute/SyncCreateDataAttributeStringDataattributeString.java new file mode 100644 index 000000000000..51d6735c86c3 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdataattribute/SyncCreateDataAttributeStringDataattributeString.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_StringDataattributeString_sync] +import com.google.cloud.dataplex.v1.DataAttribute; +import com.google.cloud.dataplex.v1.DataTaxonomyName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; + +public class SyncCreateDataAttributeStringDataattributeString { + + public static void main(String[] args) throws Exception { + syncCreateDataAttributeStringDataattributeString(); + } + + public static void syncCreateDataAttributeStringDataattributeString() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + String parent = + DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString(); + DataAttribute dataAttribute = DataAttribute.newBuilder().build(); + String dataAttributeId = "dataAttributeId-44128563"; + DataAttribute response = + dataTaxonomyServiceClient + .createDataAttributeAsync(parent, dataAttribute, dataAttributeId) + .get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttribute_StringDataattributeString_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdataattributebinding/AsyncCreateDataAttributeBinding.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdataattributebinding/AsyncCreateDataAttributeBinding.java new file mode 100644 index 000000000000..6205c12dd660 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdataattributebinding/AsyncCreateDataAttributeBinding.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest; +import com.google.cloud.dataplex.v1.DataAttributeBinding; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.LocationName; +import com.google.longrunning.Operation; + +public class AsyncCreateDataAttributeBinding { + + public static void main(String[] args) throws Exception { + asyncCreateDataAttributeBinding(); + } + + public static void asyncCreateDataAttributeBinding() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + CreateDataAttributeBindingRequest request = + CreateDataAttributeBindingRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setDataAttributeBindingId("dataAttributeBindingId1952425102") + .setDataAttributeBinding(DataAttributeBinding.newBuilder().build()) + .setValidateOnly(true) + .build(); + ApiFuture future = + dataTaxonomyServiceClient.createDataAttributeBindingCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_async] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdataattributebinding/AsyncCreateDataAttributeBindingLRO.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdataattributebinding/AsyncCreateDataAttributeBindingLRO.java new file mode 100644 index 000000000000..2d60be35c329 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdataattributebinding/AsyncCreateDataAttributeBindingLRO.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest; +import com.google.cloud.dataplex.v1.DataAttributeBinding; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.LocationName; +import com.google.cloud.dataplex.v1.OperationMetadata; + +public class AsyncCreateDataAttributeBindingLRO { + + public static void main(String[] args) throws Exception { + asyncCreateDataAttributeBindingLRO(); + } + + public static void asyncCreateDataAttributeBindingLRO() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + CreateDataAttributeBindingRequest request = + CreateDataAttributeBindingRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setDataAttributeBindingId("dataAttributeBindingId1952425102") + .setDataAttributeBinding(DataAttributeBinding.newBuilder().build()) + .setValidateOnly(true) + .build(); + OperationFuture future = + dataTaxonomyServiceClient + .createDataAttributeBindingOperationCallable() + .futureCall(request); + // Do something. + DataAttributeBinding response = future.get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_LRO_async] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdataattributebinding/SyncCreateDataAttributeBinding.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdataattributebinding/SyncCreateDataAttributeBinding.java new file mode 100644 index 000000000000..80cac4e935d0 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdataattributebinding/SyncCreateDataAttributeBinding.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_sync] +import com.google.cloud.dataplex.v1.CreateDataAttributeBindingRequest; +import com.google.cloud.dataplex.v1.DataAttributeBinding; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.LocationName; + +public class SyncCreateDataAttributeBinding { + + public static void main(String[] args) throws Exception { + syncCreateDataAttributeBinding(); + } + + public static void syncCreateDataAttributeBinding() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + CreateDataAttributeBindingRequest request = + CreateDataAttributeBindingRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setDataAttributeBindingId("dataAttributeBindingId1952425102") + .setDataAttributeBinding(DataAttributeBinding.newBuilder().build()) + .setValidateOnly(true) + .build(); + DataAttributeBinding response = + dataTaxonomyServiceClient.createDataAttributeBindingAsync(request).get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdataattributebinding/SyncCreateDataAttributeBindingLocationnameDataattributebindingString.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdataattributebinding/SyncCreateDataAttributeBindingLocationnameDataattributebindingString.java new file mode 100644 index 000000000000..0f55da33737a --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdataattributebinding/SyncCreateDataAttributeBindingLocationnameDataattributebindingString.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_LocationnameDataattributebindingString_sync] +import com.google.cloud.dataplex.v1.DataAttributeBinding; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.LocationName; + +public class SyncCreateDataAttributeBindingLocationnameDataattributebindingString { + + public static void main(String[] args) throws Exception { + syncCreateDataAttributeBindingLocationnameDataattributebindingString(); + } + + public static void syncCreateDataAttributeBindingLocationnameDataattributebindingString() + throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + DataAttributeBinding dataAttributeBinding = DataAttributeBinding.newBuilder().build(); + String dataAttributeBindingId = "dataAttributeBindingId1952425102"; + DataAttributeBinding response = + dataTaxonomyServiceClient + .createDataAttributeBindingAsync(parent, dataAttributeBinding, dataAttributeBindingId) + .get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_LocationnameDataattributebindingString_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdataattributebinding/SyncCreateDataAttributeBindingStringDataattributebindingString.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdataattributebinding/SyncCreateDataAttributeBindingStringDataattributebindingString.java new file mode 100644 index 000000000000..7dd083ce09d2 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdataattributebinding/SyncCreateDataAttributeBindingStringDataattributebindingString.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_StringDataattributebindingString_sync] +import com.google.cloud.dataplex.v1.DataAttributeBinding; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.LocationName; + +public class SyncCreateDataAttributeBindingStringDataattributebindingString { + + public static void main(String[] args) throws Exception { + syncCreateDataAttributeBindingStringDataattributebindingString(); + } + + public static void syncCreateDataAttributeBindingStringDataattributebindingString() + throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + DataAttributeBinding dataAttributeBinding = DataAttributeBinding.newBuilder().build(); + String dataAttributeBindingId = "dataAttributeBindingId1952425102"; + DataAttributeBinding response = + dataTaxonomyServiceClient + .createDataAttributeBindingAsync(parent, dataAttributeBinding, dataAttributeBindingId) + .get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_CreateDataAttributeBinding_StringDataattributebindingString_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdatataxonomy/AsyncCreateDataTaxonomy.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdatataxonomy/AsyncCreateDataTaxonomy.java new file mode 100644 index 000000000000..daf511022d62 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdatataxonomy/AsyncCreateDataTaxonomy.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest; +import com.google.cloud.dataplex.v1.DataTaxonomy; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.LocationName; +import com.google.longrunning.Operation; + +public class AsyncCreateDataTaxonomy { + + public static void main(String[] args) throws Exception { + asyncCreateDataTaxonomy(); + } + + public static void asyncCreateDataTaxonomy() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + CreateDataTaxonomyRequest request = + CreateDataTaxonomyRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setDataTaxonomyId("dataTaxonomyId987458454") + .setDataTaxonomy(DataTaxonomy.newBuilder().build()) + .setValidateOnly(true) + .build(); + ApiFuture future = + dataTaxonomyServiceClient.createDataTaxonomyCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_async] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdatataxonomy/AsyncCreateDataTaxonomyLRO.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdatataxonomy/AsyncCreateDataTaxonomyLRO.java new file mode 100644 index 000000000000..8224f5e145b3 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdatataxonomy/AsyncCreateDataTaxonomyLRO.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest; +import com.google.cloud.dataplex.v1.DataTaxonomy; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.LocationName; +import com.google.cloud.dataplex.v1.OperationMetadata; + +public class AsyncCreateDataTaxonomyLRO { + + public static void main(String[] args) throws Exception { + asyncCreateDataTaxonomyLRO(); + } + + public static void asyncCreateDataTaxonomyLRO() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + CreateDataTaxonomyRequest request = + CreateDataTaxonomyRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setDataTaxonomyId("dataTaxonomyId987458454") + .setDataTaxonomy(DataTaxonomy.newBuilder().build()) + .setValidateOnly(true) + .build(); + OperationFuture future = + dataTaxonomyServiceClient.createDataTaxonomyOperationCallable().futureCall(request); + // Do something. + DataTaxonomy response = future.get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_LRO_async] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdatataxonomy/SyncCreateDataTaxonomy.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdatataxonomy/SyncCreateDataTaxonomy.java new file mode 100644 index 000000000000..eb147a9bd51f --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdatataxonomy/SyncCreateDataTaxonomy.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_sync] +import com.google.cloud.dataplex.v1.CreateDataTaxonomyRequest; +import com.google.cloud.dataplex.v1.DataTaxonomy; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.LocationName; + +public class SyncCreateDataTaxonomy { + + public static void main(String[] args) throws Exception { + syncCreateDataTaxonomy(); + } + + public static void syncCreateDataTaxonomy() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + CreateDataTaxonomyRequest request = + CreateDataTaxonomyRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setDataTaxonomyId("dataTaxonomyId987458454") + .setDataTaxonomy(DataTaxonomy.newBuilder().build()) + .setValidateOnly(true) + .build(); + DataTaxonomy response = dataTaxonomyServiceClient.createDataTaxonomyAsync(request).get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdatataxonomy/SyncCreateDataTaxonomyLocationnameDatataxonomyString.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdatataxonomy/SyncCreateDataTaxonomyLocationnameDatataxonomyString.java new file mode 100644 index 000000000000..09ee58d5772c --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdatataxonomy/SyncCreateDataTaxonomyLocationnameDatataxonomyString.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_LocationnameDatataxonomyString_sync] +import com.google.cloud.dataplex.v1.DataTaxonomy; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.LocationName; + +public class SyncCreateDataTaxonomyLocationnameDatataxonomyString { + + public static void main(String[] args) throws Exception { + syncCreateDataTaxonomyLocationnameDatataxonomyString(); + } + + public static void syncCreateDataTaxonomyLocationnameDatataxonomyString() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + DataTaxonomy dataTaxonomy = DataTaxonomy.newBuilder().build(); + String dataTaxonomyId = "dataTaxonomyId987458454"; + DataTaxonomy response = + dataTaxonomyServiceClient + .createDataTaxonomyAsync(parent, dataTaxonomy, dataTaxonomyId) + .get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_LocationnameDatataxonomyString_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdatataxonomy/SyncCreateDataTaxonomyStringDatataxonomyString.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdatataxonomy/SyncCreateDataTaxonomyStringDatataxonomyString.java new file mode 100644 index 000000000000..ee4520d3ef76 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/createdatataxonomy/SyncCreateDataTaxonomyStringDatataxonomyString.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_StringDatataxonomyString_sync] +import com.google.cloud.dataplex.v1.DataTaxonomy; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.LocationName; + +public class SyncCreateDataTaxonomyStringDatataxonomyString { + + public static void main(String[] args) throws Exception { + syncCreateDataTaxonomyStringDatataxonomyString(); + } + + public static void syncCreateDataTaxonomyStringDatataxonomyString() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + DataTaxonomy dataTaxonomy = DataTaxonomy.newBuilder().build(); + String dataTaxonomyId = "dataTaxonomyId987458454"; + DataTaxonomy response = + dataTaxonomyServiceClient + .createDataTaxonomyAsync(parent, dataTaxonomy, dataTaxonomyId) + .get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_CreateDataTaxonomy_StringDatataxonomyString_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedataattribute/AsyncDeleteDataAttribute.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedataattribute/AsyncDeleteDataAttribute.java new file mode 100644 index 000000000000..f6b23ca01238 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedataattribute/AsyncDeleteDataAttribute.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dataplex.v1.DataAttributeName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.DeleteDataAttributeRequest; +import com.google.longrunning.Operation; + +public class AsyncDeleteDataAttribute { + + public static void main(String[] args) throws Exception { + asyncDeleteDataAttribute(); + } + + public static void asyncDeleteDataAttribute() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + DeleteDataAttributeRequest request = + DeleteDataAttributeRequest.newBuilder() + .setName( + DataAttributeName.of( + "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]") + .toString()) + .setEtag("etag3123477") + .build(); + ApiFuture future = + dataTaxonomyServiceClient.deleteDataAttributeCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_async] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedataattribute/AsyncDeleteDataAttributeLRO.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedataattribute/AsyncDeleteDataAttributeLRO.java new file mode 100644 index 000000000000..bfb1923bc3ff --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedataattribute/AsyncDeleteDataAttributeLRO.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.dataplex.v1.DataAttributeName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.DeleteDataAttributeRequest; +import com.google.cloud.dataplex.v1.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteDataAttributeLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteDataAttributeLRO(); + } + + public static void asyncDeleteDataAttributeLRO() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + DeleteDataAttributeRequest request = + DeleteDataAttributeRequest.newBuilder() + .setName( + DataAttributeName.of( + "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]") + .toString()) + .setEtag("etag3123477") + .build(); + OperationFuture future = + dataTaxonomyServiceClient.deleteDataAttributeOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_LRO_async] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedataattribute/SyncDeleteDataAttribute.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedataattribute/SyncDeleteDataAttribute.java new file mode 100644 index 000000000000..aea9ddb4d2cc --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedataattribute/SyncDeleteDataAttribute.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_sync] +import com.google.cloud.dataplex.v1.DataAttributeName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.DeleteDataAttributeRequest; +import com.google.protobuf.Empty; + +public class SyncDeleteDataAttribute { + + public static void main(String[] args) throws Exception { + syncDeleteDataAttribute(); + } + + public static void syncDeleteDataAttribute() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + DeleteDataAttributeRequest request = + DeleteDataAttributeRequest.newBuilder() + .setName( + DataAttributeName.of( + "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]") + .toString()) + .setEtag("etag3123477") + .build(); + dataTaxonomyServiceClient.deleteDataAttributeAsync(request).get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedataattribute/SyncDeleteDataAttributeDataattributename.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedataattribute/SyncDeleteDataAttributeDataattributename.java new file mode 100644 index 000000000000..9fc6c6d68f3b --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedataattribute/SyncDeleteDataAttributeDataattributename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_Dataattributename_sync] +import com.google.cloud.dataplex.v1.DataAttributeName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteDataAttributeDataattributename { + + public static void main(String[] args) throws Exception { + syncDeleteDataAttributeDataattributename(); + } + + public static void syncDeleteDataAttributeDataattributename() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + DataAttributeName name = + DataAttributeName.of("[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]"); + dataTaxonomyServiceClient.deleteDataAttributeAsync(name).get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_Dataattributename_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedataattribute/SyncDeleteDataAttributeString.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedataattribute/SyncDeleteDataAttributeString.java new file mode 100644 index 000000000000..94fd62bf9af0 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedataattribute/SyncDeleteDataAttributeString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_String_sync] +import com.google.cloud.dataplex.v1.DataAttributeName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteDataAttributeString { + + public static void main(String[] args) throws Exception { + syncDeleteDataAttributeString(); + } + + public static void syncDeleteDataAttributeString() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + String name = + DataAttributeName.of("[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]") + .toString(); + dataTaxonomyServiceClient.deleteDataAttributeAsync(name).get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_DeleteDataAttribute_String_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedataattributebinding/AsyncDeleteDataAttributeBinding.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedataattributebinding/AsyncDeleteDataAttributeBinding.java new file mode 100644 index 000000000000..1e8f17aba734 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedataattributebinding/AsyncDeleteDataAttributeBinding.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dataplex.v1.DataAttributeBindingName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest; +import com.google.longrunning.Operation; + +public class AsyncDeleteDataAttributeBinding { + + public static void main(String[] args) throws Exception { + asyncDeleteDataAttributeBinding(); + } + + public static void asyncDeleteDataAttributeBinding() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + DeleteDataAttributeBindingRequest request = + DeleteDataAttributeBindingRequest.newBuilder() + .setName( + DataAttributeBindingName.of( + "[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]") + .toString()) + .setEtag("etag3123477") + .build(); + ApiFuture future = + dataTaxonomyServiceClient.deleteDataAttributeBindingCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_async] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedataattributebinding/AsyncDeleteDataAttributeBindingLRO.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedataattributebinding/AsyncDeleteDataAttributeBindingLRO.java new file mode 100644 index 000000000000..bd01ee67f978 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedataattributebinding/AsyncDeleteDataAttributeBindingLRO.java @@ -0,0 +1,57 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.dataplex.v1.DataAttributeBindingName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest; +import com.google.cloud.dataplex.v1.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteDataAttributeBindingLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteDataAttributeBindingLRO(); + } + + public static void asyncDeleteDataAttributeBindingLRO() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + DeleteDataAttributeBindingRequest request = + DeleteDataAttributeBindingRequest.newBuilder() + .setName( + DataAttributeBindingName.of( + "[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]") + .toString()) + .setEtag("etag3123477") + .build(); + OperationFuture future = + dataTaxonomyServiceClient + .deleteDataAttributeBindingOperationCallable() + .futureCall(request); + // Do something. + future.get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_LRO_async] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedataattributebinding/SyncDeleteDataAttributeBinding.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedataattributebinding/SyncDeleteDataAttributeBinding.java new file mode 100644 index 000000000000..10ae1aa9b2e3 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedataattributebinding/SyncDeleteDataAttributeBinding.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_sync] +import com.google.cloud.dataplex.v1.DataAttributeBindingName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.DeleteDataAttributeBindingRequest; +import com.google.protobuf.Empty; + +public class SyncDeleteDataAttributeBinding { + + public static void main(String[] args) throws Exception { + syncDeleteDataAttributeBinding(); + } + + public static void syncDeleteDataAttributeBinding() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + DeleteDataAttributeBindingRequest request = + DeleteDataAttributeBindingRequest.newBuilder() + .setName( + DataAttributeBindingName.of( + "[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]") + .toString()) + .setEtag("etag3123477") + .build(); + dataTaxonomyServiceClient.deleteDataAttributeBindingAsync(request).get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedataattributebinding/SyncDeleteDataAttributeBindingDataattributebindingname.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedataattributebinding/SyncDeleteDataAttributeBindingDataattributebindingname.java new file mode 100644 index 000000000000..461dee37c6de --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedataattributebinding/SyncDeleteDataAttributeBindingDataattributebindingname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_Dataattributebindingname_sync] +import com.google.cloud.dataplex.v1.DataAttributeBindingName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteDataAttributeBindingDataattributebindingname { + + public static void main(String[] args) throws Exception { + syncDeleteDataAttributeBindingDataattributebindingname(); + } + + public static void syncDeleteDataAttributeBindingDataattributebindingname() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + DataAttributeBindingName name = + DataAttributeBindingName.of("[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]"); + dataTaxonomyServiceClient.deleteDataAttributeBindingAsync(name).get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_Dataattributebindingname_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedataattributebinding/SyncDeleteDataAttributeBindingString.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedataattributebinding/SyncDeleteDataAttributeBindingString.java new file mode 100644 index 000000000000..503e265b87dd --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedataattributebinding/SyncDeleteDataAttributeBindingString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_String_sync] +import com.google.cloud.dataplex.v1.DataAttributeBindingName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteDataAttributeBindingString { + + public static void main(String[] args) throws Exception { + syncDeleteDataAttributeBindingString(); + } + + public static void syncDeleteDataAttributeBindingString() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + String name = + DataAttributeBindingName.of("[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]") + .toString(); + dataTaxonomyServiceClient.deleteDataAttributeBindingAsync(name).get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_DeleteDataAttributeBinding_String_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedatataxonomy/AsyncDeleteDataTaxonomy.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedatataxonomy/AsyncDeleteDataTaxonomy.java new file mode 100644 index 000000000000..1dd849e875e8 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedatataxonomy/AsyncDeleteDataTaxonomy.java @@ -0,0 +1,52 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dataplex.v1.DataTaxonomyName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest; +import com.google.longrunning.Operation; + +public class AsyncDeleteDataTaxonomy { + + public static void main(String[] args) throws Exception { + asyncDeleteDataTaxonomy(); + } + + public static void asyncDeleteDataTaxonomy() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + DeleteDataTaxonomyRequest request = + DeleteDataTaxonomyRequest.newBuilder() + .setName( + DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString()) + .setEtag("etag3123477") + .build(); + ApiFuture future = + dataTaxonomyServiceClient.deleteDataTaxonomyCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_async] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedatataxonomy/AsyncDeleteDataTaxonomyLRO.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedatataxonomy/AsyncDeleteDataTaxonomyLRO.java new file mode 100644 index 000000000000..e1ae18d10eea --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedatataxonomy/AsyncDeleteDataTaxonomyLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.dataplex.v1.DataTaxonomyName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest; +import com.google.cloud.dataplex.v1.OperationMetadata; +import com.google.protobuf.Empty; + +public class AsyncDeleteDataTaxonomyLRO { + + public static void main(String[] args) throws Exception { + asyncDeleteDataTaxonomyLRO(); + } + + public static void asyncDeleteDataTaxonomyLRO() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + DeleteDataTaxonomyRequest request = + DeleteDataTaxonomyRequest.newBuilder() + .setName( + DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString()) + .setEtag("etag3123477") + .build(); + OperationFuture future = + dataTaxonomyServiceClient.deleteDataTaxonomyOperationCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_LRO_async] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedatataxonomy/SyncDeleteDataTaxonomy.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedatataxonomy/SyncDeleteDataTaxonomy.java new file mode 100644 index 000000000000..dadd96691408 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedatataxonomy/SyncDeleteDataTaxonomy.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_sync] +import com.google.cloud.dataplex.v1.DataTaxonomyName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.DeleteDataTaxonomyRequest; +import com.google.protobuf.Empty; + +public class SyncDeleteDataTaxonomy { + + public static void main(String[] args) throws Exception { + syncDeleteDataTaxonomy(); + } + + public static void syncDeleteDataTaxonomy() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + DeleteDataTaxonomyRequest request = + DeleteDataTaxonomyRequest.newBuilder() + .setName( + DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString()) + .setEtag("etag3123477") + .build(); + dataTaxonomyServiceClient.deleteDataTaxonomyAsync(request).get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedatataxonomy/SyncDeleteDataTaxonomyDatataxonomyname.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedatataxonomy/SyncDeleteDataTaxonomyDatataxonomyname.java new file mode 100644 index 000000000000..53ae773fb602 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedatataxonomy/SyncDeleteDataTaxonomyDatataxonomyname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_Datataxonomyname_sync] +import com.google.cloud.dataplex.v1.DataTaxonomyName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteDataTaxonomyDatataxonomyname { + + public static void main(String[] args) throws Exception { + syncDeleteDataTaxonomyDatataxonomyname(); + } + + public static void syncDeleteDataTaxonomyDatataxonomyname() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + DataTaxonomyName name = DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]"); + dataTaxonomyServiceClient.deleteDataTaxonomyAsync(name).get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_Datataxonomyname_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedatataxonomy/SyncDeleteDataTaxonomyString.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedatataxonomy/SyncDeleteDataTaxonomyString.java new file mode 100644 index 000000000000..d7a3d7a39189 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/deletedatataxonomy/SyncDeleteDataTaxonomyString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_String_sync] +import com.google.cloud.dataplex.v1.DataTaxonomyName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.protobuf.Empty; + +public class SyncDeleteDataTaxonomyString { + + public static void main(String[] args) throws Exception { + syncDeleteDataTaxonomyString(); + } + + public static void syncDeleteDataTaxonomyString() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + String name = DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString(); + dataTaxonomyServiceClient.deleteDataTaxonomyAsync(name).get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_DeleteDataTaxonomy_String_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdataattribute/AsyncGetDataAttribute.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdataattribute/AsyncGetDataAttribute.java new file mode 100644 index 000000000000..3b94ae585396 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdataattribute/AsyncGetDataAttribute.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dataplex.v1.DataAttribute; +import com.google.cloud.dataplex.v1.DataAttributeName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.GetDataAttributeRequest; + +public class AsyncGetDataAttribute { + + public static void main(String[] args) throws Exception { + asyncGetDataAttribute(); + } + + public static void asyncGetDataAttribute() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + GetDataAttributeRequest request = + GetDataAttributeRequest.newBuilder() + .setName( + DataAttributeName.of( + "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]") + .toString()) + .build(); + ApiFuture future = + dataTaxonomyServiceClient.getDataAttributeCallable().futureCall(request); + // Do something. + DataAttribute response = future.get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_async] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdataattribute/SyncGetDataAttribute.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdataattribute/SyncGetDataAttribute.java new file mode 100644 index 000000000000..2cc0fe0a0df7 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdataattribute/SyncGetDataAttribute.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_sync] +import com.google.cloud.dataplex.v1.DataAttribute; +import com.google.cloud.dataplex.v1.DataAttributeName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.GetDataAttributeRequest; + +public class SyncGetDataAttribute { + + public static void main(String[] args) throws Exception { + syncGetDataAttribute(); + } + + public static void syncGetDataAttribute() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + GetDataAttributeRequest request = + GetDataAttributeRequest.newBuilder() + .setName( + DataAttributeName.of( + "[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]") + .toString()) + .build(); + DataAttribute response = dataTaxonomyServiceClient.getDataAttribute(request); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdataattribute/SyncGetDataAttributeDataattributename.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdataattribute/SyncGetDataAttributeDataattributename.java new file mode 100644 index 000000000000..c21fa0787511 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdataattribute/SyncGetDataAttributeDataattributename.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_Dataattributename_sync] +import com.google.cloud.dataplex.v1.DataAttribute; +import com.google.cloud.dataplex.v1.DataAttributeName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; + +public class SyncGetDataAttributeDataattributename { + + public static void main(String[] args) throws Exception { + syncGetDataAttributeDataattributename(); + } + + public static void syncGetDataAttributeDataattributename() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + DataAttributeName name = + DataAttributeName.of("[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]"); + DataAttribute response = dataTaxonomyServiceClient.getDataAttribute(name); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_Dataattributename_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdataattribute/SyncGetDataAttributeString.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdataattribute/SyncGetDataAttributeString.java new file mode 100644 index 000000000000..b7cd812590f5 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdataattribute/SyncGetDataAttributeString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_String_sync] +import com.google.cloud.dataplex.v1.DataAttribute; +import com.google.cloud.dataplex.v1.DataAttributeName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; + +public class SyncGetDataAttributeString { + + public static void main(String[] args) throws Exception { + syncGetDataAttributeString(); + } + + public static void syncGetDataAttributeString() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + String name = + DataAttributeName.of("[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]") + .toString(); + DataAttribute response = dataTaxonomyServiceClient.getDataAttribute(name); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_GetDataAttribute_String_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdataattributebinding/AsyncGetDataAttributeBinding.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdataattributebinding/AsyncGetDataAttributeBinding.java new file mode 100644 index 000000000000..68f26dfde17e --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdataattributebinding/AsyncGetDataAttributeBinding.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dataplex.v1.DataAttributeBinding; +import com.google.cloud.dataplex.v1.DataAttributeBindingName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest; + +public class AsyncGetDataAttributeBinding { + + public static void main(String[] args) throws Exception { + asyncGetDataAttributeBinding(); + } + + public static void asyncGetDataAttributeBinding() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + GetDataAttributeBindingRequest request = + GetDataAttributeBindingRequest.newBuilder() + .setName( + DataAttributeBindingName.of( + "[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]") + .toString()) + .build(); + ApiFuture future = + dataTaxonomyServiceClient.getDataAttributeBindingCallable().futureCall(request); + // Do something. + DataAttributeBinding response = future.get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_async] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdataattributebinding/SyncGetDataAttributeBinding.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdataattributebinding/SyncGetDataAttributeBinding.java new file mode 100644 index 000000000000..bd9d51ef0311 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdataattributebinding/SyncGetDataAttributeBinding.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_sync] +import com.google.cloud.dataplex.v1.DataAttributeBinding; +import com.google.cloud.dataplex.v1.DataAttributeBindingName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.GetDataAttributeBindingRequest; + +public class SyncGetDataAttributeBinding { + + public static void main(String[] args) throws Exception { + syncGetDataAttributeBinding(); + } + + public static void syncGetDataAttributeBinding() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + GetDataAttributeBindingRequest request = + GetDataAttributeBindingRequest.newBuilder() + .setName( + DataAttributeBindingName.of( + "[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]") + .toString()) + .build(); + DataAttributeBinding response = dataTaxonomyServiceClient.getDataAttributeBinding(request); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdataattributebinding/SyncGetDataAttributeBindingDataattributebindingname.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdataattributebinding/SyncGetDataAttributeBindingDataattributebindingname.java new file mode 100644 index 000000000000..3a06f4547f4d --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdataattributebinding/SyncGetDataAttributeBindingDataattributebindingname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_Dataattributebindingname_sync] +import com.google.cloud.dataplex.v1.DataAttributeBinding; +import com.google.cloud.dataplex.v1.DataAttributeBindingName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; + +public class SyncGetDataAttributeBindingDataattributebindingname { + + public static void main(String[] args) throws Exception { + syncGetDataAttributeBindingDataattributebindingname(); + } + + public static void syncGetDataAttributeBindingDataattributebindingname() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + DataAttributeBindingName name = + DataAttributeBindingName.of("[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]"); + DataAttributeBinding response = dataTaxonomyServiceClient.getDataAttributeBinding(name); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_Dataattributebindingname_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdataattributebinding/SyncGetDataAttributeBindingString.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdataattributebinding/SyncGetDataAttributeBindingString.java new file mode 100644 index 000000000000..b5a122687e58 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdataattributebinding/SyncGetDataAttributeBindingString.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_String_sync] +import com.google.cloud.dataplex.v1.DataAttributeBinding; +import com.google.cloud.dataplex.v1.DataAttributeBindingName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; + +public class SyncGetDataAttributeBindingString { + + public static void main(String[] args) throws Exception { + syncGetDataAttributeBindingString(); + } + + public static void syncGetDataAttributeBindingString() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + String name = + DataAttributeBindingName.of("[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]") + .toString(); + DataAttributeBinding response = dataTaxonomyServiceClient.getDataAttributeBinding(name); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_GetDataAttributeBinding_String_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdatataxonomy/AsyncGetDataTaxonomy.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdatataxonomy/AsyncGetDataTaxonomy.java new file mode 100644 index 000000000000..58f89a218ea8 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdatataxonomy/AsyncGetDataTaxonomy.java @@ -0,0 +1,51 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dataplex.v1.DataTaxonomy; +import com.google.cloud.dataplex.v1.DataTaxonomyName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.GetDataTaxonomyRequest; + +public class AsyncGetDataTaxonomy { + + public static void main(String[] args) throws Exception { + asyncGetDataTaxonomy(); + } + + public static void asyncGetDataTaxonomy() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + GetDataTaxonomyRequest request = + GetDataTaxonomyRequest.newBuilder() + .setName( + DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString()) + .build(); + ApiFuture future = + dataTaxonomyServiceClient.getDataTaxonomyCallable().futureCall(request); + // Do something. + DataTaxonomy response = future.get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_async] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdatataxonomy/SyncGetDataTaxonomy.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdatataxonomy/SyncGetDataTaxonomy.java new file mode 100644 index 000000000000..02a9abace2a6 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdatataxonomy/SyncGetDataTaxonomy.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_sync] +import com.google.cloud.dataplex.v1.DataTaxonomy; +import com.google.cloud.dataplex.v1.DataTaxonomyName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.GetDataTaxonomyRequest; + +public class SyncGetDataTaxonomy { + + public static void main(String[] args) throws Exception { + syncGetDataTaxonomy(); + } + + public static void syncGetDataTaxonomy() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + GetDataTaxonomyRequest request = + GetDataTaxonomyRequest.newBuilder() + .setName( + DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString()) + .build(); + DataTaxonomy response = dataTaxonomyServiceClient.getDataTaxonomy(request); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdatataxonomy/SyncGetDataTaxonomyDatataxonomyname.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdatataxonomy/SyncGetDataTaxonomyDatataxonomyname.java new file mode 100644 index 000000000000..9d7f72c7e629 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdatataxonomy/SyncGetDataTaxonomyDatataxonomyname.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_Datataxonomyname_sync] +import com.google.cloud.dataplex.v1.DataTaxonomy; +import com.google.cloud.dataplex.v1.DataTaxonomyName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; + +public class SyncGetDataTaxonomyDatataxonomyname { + + public static void main(String[] args) throws Exception { + syncGetDataTaxonomyDatataxonomyname(); + } + + public static void syncGetDataTaxonomyDatataxonomyname() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + DataTaxonomyName name = DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]"); + DataTaxonomy response = dataTaxonomyServiceClient.getDataTaxonomy(name); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_Datataxonomyname_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdatataxonomy/SyncGetDataTaxonomyString.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdatataxonomy/SyncGetDataTaxonomyString.java new file mode 100644 index 000000000000..cd144f76240b --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getdatataxonomy/SyncGetDataTaxonomyString.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_String_sync] +import com.google.cloud.dataplex.v1.DataTaxonomy; +import com.google.cloud.dataplex.v1.DataTaxonomyName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; + +public class SyncGetDataTaxonomyString { + + public static void main(String[] args) throws Exception { + syncGetDataTaxonomyString(); + } + + public static void syncGetDataTaxonomyString() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + String name = DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString(); + DataTaxonomy response = dataTaxonomyServiceClient.getDataTaxonomy(name); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_GetDataTaxonomy_String_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getlocation/AsyncGetLocation.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getlocation/AsyncGetLocation.java new file mode 100644 index 000000000000..c41ff948ce67 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getlocation/AsyncGetLocation.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_GetLocation_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class AsyncGetLocation { + + public static void main(String[] args) throws Exception { + asyncGetLocation(); + } + + public static void asyncGetLocation() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + ApiFuture future = + dataTaxonomyServiceClient.getLocationCallable().futureCall(request); + // Do something. + Location response = future.get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_GetLocation_async] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getlocation/SyncGetLocation.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getlocation/SyncGetLocation.java new file mode 100644 index 000000000000..232cc5f91249 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/getlocation/SyncGetLocation.java @@ -0,0 +1,42 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_GetLocation_sync] +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.Location; + +public class SyncGetLocation { + + public static void main(String[] args) throws Exception { + syncGetLocation(); + } + + public static void syncGetLocation() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); + Location response = dataTaxonomyServiceClient.getLocation(request); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_GetLocation_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdataattributebindings/AsyncListDataAttributeBindings.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdataattributebindings/AsyncListDataAttributeBindings.java new file mode 100644 index 000000000000..08ddb64aec33 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdataattributebindings/AsyncListDataAttributeBindings.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dataplex.v1.DataAttributeBinding; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest; +import com.google.cloud.dataplex.v1.LocationName; + +public class AsyncListDataAttributeBindings { + + public static void main(String[] args) throws Exception { + asyncListDataAttributeBindings(); + } + + public static void asyncListDataAttributeBindings() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + ListDataAttributeBindingsRequest request = + ListDataAttributeBindingsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + dataTaxonomyServiceClient.listDataAttributeBindingsPagedCallable().futureCall(request); + // Do something. + for (DataAttributeBinding element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_async] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdataattributebindings/AsyncListDataAttributeBindingsPaged.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdataattributebindings/AsyncListDataAttributeBindingsPaged.java new file mode 100644 index 000000000000..23431773f69d --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdataattributebindings/AsyncListDataAttributeBindingsPaged.java @@ -0,0 +1,64 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_Paged_async] +import com.google.cloud.dataplex.v1.DataAttributeBinding; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest; +import com.google.cloud.dataplex.v1.ListDataAttributeBindingsResponse; +import com.google.cloud.dataplex.v1.LocationName; +import com.google.common.base.Strings; + +public class AsyncListDataAttributeBindingsPaged { + + public static void main(String[] args) throws Exception { + asyncListDataAttributeBindingsPaged(); + } + + public static void asyncListDataAttributeBindingsPaged() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + ListDataAttributeBindingsRequest request = + ListDataAttributeBindingsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListDataAttributeBindingsResponse response = + dataTaxonomyServiceClient.listDataAttributeBindingsCallable().call(request); + for (DataAttributeBinding element : response.getDataAttributeBindingsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_Paged_async] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdataattributebindings/SyncListDataAttributeBindings.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdataattributebindings/SyncListDataAttributeBindings.java new file mode 100644 index 000000000000..9104c9db23b5 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdataattributebindings/SyncListDataAttributeBindings.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_sync] +import com.google.cloud.dataplex.v1.DataAttributeBinding; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.ListDataAttributeBindingsRequest; +import com.google.cloud.dataplex.v1.LocationName; + +public class SyncListDataAttributeBindings { + + public static void main(String[] args) throws Exception { + syncListDataAttributeBindings(); + } + + public static void syncListDataAttributeBindings() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + ListDataAttributeBindingsRequest request = + ListDataAttributeBindingsRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (DataAttributeBinding element : + dataTaxonomyServiceClient.listDataAttributeBindings(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdataattributebindings/SyncListDataAttributeBindingsLocationname.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdataattributebindings/SyncListDataAttributeBindingsLocationname.java new file mode 100644 index 000000000000..f2cfeeed46ae --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdataattributebindings/SyncListDataAttributeBindingsLocationname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_Locationname_sync] +import com.google.cloud.dataplex.v1.DataAttributeBinding; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.LocationName; + +public class SyncListDataAttributeBindingsLocationname { + + public static void main(String[] args) throws Exception { + syncListDataAttributeBindingsLocationname(); + } + + public static void syncListDataAttributeBindingsLocationname() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (DataAttributeBinding element : + dataTaxonomyServiceClient.listDataAttributeBindings(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_Locationname_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdataattributebindings/SyncListDataAttributeBindingsString.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdataattributebindings/SyncListDataAttributeBindingsString.java new file mode 100644 index 000000000000..418fd195009e --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdataattributebindings/SyncListDataAttributeBindingsString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_String_sync] +import com.google.cloud.dataplex.v1.DataAttributeBinding; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.LocationName; + +public class SyncListDataAttributeBindingsString { + + public static void main(String[] args) throws Exception { + syncListDataAttributeBindingsString(); + } + + public static void syncListDataAttributeBindingsString() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (DataAttributeBinding element : + dataTaxonomyServiceClient.listDataAttributeBindings(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_ListDataAttributeBindings_String_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdataattributes/AsyncListDataAttributes.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdataattributes/AsyncListDataAttributes.java new file mode 100644 index 000000000000..7f02ee625e28 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdataattributes/AsyncListDataAttributes.java @@ -0,0 +1,57 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dataplex.v1.DataAttribute; +import com.google.cloud.dataplex.v1.DataTaxonomyName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.ListDataAttributesRequest; + +public class AsyncListDataAttributes { + + public static void main(String[] args) throws Exception { + asyncListDataAttributes(); + } + + public static void asyncListDataAttributes() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + ListDataAttributesRequest request = + ListDataAttributesRequest.newBuilder() + .setParent( + DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + dataTaxonomyServiceClient.listDataAttributesPagedCallable().futureCall(request); + // Do something. + for (DataAttribute element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_async] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdataattributes/AsyncListDataAttributesPaged.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdataattributes/AsyncListDataAttributesPaged.java new file mode 100644 index 000000000000..d5efd4fce68e --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdataattributes/AsyncListDataAttributesPaged.java @@ -0,0 +1,65 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_Paged_async] +import com.google.cloud.dataplex.v1.DataAttribute; +import com.google.cloud.dataplex.v1.DataTaxonomyName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.ListDataAttributesRequest; +import com.google.cloud.dataplex.v1.ListDataAttributesResponse; +import com.google.common.base.Strings; + +public class AsyncListDataAttributesPaged { + + public static void main(String[] args) throws Exception { + asyncListDataAttributesPaged(); + } + + public static void asyncListDataAttributesPaged() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + ListDataAttributesRequest request = + ListDataAttributesRequest.newBuilder() + .setParent( + DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListDataAttributesResponse response = + dataTaxonomyServiceClient.listDataAttributesCallable().call(request); + for (DataAttribute element : response.getDataAttributesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_Paged_async] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdataattributes/SyncListDataAttributes.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdataattributes/SyncListDataAttributes.java new file mode 100644 index 000000000000..349b417e6b19 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdataattributes/SyncListDataAttributes.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_sync] +import com.google.cloud.dataplex.v1.DataAttribute; +import com.google.cloud.dataplex.v1.DataTaxonomyName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.ListDataAttributesRequest; + +public class SyncListDataAttributes { + + public static void main(String[] args) throws Exception { + syncListDataAttributes(); + } + + public static void syncListDataAttributes() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + ListDataAttributesRequest request = + ListDataAttributesRequest.newBuilder() + .setParent( + DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (DataAttribute element : + dataTaxonomyServiceClient.listDataAttributes(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdataattributes/SyncListDataAttributesDatataxonomyname.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdataattributes/SyncListDataAttributesDatataxonomyname.java new file mode 100644 index 000000000000..d9bae8d5ae8b --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdataattributes/SyncListDataAttributesDatataxonomyname.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_Datataxonomyname_sync] +import com.google.cloud.dataplex.v1.DataAttribute; +import com.google.cloud.dataplex.v1.DataTaxonomyName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; + +public class SyncListDataAttributesDatataxonomyname { + + public static void main(String[] args) throws Exception { + syncListDataAttributesDatataxonomyname(); + } + + public static void syncListDataAttributesDatataxonomyname() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + DataTaxonomyName parent = + DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]"); + for (DataAttribute element : + dataTaxonomyServiceClient.listDataAttributes(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_Datataxonomyname_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdataattributes/SyncListDataAttributesString.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdataattributes/SyncListDataAttributesString.java new file mode 100644 index 000000000000..436f1efecd71 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdataattributes/SyncListDataAttributesString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_String_sync] +import com.google.cloud.dataplex.v1.DataAttribute; +import com.google.cloud.dataplex.v1.DataTaxonomyName; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; + +public class SyncListDataAttributesString { + + public static void main(String[] args) throws Exception { + syncListDataAttributesString(); + } + + public static void syncListDataAttributesString() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + String parent = + DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString(); + for (DataAttribute element : + dataTaxonomyServiceClient.listDataAttributes(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_ListDataAttributes_String_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdatataxonomies/AsyncListDataTaxonomies.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdatataxonomies/AsyncListDataTaxonomies.java new file mode 100644 index 000000000000..f93430d48df6 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdatataxonomies/AsyncListDataTaxonomies.java @@ -0,0 +1,56 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dataplex.v1.DataTaxonomy; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest; +import com.google.cloud.dataplex.v1.LocationName; + +public class AsyncListDataTaxonomies { + + public static void main(String[] args) throws Exception { + asyncListDataTaxonomies(); + } + + public static void asyncListDataTaxonomies() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + ListDataTaxonomiesRequest request = + ListDataTaxonomiesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + ApiFuture future = + dataTaxonomyServiceClient.listDataTaxonomiesPagedCallable().futureCall(request); + // Do something. + for (DataTaxonomy element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_async] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdatataxonomies/AsyncListDataTaxonomiesPaged.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdatataxonomies/AsyncListDataTaxonomiesPaged.java new file mode 100644 index 000000000000..e8854865429f --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdatataxonomies/AsyncListDataTaxonomiesPaged.java @@ -0,0 +1,64 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_Paged_async] +import com.google.cloud.dataplex.v1.DataTaxonomy; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest; +import com.google.cloud.dataplex.v1.ListDataTaxonomiesResponse; +import com.google.cloud.dataplex.v1.LocationName; +import com.google.common.base.Strings; + +public class AsyncListDataTaxonomiesPaged { + + public static void main(String[] args) throws Exception { + asyncListDataTaxonomiesPaged(); + } + + public static void asyncListDataTaxonomiesPaged() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + ListDataTaxonomiesRequest request = + ListDataTaxonomiesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + while (true) { + ListDataTaxonomiesResponse response = + dataTaxonomyServiceClient.listDataTaxonomiesCallable().call(request); + for (DataTaxonomy element : response.getDataTaxonomiesList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_Paged_async] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdatataxonomies/SyncListDataTaxonomies.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdatataxonomies/SyncListDataTaxonomies.java new file mode 100644 index 000000000000..da60fc620d2e --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdatataxonomies/SyncListDataTaxonomies.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_sync] +import com.google.cloud.dataplex.v1.DataTaxonomy; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.ListDataTaxonomiesRequest; +import com.google.cloud.dataplex.v1.LocationName; + +public class SyncListDataTaxonomies { + + public static void main(String[] args) throws Exception { + syncListDataTaxonomies(); + } + + public static void syncListDataTaxonomies() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + ListDataTaxonomiesRequest request = + ListDataTaxonomiesRequest.newBuilder() + .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setOrderBy("orderBy-1207110587") + .build(); + for (DataTaxonomy element : + dataTaxonomyServiceClient.listDataTaxonomies(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdatataxonomies/SyncListDataTaxonomiesLocationname.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdatataxonomies/SyncListDataTaxonomiesLocationname.java new file mode 100644 index 000000000000..fcaf64694766 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdatataxonomies/SyncListDataTaxonomiesLocationname.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_Locationname_sync] +import com.google.cloud.dataplex.v1.DataTaxonomy; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.LocationName; + +public class SyncListDataTaxonomiesLocationname { + + public static void main(String[] args) throws Exception { + syncListDataTaxonomiesLocationname(); + } + + public static void syncListDataTaxonomiesLocationname() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + for (DataTaxonomy element : + dataTaxonomyServiceClient.listDataTaxonomies(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_Locationname_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdatataxonomies/SyncListDataTaxonomiesString.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdatataxonomies/SyncListDataTaxonomiesString.java new file mode 100644 index 000000000000..0e5d5ac39f25 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listdatataxonomies/SyncListDataTaxonomiesString.java @@ -0,0 +1,45 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_String_sync] +import com.google.cloud.dataplex.v1.DataTaxonomy; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.LocationName; + +public class SyncListDataTaxonomiesString { + + public static void main(String[] args) throws Exception { + syncListDataTaxonomiesString(); + } + + public static void syncListDataTaxonomiesString() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + for (DataTaxonomy element : + dataTaxonomyServiceClient.listDataTaxonomies(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_ListDataTaxonomies_String_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listlocations/AsyncListLocations.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listlocations/AsyncListLocations.java new file mode 100644 index 000000000000..9b6f22a98a41 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listlocations/AsyncListLocations.java @@ -0,0 +1,54 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_ListLocations_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class AsyncListLocations { + + public static void main(String[] args) throws Exception { + asyncListLocations(); + } + + public static void asyncListLocations() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + dataTaxonomyServiceClient.listLocationsPagedCallable().futureCall(request); + // Do something. + for (Location element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_ListLocations_async] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listlocations/AsyncListLocationsPaged.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listlocations/AsyncListLocationsPaged.java new file mode 100644 index 000000000000..3ccd446930bb --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listlocations/AsyncListLocationsPaged.java @@ -0,0 +1,62 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_ListLocations_Paged_async] +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.base.Strings; + +public class AsyncListLocationsPaged { + + public static void main(String[] args) throws Exception { + asyncListLocationsPaged(); + } + + public static void asyncListLocationsPaged() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListLocationsResponse response = + dataTaxonomyServiceClient.listLocationsCallable().call(request); + for (Location element : response.getLocationsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_ListLocations_Paged_async] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listlocations/SyncListLocations.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listlocations/SyncListLocations.java new file mode 100644 index 000000000000..25882146c247 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/listlocations/SyncListLocations.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_ListLocations_sync] +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.Location; + +public class SyncListLocations { + + public static void main(String[] args) throws Exception { + syncListLocations(); + } + + public static void syncListLocations() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + ListLocationsRequest request = + ListLocationsRequest.newBuilder() + .setName("name3373707") + .setFilter("filter-1274492040") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Location element : dataTaxonomyServiceClient.listLocations(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_ListLocations_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedataattribute/AsyncUpdateDataAttribute.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedataattribute/AsyncUpdateDataAttribute.java new file mode 100644 index 000000000000..aa63d85f9474 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedataattribute/AsyncUpdateDataAttribute.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dataplex.v1.DataAttribute; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.UpdateDataAttributeRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateDataAttribute { + + public static void main(String[] args) throws Exception { + asyncUpdateDataAttribute(); + } + + public static void asyncUpdateDataAttribute() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + UpdateDataAttributeRequest request = + UpdateDataAttributeRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setDataAttribute(DataAttribute.newBuilder().build()) + .setValidateOnly(true) + .build(); + ApiFuture future = + dataTaxonomyServiceClient.updateDataAttributeCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_async] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedataattribute/AsyncUpdateDataAttributeLRO.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedataattribute/AsyncUpdateDataAttributeLRO.java new file mode 100644 index 000000000000..314780f3e98f --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedataattribute/AsyncUpdateDataAttributeLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.dataplex.v1.DataAttribute; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.OperationMetadata; +import com.google.cloud.dataplex.v1.UpdateDataAttributeRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateDataAttributeLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateDataAttributeLRO(); + } + + public static void asyncUpdateDataAttributeLRO() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + UpdateDataAttributeRequest request = + UpdateDataAttributeRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setDataAttribute(DataAttribute.newBuilder().build()) + .setValidateOnly(true) + .build(); + OperationFuture future = + dataTaxonomyServiceClient.updateDataAttributeOperationCallable().futureCall(request); + // Do something. + DataAttribute response = future.get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_LRO_async] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedataattribute/SyncUpdateDataAttribute.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedataattribute/SyncUpdateDataAttribute.java new file mode 100644 index 000000000000..3ccc7f5f03a0 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedataattribute/SyncUpdateDataAttribute.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_sync] +import com.google.cloud.dataplex.v1.DataAttribute; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.UpdateDataAttributeRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateDataAttribute { + + public static void main(String[] args) throws Exception { + syncUpdateDataAttribute(); + } + + public static void syncUpdateDataAttribute() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + UpdateDataAttributeRequest request = + UpdateDataAttributeRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setDataAttribute(DataAttribute.newBuilder().build()) + .setValidateOnly(true) + .build(); + DataAttribute response = dataTaxonomyServiceClient.updateDataAttributeAsync(request).get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedataattribute/SyncUpdateDataAttributeDataattributeFieldmask.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedataattribute/SyncUpdateDataAttributeDataattributeFieldmask.java new file mode 100644 index 000000000000..e2c2ccc94205 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedataattribute/SyncUpdateDataAttributeDataattributeFieldmask.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_DataattributeFieldmask_sync] +import com.google.cloud.dataplex.v1.DataAttribute; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateDataAttributeDataattributeFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateDataAttributeDataattributeFieldmask(); + } + + public static void syncUpdateDataAttributeDataattributeFieldmask() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + DataAttribute dataAttribute = DataAttribute.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + DataAttribute response = + dataTaxonomyServiceClient.updateDataAttributeAsync(dataAttribute, updateMask).get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_UpdateDataAttribute_DataattributeFieldmask_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedataattributebinding/AsyncUpdateDataAttributeBinding.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedataattributebinding/AsyncUpdateDataAttributeBinding.java new file mode 100644 index 000000000000..1a9299008685 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedataattributebinding/AsyncUpdateDataAttributeBinding.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dataplex.v1.DataAttributeBinding; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateDataAttributeBinding { + + public static void main(String[] args) throws Exception { + asyncUpdateDataAttributeBinding(); + } + + public static void asyncUpdateDataAttributeBinding() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + UpdateDataAttributeBindingRequest request = + UpdateDataAttributeBindingRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setDataAttributeBinding(DataAttributeBinding.newBuilder().build()) + .setValidateOnly(true) + .build(); + ApiFuture future = + dataTaxonomyServiceClient.updateDataAttributeBindingCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_async] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedataattributebinding/AsyncUpdateDataAttributeBindingLRO.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedataattributebinding/AsyncUpdateDataAttributeBindingLRO.java new file mode 100644 index 000000000000..d9b7586abe5d --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedataattributebinding/AsyncUpdateDataAttributeBindingLRO.java @@ -0,0 +1,55 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.dataplex.v1.DataAttributeBinding; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.OperationMetadata; +import com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateDataAttributeBindingLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateDataAttributeBindingLRO(); + } + + public static void asyncUpdateDataAttributeBindingLRO() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + UpdateDataAttributeBindingRequest request = + UpdateDataAttributeBindingRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setDataAttributeBinding(DataAttributeBinding.newBuilder().build()) + .setValidateOnly(true) + .build(); + OperationFuture future = + dataTaxonomyServiceClient + .updateDataAttributeBindingOperationCallable() + .futureCall(request); + // Do something. + DataAttributeBinding response = future.get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_LRO_async] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedataattributebinding/SyncUpdateDataAttributeBinding.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedataattributebinding/SyncUpdateDataAttributeBinding.java new file mode 100644 index 000000000000..422ff25d3783 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedataattributebinding/SyncUpdateDataAttributeBinding.java @@ -0,0 +1,49 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_sync] +import com.google.cloud.dataplex.v1.DataAttributeBinding; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.UpdateDataAttributeBindingRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateDataAttributeBinding { + + public static void main(String[] args) throws Exception { + syncUpdateDataAttributeBinding(); + } + + public static void syncUpdateDataAttributeBinding() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + UpdateDataAttributeBindingRequest request = + UpdateDataAttributeBindingRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setDataAttributeBinding(DataAttributeBinding.newBuilder().build()) + .setValidateOnly(true) + .build(); + DataAttributeBinding response = + dataTaxonomyServiceClient.updateDataAttributeBindingAsync(request).get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedataattributebinding/SyncUpdateDataAttributeBindingDataattributebindingFieldmask.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedataattributebinding/SyncUpdateDataAttributeBindingDataattributebindingFieldmask.java new file mode 100644 index 000000000000..cfe4548d8e4e --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedataattributebinding/SyncUpdateDataAttributeBindingDataattributebindingFieldmask.java @@ -0,0 +1,47 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_DataattributebindingFieldmask_sync] +import com.google.cloud.dataplex.v1.DataAttributeBinding; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateDataAttributeBindingDataattributebindingFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateDataAttributeBindingDataattributebindingFieldmask(); + } + + public static void syncUpdateDataAttributeBindingDataattributebindingFieldmask() + throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + DataAttributeBinding dataAttributeBinding = DataAttributeBinding.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + DataAttributeBinding response = + dataTaxonomyServiceClient + .updateDataAttributeBindingAsync(dataAttributeBinding, updateMask) + .get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_UpdateDataAttributeBinding_DataattributebindingFieldmask_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedatataxonomy/AsyncUpdateDataTaxonomy.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedatataxonomy/AsyncUpdateDataTaxonomy.java new file mode 100644 index 000000000000..d8a712337e75 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedatataxonomy/AsyncUpdateDataTaxonomy.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.dataplex.v1.DataTaxonomy; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest; +import com.google.longrunning.Operation; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateDataTaxonomy { + + public static void main(String[] args) throws Exception { + asyncUpdateDataTaxonomy(); + } + + public static void asyncUpdateDataTaxonomy() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + UpdateDataTaxonomyRequest request = + UpdateDataTaxonomyRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setDataTaxonomy(DataTaxonomy.newBuilder().build()) + .setValidateOnly(true) + .build(); + ApiFuture future = + dataTaxonomyServiceClient.updateDataTaxonomyCallable().futureCall(request); + // Do something. + Operation response = future.get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_async] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedatataxonomy/AsyncUpdateDataTaxonomyLRO.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedatataxonomy/AsyncUpdateDataTaxonomyLRO.java new file mode 100644 index 000000000000..0cb13c94bb51 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedatataxonomy/AsyncUpdateDataTaxonomyLRO.java @@ -0,0 +1,53 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_LRO_async] +import com.google.api.gax.longrunning.OperationFuture; +import com.google.cloud.dataplex.v1.DataTaxonomy; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.OperationMetadata; +import com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest; +import com.google.protobuf.FieldMask; + +public class AsyncUpdateDataTaxonomyLRO { + + public static void main(String[] args) throws Exception { + asyncUpdateDataTaxonomyLRO(); + } + + public static void asyncUpdateDataTaxonomyLRO() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + UpdateDataTaxonomyRequest request = + UpdateDataTaxonomyRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setDataTaxonomy(DataTaxonomy.newBuilder().build()) + .setValidateOnly(true) + .build(); + OperationFuture future = + dataTaxonomyServiceClient.updateDataTaxonomyOperationCallable().futureCall(request); + // Do something. + DataTaxonomy response = future.get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_LRO_async] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedatataxonomy/SyncUpdateDataTaxonomy.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedatataxonomy/SyncUpdateDataTaxonomy.java new file mode 100644 index 000000000000..6fc2e4dd5c5d --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedatataxonomy/SyncUpdateDataTaxonomy.java @@ -0,0 +1,48 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_sync] +import com.google.cloud.dataplex.v1.DataTaxonomy; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.cloud.dataplex.v1.UpdateDataTaxonomyRequest; +import com.google.protobuf.FieldMask; + +public class SyncUpdateDataTaxonomy { + + public static void main(String[] args) throws Exception { + syncUpdateDataTaxonomy(); + } + + public static void syncUpdateDataTaxonomy() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + UpdateDataTaxonomyRequest request = + UpdateDataTaxonomyRequest.newBuilder() + .setUpdateMask(FieldMask.newBuilder().build()) + .setDataTaxonomy(DataTaxonomy.newBuilder().build()) + .setValidateOnly(true) + .build(); + DataTaxonomy response = dataTaxonomyServiceClient.updateDataTaxonomyAsync(request).get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedatataxonomy/SyncUpdateDataTaxonomyDatataxonomyFieldmask.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedatataxonomy/SyncUpdateDataTaxonomyDatataxonomyFieldmask.java new file mode 100644 index 000000000000..5a79801fc3af --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservice/updatedatataxonomy/SyncUpdateDataTaxonomyDatataxonomyFieldmask.java @@ -0,0 +1,44 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_DatataxonomyFieldmask_sync] +import com.google.cloud.dataplex.v1.DataTaxonomy; +import com.google.cloud.dataplex.v1.DataTaxonomyServiceClient; +import com.google.protobuf.FieldMask; + +public class SyncUpdateDataTaxonomyDatataxonomyFieldmask { + + public static void main(String[] args) throws Exception { + syncUpdateDataTaxonomyDatataxonomyFieldmask(); + } + + public static void syncUpdateDataTaxonomyDatataxonomyFieldmask() throws Exception { + // 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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) { + DataTaxonomy dataTaxonomy = DataTaxonomy.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + DataTaxonomy response = + dataTaxonomyServiceClient.updateDataTaxonomyAsync(dataTaxonomy, updateMask).get(); + } + } +} +// [END dataplex_v1_generated_DataTaxonomyService_UpdateDataTaxonomy_DatataxonomyFieldmask_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservicesettings/getdatataxonomy/SyncGetDataTaxonomy.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservicesettings/getdatataxonomy/SyncGetDataTaxonomy.java new file mode 100644 index 000000000000..406b79046483 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/datataxonomyservicesettings/getdatataxonomy/SyncGetDataTaxonomy.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 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.dataplex.v1.samples; + +// [START dataplex_v1_generated_DataTaxonomyServiceSettings_GetDataTaxonomy_sync] +import com.google.cloud.dataplex.v1.DataTaxonomyServiceSettings; +import java.time.Duration; + +public class SyncGetDataTaxonomy { + + public static void main(String[] args) throws Exception { + syncGetDataTaxonomy(); + } + + public static void syncGetDataTaxonomy() throws Exception { + // 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 + DataTaxonomyServiceSettings.Builder dataTaxonomyServiceSettingsBuilder = + DataTaxonomyServiceSettings.newBuilder(); + dataTaxonomyServiceSettingsBuilder + .getDataTaxonomySettings() + .setRetrySettings( + dataTaxonomyServiceSettingsBuilder + .getDataTaxonomySettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + DataTaxonomyServiceSettings dataTaxonomyServiceSettings = + dataTaxonomyServiceSettingsBuilder.build(); + } +} +// [END dataplex_v1_generated_DataTaxonomyServiceSettings_GetDataTaxonomy_sync] diff --git a/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/stub/datataxonomyservicestubsettings/getdatataxonomy/SyncGetDataTaxonomy.java b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/stub/datataxonomyservicestubsettings/getdatataxonomy/SyncGetDataTaxonomy.java new file mode 100644 index 000000000000..c98cae289818 --- /dev/null +++ b/java-dataplex/samples/snippets/generated/com/google/cloud/dataplex/v1/stub/datataxonomyservicestubsettings/getdatataxonomy/SyncGetDataTaxonomy.java @@ -0,0 +1,50 @@ +/* + * Copyright 2023 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.dataplex.v1.stub.samples; + +// [START dataplex_v1_generated_DataTaxonomyServiceStubSettings_GetDataTaxonomy_sync] +import com.google.cloud.dataplex.v1.stub.DataTaxonomyServiceStubSettings; +import java.time.Duration; + +public class SyncGetDataTaxonomy { + + public static void main(String[] args) throws Exception { + syncGetDataTaxonomy(); + } + + public static void syncGetDataTaxonomy() throws Exception { + // 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 + DataTaxonomyServiceStubSettings.Builder dataTaxonomyServiceSettingsBuilder = + DataTaxonomyServiceStubSettings.newBuilder(); + dataTaxonomyServiceSettingsBuilder + .getDataTaxonomySettings() + .setRetrySettings( + dataTaxonomyServiceSettingsBuilder + .getDataTaxonomySettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + DataTaxonomyServiceStubSettings dataTaxonomyServiceSettings = + dataTaxonomyServiceSettingsBuilder.build(); + } +} +// [END dataplex_v1_generated_DataTaxonomyServiceStubSettings_GetDataTaxonomy_sync]