diff --git a/java-dataplex/README.md b/java-dataplex/README.md
index 5add93b8227b..b84a132814cb 100644
--- a/java-dataplex/README.md
+++ b/java-dataplex/README.md
@@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file:
{@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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * DataScanName name = DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]");
+ * DataScan response = dataScanServiceClient.getDataScan(name);
+ * }
+ * }
+ *
+ * Note: close() needs to be called on the DataScanServiceClient 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: + * + *
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 DataScanServiceSettings 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
+ * DataScanServiceSettings dataScanServiceSettings =
+ * DataScanServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * DataScanServiceClient dataScanServiceClient =
+ * DataScanServiceClient.create(dataScanServiceSettings);
+ * }
+ *
+ * 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
+ * DataScanServiceSettings dataScanServiceSettings =
+ * DataScanServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * DataScanServiceClient dataScanServiceClient =
+ * DataScanServiceClient.create(dataScanServiceSettings);
+ * }
+ *
+ * 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
+ * DataScanServiceSettings dataScanServiceSettings =
+ * DataScanServiceSettings.newHttpJsonBuilder().build();
+ * DataScanServiceClient dataScanServiceClient =
+ * DataScanServiceClient.create(dataScanServiceSettings);
+ * }
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class DataScanServiceClient implements BackgroundResource { + private final DataScanServiceSettings settings; + private final DataScanServiceStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of DataScanServiceClient with default settings. */ + public static final DataScanServiceClient create() throws IOException { + return create(DataScanServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of DataScanServiceClient, 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 DataScanServiceClient create(DataScanServiceSettings settings) + throws IOException { + return new DataScanServiceClient(settings); + } + + /** + * Constructs an instance of DataScanServiceClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(DataScanServiceSettings). + */ + public static final DataScanServiceClient create(DataScanServiceStub stub) { + return new DataScanServiceClient(stub); + } + + /** + * Constructs an instance of DataScanServiceClient, 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 DataScanServiceClient(DataScanServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((DataScanServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected DataScanServiceClient(DataScanServiceStub 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 DataScanServiceSettings getSettings() { + return settings; + } + + public DataScanServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a dataScan 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * DataScan dataScan = DataScan.newBuilder().build();
+ * String dataScanId = "dataScanId1260787906";
+ * DataScan response =
+ * dataScanServiceClient.createDataScanAsync(parent, dataScan, dataScanId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the parent location:
+ * projects/{project}/locations/{location_id} where `{project}` refers to a project_id or
+ * project_number and `location_id` refers to a GCP region.
+ * @param dataScan Required. DataScan resource.
+ * @param dataScanId Required. DataScan identifier.
+ * 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * DataScan dataScan = DataScan.newBuilder().build();
+ * String dataScanId = "dataScanId1260787906";
+ * DataScan response =
+ * dataScanServiceClient.createDataScanAsync(parent, dataScan, dataScanId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the parent location:
+ * projects/{project}/locations/{location_id} where `{project}` refers to a project_id or
+ * project_number and `location_id` refers to a GCP region.
+ * @param dataScan Required. DataScan resource.
+ * @param dataScanId Required. DataScan identifier.
+ * 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * CreateDataScanRequest request =
+ * CreateDataScanRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setDataScan(DataScan.newBuilder().build())
+ * .setDataScanId("dataScanId1260787906")
+ * .build();
+ * DataScan response = dataScanServiceClient.createDataScanAsync(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 OperationFutureSample 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * CreateDataScanRequest request =
+ * CreateDataScanRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setDataScan(DataScan.newBuilder().build())
+ * .setDataScanId("dataScanId1260787906")
+ * .build();
+ * OperationFuture future =
+ * dataScanServiceClient.createDataScanOperationCallable().futureCall(request);
+ * // Do something.
+ * DataScan response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * CreateDataScanRequest request =
+ * CreateDataScanRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setDataScan(DataScan.newBuilder().build())
+ * .setDataScanId("dataScanId1260787906")
+ * .build();
+ * ApiFuture future =
+ * dataScanServiceClient.createDataScanCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * DataScan dataScan = DataScan.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * DataScan response = dataScanServiceClient.updateDataScanAsync(dataScan, updateMask).get();
+ * }
+ * }
+ *
+ * @param dataScan Required. Update description. 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 OperationFutureSample 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * UpdateDataScanRequest request =
+ * UpdateDataScanRequest.newBuilder()
+ * .setDataScan(DataScan.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * DataScan response = dataScanServiceClient.updateDataScanAsync(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 OperationFutureSample 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * UpdateDataScanRequest request =
+ * UpdateDataScanRequest.newBuilder()
+ * .setDataScan(DataScan.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * OperationFuture future =
+ * dataScanServiceClient.updateDataScanOperationCallable().futureCall(request);
+ * // Do something.
+ * DataScan response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * UpdateDataScanRequest request =
+ * UpdateDataScanRequest.newBuilder()
+ * .setDataScan(DataScan.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * dataScanServiceClient.updateDataScanCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * DataScanName name = DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]");
+ * dataScanServiceClient.deleteDataScanAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the dataScan:
+ * projects/{project}/locations/{location_id}/dataScans/{data_scan_id} where `{project}`
+ * refers to a project_id or project_number and `location_id` refers to a GCP region.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * String name = DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString();
+ * dataScanServiceClient.deleteDataScanAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the dataScan:
+ * projects/{project}/locations/{location_id}/dataScans/{data_scan_id} where `{project}`
+ * refers to a project_id or project_number and `location_id` refers to a GCP region.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * DeleteDataScanRequest request =
+ * DeleteDataScanRequest.newBuilder()
+ * .setName(DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString())
+ * .build();
+ * dataScanServiceClient.deleteDataScanAsync(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 OperationFutureSample 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * DeleteDataScanRequest request =
+ * DeleteDataScanRequest.newBuilder()
+ * .setName(DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString())
+ * .build();
+ * OperationFuture future =
+ * dataScanServiceClient.deleteDataScanOperationCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * DeleteDataScanRequest request =
+ * DeleteDataScanRequest.newBuilder()
+ * .setName(DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString())
+ * .build();
+ * ApiFuture future =
+ * dataScanServiceClient.deleteDataScanCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * DataScanName name = DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]");
+ * DataScan response = dataScanServiceClient.getDataScan(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the dataScan:
+ * projects/{project}/locations/{location_id}/dataScans/{data_scan_id} where `{project}`
+ * refers to a project_id or project_number and `location_id` refers to a GCP region.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DataScan getDataScan(DataScanName name) {
+ GetDataScanRequest request =
+ GetDataScanRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getDataScan(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get dataScan 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * String name = DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString();
+ * DataScan response = dataScanServiceClient.getDataScan(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the dataScan:
+ * projects/{project}/locations/{location_id}/dataScans/{data_scan_id} where `{project}`
+ * refers to a project_id or project_number and `location_id` refers to a GCP region.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DataScan getDataScan(String name) {
+ GetDataScanRequest request = GetDataScanRequest.newBuilder().setName(name).build();
+ return getDataScan(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get dataScan 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * GetDataScanRequest request =
+ * GetDataScanRequest.newBuilder()
+ * .setName(DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString())
+ * .build();
+ * DataScan response = dataScanServiceClient.getDataScan(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 DataScan getDataScan(GetDataScanRequest request) {
+ return getDataScanCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get dataScan 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * GetDataScanRequest request =
+ * GetDataScanRequest.newBuilder()
+ * .setName(DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString())
+ * .build();
+ * ApiFuture future = dataScanServiceClient.getDataScanCallable().futureCall(request);
+ * // Do something.
+ * DataScan response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (DataScan element : dataScanServiceClient.listDataScans(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. projects/{project}/locations/{location_id} where `{project}` refers to
+ * a project_id or project_number and `location_id` refers to a GCP region.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListDataScansPagedResponse listDataScans(LocationName parent) {
+ ListDataScansRequest request =
+ ListDataScansRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listDataScans(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists dataScans.
+ *
+ * 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (DataScan element : dataScanServiceClient.listDataScans(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. projects/{project}/locations/{location_id} where `{project}` refers to
+ * a project_id or project_number and `location_id` refers to a GCP region.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListDataScansPagedResponse listDataScans(String parent) {
+ ListDataScansRequest request = ListDataScansRequest.newBuilder().setParent(parent).build();
+ return listDataScans(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists dataScans.
+ *
+ * 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * ListDataScansRequest request =
+ * ListDataScansRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (DataScan element : dataScanServiceClient.listDataScans(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 ListDataScansPagedResponse listDataScans(ListDataScansRequest request) {
+ return listDataScansPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists dataScans.
+ *
+ * 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * ListDataScansRequest request =
+ * ListDataScansRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * dataScanServiceClient.listDataScansPagedCallable().futureCall(request);
+ * // Do something.
+ * for (DataScan element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * ListDataScansRequest request =
+ * ListDataScansRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListDataScansResponse response =
+ * dataScanServiceClient.listDataScansCallable().call(request);
+ * for (DataScan element : response.getDataScansList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * DataScanName name = DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]");
+ * RunDataScanResponse response = dataScanServiceClient.runDataScan(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the DataScan:
+ * projects/{project}/locations/{location_id}/dataScans/{data_scan_id}. where `{project}`
+ * refers to a project_id or project_number and `location_id` refers to a GCP region. Only
+ * on-demand DataScans are allowed.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final RunDataScanResponse runDataScan(DataScanName name) {
+ RunDataScanRequest request =
+ RunDataScanRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return runDataScan(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Run an on demand execution of a DataScan.
+ *
+ * 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * String name = DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString();
+ * RunDataScanResponse response = dataScanServiceClient.runDataScan(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the DataScan:
+ * projects/{project}/locations/{location_id}/dataScans/{data_scan_id}. where `{project}`
+ * refers to a project_id or project_number and `location_id` refers to a GCP region. Only
+ * on-demand DataScans are allowed.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final RunDataScanResponse runDataScan(String name) {
+ RunDataScanRequest request = RunDataScanRequest.newBuilder().setName(name).build();
+ return runDataScan(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Run an on demand execution of a DataScan.
+ *
+ * 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * RunDataScanRequest request =
+ * RunDataScanRequest.newBuilder()
+ * .setName(DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString())
+ * .build();
+ * RunDataScanResponse response = dataScanServiceClient.runDataScan(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 RunDataScanResponse runDataScan(RunDataScanRequest request) {
+ return runDataScanCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Run an on demand execution of a DataScan.
+ *
+ * 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * RunDataScanRequest request =
+ * RunDataScanRequest.newBuilder()
+ * .setName(DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString())
+ * .build();
+ * ApiFuture future =
+ * dataScanServiceClient.runDataScanCallable().futureCall(request);
+ * // Do something.
+ * RunDataScanResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * DataScanJobName name = DataScanJobName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]", "[JOB]");
+ * DataScanJob response = dataScanServiceClient.getDataScanJob(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the DataScanJob:
+ * projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/dataScanJobs/{data_scan_job_id}
+ * where `{project}` refers to a project_id or project_number and `location_id` refers to a
+ * GCP region.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DataScanJob getDataScanJob(DataScanJobName name) {
+ GetDataScanJobRequest request =
+ GetDataScanJobRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getDataScanJob(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get DataScanJob 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * String name = DataScanJobName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]", "[JOB]").toString();
+ * DataScanJob response = dataScanServiceClient.getDataScanJob(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the DataScanJob:
+ * projects/{project}/locations/{location_id}/dataScans/{data_scan_id}/dataScanJobs/{data_scan_job_id}
+ * where `{project}` refers to a project_id or project_number and `location_id` refers to a
+ * GCP region.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DataScanJob getDataScanJob(String name) {
+ GetDataScanJobRequest request = GetDataScanJobRequest.newBuilder().setName(name).build();
+ return getDataScanJob(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get DataScanJob 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * GetDataScanJobRequest request =
+ * GetDataScanJobRequest.newBuilder()
+ * .setName(
+ * DataScanJobName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]", "[JOB]").toString())
+ * .build();
+ * DataScanJob response = dataScanServiceClient.getDataScanJob(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 DataScanJob getDataScanJob(GetDataScanJobRequest request) {
+ return getDataScanJobCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get DataScanJob 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * GetDataScanJobRequest request =
+ * GetDataScanJobRequest.newBuilder()
+ * .setName(
+ * DataScanJobName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]", "[JOB]").toString())
+ * .build();
+ * ApiFuture future =
+ * dataScanServiceClient.getDataScanJobCallable().futureCall(request);
+ * // Do something.
+ * DataScanJob response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * DataScanName parent = DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]");
+ * for (DataScanJob element : dataScanServiceClient.listDataScanJobs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the parent environment:
+ * projects/{project}/locations/{location_id}/dataScans/{data_scan_id} where `{project}`
+ * refers to a project_id or project_number and `location_id` refers to a GCP region.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListDataScanJobsPagedResponse listDataScanJobs(DataScanName parent) {
+ ListDataScanJobsRequest request =
+ ListDataScanJobsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listDataScanJobs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists DataScanJobs under the given dataScan.
+ *
+ * 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * String parent = DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString();
+ * for (DataScanJob element : dataScanServiceClient.listDataScanJobs(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the parent environment:
+ * projects/{project}/locations/{location_id}/dataScans/{data_scan_id} where `{project}`
+ * refers to a project_id or project_number and `location_id` refers to a GCP region.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListDataScanJobsPagedResponse listDataScanJobs(String parent) {
+ ListDataScanJobsRequest request =
+ ListDataScanJobsRequest.newBuilder().setParent(parent).build();
+ return listDataScanJobs(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists DataScanJobs under the given dataScan.
+ *
+ * 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * ListDataScanJobsRequest request =
+ * ListDataScanJobsRequest.newBuilder()
+ * .setParent(DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (DataScanJob element : dataScanServiceClient.listDataScanJobs(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 ListDataScanJobsPagedResponse listDataScanJobs(ListDataScanJobsRequest request) {
+ return listDataScanJobsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists DataScanJobs under the given dataScan.
+ *
+ * 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * ListDataScanJobsRequest request =
+ * ListDataScanJobsRequest.newBuilder()
+ * .setParent(DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * dataScanServiceClient.listDataScanJobsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (DataScanJob element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * ListDataScanJobsRequest request =
+ * ListDataScanJobsRequest.newBuilder()
+ * .setParent(DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListDataScanJobsResponse response =
+ * dataScanServiceClient.listDataScanJobsCallable().call(request);
+ * for (DataScanJob element : response.getDataScanJobsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : dataScanServiceClient.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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * dataScanServiceClient.listLocationsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Location element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response =
+ * dataScanServiceClient.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 UnaryCallableSample 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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = dataScanServiceClient.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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture future = dataScanServiceClient.getLocationCallable().futureCall(request);
+ * // Do something.
+ * Location response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableThe default instance has everything set to sensible defaults: + * + *
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 getDataScan 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
+ * DataScanServiceSettings.Builder dataScanServiceSettingsBuilder =
+ * DataScanServiceSettings.newBuilder();
+ * dataScanServiceSettingsBuilder
+ * .getDataScanSettings()
+ * .setRetrySettings(
+ * dataScanServiceSettingsBuilder.getDataScanSettings().getRetrySettings().toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * DataScanServiceSettings dataScanServiceSettings = dataScanServiceSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class DataScanServiceSettings extends ClientSettingsNote: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction ======================= DataScanServiceClient =======================
+ *
+ * Sample for DataScanServiceClient:
+ *
+ * ======================= MetadataServiceClient =======================
*
* Service Description: Metadata service manages metadata resources such as tables, filesets and
diff --git a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/DataScanServiceStub.java b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/DataScanServiceStub.java
new file mode 100644
index 000000000000..76f2bad7957d
--- /dev/null
+++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/DataScanServiceStub.java
@@ -0,0 +1,139 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.dataplex.v1.stub;
+
+import static com.google.cloud.dataplex.v1.DataScanServiceClient.ListDataScanJobsPagedResponse;
+import static com.google.cloud.dataplex.v1.DataScanServiceClient.ListDataScansPagedResponse;
+import static com.google.cloud.dataplex.v1.DataScanServiceClient.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.CreateDataScanRequest;
+import com.google.cloud.dataplex.v1.DataScan;
+import com.google.cloud.dataplex.v1.DataScanJob;
+import com.google.cloud.dataplex.v1.DeleteDataScanRequest;
+import com.google.cloud.dataplex.v1.GetDataScanJobRequest;
+import com.google.cloud.dataplex.v1.GetDataScanRequest;
+import com.google.cloud.dataplex.v1.ListDataScanJobsRequest;
+import com.google.cloud.dataplex.v1.ListDataScanJobsResponse;
+import com.google.cloud.dataplex.v1.ListDataScansRequest;
+import com.google.cloud.dataplex.v1.ListDataScansResponse;
+import com.google.cloud.dataplex.v1.OperationMetadata;
+import com.google.cloud.dataplex.v1.RunDataScanRequest;
+import com.google.cloud.dataplex.v1.RunDataScanResponse;
+import com.google.cloud.dataplex.v1.UpdateDataScanRequest;
+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 DataScanService service API.
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public abstract class DataScanServiceStub implements BackgroundResource {
+
+ public OperationsStub getOperationsStub() {
+ return null;
+ }
+
+ public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() {
+ return null;
+ }
+
+ public OperationCallable The default instance has everything set to sensible defaults:
+ *
+ * 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 getDataScan to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class is for advanced usage.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcDataScanServiceCallableFactory implements GrpcStubCallableFactory {
+
+ @Override
+ public This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcDataScanServiceStub extends DataScanServiceStub {
+ private static final MethodDescriptor{@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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * DataScanName name = DataScanName.of("[PROJECT]", "[LOCATION]", "[DATASCAN]");
+ * DataScan response = dataScanServiceClient.getDataScan(name);
+ * }
+ * }
+ *
*
+ *
+ *
+ * {@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
+ * DataScanServiceStubSettings.Builder dataScanServiceSettingsBuilder =
+ * DataScanServiceStubSettings.newBuilder();
+ * dataScanServiceSettingsBuilder
+ * .getDataScanSettings()
+ * .setRetrySettings(
+ * dataScanServiceSettingsBuilder.getDataScanSettings().getRetrySettings().toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * DataScanServiceStubSettings dataScanServiceSettings = dataScanServiceSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class DataScanServiceStubSettings extends StubSettings