diff --git a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/ContentServiceClient.java b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/ContentServiceClient.java
index 461dcb42e1d6..42f335050847 100644
--- a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/ContentServiceClient.java
+++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/ContentServiceClient.java
@@ -24,9 +24,19 @@
import com.google.api.gax.paging.AbstractPagedListResponse;
import com.google.api.gax.rpc.PageContext;
import com.google.api.gax.rpc.UnaryCallable;
+import com.google.api.resourcenames.ResourceName;
import com.google.cloud.dataplex.v1.stub.ContentServiceStub;
import com.google.cloud.dataplex.v1.stub.ContentServiceStubSettings;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
import com.google.common.util.concurrent.MoreExecutors;
+import com.google.iam.v1.GetIamPolicyRequest;
+import com.google.iam.v1.Policy;
+import com.google.iam.v1.SetIamPolicyRequest;
+import com.google.iam.v1.TestIamPermissionsRequest;
+import com.google.iam.v1.TestIamPermissionsResponse;
import com.google.protobuf.Empty;
import com.google.protobuf.FieldMask;
import java.io.IOException;
@@ -99,6 +109,20 @@
* ContentServiceClient contentServiceClient = ContentServiceClient.create(contentServiceSettings);
* }
*
+ * 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 for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * ContentServiceSettings contentServiceSettings =
+ * ContentServiceSettings.newBuilder()
+ * .setTransportChannelProvider(
+ * ContentServiceSettings.defaultHttpJsonTransportProviderBuilder().build())
+ * .build();
+ * ContentServiceClient contentServiceClient = ContentServiceClient.create(contentServiceSettings);
+ * }
+ *
* Please refer to the GitHub repository's samples for more quickstart code snippets.
*/
@Generated("by gapic-generator-java")
@@ -537,6 +561,257 @@ public final UnaryCallable getContentCallable() {
return stub.getContentCallable();
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for a contentitem resource. A `NOT_FOUND` error is returned if
+ * the resource does not exist. An empty policy is returned if the resource exists but does not
+ * have a policy set on it.
+ *
+ * Caller must have Google IAM `dataplex.content.getIamPolicy` permission on the resource.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) {
+ * ResourceName resource = ContentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[CONTENT]");
+ * Policy response = contentServiceClient.getIamPolicy(resource);
+ * }
+ * }
+ *
+ * @param resource REQUIRED: The resource for which the policy is being requested. See the
+ * operation documentation for the appropriate value for this field.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Policy getIamPolicy(ResourceName resource) {
+ GetIamPolicyRequest request =
+ GetIamPolicyRequest.newBuilder()
+ .setResource(resource == null ? null : resource.toString())
+ .build();
+ return getIamPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for a contentitem resource. A `NOT_FOUND` error is returned if
+ * the resource does not exist. An empty policy is returned if the resource exists but does not
+ * have a policy set on it.
+ *
+ * Caller must have Google IAM `dataplex.content.getIamPolicy` permission on the resource.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) {
+ * String resource =
+ * AssetName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[ZONE]", "[ASSET]").toString();
+ * Policy response = contentServiceClient.getIamPolicy(resource);
+ * }
+ * }
+ *
+ * @param resource REQUIRED: The resource for which the policy is being requested. See the
+ * operation documentation for the appropriate value for this field.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Policy getIamPolicy(String resource) {
+ GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder().setResource(resource).build();
+ return getIamPolicy(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for a contentitem resource. A `NOT_FOUND` error is returned if
+ * the resource does not exist. An empty policy is returned if the resource exists but does not
+ * have a policy set on it.
+ *
+ * Caller must have Google IAM `dataplex.content.getIamPolicy` permission on the resource.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * ContentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[CONTENT]").toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * Policy response = contentServiceClient.getIamPolicy(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 Policy getIamPolicy(GetIamPolicyRequest request) {
+ return getIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets the access control policy for a contentitem resource. A `NOT_FOUND` error is returned if
+ * the resource does not exist. An empty policy is returned if the resource exists but does not
+ * have a policy set on it.
+ *
+ * Caller must have Google IAM `dataplex.content.getIamPolicy` permission on the resource.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) {
+ * GetIamPolicyRequest request =
+ * GetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * ContentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[CONTENT]").toString())
+ * .setOptions(GetPolicyOptions.newBuilder().build())
+ * .build();
+ * ApiFuture future = contentServiceClient.getIamPolicyCallable().futureCall(request);
+ * // Do something.
+ * Policy response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getIamPolicyCallable() {
+ return stub.getIamPolicyCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on the specified contentitem resource. Replaces any existing
+ * policy.
+ *
+ * Caller must have Google IAM `dataplex.content.setIamPolicy` permission on the resource.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * ContentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[CONTENT]").toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * Policy response = contentServiceClient.setIamPolicy(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 Policy setIamPolicy(SetIamPolicyRequest request) {
+ return setIamPolicyCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Sets the access control policy on the specified contentitem resource. Replaces any existing
+ * policy.
+ *
+ * Caller must have Google IAM `dataplex.content.setIamPolicy` permission on the resource.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) {
+ * SetIamPolicyRequest request =
+ * SetIamPolicyRequest.newBuilder()
+ * .setResource(
+ * ContentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[CONTENT]").toString())
+ * .setPolicy(Policy.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future = contentServiceClient.setIamPolicyCallable().futureCall(request);
+ * // Do something.
+ * Policy response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable setIamPolicyCallable() {
+ return stub.setIamPolicyCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns the caller's permissions on a resource. If the resource does not exist, an empty set of
+ * permissions is returned (a `NOT_FOUND` error is not returned).
+ *
+ * A caller is not required to have Google IAM permission to make this request.
+ *
+ *
Note: This operation is designed to be used for building permission-aware UIs and
+ * command-line tools, not for authorization checking. This operation may "fail open" without
+ * warning.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(
+ * ContentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[CONTENT]").toString())
+ * .addAllPermissions(new ArrayList())
+ * .build();
+ * TestIamPermissionsResponse response = contentServiceClient.testIamPermissions(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 TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) {
+ return testIamPermissionsCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Returns the caller's permissions on a resource. If the resource does not exist, an empty set of
+ * permissions is returned (a `NOT_FOUND` error is not returned).
+ *
+ * A caller is not required to have Google IAM permission to make this request.
+ *
+ *
Note: This operation is designed to be used for building permission-aware UIs and
+ * command-line tools, not for authorization checking. This operation may "fail open" without
+ * warning.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) {
+ * TestIamPermissionsRequest request =
+ * TestIamPermissionsRequest.newBuilder()
+ * .setResource(
+ * ContentName.of("[PROJECT]", "[LOCATION]", "[LAKE]", "[CONTENT]").toString())
+ * .addAllPermissions(new ArrayList())
+ * .build();
+ * ApiFuture future =
+ * contentServiceClient.testIamPermissionsCallable().futureCall(request);
+ * // Do something.
+ * TestIamPermissionsResponse response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ testIamPermissionsCallable() {
+ return stub.testIamPermissionsCallable();
+ }
+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* List content.
@@ -689,6 +964,146 @@ public final UnaryCallable listContentC
return stub.listContentCallable();
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : contentServiceClient.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 for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * contentServiceClient.listLocationsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Location element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listLocationsPagedCallable() {
+ return stub.listLocationsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response = contentServiceClient.listLocationsCallable().call(request);
+ * for (Location element : response.getLocationsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable listLocationsCallable() {
+ return stub.listLocationsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = contentServiceClient.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 for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (ContentServiceClient contentServiceClient = ContentServiceClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture future = contentServiceClient.getLocationCallable().futureCall(request);
+ * // Do something.
+ * Location response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getLocationCallable() {
+ return stub.getLocationCallable();
+ }
+
@Override
public final void close() {
stub.close();
@@ -791,4 +1206,80 @@ protected ListContentFixedSizeCollection createCollection(
return new ListContentFixedSizeCollection(pages, collectionSize);
}
}
+
+ public static class ListLocationsPagedResponse
+ extends AbstractPagedListResponse<
+ ListLocationsRequest,
+ ListLocationsResponse,
+ Location,
+ ListLocationsPage,
+ ListLocationsFixedSizeCollection> {
+
+ public static ApiFuture createAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ ApiFuture futurePage =
+ ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse);
+ return ApiFutures.transform(
+ futurePage,
+ input -> new ListLocationsPagedResponse(input),
+ MoreExecutors.directExecutor());
+ }
+
+ private ListLocationsPagedResponse(ListLocationsPage page) {
+ super(page, ListLocationsFixedSizeCollection.createEmptyCollection());
+ }
+ }
+
+ public static class ListLocationsPage
+ extends AbstractPage<
+ ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> {
+
+ private ListLocationsPage(
+ PageContext context,
+ ListLocationsResponse response) {
+ super(context, response);
+ }
+
+ private static ListLocationsPage createEmptyPage() {
+ return new ListLocationsPage(null, null);
+ }
+
+ @Override
+ protected ListLocationsPage createPage(
+ PageContext context,
+ ListLocationsResponse response) {
+ return new ListLocationsPage(context, response);
+ }
+
+ @Override
+ public ApiFuture createPageAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ return super.createPageAsync(context, futureResponse);
+ }
+ }
+
+ public static class ListLocationsFixedSizeCollection
+ extends AbstractFixedSizeCollection<
+ ListLocationsRequest,
+ ListLocationsResponse,
+ Location,
+ ListLocationsPage,
+ ListLocationsFixedSizeCollection> {
+
+ private ListLocationsFixedSizeCollection(List pages, int collectionSize) {
+ super(pages, collectionSize);
+ }
+
+ private static ListLocationsFixedSizeCollection createEmptyCollection() {
+ return new ListLocationsFixedSizeCollection(null, 0);
+ }
+
+ @Override
+ protected ListLocationsFixedSizeCollection createCollection(
+ List pages, int collectionSize) {
+ return new ListLocationsFixedSizeCollection(pages, collectionSize);
+ }
+ }
}
diff --git a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/ContentServiceSettings.java b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/ContentServiceSettings.java
index 0664bc9ab45c..0272cbcd427d 100644
--- a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/ContentServiceSettings.java
+++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/ContentServiceSettings.java
@@ -17,12 +17,14 @@
package com.google.cloud.dataplex.v1;
import static com.google.cloud.dataplex.v1.ContentServiceClient.ListContentPagedResponse;
+import static com.google.cloud.dataplex.v1.ContentServiceClient.ListLocationsPagedResponse;
import com.google.api.core.ApiFunction;
import com.google.api.core.BetaApi;
import com.google.api.gax.core.GoogleCredentialsProvider;
import com.google.api.gax.core.InstantiatingExecutorProvider;
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
+import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider;
import com.google.api.gax.rpc.ApiClientHeaderProvider;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.ClientSettings;
@@ -30,6 +32,15 @@
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.cloud.dataplex.v1.stub.ContentServiceStubSettings;
+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.iam.v1.GetIamPolicyRequest;
+import com.google.iam.v1.Policy;
+import com.google.iam.v1.SetIamPolicyRequest;
+import com.google.iam.v1.TestIamPermissionsRequest;
+import com.google.iam.v1.TestIamPermissionsResponse;
import com.google.protobuf.Empty;
import java.io.IOException;
import java.util.List;
@@ -92,12 +103,39 @@ public UnaryCallSettings getContentSettings() {
return ((ContentServiceStubSettings) getStubSettings()).getContentSettings();
}
+ /** Returns the object with the settings used for calls to getIamPolicy. */
+ public UnaryCallSettings getIamPolicySettings() {
+ return ((ContentServiceStubSettings) getStubSettings()).getIamPolicySettings();
+ }
+
+ /** Returns the object with the settings used for calls to setIamPolicy. */
+ public UnaryCallSettings setIamPolicySettings() {
+ return ((ContentServiceStubSettings) getStubSettings()).setIamPolicySettings();
+ }
+
+ /** Returns the object with the settings used for calls to testIamPermissions. */
+ public UnaryCallSettings
+ testIamPermissionsSettings() {
+ return ((ContentServiceStubSettings) getStubSettings()).testIamPermissionsSettings();
+ }
+
/** Returns the object with the settings used for calls to listContent. */
public PagedCallSettings
listContentSettings() {
return ((ContentServiceStubSettings) getStubSettings()).listContentSettings();
}
+ /** Returns the object with the settings used for calls to listLocations. */
+ public PagedCallSettings
+ listLocationsSettings() {
+ return ((ContentServiceStubSettings) getStubSettings()).listLocationsSettings();
+ }
+
+ /** Returns the object with the settings used for calls to getLocation. */
+ public UnaryCallSettings getLocationSettings() {
+ return ((ContentServiceStubSettings) getStubSettings()).getLocationSettings();
+ }
+
public static final ContentServiceSettings create(ContentServiceStubSettings stub)
throws IOException {
return new ContentServiceSettings.Builder(stub.toBuilder()).build();
@@ -123,11 +161,18 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde
return ContentServiceStubSettings.defaultCredentialsProviderBuilder();
}
- /** Returns a builder for the default ChannelProvider for this service. */
+ /** Returns a builder for the default gRPC ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return ContentServiceStubSettings.defaultGrpcTransportProviderBuilder();
}
+ /** Returns a builder for the default REST ChannelProvider for this service. */
+ @BetaApi
+ public static InstantiatingHttpJsonChannelProvider.Builder
+ defaultHttpJsonTransportProviderBuilder() {
+ return ContentServiceStubSettings.defaultHttpJsonTransportProviderBuilder();
+ }
+
public static TransportChannelProvider defaultTransportChannelProvider() {
return ContentServiceStubSettings.defaultTransportChannelProvider();
}
@@ -137,11 +182,17 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil
return ContentServiceStubSettings.defaultApiClientHeaderProviderBuilder();
}
- /** Returns a new builder for this class. */
+ /** Returns a new gRPC builder for this class. */
public static Builder newBuilder() {
return Builder.createDefault();
}
+ /** Returns a new REST builder for this class. */
+ @BetaApi
+ public static Builder newHttpJsonBuilder() {
+ return Builder.createHttpJsonDefault();
+ }
+
/** Returns a new builder for this class. */
public static Builder newBuilder(ClientContext clientContext) {
return new Builder(clientContext);
@@ -179,6 +230,11 @@ private static Builder createDefault() {
return new Builder(ContentServiceStubSettings.newBuilder());
}
+ @BetaApi
+ private static Builder createHttpJsonDefault() {
+ return new Builder(ContentServiceStubSettings.newHttpJsonBuilder());
+ }
+
public ContentServiceStubSettings.Builder getStubSettingsBuilder() {
return ((ContentServiceStubSettings.Builder) getStubSettings());
}
@@ -215,6 +271,22 @@ public UnaryCallSettings.Builder getContentSettings(
return getStubSettingsBuilder().getContentSettings();
}
+ /** Returns the builder for the settings used for calls to getIamPolicy. */
+ public UnaryCallSettings.Builder getIamPolicySettings() {
+ return getStubSettingsBuilder().getIamPolicySettings();
+ }
+
+ /** Returns the builder for the settings used for calls to setIamPolicy. */
+ public UnaryCallSettings.Builder setIamPolicySettings() {
+ return getStubSettingsBuilder().setIamPolicySettings();
+ }
+
+ /** Returns the builder for the settings used for calls to testIamPermissions. */
+ public UnaryCallSettings.Builder
+ testIamPermissionsSettings() {
+ return getStubSettingsBuilder().testIamPermissionsSettings();
+ }
+
/** Returns the builder for the settings used for calls to listContent. */
public PagedCallSettings.Builder<
ListContentRequest, ListContentResponse, ListContentPagedResponse>
@@ -222,6 +294,18 @@ public UnaryCallSettings.Builder getContentSettings(
return getStubSettingsBuilder().listContentSettings();
}
+ /** Returns the builder for the settings used for calls to listLocations. */
+ public PagedCallSettings.Builder<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ listLocationsSettings() {
+ return getStubSettingsBuilder().listLocationsSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to getLocation. */
+ public UnaryCallSettings.Builder getLocationSettings() {
+ return getStubSettingsBuilder().getLocationSettings();
+ }
+
@Override
public ContentServiceSettings build() throws IOException {
return new ContentServiceSettings(this);
diff --git a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/DataplexServiceClient.java b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/DataplexServiceClient.java
index 8d27263fbdbb..169044fa3c59 100644
--- a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/DataplexServiceClient.java
+++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/DataplexServiceClient.java
@@ -18,7 +18,9 @@
import com.google.api.core.ApiFuture;
import com.google.api.core.ApiFutures;
+import com.google.api.core.BetaApi;
import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.httpjson.longrunning.OperationsClient;
import com.google.api.gax.longrunning.OperationFuture;
import com.google.api.gax.paging.AbstractFixedSizeCollection;
import com.google.api.gax.paging.AbstractPage;
@@ -28,9 +30,12 @@
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.dataplex.v1.stub.DataplexServiceStub;
import com.google.cloud.dataplex.v1.stub.DataplexServiceStubSettings;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.longrunning.Operation;
-import com.google.longrunning.OperationsClient;
import com.google.protobuf.Empty;
import com.google.protobuf.FieldMask;
import java.io.IOException;
@@ -41,7 +46,7 @@
// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
* Service Description: Dataplex service provides data lakes as a service. The primary resources
- * offered by this service are Lakes, Zones and Assets which collectively allow a data adminstrator
+ * offered by this service are Lakes, Zones and Assets which collectively allow a data administrator
* to organize, manage, secure and catalog data across their organization located across cloud
* projects in a variety of storage systems including Cloud Storage and BigQuery.
*
@@ -108,13 +113,29 @@
* DataplexServiceClient.create(dataplexServiceSettings);
* }
*
+ * 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 for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * DataplexServiceSettings dataplexServiceSettings =
+ * DataplexServiceSettings.newBuilder()
+ * .setTransportChannelProvider(
+ * DataplexServiceSettings.defaultHttpJsonTransportProviderBuilder().build())
+ * .build();
+ * DataplexServiceClient dataplexServiceClient =
+ * DataplexServiceClient.create(dataplexServiceSettings);
+ * }
+ *
* Please refer to the GitHub repository's samples for more quickstart code snippets.
*/
@Generated("by gapic-generator-java")
public class DataplexServiceClient implements BackgroundResource {
private final DataplexServiceSettings settings;
private final DataplexServiceStub stub;
- private final OperationsClient operationsClient;
+ private final OperationsClient httpJsonOperationsClient;
+ private final com.google.longrunning.OperationsClient operationsClient;
/** Constructs an instance of DataplexServiceClient with default settings. */
public static final DataplexServiceClient create() throws IOException {
@@ -146,13 +167,17 @@ public static final DataplexServiceClient create(DataplexServiceStub stub) {
protected DataplexServiceClient(DataplexServiceSettings settings) throws IOException {
this.settings = settings;
this.stub = ((DataplexServiceStubSettings) settings.getStubSettings()).createStub();
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
}
protected DataplexServiceClient(DataplexServiceStub stub) {
this.settings = null;
this.stub = stub;
- this.operationsClient = OperationsClient.create(this.stub.getOperationsStub());
+ this.operationsClient =
+ com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub());
+ this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub());
}
public final DataplexServiceSettings getSettings() {
@@ -167,10 +192,19 @@ public DataplexServiceStub getStub() {
* Returns the OperationsClient that can be used to query the status of a long-running operation
* returned by another API method call.
*/
- public final OperationsClient getOperationsClient() {
+ 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 lake resource.
@@ -464,7 +498,7 @@ public final UnaryCallable updateLakeCallable() {
* }
*
* @param name Required. The resource name of the lake:
- * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
+ * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteLakeAsync(LakeName name) {
@@ -490,7 +524,7 @@ public final OperationFuture deleteLakeAsync(LakeName
* }
*
* @param name Required. The resource name of the lake:
- * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
+ * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture deleteLakeAsync(String name) {
@@ -846,7 +880,7 @@ public final UnaryCallable getLakeCallable() {
* }
*
* @param parent Required. The resource name of the parent lake:
- * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
+ * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListLakeActionsPagedResponse listLakeActions(LakeName parent) {
@@ -875,7 +909,7 @@ public final ListLakeActionsPagedResponse listLakeActions(LakeName parent) {
* }
*
* @param parent Required. The resource name of the parent lake:
- * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`
+ * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListLakeActionsPagedResponse listLakeActions(String parent) {
@@ -1803,7 +1837,7 @@ public final ListZoneActionsPagedResponse listZoneActions(ListZoneActionsRequest
* }
*
* @param parent Required. The resource name of the parent zone:
- * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`
+ * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
* @param asset Required. Asset resource.
* @param assetId Required. Asset identifier. This ID will be used to generate names such as table
* names when publishing metadata to Hive Metastore and BigQuery.
@@ -1846,7 +1880,7 @@ public final OperationFuture createAssetAsync(
* }
*
* @param parent Required. The resource name of the parent zone:
- * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`
+ * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}`.
* @param asset Required. Asset resource.
* @param assetId Required. Asset identifier. This ID will be used to generate names such as table
* names when publishing metadata to Hive Metastore and BigQuery.
@@ -3155,7 +3189,7 @@ public final UnaryCallable listTasksCallabl
* }
*
* @param name Required. The resource name of the task:
- * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`
+ * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Task getTask(TaskName name) {
@@ -3180,7 +3214,7 @@ public final Task getTask(TaskName name) {
* }
*
* @param name Required. The resource name of the task:
- * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`
+ * `projects/{project_number}/locations/{location_id}/lakes/{lake_id}/tasks/{tasks_id}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final Task getTask(String name) {
@@ -3601,7 +3635,7 @@ public final UnaryCallable cancelJobCallable() {
* }
*
* @param parent Required. The resource name of the parent lake:
- * projects/{project_id}/locations/{location_id}/lakes/{lake_id}
+ * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`.
* @param environment Required. Environment resource.
* @param environmentId Required. Environment identifier.
*
@@ -3644,7 +3678,7 @@ public final OperationFuture createEnvironmentAs
* }
*
* @param parent Required. The resource name of the parent lake:
- * projects/{project_id}/locations/{location_id}/lakes/{lake_id}
+ * `projects/{project_id}/locations/{location_id}/lakes/{lake_id}`.
* @param environment Required. Environment resource.
* @param environmentId Required. Environment identifier.
*
@@ -3887,7 +3921,7 @@ public final UnaryCallable updateEnvironmen
* }
*
* @param name Required. The resource name of the environment:
- * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`
+ * `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 deleteEnvironmentAsync(
@@ -3917,7 +3951,7 @@ public final OperationFuture deleteEnvironmentAsync(
* }
*
* @param name Required. The resource name of the environment:
- * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}`
+ * `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 deleteEnvironmentAsync(String name) {
@@ -4029,7 +4063,7 @@ public final UnaryCallable deleteEnvironmen
* }
*
* @param parent Required. The resource name of the parent lake:
- * projects/{project_id}/locations/{location_id}/lakes/{lake_id}
+ * `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) {
@@ -4058,7 +4092,7 @@ public final ListEnvironmentsPagedResponse listEnvironments(LakeName parent) {
* }
*
* @param parent Required. The resource name of the parent lake:
- * projects/{project_id}/locations/{location_id}/lakes/{lake_id}
+ * `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) {
@@ -4186,7 +4220,7 @@ public final ListEnvironmentsPagedResponse listEnvironments(ListEnvironmentsRequ
* }
*
* @param name Required. The resource name of the environment:
- * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}
+ * `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) {
@@ -4212,7 +4246,7 @@ public final Environment getEnvironment(EnvironmentName name) {
* }
*
* @param name Required. The resource name of the environment:
- * projects/{project_id}/locations/{location_id}/lakes/{lake_id}/environments/{environment_id}
+ * `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) {
@@ -4293,7 +4327,7 @@ public final UnaryCallable getEnvironmentCal
* }
*
* @param parent Required. The resource name of the parent environment:
- * projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}
+ * `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) {
@@ -4323,7 +4357,7 @@ public final ListSessionsPagedResponse listSessions(EnvironmentName parent) {
* }
*
* @param parent Required. The resource name of the parent environment:
- * projects/{project_number}/locations/{location_id}/lakes/{lake_id}/environment/{environment_id}
+ * `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) {
@@ -4348,6 +4382,7 @@ public final ListSessionsPagedResponse listSessions(String parent) {
* .toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
* .build();
* for (Session element : dataplexServiceClient.listSessions(request).iterateAll()) {
* // doThingsWith(element);
@@ -4379,6 +4414,7 @@ public final ListSessionsPagedResponse listSessions(ListSessionsRequest request)
* .toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
* .build();
* ApiFuture future =
* dataplexServiceClient.listSessionsPagedCallable().futureCall(request);
@@ -4411,6 +4447,7 @@ public final ListSessionsPagedResponse listSessions(ListSessionsRequest request)
* .toString())
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
* .build();
* while (true) {
* ListSessionsResponse response = dataplexServiceClient.listSessionsCallable().call(request);
@@ -4431,6 +4468,147 @@ public final UnaryCallable listSessio
return stub.listSessionsCallable();
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : dataplexServiceClient.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 for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * dataplexServiceClient.listLocationsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Location element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listLocationsPagedCallable() {
+ return stub.listLocationsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response =
+ * dataplexServiceClient.listLocationsCallable().call(request);
+ * for (Location element : response.getLocationsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable listLocationsCallable() {
+ return stub.listLocationsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = dataplexServiceClient.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 for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (DataplexServiceClient dataplexServiceClient = DataplexServiceClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture future = dataplexServiceClient.getLocationCallable().futureCall(request);
+ * // Do something.
+ * Location response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getLocationCallable() {
+ return stub.getLocationCallable();
+ }
+
@Override
public final void close() {
stub.close();
@@ -5174,4 +5352,80 @@ protected ListSessionsFixedSizeCollection createCollection(
return new ListSessionsFixedSizeCollection(pages, collectionSize);
}
}
+
+ public static class ListLocationsPagedResponse
+ extends AbstractPagedListResponse<
+ ListLocationsRequest,
+ ListLocationsResponse,
+ Location,
+ ListLocationsPage,
+ ListLocationsFixedSizeCollection> {
+
+ public static ApiFuture createAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ ApiFuture futurePage =
+ ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse);
+ return ApiFutures.transform(
+ futurePage,
+ input -> new ListLocationsPagedResponse(input),
+ MoreExecutors.directExecutor());
+ }
+
+ private ListLocationsPagedResponse(ListLocationsPage page) {
+ super(page, ListLocationsFixedSizeCollection.createEmptyCollection());
+ }
+ }
+
+ public static class ListLocationsPage
+ extends AbstractPage<
+ ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> {
+
+ private ListLocationsPage(
+ PageContext context,
+ ListLocationsResponse response) {
+ super(context, response);
+ }
+
+ private static ListLocationsPage createEmptyPage() {
+ return new ListLocationsPage(null, null);
+ }
+
+ @Override
+ protected ListLocationsPage createPage(
+ PageContext context,
+ ListLocationsResponse response) {
+ return new ListLocationsPage(context, response);
+ }
+
+ @Override
+ public ApiFuture createPageAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ return super.createPageAsync(context, futureResponse);
+ }
+ }
+
+ public static class ListLocationsFixedSizeCollection
+ extends AbstractFixedSizeCollection<
+ ListLocationsRequest,
+ ListLocationsResponse,
+ Location,
+ ListLocationsPage,
+ ListLocationsFixedSizeCollection> {
+
+ private ListLocationsFixedSizeCollection(List pages, int collectionSize) {
+ super(pages, collectionSize);
+ }
+
+ private static ListLocationsFixedSizeCollection createEmptyCollection() {
+ return new ListLocationsFixedSizeCollection(null, 0);
+ }
+
+ @Override
+ protected ListLocationsFixedSizeCollection createCollection(
+ List pages, int collectionSize) {
+ return new ListLocationsFixedSizeCollection(pages, collectionSize);
+ }
+ }
}
diff --git a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/DataplexServiceSettings.java b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/DataplexServiceSettings.java
index 30ef821aae5d..fce8edece0bb 100644
--- a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/DataplexServiceSettings.java
+++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/DataplexServiceSettings.java
@@ -22,6 +22,7 @@
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListJobsPagedResponse;
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListLakeActionsPagedResponse;
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListLakesPagedResponse;
+import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListLocationsPagedResponse;
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListSessionsPagedResponse;
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListTasksPagedResponse;
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListZoneActionsPagedResponse;
@@ -32,6 +33,7 @@
import com.google.api.gax.core.GoogleCredentialsProvider;
import com.google.api.gax.core.InstantiatingExecutorProvider;
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
+import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider;
import com.google.api.gax.rpc.ApiClientHeaderProvider;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.ClientSettings;
@@ -40,6 +42,10 @@
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.cloud.dataplex.v1.stub.DataplexServiceStubSettings;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
import com.google.longrunning.Operation;
import com.google.protobuf.Empty;
import java.io.IOException;
@@ -347,6 +353,17 @@ public UnaryCallSettings getEnvironmentSetti
return ((DataplexServiceStubSettings) getStubSettings()).listSessionsSettings();
}
+ /** Returns the object with the settings used for calls to listLocations. */
+ public PagedCallSettings
+ listLocationsSettings() {
+ return ((DataplexServiceStubSettings) getStubSettings()).listLocationsSettings();
+ }
+
+ /** Returns the object with the settings used for calls to getLocation. */
+ public UnaryCallSettings getLocationSettings() {
+ return ((DataplexServiceStubSettings) getStubSettings()).getLocationSettings();
+ }
+
public static final DataplexServiceSettings create(DataplexServiceStubSettings stub)
throws IOException {
return new DataplexServiceSettings.Builder(stub.toBuilder()).build();
@@ -372,11 +389,18 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde
return DataplexServiceStubSettings.defaultCredentialsProviderBuilder();
}
- /** Returns a builder for the default ChannelProvider for this service. */
+ /** Returns a builder for the default gRPC ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return DataplexServiceStubSettings.defaultGrpcTransportProviderBuilder();
}
+ /** Returns a builder for the default REST ChannelProvider for this service. */
+ @BetaApi
+ public static InstantiatingHttpJsonChannelProvider.Builder
+ defaultHttpJsonTransportProviderBuilder() {
+ return DataplexServiceStubSettings.defaultHttpJsonTransportProviderBuilder();
+ }
+
public static TransportChannelProvider defaultTransportChannelProvider() {
return DataplexServiceStubSettings.defaultTransportChannelProvider();
}
@@ -386,11 +410,17 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil
return DataplexServiceStubSettings.defaultApiClientHeaderProviderBuilder();
}
- /** Returns a new builder for this class. */
+ /** Returns a new gRPC builder for this class. */
public static Builder newBuilder() {
return Builder.createDefault();
}
+ /** Returns a new REST builder for this class. */
+ @BetaApi
+ public static Builder newHttpJsonBuilder() {
+ return Builder.createHttpJsonDefault();
+ }
+
/** Returns a new builder for this class. */
public static Builder newBuilder(ClientContext clientContext) {
return new Builder(clientContext);
@@ -428,6 +458,11 @@ private static Builder createDefault() {
return new Builder(DataplexServiceStubSettings.newBuilder());
}
+ @BetaApi
+ private static Builder createHttpJsonDefault() {
+ return new Builder(DataplexServiceStubSettings.newHttpJsonBuilder());
+ }
+
public DataplexServiceStubSettings.Builder getStubSettingsBuilder() {
return ((DataplexServiceStubSettings.Builder) getStubSettings());
}
@@ -712,6 +747,18 @@ public UnaryCallSettings.Builder getEnvironm
return getStubSettingsBuilder().listSessionsSettings();
}
+ /** Returns the builder for the settings used for calls to listLocations. */
+ public PagedCallSettings.Builder<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ listLocationsSettings() {
+ return getStubSettingsBuilder().listLocationsSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to getLocation. */
+ public UnaryCallSettings.Builder getLocationSettings() {
+ return getStubSettingsBuilder().getLocationSettings();
+ }
+
@Override
public DataplexServiceSettings build() throws IOException {
return new DataplexServiceSettings(this);
diff --git a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/MetadataServiceClient.java b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/MetadataServiceClient.java
index 4164f06681eb..ef68faa410e7 100644
--- a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/MetadataServiceClient.java
+++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/MetadataServiceClient.java
@@ -26,6 +26,10 @@
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.dataplex.v1.stub.MetadataServiceStub;
import com.google.cloud.dataplex.v1.stub.MetadataServiceStubSettings;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.protobuf.Empty;
import java.io.IOException;
@@ -102,6 +106,21 @@
* MetadataServiceClient.create(metadataServiceSettings);
* }
*
+ * 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 for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * MetadataServiceSettings metadataServiceSettings =
+ * MetadataServiceSettings.newBuilder()
+ * .setTransportChannelProvider(
+ * MetadataServiceSettings.defaultHttpJsonTransportProviderBuilder().build())
+ * .build();
+ * MetadataServiceClient metadataServiceClient =
+ * MetadataServiceClient.create(metadataServiceSettings);
+ * }
+ *
* Please refer to the GitHub repository's samples for more quickstart code snippets.
*/
@Generated("by gapic-generator-java")
@@ -1179,6 +1198,147 @@ public final ListPartitionsPagedResponse listPartitions(ListPartitionsRequest re
return stub.listPartitionsCallable();
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ *
Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : metadataServiceClient.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 for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * metadataServiceClient.listLocationsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Location element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listLocationsPagedCallable() {
+ return stub.listLocationsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response =
+ * metadataServiceClient.listLocationsCallable().call(request);
+ * for (Location element : response.getLocationsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable listLocationsCallable() {
+ return stub.listLocationsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = metadataServiceClient.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 for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture future = metadataServiceClient.getLocationCallable().futureCall(request);
+ * // Do something.
+ * Location response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getLocationCallable() {
+ return stub.getLocationCallable();
+ }
+
@Override
public final void close() {
stub.close();
@@ -1359,4 +1519,80 @@ protected ListPartitionsFixedSizeCollection createCollection(
return new ListPartitionsFixedSizeCollection(pages, collectionSize);
}
}
+
+ public static class ListLocationsPagedResponse
+ extends AbstractPagedListResponse<
+ ListLocationsRequest,
+ ListLocationsResponse,
+ Location,
+ ListLocationsPage,
+ ListLocationsFixedSizeCollection> {
+
+ public static ApiFuture createAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ ApiFuture futurePage =
+ ListLocationsPage.createEmptyPage().createPageAsync(context, futureResponse);
+ return ApiFutures.transform(
+ futurePage,
+ input -> new ListLocationsPagedResponse(input),
+ MoreExecutors.directExecutor());
+ }
+
+ private ListLocationsPagedResponse(ListLocationsPage page) {
+ super(page, ListLocationsFixedSizeCollection.createEmptyCollection());
+ }
+ }
+
+ public static class ListLocationsPage
+ extends AbstractPage<
+ ListLocationsRequest, ListLocationsResponse, Location, ListLocationsPage> {
+
+ private ListLocationsPage(
+ PageContext context,
+ ListLocationsResponse response) {
+ super(context, response);
+ }
+
+ private static ListLocationsPage createEmptyPage() {
+ return new ListLocationsPage(null, null);
+ }
+
+ @Override
+ protected ListLocationsPage createPage(
+ PageContext context,
+ ListLocationsResponse response) {
+ return new ListLocationsPage(context, response);
+ }
+
+ @Override
+ public ApiFuture createPageAsync(
+ PageContext context,
+ ApiFuture futureResponse) {
+ return super.createPageAsync(context, futureResponse);
+ }
+ }
+
+ public static class ListLocationsFixedSizeCollection
+ extends AbstractFixedSizeCollection<
+ ListLocationsRequest,
+ ListLocationsResponse,
+ Location,
+ ListLocationsPage,
+ ListLocationsFixedSizeCollection> {
+
+ private ListLocationsFixedSizeCollection(List pages, int collectionSize) {
+ super(pages, collectionSize);
+ }
+
+ private static ListLocationsFixedSizeCollection createEmptyCollection() {
+ return new ListLocationsFixedSizeCollection(null, 0);
+ }
+
+ @Override
+ protected ListLocationsFixedSizeCollection createCollection(
+ List pages, int collectionSize) {
+ return new ListLocationsFixedSizeCollection(pages, collectionSize);
+ }
+ }
}
diff --git a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/MetadataServiceSettings.java b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/MetadataServiceSettings.java
index fd99b3602615..2c12a8173f6f 100644
--- a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/MetadataServiceSettings.java
+++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/MetadataServiceSettings.java
@@ -17,6 +17,7 @@
package com.google.cloud.dataplex.v1;
import static com.google.cloud.dataplex.v1.MetadataServiceClient.ListEntitiesPagedResponse;
+import static com.google.cloud.dataplex.v1.MetadataServiceClient.ListLocationsPagedResponse;
import static com.google.cloud.dataplex.v1.MetadataServiceClient.ListPartitionsPagedResponse;
import com.google.api.core.ApiFunction;
@@ -24,6 +25,7 @@
import com.google.api.gax.core.GoogleCredentialsProvider;
import com.google.api.gax.core.InstantiatingExecutorProvider;
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
+import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider;
import com.google.api.gax.rpc.ApiClientHeaderProvider;
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.ClientSettings;
@@ -31,6 +33,10 @@
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.cloud.dataplex.v1.stub.MetadataServiceStubSettings;
+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.protobuf.Empty;
import java.io.IOException;
import java.util.List;
@@ -121,6 +127,17 @@ public UnaryCallSettings getPartitionSettings()
return ((MetadataServiceStubSettings) getStubSettings()).listPartitionsSettings();
}
+ /** Returns the object with the settings used for calls to listLocations. */
+ public PagedCallSettings
+ listLocationsSettings() {
+ return ((MetadataServiceStubSettings) getStubSettings()).listLocationsSettings();
+ }
+
+ /** Returns the object with the settings used for calls to getLocation. */
+ public UnaryCallSettings getLocationSettings() {
+ return ((MetadataServiceStubSettings) getStubSettings()).getLocationSettings();
+ }
+
public static final MetadataServiceSettings create(MetadataServiceStubSettings stub)
throws IOException {
return new MetadataServiceSettings.Builder(stub.toBuilder()).build();
@@ -146,11 +163,18 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde
return MetadataServiceStubSettings.defaultCredentialsProviderBuilder();
}
- /** Returns a builder for the default ChannelProvider for this service. */
+ /** Returns a builder for the default gRPC ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return MetadataServiceStubSettings.defaultGrpcTransportProviderBuilder();
}
+ /** Returns a builder for the default REST ChannelProvider for this service. */
+ @BetaApi
+ public static InstantiatingHttpJsonChannelProvider.Builder
+ defaultHttpJsonTransportProviderBuilder() {
+ return MetadataServiceStubSettings.defaultHttpJsonTransportProviderBuilder();
+ }
+
public static TransportChannelProvider defaultTransportChannelProvider() {
return MetadataServiceStubSettings.defaultTransportChannelProvider();
}
@@ -160,11 +184,17 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil
return MetadataServiceStubSettings.defaultApiClientHeaderProviderBuilder();
}
- /** Returns a new builder for this class. */
+ /** Returns a new gRPC builder for this class. */
public static Builder newBuilder() {
return Builder.createDefault();
}
+ /** Returns a new REST builder for this class. */
+ @BetaApi
+ public static Builder newHttpJsonBuilder() {
+ return Builder.createHttpJsonDefault();
+ }
+
/** Returns a new builder for this class. */
public static Builder newBuilder(ClientContext clientContext) {
return new Builder(clientContext);
@@ -202,6 +232,11 @@ private static Builder createDefault() {
return new Builder(MetadataServiceStubSettings.newBuilder());
}
+ @BetaApi
+ private static Builder createHttpJsonDefault() {
+ return new Builder(MetadataServiceStubSettings.newHttpJsonBuilder());
+ }
+
public MetadataServiceStubSettings.Builder getStubSettingsBuilder() {
return ((MetadataServiceStubSettings.Builder) getStubSettings());
}
@@ -267,6 +302,18 @@ public UnaryCallSettings.Builder getPartitionSet
return getStubSettingsBuilder().listPartitionsSettings();
}
+ /** Returns the builder for the settings used for calls to listLocations. */
+ public PagedCallSettings.Builder<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ listLocationsSettings() {
+ return getStubSettingsBuilder().listLocationsSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to getLocation. */
+ public UnaryCallSettings.Builder getLocationSettings() {
+ return getStubSettingsBuilder().getLocationSettings();
+ }
+
@Override
public MetadataServiceSettings build() throws IOException {
return new MetadataServiceSettings(this);
diff --git a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/gapic_metadata.json b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/gapic_metadata.json
index 87f63b68e779..828829dc7f97 100644
--- a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/gapic_metadata.json
+++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/gapic_metadata.json
@@ -19,9 +19,24 @@
"GetContent": {
"methods": ["getContent", "getContent", "getContent", "getContentCallable"]
},
+ "GetIamPolicy": {
+ "methods": ["getIamPolicy", "getIamPolicy", "getIamPolicy", "getIamPolicyCallable"]
+ },
+ "GetLocation": {
+ "methods": ["getLocation", "getLocationCallable"]
+ },
"ListContent": {
"methods": ["listContent", "listContent", "listContent", "listContentPagedCallable", "listContentCallable"]
},
+ "ListLocations": {
+ "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"]
+ },
+ "SetIamPolicy": {
+ "methods": ["setIamPolicy", "setIamPolicyCallable"]
+ },
+ "TestIamPermissions": {
+ "methods": ["testIamPermissions", "testIamPermissionsCallable"]
+ },
"UpdateContent": {
"methods": ["updateContent", "updateContent", "updateContentCallable"]
}
@@ -49,12 +64,18 @@
"GetEntity": {
"methods": ["getEntity", "getEntity", "getEntity", "getEntityCallable"]
},
+ "GetLocation": {
+ "methods": ["getLocation", "getLocationCallable"]
+ },
"GetPartition": {
"methods": ["getPartition", "getPartition", "getPartition", "getPartitionCallable"]
},
"ListEntities": {
"methods": ["listEntities", "listEntities", "listEntities", "listEntitiesPagedCallable", "listEntitiesCallable"]
},
+ "ListLocations": {
+ "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"]
+ },
"ListPartitions": {
"methods": ["listPartitions", "listPartitions", "listPartitions", "listPartitionsPagedCallable", "listPartitionsCallable"]
},
@@ -115,6 +136,9 @@
"GetLake": {
"methods": ["getLake", "getLake", "getLake", "getLakeCallable"]
},
+ "GetLocation": {
+ "methods": ["getLocation", "getLocationCallable"]
+ },
"GetTask": {
"methods": ["getTask", "getTask", "getTask", "getTaskCallable"]
},
@@ -139,6 +163,9 @@
"ListLakes": {
"methods": ["listLakes", "listLakes", "listLakes", "listLakesPagedCallable", "listLakesCallable"]
},
+ "ListLocations": {
+ "methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"]
+ },
"ListSessions": {
"methods": ["listSessions", "listSessions", "listSessions", "listSessionsPagedCallable", "listSessionsCallable"]
},
diff --git a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/package-info.java b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/package-info.java
index 0b97101969b7..8f99587d65eb 100644
--- a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/package-info.java
+++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/package-info.java
@@ -55,7 +55,7 @@
* ======================= DataplexServiceClient =======================
*
*
Service Description: Dataplex service provides data lakes as a service. The primary resources
- * offered by this service are Lakes, Zones and Assets which collectively allow a data adminstrator
+ * offered by this service are Lakes, Zones and Assets which collectively allow a data administrator
* to organize, manage, secure and catalog data across their organization located across cloud
* projects in a variety of storage systems including Cloud Storage and BigQuery.
*
diff --git a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/ContentServiceStub.java b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/ContentServiceStub.java
index 0889b8a0640f..dbb318a7d6de 100644
--- a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/ContentServiceStub.java
+++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/ContentServiceStub.java
@@ -17,6 +17,7 @@
package com.google.cloud.dataplex.v1.stub;
import static com.google.cloud.dataplex.v1.ContentServiceClient.ListContentPagedResponse;
+import static com.google.cloud.dataplex.v1.ContentServiceClient.ListLocationsPagedResponse;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.rpc.UnaryCallable;
@@ -27,6 +28,15 @@
import com.google.cloud.dataplex.v1.ListContentRequest;
import com.google.cloud.dataplex.v1.ListContentResponse;
import com.google.cloud.dataplex.v1.UpdateContentRequest;
+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.iam.v1.GetIamPolicyRequest;
+import com.google.iam.v1.Policy;
+import com.google.iam.v1.SetIamPolicyRequest;
+import com.google.iam.v1.TestIamPermissionsRequest;
+import com.google.iam.v1.TestIamPermissionsResponse;
import com.google.protobuf.Empty;
import javax.annotation.Generated;
@@ -55,6 +65,19 @@ public UnaryCallable getContentCallable() {
throw new UnsupportedOperationException("Not implemented: getContentCallable()");
}
+ public UnaryCallable getIamPolicyCallable() {
+ throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()");
+ }
+
+ public UnaryCallable setIamPolicyCallable() {
+ throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()");
+ }
+
+ public UnaryCallable
+ testIamPermissionsCallable() {
+ throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()");
+ }
+
public UnaryCallable listContentPagedCallable() {
throw new UnsupportedOperationException("Not implemented: listContentPagedCallable()");
}
@@ -63,6 +86,19 @@ public UnaryCallable listContentCallabl
throw new UnsupportedOperationException("Not implemented: listContentCallable()");
}
+ public UnaryCallable
+ listLocationsPagedCallable() {
+ throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()");
+ }
+
+ public UnaryCallable listLocationsCallable() {
+ throw new UnsupportedOperationException("Not implemented: listLocationsCallable()");
+ }
+
+ public UnaryCallable getLocationCallable() {
+ throw new UnsupportedOperationException("Not implemented: getLocationCallable()");
+ }
+
@Override
public abstract void close();
}
diff --git a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/ContentServiceStubSettings.java b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/ContentServiceStubSettings.java
index 50b7ede23464..0771ee3847f9 100644
--- a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/ContentServiceStubSettings.java
+++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/ContentServiceStubSettings.java
@@ -17,6 +17,7 @@
package com.google.cloud.dataplex.v1.stub;
import static com.google.cloud.dataplex.v1.ContentServiceClient.ListContentPagedResponse;
+import static com.google.cloud.dataplex.v1.ContentServiceClient.ListLocationsPagedResponse;
import com.google.api.core.ApiFunction;
import com.google.api.core.ApiFuture;
@@ -27,6 +28,9 @@
import com.google.api.gax.grpc.GaxGrpcProperties;
import com.google.api.gax.grpc.GrpcTransportChannel;
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
+import com.google.api.gax.httpjson.GaxHttpJsonProperties;
+import com.google.api.gax.httpjson.HttpJsonTransportChannel;
+import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider;
import com.google.api.gax.retrying.RetrySettings;
import com.google.api.gax.rpc.ApiCallContext;
import com.google.api.gax.rpc.ApiClientHeaderProvider;
@@ -47,14 +51,24 @@
import com.google.cloud.dataplex.v1.ListContentRequest;
import com.google.cloud.dataplex.v1.ListContentResponse;
import com.google.cloud.dataplex.v1.UpdateContentRequest;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Lists;
+import com.google.iam.v1.GetIamPolicyRequest;
+import com.google.iam.v1.Policy;
+import com.google.iam.v1.SetIamPolicyRequest;
+import com.google.iam.v1.TestIamPermissionsRequest;
+import com.google.iam.v1.TestIamPermissionsResponse;
import com.google.protobuf.Empty;
import java.io.IOException;
import java.util.List;
import javax.annotation.Generated;
+import org.threeten.bp.Duration;
// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
@@ -100,8 +114,16 @@ public class ContentServiceStubSettings extends StubSettings updateContentSettings;
private final UnaryCallSettings deleteContentSettings;
private final UnaryCallSettings getContentSettings;
+ private final UnaryCallSettings getIamPolicySettings;
+ private final UnaryCallSettings setIamPolicySettings;
+ private final UnaryCallSettings
+ testIamPermissionsSettings;
private final PagedCallSettings
listContentSettings;
+ private final PagedCallSettings<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ listLocationsSettings;
+ private final UnaryCallSettings getLocationSettings;
private static final PagedListDescriptor
LIST_CONTENT_PAGE_STR_DESC =
@@ -139,6 +161,42 @@ public Iterable extractResources(ListContentResponse payload) {
}
};
+ private static final PagedListDescriptor
+ LIST_LOCATIONS_PAGE_STR_DESC =
+ new PagedListDescriptor() {
+ @Override
+ public String emptyToken() {
+ return "";
+ }
+
+ @Override
+ public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) {
+ return ListLocationsRequest.newBuilder(payload).setPageToken(token).build();
+ }
+
+ @Override
+ public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) {
+ return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build();
+ }
+
+ @Override
+ public Integer extractPageSize(ListLocationsRequest payload) {
+ return payload.getPageSize();
+ }
+
+ @Override
+ public String extractNextToken(ListLocationsResponse payload) {
+ return payload.getNextPageToken();
+ }
+
+ @Override
+ public Iterable extractResources(ListLocationsResponse payload) {
+ return payload.getLocationsList() == null
+ ? ImmutableList.of()
+ : payload.getLocationsList();
+ }
+ };
+
private static final PagedListResponseFactory<
ListContentRequest, ListContentResponse, ListContentPagedResponse>
LIST_CONTENT_PAGE_STR_FACT =
@@ -156,6 +214,23 @@ public ApiFuture getFuturePagedResponse(
}
};
+ private static final PagedListResponseFactory<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ LIST_LOCATIONS_PAGE_STR_FACT =
+ new PagedListResponseFactory<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() {
+ @Override
+ public ApiFuture getFuturePagedResponse(
+ UnaryCallable callable,
+ ListLocationsRequest request,
+ ApiCallContext context,
+ ApiFuture futureResponse) {
+ PageContext pageContext =
+ PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context);
+ return ListLocationsPagedResponse.createAsync(pageContext, futureResponse);
+ }
+ };
+
/** Returns the object with the settings used for calls to createContent. */
public UnaryCallSettings createContentSettings() {
return createContentSettings;
@@ -176,18 +251,50 @@ public UnaryCallSettings getContentSettings() {
return getContentSettings;
}
+ /** Returns the object with the settings used for calls to getIamPolicy. */
+ public UnaryCallSettings getIamPolicySettings() {
+ return getIamPolicySettings;
+ }
+
+ /** Returns the object with the settings used for calls to setIamPolicy. */
+ public UnaryCallSettings setIamPolicySettings() {
+ return setIamPolicySettings;
+ }
+
+ /** Returns the object with the settings used for calls to testIamPermissions. */
+ public UnaryCallSettings
+ testIamPermissionsSettings() {
+ return testIamPermissionsSettings;
+ }
+
/** Returns the object with the settings used for calls to listContent. */
public PagedCallSettings
listContentSettings() {
return listContentSettings;
}
+ /** Returns the object with the settings used for calls to listLocations. */
+ public PagedCallSettings
+ listLocationsSettings() {
+ return listLocationsSettings;
+ }
+
+ /** Returns the object with the settings used for calls to getLocation. */
+ public UnaryCallSettings getLocationSettings() {
+ return getLocationSettings;
+ }
+
public ContentServiceStub createStub() throws IOException {
if (getTransportChannelProvider()
.getTransportName()
.equals(GrpcTransportChannel.getGrpcTransportName())) {
return GrpcContentServiceStub.create(this);
}
+ if (getTransportChannelProvider()
+ .getTransportName()
+ .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) {
+ return HttpJsonContentServiceStub.create(this);
+ }
throw new UnsupportedOperationException(
String.format(
"Transport not supported: %s", getTransportChannelProvider().getTransportName()));
@@ -220,18 +327,25 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde
.setUseJwtAccessWithScope(true);
}
- /** Returns a builder for the default ChannelProvider for this service. */
+ /** Returns a builder for the default gRPC ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return InstantiatingGrpcChannelProvider.newBuilder()
.setMaxInboundMessageSize(Integer.MAX_VALUE);
}
+ /** Returns a builder for the default REST ChannelProvider for this service. */
+ @BetaApi
+ public static InstantiatingHttpJsonChannelProvider.Builder
+ defaultHttpJsonTransportProviderBuilder() {
+ return InstantiatingHttpJsonChannelProvider.newBuilder();
+ }
+
public static TransportChannelProvider defaultTransportChannelProvider() {
return defaultGrpcTransportProviderBuilder().build();
}
@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
- public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
+ public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() {
return ApiClientHeaderProvider.newBuilder()
.setGeneratedLibToken(
"gapic", GaxProperties.getLibraryVersion(ContentServiceStubSettings.class))
@@ -239,11 +353,30 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil
GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion());
}
- /** Returns a new builder for this class. */
+ @BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
+ public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() {
+ return ApiClientHeaderProvider.newBuilder()
+ .setGeneratedLibToken(
+ "gapic", GaxProperties.getLibraryVersion(ContentServiceStubSettings.class))
+ .setTransportToken(
+ GaxHttpJsonProperties.getHttpJsonTokenName(),
+ GaxHttpJsonProperties.getHttpJsonVersion());
+ }
+
+ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
+ return ContentServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder();
+ }
+
+ /** Returns a new gRPC builder for this class. */
public static Builder newBuilder() {
return Builder.createDefault();
}
+ /** Returns a new REST builder for this class. */
+ public static Builder newHttpJsonBuilder() {
+ return Builder.createHttpJsonDefault();
+ }
+
/** Returns a new builder for this class. */
public static Builder newBuilder(ClientContext clientContext) {
return new Builder(clientContext);
@@ -261,7 +394,12 @@ protected ContentServiceStubSettings(Builder settingsBuilder) throws IOException
updateContentSettings = settingsBuilder.updateContentSettings().build();
deleteContentSettings = settingsBuilder.deleteContentSettings().build();
getContentSettings = settingsBuilder.getContentSettings().build();
+ getIamPolicySettings = settingsBuilder.getIamPolicySettings().build();
+ setIamPolicySettings = settingsBuilder.setIamPolicySettings().build();
+ testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build();
listContentSettings = settingsBuilder.listContentSettings().build();
+ listLocationsSettings = settingsBuilder.listLocationsSettings().build();
+ getLocationSettings = settingsBuilder.getLocationSettings().build();
}
/** Builder for ContentServiceStubSettings. */
@@ -271,15 +409,31 @@ public static class Builder extends StubSettings.Builder updateContentSettings;
private final UnaryCallSettings.Builder deleteContentSettings;
private final UnaryCallSettings.Builder getContentSettings;
+ private final UnaryCallSettings.Builder getIamPolicySettings;
+ private final UnaryCallSettings.Builder setIamPolicySettings;
+ private final UnaryCallSettings.Builder
+ testIamPermissionsSettings;
private final PagedCallSettings.Builder<
ListContentRequest, ListContentResponse, ListContentPagedResponse>
listContentSettings;
+ private final PagedCallSettings.Builder<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ listLocationsSettings;
+ private final UnaryCallSettings.Builder getLocationSettings;
private static final ImmutableMap>
RETRYABLE_CODE_DEFINITIONS;
static {
ImmutableMap.Builder> definitions =
ImmutableMap.builder();
+ definitions.put(
+ "no_retry_8_codes", ImmutableSet.copyOf(Lists.newArrayList()));
+ definitions.put(
+ "retry_policy_4_codes",
+ ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE)));
+ definitions.put(
+ "retry_policy_5_codes",
+ ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE)));
definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList()));
RETRYABLE_CODE_DEFINITIONS = definitions.build();
}
@@ -289,6 +443,36 @@ public static class Builder extends StubSettings.Builder definitions = ImmutableMap.builder();
RetrySettings settings = null;
+ settings =
+ RetrySettings.newBuilder()
+ .setInitialRpcTimeout(Duration.ofMillis(60000L))
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ofMillis(60000L))
+ .setTotalTimeout(Duration.ofMillis(60000L))
+ .build();
+ definitions.put("no_retry_8_params", settings);
+ settings =
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(1000L))
+ .setRetryDelayMultiplier(1.3)
+ .setMaxRetryDelay(Duration.ofMillis(10000L))
+ .setInitialRpcTimeout(Duration.ofMillis(60000L))
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ofMillis(60000L))
+ .setTotalTimeout(Duration.ofMillis(60000L))
+ .build();
+ definitions.put("retry_policy_4_params", settings);
+ settings =
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(1000L))
+ .setRetryDelayMultiplier(1.3)
+ .setMaxRetryDelay(Duration.ofMillis(10000L))
+ .setInitialRpcTimeout(Duration.ofMillis(60000L))
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ofMillis(60000L))
+ .setTotalTimeout(Duration.ofMillis(60000L))
+ .build();
+ definitions.put("retry_policy_5_params", settings);
settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build();
definitions.put("no_retry_params", settings);
RETRY_PARAM_DEFINITIONS = definitions.build();
@@ -305,7 +489,12 @@ protected Builder(ClientContext clientContext) {
updateContentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
deleteContentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
getContentSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
listContentSettings = PagedCallSettings.newBuilder(LIST_CONTENT_PAGE_STR_FACT);
+ listLocationsSettings = PagedCallSettings.newBuilder(LIST_LOCATIONS_PAGE_STR_FACT);
+ getLocationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
unaryMethodSettingsBuilders =
ImmutableList.>of(
@@ -313,7 +502,12 @@ protected Builder(ClientContext clientContext) {
updateContentSettings,
deleteContentSettings,
getContentSettings,
- listContentSettings);
+ getIamPolicySettings,
+ setIamPolicySettings,
+ testIamPermissionsSettings,
+ listContentSettings,
+ listLocationsSettings,
+ getLocationSettings);
initDefaults(this);
}
@@ -324,7 +518,12 @@ protected Builder(ContentServiceStubSettings settings) {
updateContentSettings = settings.updateContentSettings.toBuilder();
deleteContentSettings = settings.deleteContentSettings.toBuilder();
getContentSettings = settings.getContentSettings.toBuilder();
+ getIamPolicySettings = settings.getIamPolicySettings.toBuilder();
+ setIamPolicySettings = settings.setIamPolicySettings.toBuilder();
+ testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder();
listContentSettings = settings.listContentSettings.toBuilder();
+ listLocationsSettings = settings.listLocationsSettings.toBuilder();
+ getLocationSettings = settings.getLocationSettings.toBuilder();
unaryMethodSettingsBuilders =
ImmutableList.>of(
@@ -332,7 +531,12 @@ protected Builder(ContentServiceStubSettings settings) {
updateContentSettings,
deleteContentSettings,
getContentSettings,
- listContentSettings);
+ getIamPolicySettings,
+ setIamPolicySettings,
+ testIamPermissionsSettings,
+ listContentSettings,
+ listLocationsSettings,
+ getLocationSettings);
}
private static Builder createDefault() {
@@ -348,29 +552,67 @@ private static Builder createDefault() {
return initDefaults(builder);
}
+ private static Builder createHttpJsonDefault() {
+ Builder builder = new Builder(((ClientContext) null));
+
+ builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build());
+ builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
+ builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build());
+ builder.setEndpoint(getDefaultEndpoint());
+ builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
+ builder.setSwitchToMtlsEndpointAllowed(true);
+
+ return initDefaults(builder);
+ }
+
private static Builder initDefaults(Builder builder) {
builder
.createContentSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_8_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_8_params"));
builder
.updateContentSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_8_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_8_params"));
builder
.deleteContentSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_8_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_8_params"));
builder
.getContentSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_4_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_4_params"));
+
+ builder
+ .getIamPolicySettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_4_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_4_params"));
+
+ builder
+ .setIamPolicySettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_8_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_8_params"));
+
+ builder
+ .testIamPermissionsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_4_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_4_params"));
+
+ builder
+ .listContentSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_5_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_5_params"));
+
+ builder
+ .listLocationsSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
builder
- .listContentSettings()
+ .getLocationSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
@@ -412,6 +654,22 @@ public UnaryCallSettings.Builder getContentSettings(
return getContentSettings;
}
+ /** Returns the builder for the settings used for calls to getIamPolicy. */
+ public UnaryCallSettings.Builder getIamPolicySettings() {
+ return getIamPolicySettings;
+ }
+
+ /** Returns the builder for the settings used for calls to setIamPolicy. */
+ public UnaryCallSettings.Builder setIamPolicySettings() {
+ return setIamPolicySettings;
+ }
+
+ /** Returns the builder for the settings used for calls to testIamPermissions. */
+ public UnaryCallSettings.Builder
+ testIamPermissionsSettings() {
+ return testIamPermissionsSettings;
+ }
+
/** Returns the builder for the settings used for calls to listContent. */
public PagedCallSettings.Builder<
ListContentRequest, ListContentResponse, ListContentPagedResponse>
@@ -419,6 +677,18 @@ public UnaryCallSettings.Builder getContentSettings(
return listContentSettings;
}
+ /** Returns the builder for the settings used for calls to listLocations. */
+ public PagedCallSettings.Builder<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ listLocationsSettings() {
+ return listLocationsSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to getLocation. */
+ public UnaryCallSettings.Builder getLocationSettings() {
+ return getLocationSettings;
+ }
+
@Override
public ContentServiceStubSettings build() throws IOException {
return new ContentServiceStubSettings(this);
diff --git a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/DataplexServiceStub.java b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/DataplexServiceStub.java
index 1a3a49f9e311..be8f550d58a6 100644
--- a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/DataplexServiceStub.java
+++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/DataplexServiceStub.java
@@ -22,6 +22,7 @@
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListJobsPagedResponse;
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListLakeActionsPagedResponse;
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListLakesPagedResponse;
+import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListLocationsPagedResponse;
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListSessionsPagedResponse;
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListTasksPagedResponse;
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListZoneActionsPagedResponse;
@@ -77,6 +78,10 @@
import com.google.cloud.dataplex.v1.UpdateTaskRequest;
import com.google.cloud.dataplex.v1.UpdateZoneRequest;
import com.google.cloud.dataplex.v1.Zone;
+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;
@@ -92,7 +97,11 @@
public abstract class DataplexServiceStub implements BackgroundResource {
public OperationsStub getOperationsStub() {
- throw new UnsupportedOperationException("Not implemented: getOperationsStub()");
+ return null;
+ }
+
+ public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() {
+ return null;
}
public OperationCallable
@@ -346,6 +355,19 @@ public UnaryCallable listSessionsCall
throw new UnsupportedOperationException("Not implemented: listSessionsCallable()");
}
+ public UnaryCallable
+ listLocationsPagedCallable() {
+ throw new UnsupportedOperationException("Not implemented: listLocationsPagedCallable()");
+ }
+
+ public UnaryCallable listLocationsCallable() {
+ throw new UnsupportedOperationException("Not implemented: listLocationsCallable()");
+ }
+
+ public UnaryCallable getLocationCallable() {
+ throw new UnsupportedOperationException("Not implemented: getLocationCallable()");
+ }
+
@Override
public abstract void close();
}
diff --git a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/DataplexServiceStubSettings.java b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/DataplexServiceStubSettings.java
index 96f820487fc7..3a128357913a 100644
--- a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/DataplexServiceStubSettings.java
+++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/DataplexServiceStubSettings.java
@@ -22,6 +22,7 @@
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListJobsPagedResponse;
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListLakeActionsPagedResponse;
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListLakesPagedResponse;
+import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListLocationsPagedResponse;
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListSessionsPagedResponse;
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListTasksPagedResponse;
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListZoneActionsPagedResponse;
@@ -37,6 +38,9 @@
import com.google.api.gax.grpc.GrpcTransportChannel;
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
import com.google.api.gax.grpc.ProtoOperationTransformers;
+import com.google.api.gax.httpjson.GaxHttpJsonProperties;
+import com.google.api.gax.httpjson.HttpJsonTransportChannel;
+import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider;
import com.google.api.gax.longrunning.OperationSnapshot;
import com.google.api.gax.longrunning.OperationTimedPollAlgorithm;
import com.google.api.gax.retrying.RetrySettings;
@@ -102,6 +106,10 @@
import com.google.cloud.dataplex.v1.UpdateTaskRequest;
import com.google.cloud.dataplex.v1.UpdateZoneRequest;
import com.google.cloud.dataplex.v1.Zone;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
@@ -230,6 +238,10 @@ public class DataplexServiceStubSettings extends StubSettings
listSessionsSettings;
+ private final PagedCallSettings<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ listLocationsSettings;
+ private final UnaryCallSettings getLocationSettings;
private static final PagedListDescriptor
LIST_LAKES_PAGE_STR_DESC =
@@ -601,6 +613,42 @@ public Iterable extractResources(ListSessionsResponse payload) {
}
};
+ private static final PagedListDescriptor
+ LIST_LOCATIONS_PAGE_STR_DESC =
+ new PagedListDescriptor() {
+ @Override
+ public String emptyToken() {
+ return "";
+ }
+
+ @Override
+ public ListLocationsRequest injectToken(ListLocationsRequest payload, String token) {
+ return ListLocationsRequest.newBuilder(payload).setPageToken(token).build();
+ }
+
+ @Override
+ public ListLocationsRequest injectPageSize(ListLocationsRequest payload, int pageSize) {
+ return ListLocationsRequest.newBuilder(payload).setPageSize(pageSize).build();
+ }
+
+ @Override
+ public Integer extractPageSize(ListLocationsRequest payload) {
+ return payload.getPageSize();
+ }
+
+ @Override
+ public String extractNextToken(ListLocationsResponse payload) {
+ return payload.getNextPageToken();
+ }
+
+ @Override
+ public Iterable extractResources(ListLocationsResponse payload) {
+ return payload.getLocationsList() == null
+ ? ImmutableList.of()
+ : payload.getLocationsList();
+ }
+ };
+
private static final PagedListResponseFactory<
ListLakesRequest, ListLakesResponse, ListLakesPagedResponse>
LIST_LAKES_PAGE_STR_FACT =
@@ -772,6 +820,23 @@ public ApiFuture getFuturePagedResponse(
}
};
+ private static final PagedListResponseFactory<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ LIST_LOCATIONS_PAGE_STR_FACT =
+ new PagedListResponseFactory<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>() {
+ @Override
+ public ApiFuture getFuturePagedResponse(
+ UnaryCallable callable,
+ ListLocationsRequest request,
+ ApiCallContext context,
+ ApiFuture futureResponse) {
+ PageContext pageContext =
+ PageContext.create(callable, LIST_LOCATIONS_PAGE_STR_DESC, request, context);
+ return ListLocationsPagedResponse.createAsync(pageContext, futureResponse);
+ }
+ };
+
/** Returns the object with the settings used for calls to createLake. */
public UnaryCallSettings createLakeSettings() {
return createLakeSettings;
@@ -1036,12 +1101,28 @@ public UnaryCallSettings getEnvironmentSetti
return listSessionsSettings;
}
+ /** Returns the object with the settings used for calls to listLocations. */
+ public PagedCallSettings
+ listLocationsSettings() {
+ return listLocationsSettings;
+ }
+
+ /** Returns the object with the settings used for calls to getLocation. */
+ public UnaryCallSettings getLocationSettings() {
+ return getLocationSettings;
+ }
+
public DataplexServiceStub createStub() throws IOException {
if (getTransportChannelProvider()
.getTransportName()
.equals(GrpcTransportChannel.getGrpcTransportName())) {
return GrpcDataplexServiceStub.create(this);
}
+ if (getTransportChannelProvider()
+ .getTransportName()
+ .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) {
+ return HttpJsonDataplexServiceStub.create(this);
+ }
throw new UnsupportedOperationException(
String.format(
"Transport not supported: %s", getTransportChannelProvider().getTransportName()));
@@ -1074,18 +1155,25 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde
.setUseJwtAccessWithScope(true);
}
- /** Returns a builder for the default ChannelProvider for this service. */
+ /** Returns a builder for the default gRPC ChannelProvider for this service. */
public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() {
return InstantiatingGrpcChannelProvider.newBuilder()
.setMaxInboundMessageSize(Integer.MAX_VALUE);
}
+ /** Returns a builder for the default REST ChannelProvider for this service. */
+ @BetaApi
+ public static InstantiatingHttpJsonChannelProvider.Builder
+ defaultHttpJsonTransportProviderBuilder() {
+ return InstantiatingHttpJsonChannelProvider.newBuilder();
+ }
+
public static TransportChannelProvider defaultTransportChannelProvider() {
return defaultGrpcTransportProviderBuilder().build();
}
@BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
- public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
+ public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() {
return ApiClientHeaderProvider.newBuilder()
.setGeneratedLibToken(
"gapic", GaxProperties.getLibraryVersion(DataplexServiceStubSettings.class))
@@ -1093,11 +1181,30 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil
GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion());
}
- /** Returns a new builder for this class. */
+ @BetaApi("The surface for customizing headers is not stable yet and may change in the future.")
+ public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() {
+ return ApiClientHeaderProvider.newBuilder()
+ .setGeneratedLibToken(
+ "gapic", GaxProperties.getLibraryVersion(DataplexServiceStubSettings.class))
+ .setTransportToken(
+ GaxHttpJsonProperties.getHttpJsonTokenName(),
+ GaxHttpJsonProperties.getHttpJsonVersion());
+ }
+
+ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() {
+ return DataplexServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder();
+ }
+
+ /** Returns a new gRPC builder for this class. */
public static Builder newBuilder() {
return Builder.createDefault();
}
+ /** Returns a new REST builder for this class. */
+ public static Builder newHttpJsonBuilder() {
+ return Builder.createHttpJsonDefault();
+ }
+
/** Returns a new builder for this class. */
public static Builder newBuilder(ClientContext clientContext) {
return new Builder(clientContext);
@@ -1161,6 +1268,8 @@ protected DataplexServiceStubSettings(Builder settingsBuilder) throws IOExceptio
listEnvironmentsSettings = settingsBuilder.listEnvironmentsSettings().build();
getEnvironmentSettings = settingsBuilder.getEnvironmentSettings().build();
listSessionsSettings = settingsBuilder.listSessionsSettings().build();
+ listLocationsSettings = settingsBuilder.listLocationsSettings().build();
+ getLocationSettings = settingsBuilder.getLocationSettings().build();
}
/** Builder for DataplexServiceStubSettings. */
@@ -1254,6 +1363,10 @@ public static class Builder extends StubSettings.Builder
listSessionsSettings;
+ private final PagedCallSettings.Builder<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ listLocationsSettings;
+ private final UnaryCallSettings.Builder getLocationSettings;
private static final ImmutableMap>
RETRYABLE_CODE_DEFINITIONS;
@@ -1261,7 +1374,7 @@ public static class Builder extends StubSettings.Builder> definitions =
ImmutableMap.builder();
definitions.put(
- "no_retry_4_codes", ImmutableSet.copyOf(Lists.newArrayList()));
+ "no_retry_6_codes", ImmutableSet.copyOf(Lists.newArrayList()));
definitions.put(
"retry_policy_1_codes",
ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE)));
@@ -1284,7 +1397,7 @@ public static class Builder extends StubSettings.Builder>of(
@@ -1400,7 +1515,9 @@ protected Builder(ClientContext clientContext) {
deleteEnvironmentSettings,
listEnvironmentsSettings,
getEnvironmentSettings,
- listSessionsSettings);
+ listSessionsSettings,
+ listLocationsSettings,
+ getLocationSettings);
initDefaults(this);
}
@@ -1454,6 +1571,8 @@ protected Builder(DataplexServiceStubSettings settings) {
listEnvironmentsSettings = settings.listEnvironmentsSettings.toBuilder();
getEnvironmentSettings = settings.getEnvironmentSettings.toBuilder();
listSessionsSettings = settings.listSessionsSettings.toBuilder();
+ listLocationsSettings = settings.listLocationsSettings.toBuilder();
+ getLocationSettings = settings.getLocationSettings.toBuilder();
unaryMethodSettingsBuilders =
ImmutableList.>of(
@@ -1488,7 +1607,9 @@ protected Builder(DataplexServiceStubSettings settings) {
deleteEnvironmentSettings,
listEnvironmentsSettings,
getEnvironmentSettings,
- listSessionsSettings);
+ listSessionsSettings,
+ listLocationsSettings,
+ getLocationSettings);
}
private static Builder createDefault() {
@@ -1504,21 +1625,34 @@ private static Builder createDefault() {
return initDefaults(builder);
}
+ private static Builder createHttpJsonDefault() {
+ Builder builder = new Builder(((ClientContext) null));
+
+ builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build());
+ builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build());
+ builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build());
+ builder.setEndpoint(getDefaultEndpoint());
+ builder.setMtlsEndpoint(getDefaultMtlsEndpoint());
+ builder.setSwitchToMtlsEndpointAllowed(true);
+
+ return initDefaults(builder);
+ }
+
private static Builder initDefaults(Builder builder) {
builder
.createLakeSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params"));
builder
.updateLakeSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params"));
builder
.deleteLakeSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params"));
builder
.listLakesSettings()
@@ -1537,18 +1671,18 @@ private static Builder initDefaults(Builder builder) {
builder
.createZoneSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params"));
builder
.updateZoneSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params"));
builder
.deleteZoneSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params"));
builder
.listZonesSettings()
@@ -1567,18 +1701,18 @@ private static Builder initDefaults(Builder builder) {
builder
.createAssetSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params"));
builder
.updateAssetSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params"));
builder
.deleteAssetSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params"));
builder
.listAssetsSettings()
@@ -1597,18 +1731,18 @@ private static Builder initDefaults(Builder builder) {
builder
.createTaskSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params"));
builder
.updateTaskSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params"));
builder
.deleteTaskSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params"));
builder
.listTasksSettings()
@@ -1632,36 +1766,46 @@ private static Builder initDefaults(Builder builder) {
builder
.cancelJobSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params"));
builder
.createEnvironmentSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params"));
builder
.updateEnvironmentSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params"));
builder
.deleteEnvironmentSettings()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params"));
builder
.listEnvironmentsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_1_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_1_params"));
+
+ builder
+ .getEnvironmentSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+
+ builder
+ .listSessionsSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
builder
- .getEnvironmentSettings()
+ .listLocationsSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
builder
- .listSessionsSettings()
+ .getLocationSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
@@ -1669,8 +1813,8 @@ private static Builder initDefaults(Builder builder) {
.createLakeOperationSettings()
.setInitialCallSettings(
UnaryCallSettings.newUnaryCallSettingsBuilder()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params"))
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params"))
.build())
.setResponseTransformer(ProtoOperationTransformers.ResponseTransformer.create(Lake.class))
.setMetadataTransformer(
@@ -1691,8 +1835,8 @@ private static Builder initDefaults(Builder builder) {
.updateLakeOperationSettings()
.setInitialCallSettings(
UnaryCallSettings.newUnaryCallSettingsBuilder()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params"))
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params"))
.build())
.setResponseTransformer(ProtoOperationTransformers.ResponseTransformer.create(Lake.class))
.setMetadataTransformer(
@@ -1713,8 +1857,8 @@ private static Builder initDefaults(Builder builder) {
.deleteLakeOperationSettings()
.setInitialCallSettings(
UnaryCallSettings.newUnaryCallSettingsBuilder()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params"))
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params"))
.build())
.setResponseTransformer(
ProtoOperationTransformers.ResponseTransformer.create(Empty.class))
@@ -1736,8 +1880,8 @@ private static Builder initDefaults(Builder builder) {
.createZoneOperationSettings()
.setInitialCallSettings(
UnaryCallSettings.newUnaryCallSettingsBuilder()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params"))
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params"))
.build())
.setResponseTransformer(ProtoOperationTransformers.ResponseTransformer.create(Zone.class))
.setMetadataTransformer(
@@ -1758,8 +1902,8 @@ private static Builder initDefaults(Builder builder) {
.updateZoneOperationSettings()
.setInitialCallSettings(
UnaryCallSettings.newUnaryCallSettingsBuilder()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params"))
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params"))
.build())
.setResponseTransformer(ProtoOperationTransformers.ResponseTransformer.create(Zone.class))
.setMetadataTransformer(
@@ -1780,8 +1924,8 @@ private static Builder initDefaults(Builder builder) {
.deleteZoneOperationSettings()
.setInitialCallSettings(
UnaryCallSettings.newUnaryCallSettingsBuilder()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params"))
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params"))
.build())
.setResponseTransformer(
ProtoOperationTransformers.ResponseTransformer.create(Empty.class))
@@ -1803,8 +1947,8 @@ private static Builder initDefaults(Builder builder) {
.createAssetOperationSettings()
.setInitialCallSettings(
UnaryCallSettings.newUnaryCallSettingsBuilder()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params"))
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params"))
.build())
.setResponseTransformer(
ProtoOperationTransformers.ResponseTransformer.create(Asset.class))
@@ -1826,8 +1970,8 @@ private static Builder initDefaults(Builder builder) {
.updateAssetOperationSettings()
.setInitialCallSettings(
UnaryCallSettings.newUnaryCallSettingsBuilder()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params"))
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params"))
.build())
.setResponseTransformer(
ProtoOperationTransformers.ResponseTransformer.create(Asset.class))
@@ -1849,8 +1993,8 @@ private static Builder initDefaults(Builder builder) {
.deleteAssetOperationSettings()
.setInitialCallSettings(
UnaryCallSettings.newUnaryCallSettingsBuilder()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params"))
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params"))
.build())
.setResponseTransformer(
ProtoOperationTransformers.ResponseTransformer.create(Empty.class))
@@ -1872,8 +2016,8 @@ private static Builder initDefaults(Builder builder) {
.createTaskOperationSettings()
.setInitialCallSettings(
UnaryCallSettings.newUnaryCallSettingsBuilder()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params"))
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params"))
.build())
.setResponseTransformer(ProtoOperationTransformers.ResponseTransformer.create(Task.class))
.setMetadataTransformer(
@@ -1894,8 +2038,8 @@ private static Builder initDefaults(Builder builder) {
.updateTaskOperationSettings()
.setInitialCallSettings(
UnaryCallSettings.newUnaryCallSettingsBuilder()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params"))
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params"))
.build())
.setResponseTransformer(ProtoOperationTransformers.ResponseTransformer.create(Task.class))
.setMetadataTransformer(
@@ -1916,8 +2060,8 @@ private static Builder initDefaults(Builder builder) {
.deleteTaskOperationSettings()
.setInitialCallSettings(
UnaryCallSettings.newUnaryCallSettingsBuilder()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_4_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_4_params"))
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params"))
.build())
.setResponseTransformer(
ProtoOperationTransformers.ResponseTransformer.create(Empty.class))
@@ -1940,8 +2084,8 @@ private static Builder initDefaults(Builder builder) {
.setInitialCallSettings(
UnaryCallSettings
.newUnaryCallSettingsBuilder()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"))
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params"))
.build())
.setResponseTransformer(
ProtoOperationTransformers.ResponseTransformer.create(Environment.class))
@@ -1964,8 +2108,8 @@ private static Builder initDefaults(Builder builder) {
.setInitialCallSettings(
UnaryCallSettings
.newUnaryCallSettingsBuilder()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"))
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params"))
.build())
.setResponseTransformer(
ProtoOperationTransformers.ResponseTransformer.create(Environment.class))
@@ -1988,8 +2132,8 @@ private static Builder initDefaults(Builder builder) {
.setInitialCallSettings(
UnaryCallSettings
.newUnaryCallSettingsBuilder()
- .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
- .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"))
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_6_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_6_params"))
.build())
.setResponseTransformer(
ProtoOperationTransformers.ResponseTransformer.create(Empty.class))
@@ -2323,6 +2467,18 @@ public UnaryCallSettings.Builder getEnvironm
return listSessionsSettings;
}
+ /** Returns the builder for the settings used for calls to listLocations. */
+ public PagedCallSettings.Builder<
+ ListLocationsRequest, ListLocationsResponse, ListLocationsPagedResponse>
+ listLocationsSettings() {
+ return listLocationsSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to getLocation. */
+ public UnaryCallSettings.Builder getLocationSettings() {
+ return getLocationSettings;
+ }
+
@Override
public DataplexServiceStubSettings build() throws IOException {
return new DataplexServiceStubSettings(this);
diff --git a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/GrpcContentServiceStub.java b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/GrpcContentServiceStub.java
index 520755cd7880..0b7fd2e1dd28 100644
--- a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/GrpcContentServiceStub.java
+++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/GrpcContentServiceStub.java
@@ -17,6 +17,7 @@
package com.google.cloud.dataplex.v1.stub;
import static com.google.cloud.dataplex.v1.ContentServiceClient.ListContentPagedResponse;
+import static com.google.cloud.dataplex.v1.ContentServiceClient.ListLocationsPagedResponse;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.core.BackgroundResourceAggregation;
@@ -31,7 +32,16 @@
import com.google.cloud.dataplex.v1.ListContentRequest;
import com.google.cloud.dataplex.v1.ListContentResponse;
import com.google.cloud.dataplex.v1.UpdateContentRequest;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
import com.google.common.collect.ImmutableMap;
+import com.google.iam.v1.GetIamPolicyRequest;
+import com.google.iam.v1.Policy;
+import com.google.iam.v1.SetIamPolicyRequest;
+import com.google.iam.v1.TestIamPermissionsRequest;
+import com.google.iam.v1.TestIamPermissionsResponse;
import com.google.longrunning.stub.GrpcOperationsStub;
import com.google.protobuf.Empty;
import io.grpc.MethodDescriptor;
@@ -84,6 +94,33 @@ public class GrpcContentServiceStub extends ContentServiceStub {
.setResponseMarshaller(ProtoUtils.marshaller(Content.getDefaultInstance()))
.build();
+ private static final MethodDescriptor getIamPolicyMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.dataplex.v1.ContentService/GetIamPolicy")
+ .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor setIamPolicyMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.dataplex.v1.ContentService/SetIamPolicy")
+ .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ testIamPermissionsMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.dataplex.v1.ContentService/TestIamPermissions")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance()))
+ .build();
+
private static final MethodDescriptor
listContentMethodDescriptor =
MethodDescriptor.newBuilder()
@@ -94,13 +131,40 @@ public class GrpcContentServiceStub extends ContentServiceStub {
ProtoUtils.marshaller(ListContentResponse.getDefaultInstance()))
.build();
+ private static final MethodDescriptor
+ listLocationsMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.location.Locations/ListLocations")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor getLocationMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.location.Locations/GetLocation")
+ .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance()))
+ .build();
+
private final UnaryCallable createContentCallable;
private final UnaryCallable updateContentCallable;
private final UnaryCallable deleteContentCallable;
private final UnaryCallable getContentCallable;
+ private final UnaryCallable getIamPolicyCallable;
+ private final UnaryCallable setIamPolicyCallable;
+ private final UnaryCallable
+ testIamPermissionsCallable;
private final UnaryCallable listContentCallable;
private final UnaryCallable
listContentPagedCallable;
+ private final UnaryCallable listLocationsCallable;
+ private final UnaryCallable
+ listLocationsPagedCallable;
+ private final UnaryCallable getLocationCallable;
private final BackgroundResource backgroundResources;
private final GrpcOperationsStub operationsStub;
@@ -186,6 +250,37 @@ protected GrpcContentServiceStub(
return params.build();
})
.build();
+ GrpcCallSettings getIamPolicyTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getIamPolicyMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("resource", String.valueOf(request.getResource()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings setIamPolicyTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(setIamPolicyMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("resource", String.valueOf(request.getResource()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings
+ testIamPermissionsTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(testIamPermissionsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("resource", String.valueOf(request.getResource()));
+ return params.build();
+ })
+ .build();
GrpcCallSettings listContentTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(listContentMethodDescriptor)
@@ -196,6 +291,26 @@ protected GrpcContentServiceStub(
return params.build();
})
.build();
+ GrpcCallSettings listLocationsTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(listLocationsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
+ })
+ .build();
+ GrpcCallSettings getLocationTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getLocationMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ ImmutableMap.Builder params = ImmutableMap.builder();
+ params.put("name", String.valueOf(request.getName()));
+ return params.build();
+ })
+ .build();
this.createContentCallable =
callableFactory.createUnaryCallable(
@@ -209,12 +324,32 @@ protected GrpcContentServiceStub(
this.getContentCallable =
callableFactory.createUnaryCallable(
getContentTransportSettings, settings.getContentSettings(), clientContext);
+ this.getIamPolicyCallable =
+ callableFactory.createUnaryCallable(
+ getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext);
+ this.setIamPolicyCallable =
+ callableFactory.createUnaryCallable(
+ setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext);
+ this.testIamPermissionsCallable =
+ callableFactory.createUnaryCallable(
+ testIamPermissionsTransportSettings,
+ settings.testIamPermissionsSettings(),
+ clientContext);
this.listContentCallable =
callableFactory.createUnaryCallable(
listContentTransportSettings, settings.listContentSettings(), clientContext);
this.listContentPagedCallable =
callableFactory.createPagedCallable(
listContentTransportSettings, settings.listContentSettings(), clientContext);
+ this.listLocationsCallable =
+ callableFactory.createUnaryCallable(
+ listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);
+ this.listLocationsPagedCallable =
+ callableFactory.createPagedCallable(
+ listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);
+ this.getLocationCallable =
+ callableFactory.createUnaryCallable(
+ getLocationTransportSettings, settings.getLocationSettings(), clientContext);
this.backgroundResources =
new BackgroundResourceAggregation(clientContext.getBackgroundResources());
@@ -244,6 +379,22 @@ public UnaryCallable getContentCallable() {
return getContentCallable;
}
+ @Override
+ public UnaryCallable getIamPolicyCallable() {
+ return getIamPolicyCallable;
+ }
+
+ @Override
+ public UnaryCallable setIamPolicyCallable() {
+ return setIamPolicyCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ testIamPermissionsCallable() {
+ return testIamPermissionsCallable;
+ }
+
@Override
public UnaryCallable listContentCallable() {
return listContentCallable;
@@ -254,6 +405,22 @@ public UnaryCallable listContentPa
return listContentPagedCallable;
}
+ @Override
+ public UnaryCallable listLocationsCallable() {
+ return listLocationsCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ listLocationsPagedCallable() {
+ return listLocationsPagedCallable;
+ }
+
+ @Override
+ public UnaryCallable getLocationCallable() {
+ return getLocationCallable;
+ }
+
@Override
public final void close() {
try {
diff --git a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/GrpcDataplexServiceStub.java b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/GrpcDataplexServiceStub.java
index 6cec306f9c67..8c0c4e625470 100644
--- a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/GrpcDataplexServiceStub.java
+++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/GrpcDataplexServiceStub.java
@@ -22,6 +22,7 @@
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListJobsPagedResponse;
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListLakeActionsPagedResponse;
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListLakesPagedResponse;
+import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListLocationsPagedResponse;
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListSessionsPagedResponse;
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListTasksPagedResponse;
import static com.google.cloud.dataplex.v1.DataplexServiceClient.ListZoneActionsPagedResponse;
@@ -81,6 +82,10 @@
import com.google.cloud.dataplex.v1.UpdateTaskRequest;
import com.google.cloud.dataplex.v1.UpdateZoneRequest;
import com.google.cloud.dataplex.v1.Zone;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
import com.google.common.collect.ImmutableMap;
import com.google.longrunning.Operation;
import com.google.longrunning.stub.GrpcOperationsStub;
@@ -382,6 +387,25 @@ public class GrpcDataplexServiceStub extends DataplexServiceStub {
ProtoUtils.marshaller(ListSessionsResponse.getDefaultInstance()))
.build();
+ private static final MethodDescriptor
+ listLocationsMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.location.Locations/ListLocations")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor getLocationMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.cloud.location.Locations/GetLocation")
+ .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance()))
+ .build();
+
private final UnaryCallable createLakeCallable;
private final OperationCallable