From 66164f8d9de4e66417def7ac37957f9a3acf9c77 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 17 Feb 2022 16:07:08 +0000 Subject: [PATCH] feat: added client side library for the followings: (#25) - [ ] Regenerate this pull request now. 1. Content APIs. 2. Create|Update|Delete Metadata APIs (e.g. Entity and/or Partition). PiperOrigin-RevId: 429081053 Source-Link: https://github.com/googleapis/googleapis/commit/7b42fd062975fb2939a19aa33210e09ae303f8ea Source-Link: https://github.com/googleapis/googleapis-gen/commit/3f71d2df5c102ee1fe82f492de545cd3a3dc7f79 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiM2Y3MWQyZGY1YzEwMmVlMWZlODJmNDkyZGU1NDVjZDNhM2RjN2Y3OSJ9 --- .../dataplex/v1/ContentServiceClient.java | 752 ++ .../dataplex/v1/ContentServiceSettings.java | 228 + .../dataplex/v1/DataplexServiceClient.java | 1099 +- .../dataplex/v1/DataplexServiceSettings.java | 108 + .../dataplex/v1/MetadataServiceClient.java | 474 +- .../dataplex/v1/MetadataServiceSettings.java | 57 +- .../cloud/dataplex/v1/gapic_metadata.json | 57 + .../cloud/dataplex/v1/package-info.java | 19 +- .../dataplex/v1/stub/ContentServiceStub.java | 68 + .../v1/stub/ContentServiceStubSettings.java | 426 + .../dataplex/v1/stub/DataplexServiceStub.java | 63 + .../v1/stub/DataplexServiceStubSettings.java | 425 +- .../GrpcContentServiceCallableFactory.java | 113 + .../v1/stub/GrpcContentServiceStub.java | 292 + .../v1/stub/GrpcDataplexServiceStub.java | 259 + .../v1/stub/GrpcMetadataServiceStub.java | 145 + .../dataplex/v1/stub/MetadataServiceStub.java | 26 + .../v1/stub/MetadataServiceStubSettings.java | 133 +- .../dataplex/v1/ContentServiceClientTest.java | 469 + .../v1/DataplexServiceClientTest.java | 557 + .../v1/MetadataServiceClientTest.java | 408 + .../cloud/dataplex/v1/MockContentService.java | 59 + .../dataplex/v1/MockContentServiceImpl.java | 164 + .../dataplex/v1/MockDataplexServiceImpl.java | 126 + .../dataplex/v1/MockMetadataServiceImpl.java | 103 + .../cloud/dataplex/v1/ContentServiceGrpc.java | 805 ++ .../dataplex/v1/DataplexServiceGrpc.java | 699 ++ .../dataplex/v1/MetadataServiceGrpc.java | 572 +- .../cloud/dataplex/v1/AnalyzeProto.java | 347 + .../com/google/cloud/dataplex/v1/Asset.java | 63 - .../com/google/cloud/dataplex/v1/Content.java | 4682 ++++++++ .../google/cloud/dataplex/v1/ContentName.java | 257 + .../cloud/dataplex/v1/ContentOrBuilder.java | 378 + .../cloud/dataplex/v1/ContentProto.java | 202 + .../dataplex/v1/CreateContentRequest.java | 1047 ++ .../v1/CreateContentRequestOrBuilder.java | 108 + .../dataplex/v1/CreateEntityRequest.java | 1033 ++ .../v1/CreateEntityRequestOrBuilder.java | 108 + .../dataplex/v1/CreateEnvironmentRequest.java | 1268 +++ .../v1/CreateEnvironmentRequestOrBuilder.java | 146 + .../cloud/dataplex/v1/CreateLakeRequest.java | 14 +- .../v1/CreateLakeRequestOrBuilder.java | 4 +- .../dataplex/v1/CreatePartitionRequest.java | 1052 ++ .../v1/CreatePartitionRequestOrBuilder.java | 111 + .../dataplex/v1/DeleteContentRequest.java | 657 ++ .../v1/DeleteContentRequestOrBuilder.java | 56 + .../dataplex/v1/DeleteEntityRequest.java | 835 ++ .../v1/DeleteEntityRequestOrBuilder.java | 81 + .../dataplex/v1/DeleteEnvironmentRequest.java | 658 ++ .../v1/DeleteEnvironmentRequestOrBuilder.java | 56 + .../dataplex/v1/DeletePartitionRequest.java | 864 ++ .../v1/DeletePartitionRequestOrBuilder.java | 89 + .../com/google/cloud/dataplex/v1/Entity.java | 189 +- .../cloud/dataplex/v1/EntityOrBuilder.java | 54 +- .../google/cloud/dataplex/v1/Environment.java | 9877 +++++++++++++++++ .../cloud/dataplex/v1/EnvironmentName.java | 260 + .../dataplex/v1/EnvironmentOrBuilder.java | 455 + .../cloud/dataplex/v1/GetContentRequest.java | 987 ++ .../v1/GetContentRequestOrBuilder.java | 85 + .../cloud/dataplex/v1/GetEntityRequest.java | 4 +- .../dataplex/v1/GetEnvironmentRequest.java | 657 ++ .../v1/GetEnvironmentRequestOrBuilder.java | 56 + .../dataplex/v1/GetPartitionRequest.java | 28 +- .../v1/GetPartitionRequestOrBuilder.java | 8 +- .../cloud/dataplex/v1/ListContentRequest.java | 1175 ++ .../v1/ListContentRequestOrBuilder.java | 139 + .../dataplex/v1/ListContentResponse.java | 1133 ++ .../v1/ListContentResponseOrBuilder.java | 103 + .../dataplex/v1/ListEntitiesRequest.java | 72 +- .../v1/ListEntitiesRequestOrBuilder.java | 20 +- .../dataplex/v1/ListEnvironmentsRequest.java | 1313 +++ .../v1/ListEnvironmentsRequestOrBuilder.java | 152 + .../dataplex/v1/ListEnvironmentsResponse.java | 1138 ++ .../v1/ListEnvironmentsResponseOrBuilder.java | 104 + .../dataplex/v1/ListPartitionsRequest.java | 128 +- .../v1/ListPartitionsRequestOrBuilder.java | 36 +- .../dataplex/v1/ListSessionsRequest.java | 954 ++ .../v1/ListSessionsRequestOrBuilder.java | 102 + .../dataplex/v1/ListSessionsResponse.java | 1134 ++ .../v1/ListSessionsResponseOrBuilder.java | 104 + .../cloud/dataplex/v1/MetadataProto.java | 384 +- .../google/cloud/dataplex/v1/Partition.java | 105 +- .../cloud/dataplex/v1/PartitionOrBuilder.java | 30 +- .../com/google/cloud/dataplex/v1/Schema.java | 201 +- .../cloud/dataplex/v1/SchemaOrBuilder.java | 19 +- .../cloud/dataplex/v1/ServiceProto.java | 414 +- .../com/google/cloud/dataplex/v1/Session.java | 1238 +++ .../cloud/dataplex/v1/SessionOrBuilder.java | 134 + .../cloud/dataplex/v1/StorageFormat.java | 223 +- .../dataplex/v1/StorageFormatOrBuilder.java | 34 +- .../dataplex/v1/UpdateContentRequest.java | 1142 ++ .../v1/UpdateContentRequestOrBuilder.java | 118 + .../dataplex/v1/UpdateEntityRequest.java | 838 ++ .../v1/UpdateEntityRequestOrBuilder.java | 77 + .../dataplex/v1/UpdateEnvironmentRequest.java | 1149 ++ .../v1/UpdateEnvironmentRequestOrBuilder.java | 121 + .../google/cloud/dataplex/v1/analyze.proto | 265 + .../google/cloud/dataplex/v1/content.proto | 196 + .../google/cloud/dataplex/v1/metadata.proto | 294 +- .../google/cloud/dataplex/v1/resources.proto | 7 - .../google/cloud/dataplex/v1/service.proto | 203 +- 101 files changed, 49673 insertions(+), 808 deletions(-) create mode 100644 google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/ContentServiceClient.java create mode 100644 google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/ContentServiceSettings.java create mode 100644 google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/ContentServiceStub.java create mode 100644 google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/ContentServiceStubSettings.java create mode 100644 google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/GrpcContentServiceCallableFactory.java create mode 100644 google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/GrpcContentServiceStub.java create mode 100644 google-cloud-dataplex/src/test/java/com/google/cloud/dataplex/v1/ContentServiceClientTest.java create mode 100644 google-cloud-dataplex/src/test/java/com/google/cloud/dataplex/v1/MockContentService.java create mode 100644 google-cloud-dataplex/src/test/java/com/google/cloud/dataplex/v1/MockContentServiceImpl.java create mode 100644 grpc-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ContentServiceGrpc.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/AnalyzeProto.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Content.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ContentName.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ContentOrBuilder.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ContentProto.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateContentRequest.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateContentRequestOrBuilder.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateEntityRequest.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateEntityRequestOrBuilder.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateEnvironmentRequest.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreateEnvironmentRequestOrBuilder.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreatePartitionRequest.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/CreatePartitionRequestOrBuilder.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteContentRequest.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteContentRequestOrBuilder.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteEntityRequest.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteEntityRequestOrBuilder.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteEnvironmentRequest.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeleteEnvironmentRequestOrBuilder.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeletePartitionRequest.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/DeletePartitionRequestOrBuilder.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Environment.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/EnvironmentName.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/EnvironmentOrBuilder.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetContentRequest.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetContentRequestOrBuilder.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetEnvironmentRequest.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/GetEnvironmentRequestOrBuilder.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListContentRequest.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListContentRequestOrBuilder.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListContentResponse.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListContentResponseOrBuilder.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListEnvironmentsRequest.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListEnvironmentsRequestOrBuilder.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListEnvironmentsResponse.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListEnvironmentsResponseOrBuilder.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListSessionsRequest.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListSessionsRequestOrBuilder.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListSessionsResponse.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/ListSessionsResponseOrBuilder.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/Session.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/SessionOrBuilder.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateContentRequest.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateContentRequestOrBuilder.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateEntityRequest.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateEntityRequestOrBuilder.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateEnvironmentRequest.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/java/com/google/cloud/dataplex/v1/UpdateEnvironmentRequestOrBuilder.java create mode 100644 proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/analyze.proto create mode 100644 proto-google-cloud-dataplex-v1/src/main/proto/google/cloud/dataplex/v1/content.proto diff --git a/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/ContentServiceClient.java b/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/ContentServiceClient.java new file mode 100644 index 0000000..d2685c7 --- /dev/null +++ b/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/ContentServiceClient.java @@ -0,0 +1,752 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +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.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dataplex.v1.stub.ContentServiceStub; +import com.google.cloud.dataplex.v1.stub.ContentServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +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: ContentService manages Notebook and SQL Scripts for Dataplex. + * + *
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 + * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) { + * LakeName parent = LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]"); + * Content content = Content.newBuilder().build(); + * Content response = contentServiceClient.createContent(parent, content); + * } + * }+ * + *
Note: close() needs to be called on the ContentServiceClient 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 ContentServiceSettings to + * create(). For example: + * + *
To customize credentials: + * + *
{@code + * ContentServiceSettings contentServiceSettings = + * ContentServiceSettings.newBuilder() + * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + * .build(); + * ContentServiceClient contentServiceClient = ContentServiceClient.create(contentServiceSettings); + * }+ * + *
To customize the endpoint: + * + *
{@code + * ContentServiceSettings contentServiceSettings = + * ContentServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + * ContentServiceClient contentServiceClient = ContentServiceClient.create(contentServiceSettings); + * }+ * + *
Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class ContentServiceClient implements BackgroundResource { + private final ContentServiceSettings settings; + private final ContentServiceStub stub; + + /** Constructs an instance of ContentServiceClient with default settings. */ + public static final ContentServiceClient create() throws IOException { + return create(ContentServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of ContentServiceClient, 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 ContentServiceClient create(ContentServiceSettings settings) + throws IOException { + return new ContentServiceClient(settings); + } + + /** + * Constructs an instance of ContentServiceClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(ContentServiceSettings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final ContentServiceClient create(ContentServiceStub stub) { + return new ContentServiceClient(stub); + } + + /** + * Constructs an instance of ContentServiceClient, 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 ContentServiceClient(ContentServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((ContentServiceStubSettings) settings.getStubSettings()).createStub(); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected ContentServiceClient(ContentServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final ContentServiceSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public ContentServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a content. + * + *
Sample code: + * + *
{@code + * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) { + * LakeName parent = LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]"); + * Content content = Content.newBuilder().build(); + * Content response = contentServiceClient.createContent(parent, content); + * } + * }+ * + * @param parent Required. The resource name of the parent lake: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + * @param content Required. Content resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Content createContent(LakeName parent, Content content) { + CreateContentRequest request = + CreateContentRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setContent(content) + .build(); + return createContent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a content. + * + *
Sample code: + * + *
{@code + * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) { + * String parent = LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString(); + * Content content = Content.newBuilder().build(); + * Content response = contentServiceClient.createContent(parent, content); + * } + * }+ * + * @param parent Required. The resource name of the parent lake: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + * @param content Required. Content resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Content createContent(String parent, Content content) { + CreateContentRequest request = + CreateContentRequest.newBuilder().setParent(parent).setContent(content).build(); + return createContent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a content. + * + *
Sample code: + * + *
{@code + * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) { + * CreateContentRequest request = + * CreateContentRequest.newBuilder() + * .setParent(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString()) + * .setContent(Content.newBuilder().build()) + * .setValidateOnly(true) + * .build(); + * Content response = contentServiceClient.createContent(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 Content createContent(CreateContentRequest request) { + return createContentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a content. + * + *
Sample code: + * + *
{@code + * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) { + * CreateContentRequest request = + * CreateContentRequest.newBuilder() + * .setParent(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString()) + * .setContent(Content.newBuilder().build()) + * .setValidateOnly(true) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = contentServiceClient.createContentCallable().futureCall(request); + * // Do something. + * Content response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) { + * Content content = Content.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * Content response = contentServiceClient.updateContent(content, updateMask); + * } + * }+ * + * @param content 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 Content updateContent(Content content, FieldMask updateMask) { + UpdateContentRequest request = + UpdateContentRequest.newBuilder().setContent(content).setUpdateMask(updateMask).build(); + return updateContent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update a content. Only supports full resource update. + * + *
Sample code: + * + *
{@code + * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) { + * UpdateContentRequest request = + * UpdateContentRequest.newBuilder() + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setContent(Content.newBuilder().build()) + * .setValidateOnly(true) + * .build(); + * Content response = contentServiceClient.updateContent(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 Content updateContent(UpdateContentRequest request) { + return updateContentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update a content. Only supports full resource update. + * + *
Sample code: + * + *
{@code + * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) { + * UpdateContentRequest request = + * UpdateContentRequest.newBuilder() + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setContent(Content.newBuilder().build()) + * .setValidateOnly(true) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = contentServiceClient.updateContentCallable().futureCall(request); + * // Do something. + * Content response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) { + * ContentName name = ContentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[CONTENT]"); + * contentServiceClient.deleteContent(name); + * } + * }+ * + * @param name Required. The resource name of the content: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteContent(ContentName name) { + DeleteContentRequest request = + DeleteContentRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteContent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a content. + * + *
Sample code: + * + *
{@code + * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) { + * String name = ContentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[CONTENT]").toString(); + * contentServiceClient.deleteContent(name); + * } + * }+ * + * @param name Required. The resource name of the content: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteContent(String name) { + DeleteContentRequest request = DeleteContentRequest.newBuilder().setName(name).build(); + deleteContent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a content. + * + *
Sample code: + * + *
{@code + * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) { + * DeleteContentRequest request = + * DeleteContentRequest.newBuilder() + * .setName(ContentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[CONTENT]").toString()) + * .build(); + * contentServiceClient.deleteContent(request); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteContent(DeleteContentRequest request) { + deleteContentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Delete a content. + * + *
Sample code: + * + *
{@code + * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) { + * DeleteContentRequest request = + * DeleteContentRequest.newBuilder() + * .setName(ContentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[CONTENT]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = contentServiceClient.deleteContentCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) { + * ContentName name = ContentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[CONTENT]"); + * Content response = contentServiceClient.getContent(name); + * } + * }+ * + * @param name Required. The resource name of the content: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Content getContent(ContentName name) { + GetContentRequest request = + GetContentRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getContent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a content resource. + * + *
Sample code: + * + *
{@code + * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) { + * String name = ContentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[CONTENT]").toString(); + * Content response = contentServiceClient.getContent(name); + * } + * }+ * + * @param name Required. The resource name of the content: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/content/{content_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Content getContent(String name) { + GetContentRequest request = GetContentRequest.newBuilder().setName(name).build(); + return getContent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a content resource. + * + *
Sample code: + * + *
{@code + * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) { + * GetContentRequest request = + * GetContentRequest.newBuilder() + * .setName(ContentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[CONTENT]").toString()) + * .build(); + * Content response = contentServiceClient.getContent(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 Content getContent(GetContentRequest request) { + return getContentCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Get a content resource. + * + *
Sample code: + * + *
{@code + * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) { + * GetContentRequest request = + * GetContentRequest.newBuilder() + * .setName(ContentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[CONTENT]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = contentServiceClient.getContentCallable().futureCall(request); + * // Do something. + * Content response = future.get(); + * } + * }
Sample code: + * + *
{@code + * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) { + * LakeName parent = LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]"); + * for (Content element : contentServiceClient.listContent(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The resource name of the parent lake: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListContentPagedResponse listContent(LakeName parent) { + ListContentRequest request = + ListContentRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listContent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List content. + * + *
Sample code: + * + *
{@code + * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) { + * String parent = LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString(); + * for (Content element : contentServiceClient.listContent(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The resource name of the parent lake: + * projects/{project_id}/locations/{location_id}/lakes/{lake_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListContentPagedResponse listContent(String parent) { + ListContentRequest request = ListContentRequest.newBuilder().setParent(parent).build(); + return listContent(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List content. + * + *
Sample code: + * + *
{@code + * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) { + * ListContentRequest request = + * ListContentRequest.newBuilder() + * .setParent(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .build(); + * for (Content element : contentServiceClient.listContent(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 ListContentPagedResponse listContent(ListContentRequest request) { + return listContentPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List content. + * + *
Sample code: + * + *
{@code + * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) { + * ListContentRequest request = + * ListContentRequest.newBuilder() + * .setParent(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * contentServiceClient.listContentPagedCallable().futureCall(request); + * // Do something. + * for (Content element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) { + * ListContentRequest request = + * ListContentRequest.newBuilder() + * .setParent(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setFilter("filter-1274492040") + * .build(); + * while (true) { + * ListContentResponse response = contentServiceClient.listContentCallable().call(request); + * for (Content element : response.getResponsesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }+ */ + public final UnaryCallable
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 createContent to 30 seconds: + * + *
{@code + * ContentServiceSettings.Builder contentServiceSettingsBuilder = + * ContentServiceSettings.newBuilder(); + * contentServiceSettingsBuilder + * .createContentSettings() + * .setRetrySettings( + * contentServiceSettingsBuilder + * .createContentSettings() + * .getRetrySettings() + * .toBuilder() + * .setTotalTimeout(Duration.ofSeconds(30)) + * .build()); + * ContentServiceSettings contentServiceSettings = contentServiceSettingsBuilder.build(); + * }+ */ +@Generated("by gapic-generator-java") +public class ContentServiceSettings extends ClientSettings
Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * 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 getEntity to 30 seconds:
+ * For example, to set the total timeout of createEntity to 30 seconds:
*
* The interfaces provided are listed below, along with usage samples.
*
+ * ======================= ContentServiceClient =======================
+ *
+ * Service Description: ContentService manages Notebook and SQL Scripts for Dataplex.
+ *
+ * Sample for ContentServiceClient:
+ *
+ * ======================= MetadataServiceClient =======================
*
* Service Description: Metadata service manages metadata resources such as tables, filesets and
@@ -28,8 +42,9 @@
*
* This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public abstract class ContentServiceStub implements BackgroundResource {
+
+ public UnaryCallable 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 createContent to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction{@code
+ * try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
+ * LakeName parent = LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]");
+ * Environment environment = Environment.newBuilder().build();
+ * String environmentId = "environmentId-950205810";
+ * Environment response =
+ * dataplexServiceClient.createEnvironmentAsync(parent, environment, environmentId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the parent lake:
+ * projects/{project_id}/locations/{location_id}/lakes/{lake_id}
+ * @param environment Required. Environment resource.
+ * @param environmentId Required. Environment identifier.
+ *
+ *
+ *
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
+ * String parent = LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString();
+ * Environment environment = Environment.newBuilder().build();
+ * String environmentId = "environmentId-950205810";
+ * Environment response =
+ * dataplexServiceClient.createEnvironmentAsync(parent, environment, environmentId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the parent lake:
+ * projects/{project_id}/locations/{location_id}/lakes/{lake_id}
+ * @param environment Required. Environment resource.
+ * @param environmentId Required. Environment identifier.
+ *
+ *
+ *
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
+ * CreateEnvironmentRequest request =
+ * CreateEnvironmentRequest.newBuilder()
+ * .setParent(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString())
+ * .setEnvironmentId("environmentId-950205810")
+ * .setEnvironment(Environment.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * Environment response = dataplexServiceClient.createEnvironmentAsync(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{@code
+ * try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
+ * CreateEnvironmentRequest request =
+ * CreateEnvironmentRequest.newBuilder()
+ * .setParent(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString())
+ * .setEnvironmentId("environmentId-950205810")
+ * .setEnvironment(Environment.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
+ * CreateEnvironmentRequest request =
+ * CreateEnvironmentRequest.newBuilder()
+ * .setParent(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString())
+ * .setEnvironmentId("environmentId-950205810")
+ * .setEnvironment(Environment.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
+ * Environment environment = Environment.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Environment response =
+ * dataplexServiceClient.updateEnvironmentAsync(environment, updateMask).get();
+ * }
+ * }
+ *
+ * @param environment 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 OperationFuture{@code
+ * try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
+ * UpdateEnvironmentRequest request =
+ * UpdateEnvironmentRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setEnvironment(Environment.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * Environment response = dataplexServiceClient.updateEnvironmentAsync(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{@code
+ * try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
+ * UpdateEnvironmentRequest request =
+ * UpdateEnvironmentRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setEnvironment(Environment.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
+ * UpdateEnvironmentRequest request =
+ * UpdateEnvironmentRequest.newBuilder()
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setEnvironment(Environment.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
+ * EnvironmentName name =
+ * EnvironmentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ENVIRONMENT]");
+ * dataplexServiceClient.deleteEnvironmentAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the environment:
+ * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
+ * String name =
+ * EnvironmentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ENVIRONMENT]").toString();
+ * dataplexServiceClient.deleteEnvironmentAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the environment:
+ * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@code
+ * try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
+ * DeleteEnvironmentRequest request =
+ * DeleteEnvironmentRequest.newBuilder()
+ * .setName(
+ * EnvironmentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ENVIRONMENT]")
+ * .toString())
+ * .build();
+ * dataplexServiceClient.deleteEnvironmentAsync(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{@code
+ * try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
+ * DeleteEnvironmentRequest request =
+ * DeleteEnvironmentRequest.newBuilder()
+ * .setName(
+ * EnvironmentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ENVIRONMENT]")
+ * .toString())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@code
+ * try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
+ * DeleteEnvironmentRequest request =
+ * DeleteEnvironmentRequest.newBuilder()
+ * .setName(
+ * EnvironmentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ENVIRONMENT]")
+ * .toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
+ * LakeName parent = LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]");
+ * for (Environment element : dataplexServiceClient.listEnvironments(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the parent lake:
+ * projects/{project_id}/locations/{location_id}/lakes/{lake_id}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListEnvironmentsPagedResponse listEnvironments(LakeName parent) {
+ ListEnvironmentsRequest request =
+ ListEnvironmentsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listEnvironments(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists environments under the given lake.
+ *
+ * {@code
+ * try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
+ * String parent = LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString();
+ * for (Environment element : dataplexServiceClient.listEnvironments(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the parent lake:
+ * projects/{project_id}/locations/{location_id}/lakes/{lake_id}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListEnvironmentsPagedResponse listEnvironments(String parent) {
+ ListEnvironmentsRequest request =
+ ListEnvironmentsRequest.newBuilder().setParent(parent).build();
+ return listEnvironments(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists environments under the given lake.
+ *
+ * {@code
+ * try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
+ * ListEnvironmentsRequest request =
+ * ListEnvironmentsRequest.newBuilder()
+ * .setParent(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Environment element : dataplexServiceClient.listEnvironments(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 ListEnvironmentsPagedResponse listEnvironments(ListEnvironmentsRequest request) {
+ return listEnvironmentsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists environments under the given lake.
+ *
+ * {@code
+ * try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
+ * ListEnvironmentsRequest request =
+ * ListEnvironmentsRequest.newBuilder()
+ * .setParent(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
+ * ListEnvironmentsRequest request =
+ * ListEnvironmentsRequest.newBuilder()
+ * .setParent(LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListEnvironmentsResponse response =
+ * dataplexServiceClient.listEnvironmentsCallable().call(request);
+ * for (Environment element : response.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
+ * try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
+ * EnvironmentName name =
+ * EnvironmentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ENVIRONMENT]");
+ * Environment response = dataplexServiceClient.getEnvironment(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the environment:
+ * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Environment getEnvironment(EnvironmentName name) {
+ GetEnvironmentRequest request =
+ GetEnvironmentRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getEnvironment(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get environment resource.
+ *
+ * {@code
+ * try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
+ * String name =
+ * EnvironmentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ENVIRONMENT]").toString();
+ * Environment response = dataplexServiceClient.getEnvironment(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the environment:
+ * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Environment getEnvironment(String name) {
+ GetEnvironmentRequest request = GetEnvironmentRequest.newBuilder().setName(name).build();
+ return getEnvironment(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get environment resource.
+ *
+ * {@code
+ * try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
+ * GetEnvironmentRequest request =
+ * GetEnvironmentRequest.newBuilder()
+ * .setName(
+ * EnvironmentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ENVIRONMENT]")
+ * .toString())
+ * .build();
+ * Environment response = dataplexServiceClient.getEnvironment(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 Environment getEnvironment(GetEnvironmentRequest request) {
+ return getEnvironmentCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Get environment resource.
+ *
+ * {@code
+ * try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
+ * GetEnvironmentRequest request =
+ * GetEnvironmentRequest.newBuilder()
+ * .setName(
+ * EnvironmentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ENVIRONMENT]")
+ * .toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
+ * EnvironmentName parent =
+ * EnvironmentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ENVIRONMENT]");
+ * for (Session element : dataplexServiceClient.listSessions(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the parent environment:
+ * projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSessionsPagedResponse listSessions(EnvironmentName parent) {
+ ListSessionsRequest request =
+ ListSessionsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listSessions(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists session resources in an environment.
+ *
+ * {@code
+ * try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
+ * String parent =
+ * EnvironmentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ENVIRONMENT]").toString();
+ * for (Session element : dataplexServiceClient.listSessions(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the parent environment:
+ * projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListSessionsPagedResponse listSessions(String parent) {
+ ListSessionsRequest request = ListSessionsRequest.newBuilder().setParent(parent).build();
+ return listSessions(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists session resources in an environment.
+ *
+ * {@code
+ * try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
+ * ListSessionsRequest request =
+ * ListSessionsRequest.newBuilder()
+ * .setParent(
+ * EnvironmentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ENVIRONMENT]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Session element : dataplexServiceClient.listSessions(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 ListSessionsPagedResponse listSessions(ListSessionsRequest request) {
+ return listSessionsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists session resources in an environment.
+ *
+ * {@code
+ * try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
+ * ListSessionsRequest request =
+ * ListSessionsRequest.newBuilder()
+ * .setParent(
+ * EnvironmentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ENVIRONMENT]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
+ * ListSessionsRequest request =
+ * ListSessionsRequest.newBuilder()
+ * .setParent(
+ * EnvironmentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ENVIRONMENT]")
+ * .toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListSessionsResponse response = dataplexServiceClient.listSessionsCallable().call(request);
+ * for (Session element : response.getResponsesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@code
* try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
- * EntityName name = EntityName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]");
- * Entity response = metadataServiceClient.getEntity(name);
+ * ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]");
+ * Entity entity = Entity.newBuilder().build();
+ * Entity response = metadataServiceClient.createEntity(parent, entity);
* }
* }
*
@@ -150,6 +152,252 @@ public MetadataServiceStub getStub() {
return stub;
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a metadata entity.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]");
+ * Entity entity = Entity.newBuilder().build();
+ * Entity response = metadataServiceClient.createEntity(parent, entity);
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the parent zone:
+ * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
+ * @param entity Required. Entity resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Entity createEntity(ZoneName parent, Entity entity) {
+ CreateEntityRequest request =
+ CreateEntityRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setEntity(entity)
+ .build();
+ return createEntity(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a metadata entity.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * String parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]").toString();
+ * Entity entity = Entity.newBuilder().build();
+ * Entity response = metadataServiceClient.createEntity(parent, entity);
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the parent zone:
+ * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
+ * @param entity Required. Entity resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Entity createEntity(String parent, Entity entity) {
+ CreateEntityRequest request =
+ CreateEntityRequest.newBuilder().setParent(parent).setEntity(entity).build();
+ return createEntity(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a metadata entity.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * CreateEntityRequest request =
+ * CreateEntityRequest.newBuilder()
+ * .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]").toString())
+ * .setEntity(Entity.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * Entity response = metadataServiceClient.createEntity(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 Entity createEntity(CreateEntityRequest request) {
+ return createEntityCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a metadata entity.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * CreateEntityRequest request =
+ * CreateEntityRequest.newBuilder()
+ * .setParent(ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]").toString())
+ * .setEntity(Entity.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * UpdateEntityRequest request =
+ * UpdateEntityRequest.newBuilder()
+ * .setEntity(Entity.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * Entity response = metadataServiceClient.updateEntity(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 Entity updateEntity(UpdateEntityRequest request) {
+ return updateEntityCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Update a metadata entity. Only supports full resource update.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * UpdateEntityRequest request =
+ * UpdateEntityRequest.newBuilder()
+ * .setEntity(Entity.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * EntityName name = EntityName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]");
+ * metadataServiceClient.deleteEntity(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the entity:
+ * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteEntity(EntityName name) {
+ DeleteEntityRequest request =
+ DeleteEntityRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ deleteEntity(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a metadata entity.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * String name =
+ * EntityName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]").toString();
+ * metadataServiceClient.deleteEntity(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the entity:
+ * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteEntity(String name) {
+ DeleteEntityRequest request = DeleteEntityRequest.newBuilder().setName(name).build();
+ deleteEntity(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a metadata entity.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * DeleteEntityRequest request =
+ * DeleteEntityRequest.newBuilder()
+ * .setName(
+ * EntityName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]")
+ * .toString())
+ * .setEtag("etag3123477")
+ * .build();
+ * metadataServiceClient.deleteEntity(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteEntity(DeleteEntityRequest request) {
+ deleteEntityCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a metadata entity.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * DeleteEntityRequest request =
+ * DeleteEntityRequest.newBuilder()
+ * .setName(
+ * EntityName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]")
+ * .toString())
+ * .setEtag("etag3123477")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * EntityName parent = EntityName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]");
+ * Partition partition = Partition.newBuilder().build();
+ * Partition response = metadataServiceClient.createPartition(parent, partition);
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the parent zone:
+ * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`.
+ * @param partition Required. Partition resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Partition createPartition(EntityName parent, Partition partition) {
+ CreatePartitionRequest request =
+ CreatePartitionRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setPartition(partition)
+ .build();
+ return createPartition(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a metadata partition.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * String parent =
+ * EntityName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]").toString();
+ * Partition partition = Partition.newBuilder().build();
+ * Partition response = metadataServiceClient.createPartition(parent, partition);
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the parent zone:
+ * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}`.
+ * @param partition Required. Partition resource.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Partition createPartition(String parent, Partition partition) {
+ CreatePartitionRequest request =
+ CreatePartitionRequest.newBuilder().setParent(parent).setPartition(partition).build();
+ return createPartition(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a metadata partition.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * CreatePartitionRequest request =
+ * CreatePartitionRequest.newBuilder()
+ * .setParent(
+ * EntityName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]")
+ * .toString())
+ * .setPartition(Partition.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * Partition response = metadataServiceClient.createPartition(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 Partition createPartition(CreatePartitionRequest request) {
+ return createPartitionCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a metadata partition.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * CreatePartitionRequest request =
+ * CreatePartitionRequest.newBuilder()
+ * .setParent(
+ * EntityName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]")
+ * .toString())
+ * .setPartition(Partition.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * PartitionName name =
+ * PartitionName.of(
+ * "[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]", "[PARTITION]");
+ * metadataServiceClient.deletePartition(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the partition. format:
+ * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`.
+ * The {partition_value_path} segment consists of an ordered sequence of partition values
+ * separated by "/". All values must be provided.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deletePartition(PartitionName name) {
+ DeletePartitionRequest request =
+ DeletePartitionRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ deletePartition(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a metadata partition.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * String name =
+ * PartitionName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]", "[PARTITION]")
+ * .toString();
+ * metadataServiceClient.deletePartition(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the partition. format:
+ * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_value_path}`.
+ * The {partition_value_path} segment consists of an ordered sequence of partition values
+ * separated by "/". All values must be provided.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deletePartition(String name) {
+ DeletePartitionRequest request = DeletePartitionRequest.newBuilder().setName(name).build();
+ deletePartition(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a metadata partition.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * DeletePartitionRequest request =
+ * DeletePartitionRequest.newBuilder()
+ * .setName(
+ * PartitionName.of(
+ * "[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]", "[PARTITION]")
+ * .toString())
+ * .setEtag("etag3123477")
+ * .build();
+ * metadataServiceClient.deletePartition(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deletePartition(DeletePartitionRequest request) {
+ deletePartitionCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Delete a metadata partition.
+ *
+ * {@code
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * DeletePartitionRequest request =
+ * DeletePartitionRequest.newBuilder()
+ * .setName(
+ * PartitionName.of(
+ * "[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]", "[PARTITION]")
+ * .toString())
+ * .setEtag("etag3123477")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
* MetadataServiceSettings.Builder metadataServiceSettingsBuilder =
* MetadataServiceSettings.newBuilder();
* metadataServiceSettingsBuilder
- * .getEntitySettings()
+ * .createEntitySettings()
* .setRetrySettings(
* metadataServiceSettingsBuilder
- * .getEntitySettings()
+ * .createEntitySettings()
* .getRetrySettings()
* .toBuilder()
* .setTotalTimeout(Duration.ofSeconds(30))
@@ -70,6 +71,21 @@
@Generated("by gapic-generator-java")
public class MetadataServiceSettings extends ClientSettings
{@code
+ * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) {
+ * LakeName parent = LakeName.of("[PROJECT]", "[LOCATION]", "[LAKE]");
+ * Content content = Content.newBuilder().build();
+ * Content response = contentServiceClient.createContent(parent, content);
+ * }
+ * }
+ *
* {@code
* try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
- * EntityName name = EntityName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ENTITY]");
- * Entity response = metadataServiceClient.getEntity(name);
+ * ZoneName parent = ZoneName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]");
+ * Entity entity = Entity.newBuilder().build();
+ * Entity response = metadataServiceClient.createEntity(parent, entity);
* }
* }
*
diff --git a/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/ContentServiceStub.java b/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/ContentServiceStub.java
new file mode 100644
index 0000000..459e643
--- /dev/null
+++ b/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/ContentServiceStub.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2021 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.dataplex.v1.stub;
+
+import static com.google.cloud.dataplex.v1.ContentServiceClient.ListContentPagedResponse;
+
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.dataplex.v1.Content;
+import com.google.cloud.dataplex.v1.CreateContentRequest;
+import com.google.cloud.dataplex.v1.DeleteContentRequest;
+import com.google.cloud.dataplex.v1.GetContentRequest;
+import com.google.cloud.dataplex.v1.ListContentRequest;
+import com.google.cloud.dataplex.v1.ListContentResponse;
+import com.google.cloud.dataplex.v1.UpdateContentRequest;
+import com.google.protobuf.Empty;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Base stub class for the ContentService service API.
+ *
+ *
+ *
+ *
+ * {@code
+ * ContentServiceStubSettings.Builder contentServiceSettingsBuilder =
+ * ContentServiceStubSettings.newBuilder();
+ * contentServiceSettingsBuilder
+ * .createContentSettings()
+ * .setRetrySettings(
+ * contentServiceSettingsBuilder
+ * .createContentSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * ContentServiceStubSettings contentServiceSettings = contentServiceSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class ContentServiceStubSettings extends StubSettings