extract(MutateRowRequest mutateRowRequest) {
methodName, new MutateRowCallable(retrying, requestContext));
}
+ /**
+ * Internal helper to create the base MutateRows callable chain. The chain is responsible for
+ * retrying individual entry in case of error.
+ *
+ * NOTE: the caller is responsible for adding tracing & metrics.
+ *
+ * @see MutateRowsRetryingCallable for more details
+ */
+ private UnaryCallable createMutateRowsBaseCallable() {
+ ServerStreamingCallable base =
+ GrpcRawCallableFactory.createServerStreamingCallable(
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(BigtableGrpc.getMutateRowsMethod())
+ .setParamsExtractor(
+ new RequestParamsExtractor() {
+ @Override
+ public Map extract(MutateRowsRequest mutateRowsRequest) {
+ return ImmutableMap.of(
+ "table_name", mutateRowsRequest.getTableName(),
+ "app_profile_id", mutateRowsRequest.getAppProfileId());
+ }
+ })
+ .build(),
+ settings.bulkMutateRowsSettings().getRetryableCodes());
+
+ ServerStreamingCallable callable =
+ new StatsHeadersServerStreamingCallable<>(base);
+
+ if (settings.bulkMutateRowsSettings().isServerInitiatedFlowControlEnabled()) {
+ callable = new RateLimitingServerStreamingCallable(callable);
+ }
+
+ // Sometimes MutateRows connections are disconnected via an RST frame. This error is transient
+ // and
+ // should be treated similar to UNAVAILABLE. However, this exception has an INTERNAL error code
+ // which by default is not retryable. Convert the exception so it can be retried in the client.
+ ServerStreamingCallable convertException =
+ new ConvertExceptionCallable<>(callable);
+
+ ServerStreamingCallable withBigtableTracer =
+ new BigtableTracerStreamingCallable<>(convertException);
+
+ BasicResultRetryAlgorithm resultRetryAlgorithm;
+ if (settings.getEnableRetryInfo()) {
+ resultRetryAlgorithm = new RetryInfoRetryAlgorithm<>();
+ } else {
+ resultRetryAlgorithm = new ApiResultRetryAlgorithm<>();
+ }
+
+ RetryAlgorithm retryAlgorithm =
+ new RetryAlgorithm<>(
+ resultRetryAlgorithm,
+ new ExponentialRetryAlgorithm(
+ settings.bulkMutateRowsSettings().getRetrySettings(), clientContext.getClock()));
+
+ RetryingExecutorWithContext retryingExecutor =
+ new ScheduledRetryingExecutor<>(retryAlgorithm, clientContext.getExecutor());
+
+ return new MutateRowsRetryingCallable(
+ clientContext.getDefaultCallContext(),
+ withBigtableTracer,
+ retryingExecutor,
+ settings.bulkMutateRowsSettings().getRetryableCodes(),
+ retryAlgorithm);
+ }
+
/**
* Creates a callable chain to handle MutatesRows RPCs. This is meant to be used for manual
* batching. The chain will:
@@ -773,72 +839,6 @@ public Batcher newBulkReadRowsBatcher(
MoreObjects.firstNonNull(ctx, clientContext.getDefaultCallContext()));
}
- /**
- * Internal helper to create the base MutateRows callable chain. The chain is responsible for
- * retrying individual entry in case of error.
- *
- * NOTE: the caller is responsible for adding tracing & metrics.
- *
- * @see MutateRowsRetryingCallable for more details
- */
- private UnaryCallable createMutateRowsBaseCallable() {
- ServerStreamingCallable base =
- GrpcRawCallableFactory.createServerStreamingCallable(
- GrpcCallSettings.newBuilder()
- .setMethodDescriptor(BigtableGrpc.getMutateRowsMethod())
- .setParamsExtractor(
- new RequestParamsExtractor() {
- @Override
- public Map extract(MutateRowsRequest mutateRowsRequest) {
- return ImmutableMap.of(
- "table_name", mutateRowsRequest.getTableName(),
- "app_profile_id", mutateRowsRequest.getAppProfileId());
- }
- })
- .build(),
- settings.bulkMutateRowsSettings().getRetryableCodes());
-
- ServerStreamingCallable callable =
- new StatsHeadersServerStreamingCallable<>(base);
-
- if (settings.bulkMutateRowsSettings().isServerInitiatedFlowControlEnabled()) {
- callable = new RateLimitingServerStreamingCallable(callable);
- }
-
- // Sometimes MutateRows connections are disconnected via an RST frame. This error is transient
- // and
- // should be treated similar to UNAVAILABLE. However, this exception has an INTERNAL error code
- // which by default is not retryable. Convert the exception so it can be retried in the client.
- ServerStreamingCallable convertException =
- new ConvertExceptionCallable<>(callable);
-
- ServerStreamingCallable withBigtableTracer =
- new BigtableTracerStreamingCallable<>(convertException);
-
- BasicResultRetryAlgorithm resultRetryAlgorithm;
- if (settings.getEnableRetryInfo()) {
- resultRetryAlgorithm = new RetryInfoRetryAlgorithm<>();
- } else {
- resultRetryAlgorithm = new ApiResultRetryAlgorithm<>();
- }
-
- RetryAlgorithm retryAlgorithm =
- new RetryAlgorithm<>(
- resultRetryAlgorithm,
- new ExponentialRetryAlgorithm(
- settings.bulkMutateRowsSettings().getRetrySettings(), clientContext.getClock()));
-
- RetryingExecutorWithContext retryingExecutor =
- new ScheduledRetryingExecutor<>(retryAlgorithm, clientContext.getExecutor());
-
- return new MutateRowsRetryingCallable(
- clientContext.getDefaultCallContext(),
- withBigtableTracer,
- retryingExecutor,
- settings.bulkMutateRowsSettings().getRetryableCodes(),
- retryAlgorithm);
- }
-
/**
* Creates a callable chain to handle CheckAndMutateRow RPCs. THe chain will:
*
From a2497bb123a9b2373ccba7ee61cf820bc3751c4b Mon Sep 17 00:00:00 2001
From: Igor Bernstein
Date: Mon, 4 Mar 2024 18:08:59 -0500
Subject: [PATCH 08/11] test: add ability to inject tracing cookies for
integration tests (#2142)
---
.../bigtable/test_helpers/env/CloudEnv.java | 34 +++++++++++++++++--
1 file changed, 32 insertions(+), 2 deletions(-)
diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/CloudEnv.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/CloudEnv.java
index ba0fda8b2c..692b94b2bc 100644
--- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/CloudEnv.java
+++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/test_helpers/env/CloudEnv.java
@@ -18,6 +18,7 @@
import com.google.api.core.ApiFunction;
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
import com.google.api.gax.rpc.FixedHeaderProvider;
+import com.google.api.gax.rpc.HeaderProvider;
import com.google.api.gax.rpc.StubSettings;
import com.google.cloud.bigtable.admin.v2.BigtableInstanceAdminClient;
import com.google.cloud.bigtable.admin.v2.BigtableInstanceAdminSettings;
@@ -31,6 +32,7 @@
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.base.Strings;
+import com.google.common.collect.ImmutableMap;
import io.grpc.CallOptions;
import io.grpc.Channel;
import io.grpc.ClientCall;
@@ -48,6 +50,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.Optional;
import javax.annotation.Nullable;
/**
@@ -84,9 +87,12 @@ public boolean apply(InetSocketAddress input) {
private static final String TABLE_PROPERTY_NAME = "bigtable.table";
private static final String CMEK_KMS_KEY_PROPERTY_NAME = "bigtable.kms_key_name";
+ private static final String TRACING_COOKIE_PROPERTY_NAME = "bigtable.tracing_cookie";
+
private final String projectId;
private final String instanceId;
private final String tableId;
+ private final String tracingCookie;
private final String kmsKeyName;
private final BigtableDataSettings.Builder dataSettings;
@@ -104,7 +110,8 @@ static CloudEnv fromSystemProperties() {
getOptionalProperty(CMEK_KMS_KEY_PROPERTY_NAME, ""),
getRequiredProperty(PROJECT_PROPERTY_NAME),
getRequiredProperty(INSTANCE_PROPERTY_NAME),
- getRequiredProperty(TABLE_PROPERTY_NAME));
+ getRequiredProperty(TABLE_PROPERTY_NAME),
+ getOptionalProperty(TRACING_COOKIE_PROPERTY_NAME));
}
private CloudEnv(
@@ -113,10 +120,12 @@ private CloudEnv(
@Nullable String kmsKeyName,
String projectId,
String instanceId,
- String tableId) {
+ String tableId,
+ @Nullable String tracingCookie) {
this.projectId = projectId;
this.instanceId = instanceId;
this.tableId = tableId;
+ this.tracingCookie = tracingCookie;
this.kmsKeyName = kmsKeyName;
this.dataSettings =
@@ -127,6 +136,9 @@ private CloudEnv(
setupRemoteAddrInterceptor(dataSettings.stubSettings());
configureUserAgent(dataSettings.stubSettings());
+ if (tracingCookie != null) {
+ injectTracingCookie(tracingCookie, dataSettings.stubSettings());
+ }
this.tableAdminSettings =
BigtableTableAdminSettings.newBuilder().setProjectId(projectId).setInstanceId(instanceId);
@@ -140,6 +152,18 @@ private CloudEnv(
}
}
+ private static void injectTracingCookie(
+ String tracingCookie, EnhancedBigtableStubSettings.Builder settings) {
+ HeaderProvider oldHeaderProvider = settings.getHeaderProvider();
+ settings.setHeaderProvider(
+ () ->
+ Optional.ofNullable(oldHeaderProvider)
+ .map(p -> ImmutableMap.builder().putAll(p.getHeaders()))
+ .orElse(ImmutableMap.builder())
+ .put("cookie", tracingCookie)
+ .build());
+ }
+
private void setupRemoteAddrInterceptor(StubSettings.Builder stubSettings) {
// Build an remote address restricting interceptor
final ClientInterceptor interceptor;
@@ -204,6 +228,7 @@ public ClientCall interceptCall(
return new SimpleForwardingClientCall(clientCall) {
@Override
public void start(Listener responseListener, Metadata headers) {
+ System.out.println(headers);
super.start(
new SimpleForwardingClientCallListener(responseListener) {
@Override
@@ -361,6 +386,11 @@ public String getKmsKeyName() {
return kmsKeyName;
}
+ @Nullable
+ private static String getOptionalProperty(String prop) {
+ return System.getProperty(prop);
+ }
+
private static String getOptionalProperty(String prop, String defaultValue) {
return MoreObjects.firstNonNull(System.getProperty(prop), defaultValue);
}
From ae89709514921f7f362b7bf6057ec2f01e50046d Mon Sep 17 00:00:00 2001
From: Lixia Chen
Date: Tue, 5 Mar 2024 11:04:23 -0500
Subject: [PATCH 09/11] feat: Add authorized view bindings to Cloud Bigtable
data APIs and messages (#2144)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* fix(deps): Update the Java code generator (gapic-generator-java) to 2.37.0
PiperOrigin-RevId: 611816371
Source-Link: https://github.com/googleapis/googleapis/commit/2a40f63ea714c7f4c6856a5db4d1f3cc7d4c4b18
Source-Link: https://github.com/googleapis/googleapis-gen/commit/d30ff0767777b381fb1617f67a90e3abd3bdc6dc
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZDMwZmYwNzY3Nzc3YjM4MWZiMTYxN2Y2N2E5MGUzYWJkM2JkYzZkYyJ9
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
* feat: Cloud Bigtable Authorized Views admin APIs protos
PiperOrigin-RevId: 612537460
Source-Link: https://github.com/googleapis/googleapis/commit/b98fe7ff808454e9d11a83946f40259ea9c6a63b
Source-Link: https://github.com/googleapis/googleapis-gen/commit/03d9b5c5517cf9123f120461180ebdd387a47bcc
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDNkOWI1YzU1MTdjZjkxMjNmMTIwNDYxMTgwZWJkZDM4N2E0N2JjYyJ9
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
* feat: Add authorized view bindings to Cloud Bigtable data APIs and messages
docs: The field `table_name` in message `.google.bigtable.v2.ReadRowsRequest` is changed from required to optional
docs: The field `table_name` in message `.google.bigtable.v2.SampleRowKeysRequest` is changed from required to optional
docs: The field `table_name` in message `.google.bigtable.v2.MutateRowRequest` is changed from required to optional
docs: The field `table_name` in message `.google.bigtable.v2.MutateRowsRequest` is changed from required to optional
docs: The field `table_name` in message `.google.bigtable.v2.CheckAndMutateRowRequest` is changed from required to optional
docs: The field `table_name` in message `.google.bigtable.v2.ReadModifyWriteRowRequest` is changed from required to optional
PiperOrigin-RevId: 612537984
Source-Link: https://github.com/googleapis/googleapis/commit/6465963c92930626473457717ff697aeb1bf4a12
Source-Link: https://github.com/googleapis/googleapis-gen/commit/f4a996071801f559bb6f4d0c99bb9a3c0ecf4844
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjRhOTk2MDcxODAxZjU1OWJiNmY0ZDBjOTliYjlhM2MwZWNmNDg0NCJ9
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
* Fix unit test broken by the new authorized views apis
Change-Id: I075e896a696d83c70f72337f2921d3285e408e1e
---------
Co-authored-by: Owl Bot
Co-authored-by: Lixia Chen
---
.../v2/BaseBigtableTableAdminClient.java | 850 ++++
.../v2/BaseBigtableTableAdminSettings.java | 100 +
.../admin/v2/BigtableTableAdminSettings.java | 11 +
.../bigtable/admin/v2/gapic_metadata.json | 15 +
.../BigtableInstanceAdminStubSettings.java | 13 -
.../admin/v2/stub/BigtableTableAdminStub.java | 50 +
.../stub/BigtableTableAdminStubSettings.java | 320 +-
.../v2/stub/GrpcBigtableTableAdminStub.java | 216 +
.../data/v2/stub/GrpcBigtableStub.java | 42 +
.../reflect-config.json | 207 +
.../v2/BaseBigtableTableAdminClientTest.java | 426 ++
.../v2/BigtableTableAdminSettingsTest.java | 7 +
.../admin/v2/MockBigtableTableAdminImpl.java | 113 +
.../admin/v2/BigtableTableAdminGrpc.java | 631 ++-
.../bigtable/admin/v2/AuthorizedView.java | 3788 +++++++++++++++++
.../bigtable/admin/v2/AuthorizedViewName.java | 269 ++
.../admin/v2/AuthorizedViewOrBuilder.java | 136 +
.../admin/v2/BigtableTableAdminProto.java | 446 +-
.../v2/CreateAuthorizedViewMetadata.java | 1259 ++++++
...CreateAuthorizedViewMetadataOrBuilder.java | 131 +
.../admin/v2/CreateAuthorizedViewRequest.java | 1165 +++++
.../CreateAuthorizedViewRequestOrBuilder.java | 131 +
.../admin/v2/DeleteAuthorizedViewRequest.java | 859 ++++
.../DeleteAuthorizedViewRequestOrBuilder.java | 90 +
.../admin/v2/GetAuthorizedViewRequest.java | 833 ++++
.../v2/GetAuthorizedViewRequestOrBuilder.java | 90 +
.../admin/v2/ListAuthorizedViewsRequest.java | 1140 +++++
.../ListAuthorizedViewsRequestOrBuilder.java | 136 +
.../admin/v2/ListAuthorizedViewsResponse.java | 1146 +++++
.../ListAuthorizedViewsResponseOrBuilder.java | 107 +
.../google/bigtable/admin/v2/TableProto.java | 204 +-
.../v2/UpdateAuthorizedViewMetadata.java | 1273 ++++++
...UpdateAuthorizedViewMetadataOrBuilder.java | 134 +
.../admin/v2/UpdateAuthorizedViewRequest.java | 1232 ++++++
.../UpdateAuthorizedViewRequestOrBuilder.java | 146 +
.../admin/v2/bigtable_table_admin.proto | 210 +
.../google/bigtable/admin/v2/table.proto | 73 +
.../bigtable/v2/AuthorizedViewName.java | 269 ++
.../com/google/bigtable/v2/BigtableProto.java | 454 +-
.../bigtable/v2/CheckAndMutateRowRequest.java | 352 +-
.../v2/CheckAndMutateRowRequestOrBuilder.java | 53 +-
.../google/bigtable/v2/MutateRowRequest.java | 316 +-
.../v2/MutateRowRequestOrBuilder.java | 53 +-
.../google/bigtable/v2/MutateRowsRequest.java | 301 +-
.../v2/MutateRowsRequestOrBuilder.java | 51 +-
.../v2/ReadModifyWriteRowRequest.java | 316 +-
.../ReadModifyWriteRowRequestOrBuilder.java | 53 +-
.../google/bigtable/v2/ReadRowsRequest.java | 324 +-
.../bigtable/v2/ReadRowsRequestOrBuilder.java | 45 +-
.../bigtable/v2/SampleRowKeysRequest.java | 269 +-
.../v2/SampleRowKeysRequestOrBuilder.java | 47 +-
.../proto/google/bigtable/v2/bigtable.proto | 163 +-
52 files changed, 20329 insertions(+), 736 deletions(-)
create mode 100644 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AuthorizedView.java
create mode 100644 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AuthorizedViewName.java
create mode 100644 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/AuthorizedViewOrBuilder.java
create mode 100644 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateAuthorizedViewMetadata.java
create mode 100644 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateAuthorizedViewMetadataOrBuilder.java
create mode 100644 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateAuthorizedViewRequest.java
create mode 100644 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/CreateAuthorizedViewRequestOrBuilder.java
create mode 100644 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteAuthorizedViewRequest.java
create mode 100644 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/DeleteAuthorizedViewRequestOrBuilder.java
create mode 100644 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetAuthorizedViewRequest.java
create mode 100644 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/GetAuthorizedViewRequestOrBuilder.java
create mode 100644 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAuthorizedViewsRequest.java
create mode 100644 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAuthorizedViewsRequestOrBuilder.java
create mode 100644 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAuthorizedViewsResponse.java
create mode 100644 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/ListAuthorizedViewsResponseOrBuilder.java
create mode 100644 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAuthorizedViewMetadata.java
create mode 100644 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAuthorizedViewMetadataOrBuilder.java
create mode 100644 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAuthorizedViewRequest.java
create mode 100644 proto-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/UpdateAuthorizedViewRequestOrBuilder.java
create mode 100644 proto-google-cloud-bigtable-v2/src/main/java/com/google/bigtable/v2/AuthorizedViewName.java
diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClient.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClient.java
index ff409bfa9c..799aebf58e 100644
--- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClient.java
+++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClient.java
@@ -28,6 +28,8 @@
import com.google.api.gax.rpc.PageContext;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.api.resourcenames.ResourceName;
+import com.google.bigtable.admin.v2.AuthorizedView;
+import com.google.bigtable.admin.v2.AuthorizedViewName;
import com.google.bigtable.admin.v2.Backup;
import com.google.bigtable.admin.v2.BackupName;
import com.google.bigtable.admin.v2.CheckConsistencyRequest;
@@ -35,21 +37,27 @@
import com.google.bigtable.admin.v2.ClusterName;
import com.google.bigtable.admin.v2.CopyBackupMetadata;
import com.google.bigtable.admin.v2.CopyBackupRequest;
+import com.google.bigtable.admin.v2.CreateAuthorizedViewMetadata;
+import com.google.bigtable.admin.v2.CreateAuthorizedViewRequest;
import com.google.bigtable.admin.v2.CreateBackupMetadata;
import com.google.bigtable.admin.v2.CreateBackupRequest;
import com.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata;
import com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest;
import com.google.bigtable.admin.v2.CreateTableRequest;
+import com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest;
import com.google.bigtable.admin.v2.DeleteBackupRequest;
import com.google.bigtable.admin.v2.DeleteSnapshotRequest;
import com.google.bigtable.admin.v2.DeleteTableRequest;
import com.google.bigtable.admin.v2.DropRowRangeRequest;
import com.google.bigtable.admin.v2.GenerateConsistencyTokenRequest;
import com.google.bigtable.admin.v2.GenerateConsistencyTokenResponse;
+import com.google.bigtable.admin.v2.GetAuthorizedViewRequest;
import com.google.bigtable.admin.v2.GetBackupRequest;
import com.google.bigtable.admin.v2.GetSnapshotRequest;
import com.google.bigtable.admin.v2.GetTableRequest;
import com.google.bigtable.admin.v2.InstanceName;
+import com.google.bigtable.admin.v2.ListAuthorizedViewsRequest;
+import com.google.bigtable.admin.v2.ListAuthorizedViewsResponse;
import com.google.bigtable.admin.v2.ListBackupsRequest;
import com.google.bigtable.admin.v2.ListBackupsResponse;
import com.google.bigtable.admin.v2.ListSnapshotsRequest;
@@ -67,6 +75,8 @@
import com.google.bigtable.admin.v2.TableName;
import com.google.bigtable.admin.v2.UndeleteTableMetadata;
import com.google.bigtable.admin.v2.UndeleteTableRequest;
+import com.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata;
+import com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest;
import com.google.bigtable.admin.v2.UpdateBackupRequest;
import com.google.bigtable.admin.v2.UpdateTableMetadata;
import com.google.bigtable.admin.v2.UpdateTableRequest;
@@ -1298,6 +1308,762 @@ public final UnaryCallable undeleteTableCallabl
return stub.undeleteTableCallable();
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new AuthorizedView in a table.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * TableName parent = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
+ * AuthorizedView authorizedView = AuthorizedView.newBuilder().build();
+ * String authorizedViewId = "authorizedViewId-2074136549";
+ * AuthorizedView response =
+ * baseBigtableTableAdminClient
+ * .createAuthorizedViewAsync(parent, authorizedView, authorizedViewId)
+ * .get();
+ * }
+ * }
+ *
+ * @param parent Required. This is the name of the table the AuthorizedView belongs to. Values are
+ * of the form `projects/{project}/instances/{instance}/tables/{table}`.
+ * @param authorizedView Required. The AuthorizedView to create.
+ * @param authorizedViewId Required. The id of the AuthorizedView to create. This AuthorizedView
+ * must not already exist. The `authorized_view_id` appended to `parent` forms the full
+ * AuthorizedView name of the form
+ * `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture
+ createAuthorizedViewAsync(
+ TableName parent, AuthorizedView authorizedView, String authorizedViewId) {
+ CreateAuthorizedViewRequest request =
+ CreateAuthorizedViewRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setAuthorizedView(authorizedView)
+ .setAuthorizedViewId(authorizedViewId)
+ .build();
+ return createAuthorizedViewAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new AuthorizedView in a table.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * String parent = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
+ * AuthorizedView authorizedView = AuthorizedView.newBuilder().build();
+ * String authorizedViewId = "authorizedViewId-2074136549";
+ * AuthorizedView response =
+ * baseBigtableTableAdminClient
+ * .createAuthorizedViewAsync(parent, authorizedView, authorizedViewId)
+ * .get();
+ * }
+ * }
+ *
+ * @param parent Required. This is the name of the table the AuthorizedView belongs to. Values are
+ * of the form `projects/{project}/instances/{instance}/tables/{table}`.
+ * @param authorizedView Required. The AuthorizedView to create.
+ * @param authorizedViewId Required. The id of the AuthorizedView to create. This AuthorizedView
+ * must not already exist. The `authorized_view_id` appended to `parent` forms the full
+ * AuthorizedView name of the form
+ * `projects/{project}/instances/{instance}/tables/{table}/authorizedView/{authorized_view}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture
+ createAuthorizedViewAsync(
+ String parent, AuthorizedView authorizedView, String authorizedViewId) {
+ CreateAuthorizedViewRequest request =
+ CreateAuthorizedViewRequest.newBuilder()
+ .setParent(parent)
+ .setAuthorizedView(authorizedView)
+ .setAuthorizedViewId(authorizedViewId)
+ .build();
+ return createAuthorizedViewAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new AuthorizedView in a table.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * CreateAuthorizedViewRequest request =
+ * CreateAuthorizedViewRequest.newBuilder()
+ * .setParent(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
+ * .setAuthorizedViewId("authorizedViewId-2074136549")
+ * .setAuthorizedView(AuthorizedView.newBuilder().build())
+ * .build();
+ * AuthorizedView response =
+ * baseBigtableTableAdminClient.createAuthorizedViewAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture
+ createAuthorizedViewAsync(CreateAuthorizedViewRequest request) {
+ return createAuthorizedViewOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new AuthorizedView in a table.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * CreateAuthorizedViewRequest request =
+ * CreateAuthorizedViewRequest.newBuilder()
+ * .setParent(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
+ * .setAuthorizedViewId("authorizedViewId-2074136549")
+ * .setAuthorizedView(AuthorizedView.newBuilder().build())
+ * .build();
+ * OperationFuture future =
+ * baseBigtableTableAdminClient.createAuthorizedViewOperationCallable().futureCall(request);
+ * // Do something.
+ * AuthorizedView response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ CreateAuthorizedViewRequest, AuthorizedView, CreateAuthorizedViewMetadata>
+ createAuthorizedViewOperationCallable() {
+ return stub.createAuthorizedViewOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new AuthorizedView in a table.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * CreateAuthorizedViewRequest request =
+ * CreateAuthorizedViewRequest.newBuilder()
+ * .setParent(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
+ * .setAuthorizedViewId("authorizedViewId-2074136549")
+ * .setAuthorizedView(AuthorizedView.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * baseBigtableTableAdminClient.createAuthorizedViewCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ createAuthorizedViewCallable() {
+ return stub.createAuthorizedViewCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all AuthorizedViews from a specific table.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * TableName parent = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
+ * for (AuthorizedView element :
+ * baseBigtableTableAdminClient.listAuthorizedViews(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The unique name of the table for which AuthorizedViews should be
+ * listed. Values are of the form `projects/{project}/instances/{instance}/tables/{table}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListAuthorizedViewsPagedResponse listAuthorizedViews(TableName parent) {
+ ListAuthorizedViewsRequest request =
+ ListAuthorizedViewsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listAuthorizedViews(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all AuthorizedViews from a specific table.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * String parent = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
+ * for (AuthorizedView element :
+ * baseBigtableTableAdminClient.listAuthorizedViews(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The unique name of the table for which AuthorizedViews should be
+ * listed. Values are of the form `projects/{project}/instances/{instance}/tables/{table}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListAuthorizedViewsPagedResponse listAuthorizedViews(String parent) {
+ ListAuthorizedViewsRequest request =
+ ListAuthorizedViewsRequest.newBuilder().setParent(parent).build();
+ return listAuthorizedViews(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all AuthorizedViews from a specific table.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * ListAuthorizedViewsRequest request =
+ * ListAuthorizedViewsRequest.newBuilder()
+ * .setParent(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (AuthorizedView element :
+ * baseBigtableTableAdminClient.listAuthorizedViews(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 ListAuthorizedViewsPagedResponse listAuthorizedViews(
+ ListAuthorizedViewsRequest request) {
+ return listAuthorizedViewsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all AuthorizedViews from a specific table.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * ListAuthorizedViewsRequest request =
+ * ListAuthorizedViewsRequest.newBuilder()
+ * .setParent(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * baseBigtableTableAdminClient.listAuthorizedViewsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (AuthorizedView element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listAuthorizedViewsPagedCallable() {
+ return stub.listAuthorizedViewsPagedCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists all AuthorizedViews from a specific table.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * ListAuthorizedViewsRequest request =
+ * ListAuthorizedViewsRequest.newBuilder()
+ * .setParent(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListAuthorizedViewsResponse response =
+ * baseBigtableTableAdminClient.listAuthorizedViewsCallable().call(request);
+ * for (AuthorizedView element : response.getAuthorizedViewsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable
+ listAuthorizedViewsCallable() {
+ return stub.listAuthorizedViewsCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information from a specified AuthorizedView.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * AuthorizedViewName name =
+ * AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]");
+ * AuthorizedView response = baseBigtableTableAdminClient.getAuthorizedView(name);
+ * }
+ * }
+ *
+ * @param name Required. The unique name of the requested AuthorizedView. Values are of the form
+ * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AuthorizedView getAuthorizedView(AuthorizedViewName name) {
+ GetAuthorizedViewRequest request =
+ GetAuthorizedViewRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getAuthorizedView(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information from a specified AuthorizedView.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * String name =
+ * AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]")
+ * .toString();
+ * AuthorizedView response = baseBigtableTableAdminClient.getAuthorizedView(name);
+ * }
+ * }
+ *
+ * @param name Required. The unique name of the requested AuthorizedView. Values are of the form
+ * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AuthorizedView getAuthorizedView(String name) {
+ GetAuthorizedViewRequest request = GetAuthorizedViewRequest.newBuilder().setName(name).build();
+ return getAuthorizedView(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information from a specified AuthorizedView.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * GetAuthorizedViewRequest request =
+ * GetAuthorizedViewRequest.newBuilder()
+ * .setName(
+ * AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]")
+ * .toString())
+ * .build();
+ * AuthorizedView response = baseBigtableTableAdminClient.getAuthorizedView(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 AuthorizedView getAuthorizedView(GetAuthorizedViewRequest request) {
+ return getAuthorizedViewCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information from a specified AuthorizedView.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * GetAuthorizedViewRequest request =
+ * GetAuthorizedViewRequest.newBuilder()
+ * .setName(
+ * AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * baseBigtableTableAdminClient.getAuthorizedViewCallable().futureCall(request);
+ * // Do something.
+ * AuthorizedView response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable getAuthorizedViewCallable() {
+ return stub.getAuthorizedViewCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates an AuthorizedView in a table.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * AuthorizedView authorizedView = AuthorizedView.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * AuthorizedView response =
+ * baseBigtableTableAdminClient.updateAuthorizedViewAsync(authorizedView, updateMask).get();
+ * }
+ * }
+ *
+ * @param authorizedView Required. The AuthorizedView to update. The `name` in `authorized_view`
+ * is used to identify the AuthorizedView. AuthorizedView name must in this format
+ * projects/<project>/instances/<instance>/tables/<table>/authorizedViews/<authorized_view>
+ * @param updateMask Optional. The list of fields to update. A mask specifying which fields in the
+ * AuthorizedView resource should be updated. This mask is relative to the AuthorizedView
+ * resource, not to the request message. A field will be overwritten if it is in the mask. If
+ * empty, all fields set in the request will be overwritten. A special value `*` means to
+ * overwrite all fields (including fields not set in the request).
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture
+ updateAuthorizedViewAsync(AuthorizedView authorizedView, FieldMask updateMask) {
+ UpdateAuthorizedViewRequest request =
+ UpdateAuthorizedViewRequest.newBuilder()
+ .setAuthorizedView(authorizedView)
+ .setUpdateMask(updateMask)
+ .build();
+ return updateAuthorizedViewAsync(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates an AuthorizedView in a table.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * UpdateAuthorizedViewRequest request =
+ * UpdateAuthorizedViewRequest.newBuilder()
+ * .setAuthorizedView(AuthorizedView.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setIgnoreWarnings(true)
+ * .build();
+ * AuthorizedView response =
+ * baseBigtableTableAdminClient.updateAuthorizedViewAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture
+ updateAuthorizedViewAsync(UpdateAuthorizedViewRequest request) {
+ return updateAuthorizedViewOperationCallable().futureCall(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates an AuthorizedView in a table.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * UpdateAuthorizedViewRequest request =
+ * UpdateAuthorizedViewRequest.newBuilder()
+ * .setAuthorizedView(AuthorizedView.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setIgnoreWarnings(true)
+ * .build();
+ * OperationFuture future =
+ * baseBigtableTableAdminClient.updateAuthorizedViewOperationCallable().futureCall(request);
+ * // Do something.
+ * AuthorizedView response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallable<
+ UpdateAuthorizedViewRequest, AuthorizedView, UpdateAuthorizedViewMetadata>
+ updateAuthorizedViewOperationCallable() {
+ return stub.updateAuthorizedViewOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates an AuthorizedView in a table.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * UpdateAuthorizedViewRequest request =
+ * UpdateAuthorizedViewRequest.newBuilder()
+ * .setAuthorizedView(AuthorizedView.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setIgnoreWarnings(true)
+ * .build();
+ * ApiFuture future =
+ * baseBigtableTableAdminClient.updateAuthorizedViewCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable
+ updateAuthorizedViewCallable() {
+ return stub.updateAuthorizedViewCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Permanently deletes a specified AuthorizedView.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * AuthorizedViewName name =
+ * AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]");
+ * baseBigtableTableAdminClient.deleteAuthorizedView(name);
+ * }
+ * }
+ *
+ * @param name Required. The unique name of the AuthorizedView to be deleted. Values are of the
+ * form
+ * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteAuthorizedView(AuthorizedViewName name) {
+ DeleteAuthorizedViewRequest request =
+ DeleteAuthorizedViewRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ deleteAuthorizedView(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Permanently deletes a specified AuthorizedView.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * String name =
+ * AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]")
+ * .toString();
+ * baseBigtableTableAdminClient.deleteAuthorizedView(name);
+ * }
+ * }
+ *
+ * @param name Required. The unique name of the AuthorizedView to be deleted. Values are of the
+ * form
+ * `projects/{project}/instances/{instance}/tables/{table}/authorizedViews/{authorized_view}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteAuthorizedView(String name) {
+ DeleteAuthorizedViewRequest request =
+ DeleteAuthorizedViewRequest.newBuilder().setName(name).build();
+ deleteAuthorizedView(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Permanently deletes a specified AuthorizedView.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * DeleteAuthorizedViewRequest request =
+ * DeleteAuthorizedViewRequest.newBuilder()
+ * .setName(
+ * AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]")
+ * .toString())
+ * .setEtag("etag3123477")
+ * .build();
+ * baseBigtableTableAdminClient.deleteAuthorizedView(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteAuthorizedView(DeleteAuthorizedViewRequest request) {
+ deleteAuthorizedViewCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Permanently deletes a specified AuthorizedView.
+ *
+ * Sample code:
+ *
+ *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
+ * BaseBigtableTableAdminClient.create()) {
+ * DeleteAuthorizedViewRequest request =
+ * DeleteAuthorizedViewRequest.newBuilder()
+ * .setName(
+ * AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]")
+ * .toString())
+ * .setEtag("etag3123477")
+ * .build();
+ * ApiFuture future =
+ * baseBigtableTableAdminClient.deleteAuthorizedViewCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable deleteAuthorizedViewCallable() {
+ return stub.deleteAuthorizedViewCallable();
+ }
+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Performs a series of column family modifications on the specified table. Either all or none of
@@ -4239,6 +5005,90 @@ protected ListTablesFixedSizeCollection createCollection(
}
}
+ public static class ListAuthorizedViewsPagedResponse
+ extends AbstractPagedListResponse<
+ ListAuthorizedViewsRequest,
+ ListAuthorizedViewsResponse,
+ AuthorizedView,
+ ListAuthorizedViewsPage,
+ ListAuthorizedViewsFixedSizeCollection> {
+
+ public static ApiFuture createAsync(
+ PageContext
+ context,
+ ApiFuture futureResponse) {
+ ApiFuture futurePage =
+ ListAuthorizedViewsPage.createEmptyPage().createPageAsync(context, futureResponse);
+ return ApiFutures.transform(
+ futurePage,
+ input -> new ListAuthorizedViewsPagedResponse(input),
+ MoreExecutors.directExecutor());
+ }
+
+ private ListAuthorizedViewsPagedResponse(ListAuthorizedViewsPage page) {
+ super(page, ListAuthorizedViewsFixedSizeCollection.createEmptyCollection());
+ }
+ }
+
+ public static class ListAuthorizedViewsPage
+ extends AbstractPage<
+ ListAuthorizedViewsRequest,
+ ListAuthorizedViewsResponse,
+ AuthorizedView,
+ ListAuthorizedViewsPage> {
+
+ private ListAuthorizedViewsPage(
+ PageContext
+ context,
+ ListAuthorizedViewsResponse response) {
+ super(context, response);
+ }
+
+ private static ListAuthorizedViewsPage createEmptyPage() {
+ return new ListAuthorizedViewsPage(null, null);
+ }
+
+ @Override
+ protected ListAuthorizedViewsPage createPage(
+ PageContext
+ context,
+ ListAuthorizedViewsResponse response) {
+ return new ListAuthorizedViewsPage(context, response);
+ }
+
+ @Override
+ public ApiFuture createPageAsync(
+ PageContext
+ context,
+ ApiFuture futureResponse) {
+ return super.createPageAsync(context, futureResponse);
+ }
+ }
+
+ public static class ListAuthorizedViewsFixedSizeCollection
+ extends AbstractFixedSizeCollection<
+ ListAuthorizedViewsRequest,
+ ListAuthorizedViewsResponse,
+ AuthorizedView,
+ ListAuthorizedViewsPage,
+ ListAuthorizedViewsFixedSizeCollection> {
+
+ private ListAuthorizedViewsFixedSizeCollection(
+ List pages, int collectionSize) {
+ super(pages, collectionSize);
+ }
+
+ private static ListAuthorizedViewsFixedSizeCollection createEmptyCollection() {
+ return new ListAuthorizedViewsFixedSizeCollection(null, 0);
+ }
+
+ @Override
+ protected ListAuthorizedViewsFixedSizeCollection createCollection(
+ List pages, int collectionSize) {
+ return new ListAuthorizedViewsFixedSizeCollection(pages, collectionSize);
+ }
+ }
+
public static class ListSnapshotsPagedResponse
extends AbstractPagedListResponse<
ListSnapshotsRequest,
diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminSettings.java
index 97d92cbc2d..35494a28f7 100644
--- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminSettings.java
+++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminSettings.java
@@ -16,6 +16,7 @@
package com.google.cloud.bigtable.admin.v2;
+import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListAuthorizedViewsPagedResponse;
import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListBackupsPagedResponse;
import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListSnapshotsPagedResponse;
import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListTablesPagedResponse;
@@ -32,25 +33,32 @@
import com.google.api.gax.rpc.PagedCallSettings;
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.bigtable.admin.v2.AuthorizedView;
import com.google.bigtable.admin.v2.Backup;
import com.google.bigtable.admin.v2.CheckConsistencyRequest;
import com.google.bigtable.admin.v2.CheckConsistencyResponse;
import com.google.bigtable.admin.v2.CopyBackupMetadata;
import com.google.bigtable.admin.v2.CopyBackupRequest;
+import com.google.bigtable.admin.v2.CreateAuthorizedViewMetadata;
+import com.google.bigtable.admin.v2.CreateAuthorizedViewRequest;
import com.google.bigtable.admin.v2.CreateBackupMetadata;
import com.google.bigtable.admin.v2.CreateBackupRequest;
import com.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata;
import com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest;
import com.google.bigtable.admin.v2.CreateTableRequest;
+import com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest;
import com.google.bigtable.admin.v2.DeleteBackupRequest;
import com.google.bigtable.admin.v2.DeleteSnapshotRequest;
import com.google.bigtable.admin.v2.DeleteTableRequest;
import com.google.bigtable.admin.v2.DropRowRangeRequest;
import com.google.bigtable.admin.v2.GenerateConsistencyTokenRequest;
import com.google.bigtable.admin.v2.GenerateConsistencyTokenResponse;
+import com.google.bigtable.admin.v2.GetAuthorizedViewRequest;
import com.google.bigtable.admin.v2.GetBackupRequest;
import com.google.bigtable.admin.v2.GetSnapshotRequest;
import com.google.bigtable.admin.v2.GetTableRequest;
+import com.google.bigtable.admin.v2.ListAuthorizedViewsRequest;
+import com.google.bigtable.admin.v2.ListAuthorizedViewsResponse;
import com.google.bigtable.admin.v2.ListBackupsRequest;
import com.google.bigtable.admin.v2.ListBackupsResponse;
import com.google.bigtable.admin.v2.ListSnapshotsRequest;
@@ -66,6 +74,8 @@
import com.google.bigtable.admin.v2.Table;
import com.google.bigtable.admin.v2.UndeleteTableMetadata;
import com.google.bigtable.admin.v2.UndeleteTableRequest;
+import com.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata;
+import com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest;
import com.google.bigtable.admin.v2.UpdateBackupRequest;
import com.google.bigtable.admin.v2.UpdateTableMetadata;
import com.google.bigtable.admin.v2.UpdateTableRequest;
@@ -144,6 +154,49 @@ public UnaryCallSettings undeleteTableSettings(
return ((BigtableTableAdminStubSettings) getStubSettings()).undeleteTableOperationSettings();
}
+ /** Returns the object with the settings used for calls to createAuthorizedView. */
+ public UnaryCallSettings createAuthorizedViewSettings() {
+ return ((BigtableTableAdminStubSettings) getStubSettings()).createAuthorizedViewSettings();
+ }
+
+ /** Returns the object with the settings used for calls to createAuthorizedView. */
+ public OperationCallSettings<
+ CreateAuthorizedViewRequest, AuthorizedView, CreateAuthorizedViewMetadata>
+ createAuthorizedViewOperationSettings() {
+ return ((BigtableTableAdminStubSettings) getStubSettings())
+ .createAuthorizedViewOperationSettings();
+ }
+
+ /** Returns the object with the settings used for calls to listAuthorizedViews. */
+ public PagedCallSettings<
+ ListAuthorizedViewsRequest, ListAuthorizedViewsResponse, ListAuthorizedViewsPagedResponse>
+ listAuthorizedViewsSettings() {
+ return ((BigtableTableAdminStubSettings) getStubSettings()).listAuthorizedViewsSettings();
+ }
+
+ /** Returns the object with the settings used for calls to getAuthorizedView. */
+ public UnaryCallSettings getAuthorizedViewSettings() {
+ return ((BigtableTableAdminStubSettings) getStubSettings()).getAuthorizedViewSettings();
+ }
+
+ /** Returns the object with the settings used for calls to updateAuthorizedView. */
+ public UnaryCallSettings updateAuthorizedViewSettings() {
+ return ((BigtableTableAdminStubSettings) getStubSettings()).updateAuthorizedViewSettings();
+ }
+
+ /** Returns the object with the settings used for calls to updateAuthorizedView. */
+ public OperationCallSettings<
+ UpdateAuthorizedViewRequest, AuthorizedView, UpdateAuthorizedViewMetadata>
+ updateAuthorizedViewOperationSettings() {
+ return ((BigtableTableAdminStubSettings) getStubSettings())
+ .updateAuthorizedViewOperationSettings();
+ }
+
+ /** Returns the object with the settings used for calls to deleteAuthorizedView. */
+ public UnaryCallSettings deleteAuthorizedViewSettings() {
+ return ((BigtableTableAdminStubSettings) getStubSettings()).deleteAuthorizedViewSettings();
+ }
+
/** Returns the object with the settings used for calls to modifyColumnFamilies. */
public UnaryCallSettings modifyColumnFamiliesSettings() {
return ((BigtableTableAdminStubSettings) getStubSettings()).modifyColumnFamiliesSettings();
@@ -416,6 +469,53 @@ public UnaryCallSettings.Builder undeleteTableS
return getStubSettingsBuilder().undeleteTableOperationSettings();
}
+ /** Returns the builder for the settings used for calls to createAuthorizedView. */
+ public UnaryCallSettings.Builder
+ createAuthorizedViewSettings() {
+ return getStubSettingsBuilder().createAuthorizedViewSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to createAuthorizedView. */
+ public OperationCallSettings.Builder<
+ CreateAuthorizedViewRequest, AuthorizedView, CreateAuthorizedViewMetadata>
+ createAuthorizedViewOperationSettings() {
+ return getStubSettingsBuilder().createAuthorizedViewOperationSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to listAuthorizedViews. */
+ public PagedCallSettings.Builder<
+ ListAuthorizedViewsRequest,
+ ListAuthorizedViewsResponse,
+ ListAuthorizedViewsPagedResponse>
+ listAuthorizedViewsSettings() {
+ return getStubSettingsBuilder().listAuthorizedViewsSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to getAuthorizedView. */
+ public UnaryCallSettings.Builder
+ getAuthorizedViewSettings() {
+ return getStubSettingsBuilder().getAuthorizedViewSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to updateAuthorizedView. */
+ public UnaryCallSettings.Builder
+ updateAuthorizedViewSettings() {
+ return getStubSettingsBuilder().updateAuthorizedViewSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to updateAuthorizedView. */
+ public OperationCallSettings.Builder<
+ UpdateAuthorizedViewRequest, AuthorizedView, UpdateAuthorizedViewMetadata>
+ updateAuthorizedViewOperationSettings() {
+ return getStubSettingsBuilder().updateAuthorizedViewOperationSettings();
+ }
+
+ /** Returns the builder for the settings used for calls to deleteAuthorizedView. */
+ public UnaryCallSettings.Builder
+ deleteAuthorizedViewSettings() {
+ return getStubSettingsBuilder().deleteAuthorizedViewSettings();
+ }
+
/** Returns the builder for the settings used for calls to modifyColumnFamilies. */
public UnaryCallSettings.Builder
modifyColumnFamiliesSettings() {
diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettings.java
index d6630fd887..9da3e9af17 100644
--- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettings.java
+++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettings.java
@@ -128,6 +128,17 @@ public String toString() {
.add("updateTableOperationSettings", stubSettings.updateTableOperationSettings())
.add("copyBackupSettings", stubSettings.copyBackupSettings())
.add("copyBackupOperationSettings", stubSettings.copyBackupOperationSettings())
+ .add("createAuthorizedViewSettings", stubSettings.createAuthorizedViewSettings())
+ .add(
+ "createAuthorizedViewOperationSettings",
+ stubSettings.createAuthorizedViewOperationSettings())
+ .add("updateAuthorizedViewSettings", stubSettings.updateAuthorizedViewSettings())
+ .add(
+ "updateAuthorizedViewOperationSettings",
+ stubSettings.updateAuthorizedViewOperationSettings())
+ .add("deleteAuthorizedViewSettings", stubSettings.deleteAuthorizedViewSettings())
+ .add("listAuthorizedViewsSettings", stubSettings.listAuthorizedViewsSettings())
+ .add("getAuthorizedViewSettings", stubSettings.getAuthorizedViewSettings())
.toString();
}
diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/gapic_metadata.json b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/gapic_metadata.json
index aca81585e0..796badc1bb 100644
--- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/gapic_metadata.json
+++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/gapic_metadata.json
@@ -88,6 +88,9 @@
"CopyBackup": {
"methods": ["copyBackupAsync", "copyBackupAsync", "copyBackupAsync", "copyBackupAsync", "copyBackupAsync", "copyBackupOperationCallable", "copyBackupCallable"]
},
+ "CreateAuthorizedView": {
+ "methods": ["createAuthorizedViewAsync", "createAuthorizedViewAsync", "createAuthorizedViewAsync", "createAuthorizedViewOperationCallable", "createAuthorizedViewCallable"]
+ },
"CreateBackup": {
"methods": ["createBackupAsync", "createBackupAsync", "createBackupAsync", "createBackupOperationCallable", "createBackupCallable"]
},
@@ -97,6 +100,9 @@
"CreateTableFromSnapshot": {
"methods": ["createTableFromSnapshotAsync", "createTableFromSnapshotAsync", "createTableFromSnapshotAsync", "createTableFromSnapshotAsync", "createTableFromSnapshotAsync", "createTableFromSnapshotOperationCallable", "createTableFromSnapshotCallable"]
},
+ "DeleteAuthorizedView": {
+ "methods": ["deleteAuthorizedView", "deleteAuthorizedView", "deleteAuthorizedView", "deleteAuthorizedViewCallable"]
+ },
"DeleteBackup": {
"methods": ["deleteBackup", "deleteBackup", "deleteBackup", "deleteBackupCallable"]
},
@@ -112,6 +118,9 @@
"GenerateConsistencyToken": {
"methods": ["generateConsistencyToken", "generateConsistencyToken", "generateConsistencyToken", "generateConsistencyTokenCallable"]
},
+ "GetAuthorizedView": {
+ "methods": ["getAuthorizedView", "getAuthorizedView", "getAuthorizedView", "getAuthorizedViewCallable"]
+ },
"GetBackup": {
"methods": ["getBackup", "getBackup", "getBackup", "getBackupCallable"]
},
@@ -124,6 +133,9 @@
"GetTable": {
"methods": ["getTable", "getTable", "getTable", "getTableCallable"]
},
+ "ListAuthorizedViews": {
+ "methods": ["listAuthorizedViews", "listAuthorizedViews", "listAuthorizedViews", "listAuthorizedViewsPagedCallable", "listAuthorizedViewsCallable"]
+ },
"ListBackups": {
"methods": ["listBackups", "listBackups", "listBackups", "listBackupsPagedCallable", "listBackupsCallable"]
},
@@ -151,6 +163,9 @@
"UndeleteTable": {
"methods": ["undeleteTableAsync", "undeleteTableAsync", "undeleteTableAsync", "undeleteTableOperationCallable", "undeleteTableCallable"]
},
+ "UpdateAuthorizedView": {
+ "methods": ["updateAuthorizedViewAsync", "updateAuthorizedViewAsync", "updateAuthorizedViewOperationCallable", "updateAuthorizedViewCallable"]
+ },
"UpdateBackup": {
"methods": ["updateBackup", "updateBackup", "updateBackupCallable"]
},
diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStubSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStubSettings.java
index dc34cead80..d3d14011d2 100644
--- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStubSettings.java
+++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStubSettings.java
@@ -21,7 +21,6 @@
import com.google.api.core.ApiFunction;
import com.google.api.core.ApiFuture;
-import com.google.api.core.BetaApi;
import com.google.api.gax.core.GaxProperties;
import com.google.api.gax.core.GoogleCredentialsProvider;
import com.google.api.gax.core.InstantiatingExecutorProvider;
@@ -1081,8 +1080,6 @@ public UnaryCallSettings.Builder createInstanc
}
/** Returns the builder for the settings used for calls to createInstance. */
- @BetaApi(
- "The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallSettings.Builder
createInstanceOperationSettings() {
return createInstanceOperationSettings;
@@ -1111,8 +1108,6 @@ public UnaryCallSettings.Builder updateInstanceSettings() {
}
/** Returns the builder for the settings used for calls to partialUpdateInstance. */
- @BetaApi(
- "The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallSettings.Builder<
PartialUpdateInstanceRequest, Instance, UpdateInstanceMetadata>
partialUpdateInstanceOperationSettings() {
@@ -1130,8 +1125,6 @@ public UnaryCallSettings.Builder createClusterS
}
/** Returns the builder for the settings used for calls to createCluster. */
- @BetaApi(
- "The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallSettings.Builder
createClusterOperationSettings() {
return createClusterOperationSettings;
@@ -1154,8 +1147,6 @@ public UnaryCallSettings.Builder updateClusterSettings() {
}
/** Returns the builder for the settings used for calls to updateCluster. */
- @BetaApi(
- "The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallSettings.Builder
updateClusterOperationSettings() {
return updateClusterOperationSettings;
@@ -1168,8 +1159,6 @@ public UnaryCallSettings.Builder updateClusterSettings() {
}
/** Returns the builder for the settings used for calls to partialUpdateCluster. */
- @BetaApi(
- "The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallSettings.Builder<
PartialUpdateClusterRequest, Cluster, PartialUpdateClusterMetadata>
partialUpdateClusterOperationSettings() {
@@ -1206,8 +1195,6 @@ public UnaryCallSettings.Builder getAppProfile
}
/** Returns the builder for the settings used for calls to updateAppProfile. */
- @BetaApi(
- "The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallSettings.Builder<
UpdateAppProfileRequest, AppProfile, UpdateAppProfileMetadata>
updateAppProfileOperationSettings() {
diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStub.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStub.java
index 2bc5da6eda..df3bf12094 100644
--- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStub.java
+++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStub.java
@@ -16,6 +16,7 @@
package com.google.cloud.bigtable.admin.v2.stub;
+import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListAuthorizedViewsPagedResponse;
import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListBackupsPagedResponse;
import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListSnapshotsPagedResponse;
import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListTablesPagedResponse;
@@ -24,25 +25,32 @@
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.UnaryCallable;
+import com.google.bigtable.admin.v2.AuthorizedView;
import com.google.bigtable.admin.v2.Backup;
import com.google.bigtable.admin.v2.CheckConsistencyRequest;
import com.google.bigtable.admin.v2.CheckConsistencyResponse;
import com.google.bigtable.admin.v2.CopyBackupMetadata;
import com.google.bigtable.admin.v2.CopyBackupRequest;
+import com.google.bigtable.admin.v2.CreateAuthorizedViewMetadata;
+import com.google.bigtable.admin.v2.CreateAuthorizedViewRequest;
import com.google.bigtable.admin.v2.CreateBackupMetadata;
import com.google.bigtable.admin.v2.CreateBackupRequest;
import com.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata;
import com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest;
import com.google.bigtable.admin.v2.CreateTableRequest;
+import com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest;
import com.google.bigtable.admin.v2.DeleteBackupRequest;
import com.google.bigtable.admin.v2.DeleteSnapshotRequest;
import com.google.bigtable.admin.v2.DeleteTableRequest;
import com.google.bigtable.admin.v2.DropRowRangeRequest;
import com.google.bigtable.admin.v2.GenerateConsistencyTokenRequest;
import com.google.bigtable.admin.v2.GenerateConsistencyTokenResponse;
+import com.google.bigtable.admin.v2.GetAuthorizedViewRequest;
import com.google.bigtable.admin.v2.GetBackupRequest;
import com.google.bigtable.admin.v2.GetSnapshotRequest;
import com.google.bigtable.admin.v2.GetTableRequest;
+import com.google.bigtable.admin.v2.ListAuthorizedViewsRequest;
+import com.google.bigtable.admin.v2.ListAuthorizedViewsResponse;
import com.google.bigtable.admin.v2.ListBackupsRequest;
import com.google.bigtable.admin.v2.ListBackupsResponse;
import com.google.bigtable.admin.v2.ListSnapshotsRequest;
@@ -58,6 +66,8 @@
import com.google.bigtable.admin.v2.Table;
import com.google.bigtable.admin.v2.UndeleteTableMetadata;
import com.google.bigtable.admin.v2.UndeleteTableRequest;
+import com.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata;
+import com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest;
import com.google.bigtable.admin.v2.UpdateBackupRequest;
import com.google.bigtable.admin.v2.UpdateTableMetadata;
import com.google.bigtable.admin.v2.UpdateTableRequest;
@@ -130,6 +140,46 @@ public UnaryCallable undeleteTableCallable() {
throw new UnsupportedOperationException("Not implemented: undeleteTableCallable()");
}
+ public OperationCallable<
+ CreateAuthorizedViewRequest, AuthorizedView, CreateAuthorizedViewMetadata>
+ createAuthorizedViewOperationCallable() {
+ throw new UnsupportedOperationException(
+ "Not implemented: createAuthorizedViewOperationCallable()");
+ }
+
+ public UnaryCallable createAuthorizedViewCallable() {
+ throw new UnsupportedOperationException("Not implemented: createAuthorizedViewCallable()");
+ }
+
+ public UnaryCallable
+ listAuthorizedViewsPagedCallable() {
+ throw new UnsupportedOperationException("Not implemented: listAuthorizedViewsPagedCallable()");
+ }
+
+ public UnaryCallable
+ listAuthorizedViewsCallable() {
+ throw new UnsupportedOperationException("Not implemented: listAuthorizedViewsCallable()");
+ }
+
+ public UnaryCallable getAuthorizedViewCallable() {
+ throw new UnsupportedOperationException("Not implemented: getAuthorizedViewCallable()");
+ }
+
+ public OperationCallable<
+ UpdateAuthorizedViewRequest, AuthorizedView, UpdateAuthorizedViewMetadata>
+ updateAuthorizedViewOperationCallable() {
+ throw new UnsupportedOperationException(
+ "Not implemented: updateAuthorizedViewOperationCallable()");
+ }
+
+ public UnaryCallable updateAuthorizedViewCallable() {
+ throw new UnsupportedOperationException("Not implemented: updateAuthorizedViewCallable()");
+ }
+
+ public UnaryCallable deleteAuthorizedViewCallable() {
+ throw new UnsupportedOperationException("Not implemented: deleteAuthorizedViewCallable()");
+ }
+
public UnaryCallable modifyColumnFamiliesCallable() {
throw new UnsupportedOperationException("Not implemented: modifyColumnFamiliesCallable()");
}
diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStubSettings.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStubSettings.java
index 043ee375b9..ef42a77ed8 100644
--- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStubSettings.java
+++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStubSettings.java
@@ -16,13 +16,13 @@
package com.google.cloud.bigtable.admin.v2.stub;
+import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListAuthorizedViewsPagedResponse;
import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListBackupsPagedResponse;
import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListSnapshotsPagedResponse;
import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListTablesPagedResponse;
import com.google.api.core.ApiFunction;
import com.google.api.core.ApiFuture;
-import com.google.api.core.BetaApi;
import com.google.api.gax.core.GaxProperties;
import com.google.api.gax.core.GoogleCredentialsProvider;
import com.google.api.gax.core.InstantiatingExecutorProvider;
@@ -46,25 +46,32 @@
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.api.gax.rpc.UnaryCallable;
+import com.google.bigtable.admin.v2.AuthorizedView;
import com.google.bigtable.admin.v2.Backup;
import com.google.bigtable.admin.v2.CheckConsistencyRequest;
import com.google.bigtable.admin.v2.CheckConsistencyResponse;
import com.google.bigtable.admin.v2.CopyBackupMetadata;
import com.google.bigtable.admin.v2.CopyBackupRequest;
+import com.google.bigtable.admin.v2.CreateAuthorizedViewMetadata;
+import com.google.bigtable.admin.v2.CreateAuthorizedViewRequest;
import com.google.bigtable.admin.v2.CreateBackupMetadata;
import com.google.bigtable.admin.v2.CreateBackupRequest;
import com.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata;
import com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest;
import com.google.bigtable.admin.v2.CreateTableRequest;
+import com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest;
import com.google.bigtable.admin.v2.DeleteBackupRequest;
import com.google.bigtable.admin.v2.DeleteSnapshotRequest;
import com.google.bigtable.admin.v2.DeleteTableRequest;
import com.google.bigtable.admin.v2.DropRowRangeRequest;
import com.google.bigtable.admin.v2.GenerateConsistencyTokenRequest;
import com.google.bigtable.admin.v2.GenerateConsistencyTokenResponse;
+import com.google.bigtable.admin.v2.GetAuthorizedViewRequest;
import com.google.bigtable.admin.v2.GetBackupRequest;
import com.google.bigtable.admin.v2.GetSnapshotRequest;
import com.google.bigtable.admin.v2.GetTableRequest;
+import com.google.bigtable.admin.v2.ListAuthorizedViewsRequest;
+import com.google.bigtable.admin.v2.ListAuthorizedViewsResponse;
import com.google.bigtable.admin.v2.ListBackupsRequest;
import com.google.bigtable.admin.v2.ListBackupsResponse;
import com.google.bigtable.admin.v2.ListSnapshotsRequest;
@@ -80,6 +87,8 @@
import com.google.bigtable.admin.v2.Table;
import com.google.bigtable.admin.v2.UndeleteTableMetadata;
import com.google.bigtable.admin.v2.UndeleteTableRequest;
+import com.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata;
+import com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest;
import com.google.bigtable.admin.v2.UpdateBackupRequest;
import com.google.bigtable.admin.v2.UpdateTableMetadata;
import com.google.bigtable.admin.v2.UpdateTableRequest;
@@ -166,6 +175,22 @@ public class BigtableTableAdminStubSettings extends StubSettings undeleteTableSettings;
private final OperationCallSettings
undeleteTableOperationSettings;
+ private final UnaryCallSettings
+ createAuthorizedViewSettings;
+ private final OperationCallSettings<
+ CreateAuthorizedViewRequest, AuthorizedView, CreateAuthorizedViewMetadata>
+ createAuthorizedViewOperationSettings;
+ private final PagedCallSettings<
+ ListAuthorizedViewsRequest, ListAuthorizedViewsResponse, ListAuthorizedViewsPagedResponse>
+ listAuthorizedViewsSettings;
+ private final UnaryCallSettings
+ getAuthorizedViewSettings;
+ private final UnaryCallSettings
+ updateAuthorizedViewSettings;
+ private final OperationCallSettings<
+ UpdateAuthorizedViewRequest, AuthorizedView, UpdateAuthorizedViewMetadata>
+ updateAuthorizedViewOperationSettings;
+ private final UnaryCallSettings deleteAuthorizedViewSettings;
private final UnaryCallSettings modifyColumnFamiliesSettings;
private final UnaryCallSettings dropRowRangeSettings;
private final UnaryCallSettings
@@ -235,6 +260,46 @@ public Iterable extractResources(ListTablesResponse payload) {
}
};
+ private static final PagedListDescriptor<
+ ListAuthorizedViewsRequest, ListAuthorizedViewsResponse, AuthorizedView>
+ LIST_AUTHORIZED_VIEWS_PAGE_STR_DESC =
+ new PagedListDescriptor<
+ ListAuthorizedViewsRequest, ListAuthorizedViewsResponse, AuthorizedView>() {
+ @Override
+ public String emptyToken() {
+ return "";
+ }
+
+ @Override
+ public ListAuthorizedViewsRequest injectToken(
+ ListAuthorizedViewsRequest payload, String token) {
+ return ListAuthorizedViewsRequest.newBuilder(payload).setPageToken(token).build();
+ }
+
+ @Override
+ public ListAuthorizedViewsRequest injectPageSize(
+ ListAuthorizedViewsRequest payload, int pageSize) {
+ return ListAuthorizedViewsRequest.newBuilder(payload).setPageSize(pageSize).build();
+ }
+
+ @Override
+ public Integer extractPageSize(ListAuthorizedViewsRequest payload) {
+ return payload.getPageSize();
+ }
+
+ @Override
+ public String extractNextToken(ListAuthorizedViewsResponse payload) {
+ return payload.getNextPageToken();
+ }
+
+ @Override
+ public Iterable extractResources(ListAuthorizedViewsResponse payload) {
+ return payload.getAuthorizedViewsList() == null
+ ? ImmutableList.of()
+ : payload.getAuthorizedViewsList();
+ }
+ };
+
private static final PagedListDescriptor
LIST_SNAPSHOTS_PAGE_STR_DESC =
new PagedListDescriptor() {
@@ -324,6 +389,27 @@ public ApiFuture getFuturePagedResponse(
}
};
+ private static final PagedListResponseFactory<
+ ListAuthorizedViewsRequest, ListAuthorizedViewsResponse, ListAuthorizedViewsPagedResponse>
+ LIST_AUTHORIZED_VIEWS_PAGE_STR_FACT =
+ new PagedListResponseFactory<
+ ListAuthorizedViewsRequest,
+ ListAuthorizedViewsResponse,
+ ListAuthorizedViewsPagedResponse>() {
+ @Override
+ public ApiFuture getFuturePagedResponse(
+ UnaryCallable callable,
+ ListAuthorizedViewsRequest request,
+ ApiCallContext context,
+ ApiFuture futureResponse) {
+ PageContext
+ pageContext =
+ PageContext.create(
+ callable, LIST_AUTHORIZED_VIEWS_PAGE_STR_DESC, request, context);
+ return ListAuthorizedViewsPagedResponse.createAsync(pageContext, futureResponse);
+ }
+ };
+
private static final PagedListResponseFactory<
ListSnapshotsRequest, ListSnapshotsResponse, ListSnapshotsPagedResponse>
LIST_SNAPSHOTS_PAGE_STR_FACT =
@@ -414,6 +500,47 @@ public UnaryCallSettings undeleteTableSettings(
return undeleteTableOperationSettings;
}
+ /** Returns the object with the settings used for calls to createAuthorizedView. */
+ public UnaryCallSettings createAuthorizedViewSettings() {
+ return createAuthorizedViewSettings;
+ }
+
+ /** Returns the object with the settings used for calls to createAuthorizedView. */
+ public OperationCallSettings<
+ CreateAuthorizedViewRequest, AuthorizedView, CreateAuthorizedViewMetadata>
+ createAuthorizedViewOperationSettings() {
+ return createAuthorizedViewOperationSettings;
+ }
+
+ /** Returns the object with the settings used for calls to listAuthorizedViews. */
+ public PagedCallSettings<
+ ListAuthorizedViewsRequest, ListAuthorizedViewsResponse, ListAuthorizedViewsPagedResponse>
+ listAuthorizedViewsSettings() {
+ return listAuthorizedViewsSettings;
+ }
+
+ /** Returns the object with the settings used for calls to getAuthorizedView. */
+ public UnaryCallSettings getAuthorizedViewSettings() {
+ return getAuthorizedViewSettings;
+ }
+
+ /** Returns the object with the settings used for calls to updateAuthorizedView. */
+ public UnaryCallSettings updateAuthorizedViewSettings() {
+ return updateAuthorizedViewSettings;
+ }
+
+ /** Returns the object with the settings used for calls to updateAuthorizedView. */
+ public OperationCallSettings<
+ UpdateAuthorizedViewRequest, AuthorizedView, UpdateAuthorizedViewMetadata>
+ updateAuthorizedViewOperationSettings() {
+ return updateAuthorizedViewOperationSettings;
+ }
+
+ /** Returns the object with the settings used for calls to deleteAuthorizedView. */
+ public UnaryCallSettings deleteAuthorizedViewSettings() {
+ return deleteAuthorizedViewSettings;
+ }
+
/** Returns the object with the settings used for calls to modifyColumnFamilies. */
public UnaryCallSettings modifyColumnFamiliesSettings() {
return modifyColumnFamiliesSettings;
@@ -633,6 +760,15 @@ protected BigtableTableAdminStubSettings(Builder settingsBuilder) throws IOExcep
deleteTableSettings = settingsBuilder.deleteTableSettings().build();
undeleteTableSettings = settingsBuilder.undeleteTableSettings().build();
undeleteTableOperationSettings = settingsBuilder.undeleteTableOperationSettings().build();
+ createAuthorizedViewSettings = settingsBuilder.createAuthorizedViewSettings().build();
+ createAuthorizedViewOperationSettings =
+ settingsBuilder.createAuthorizedViewOperationSettings().build();
+ listAuthorizedViewsSettings = settingsBuilder.listAuthorizedViewsSettings().build();
+ getAuthorizedViewSettings = settingsBuilder.getAuthorizedViewSettings().build();
+ updateAuthorizedViewSettings = settingsBuilder.updateAuthorizedViewSettings().build();
+ updateAuthorizedViewOperationSettings =
+ settingsBuilder.updateAuthorizedViewOperationSettings().build();
+ deleteAuthorizedViewSettings = settingsBuilder.deleteAuthorizedViewSettings().build();
modifyColumnFamiliesSettings = settingsBuilder.modifyColumnFamiliesSettings().build();
dropRowRangeSettings = settingsBuilder.dropRowRangeSettings().build();
generateConsistencyTokenSettings = settingsBuilder.generateConsistencyTokenSettings().build();
@@ -678,6 +814,25 @@ public static class Builder
private final UnaryCallSettings.Builder undeleteTableSettings;
private final OperationCallSettings.Builder
undeleteTableOperationSettings;
+ private final UnaryCallSettings.Builder
+ createAuthorizedViewSettings;
+ private final OperationCallSettings.Builder<
+ CreateAuthorizedViewRequest, AuthorizedView, CreateAuthorizedViewMetadata>
+ createAuthorizedViewOperationSettings;
+ private final PagedCallSettings.Builder<
+ ListAuthorizedViewsRequest,
+ ListAuthorizedViewsResponse,
+ ListAuthorizedViewsPagedResponse>
+ listAuthorizedViewsSettings;
+ private final UnaryCallSettings.Builder
+ getAuthorizedViewSettings;
+ private final UnaryCallSettings.Builder
+ updateAuthorizedViewSettings;
+ private final OperationCallSettings.Builder<
+ UpdateAuthorizedViewRequest, AuthorizedView, UpdateAuthorizedViewMetadata>
+ updateAuthorizedViewOperationSettings;
+ private final UnaryCallSettings.Builder
+ deleteAuthorizedViewSettings;
private final UnaryCallSettings.Builder
modifyColumnFamiliesSettings;
private final UnaryCallSettings.Builder dropRowRangeSettings;
@@ -797,6 +952,14 @@ protected Builder(ClientContext clientContext) {
deleteTableSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
undeleteTableSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
undeleteTableOperationSettings = OperationCallSettings.newBuilder();
+ createAuthorizedViewSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ createAuthorizedViewOperationSettings = OperationCallSettings.newBuilder();
+ listAuthorizedViewsSettings =
+ PagedCallSettings.newBuilder(LIST_AUTHORIZED_VIEWS_PAGE_STR_FACT);
+ getAuthorizedViewSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ updateAuthorizedViewSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+ updateAuthorizedViewOperationSettings = OperationCallSettings.newBuilder();
+ deleteAuthorizedViewSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
modifyColumnFamiliesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
dropRowRangeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
generateConsistencyTokenSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
@@ -829,6 +992,11 @@ protected Builder(ClientContext clientContext) {
updateTableSettings,
deleteTableSettings,
undeleteTableSettings,
+ createAuthorizedViewSettings,
+ listAuthorizedViewsSettings,
+ getAuthorizedViewSettings,
+ updateAuthorizedViewSettings,
+ deleteAuthorizedViewSettings,
modifyColumnFamiliesSettings,
dropRowRangeSettings,
generateConsistencyTokenSettings,
@@ -864,6 +1032,15 @@ protected Builder(BigtableTableAdminStubSettings settings) {
deleteTableSettings = settings.deleteTableSettings.toBuilder();
undeleteTableSettings = settings.undeleteTableSettings.toBuilder();
undeleteTableOperationSettings = settings.undeleteTableOperationSettings.toBuilder();
+ createAuthorizedViewSettings = settings.createAuthorizedViewSettings.toBuilder();
+ createAuthorizedViewOperationSettings =
+ settings.createAuthorizedViewOperationSettings.toBuilder();
+ listAuthorizedViewsSettings = settings.listAuthorizedViewsSettings.toBuilder();
+ getAuthorizedViewSettings = settings.getAuthorizedViewSettings.toBuilder();
+ updateAuthorizedViewSettings = settings.updateAuthorizedViewSettings.toBuilder();
+ updateAuthorizedViewOperationSettings =
+ settings.updateAuthorizedViewOperationSettings.toBuilder();
+ deleteAuthorizedViewSettings = settings.deleteAuthorizedViewSettings.toBuilder();
modifyColumnFamiliesSettings = settings.modifyColumnFamiliesSettings.toBuilder();
dropRowRangeSettings = settings.dropRowRangeSettings.toBuilder();
generateConsistencyTokenSettings = settings.generateConsistencyTokenSettings.toBuilder();
@@ -896,6 +1073,11 @@ protected Builder(BigtableTableAdminStubSettings settings) {
updateTableSettings,
deleteTableSettings,
undeleteTableSettings,
+ createAuthorizedViewSettings,
+ listAuthorizedViewsSettings,
+ getAuthorizedViewSettings,
+ updateAuthorizedViewSettings,
+ deleteAuthorizedViewSettings,
modifyColumnFamiliesSettings,
dropRowRangeSettings,
generateConsistencyTokenSettings,
@@ -964,6 +1146,31 @@ private static Builder initDefaults(Builder builder) {
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+ builder
+ .createAuthorizedViewSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .listAuthorizedViewsSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .getAuthorizedViewSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .updateAuthorizedViewSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
+ builder
+ .deleteAuthorizedViewSettings()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"));
+
builder
.modifyColumnFamiliesSettings()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes"))
@@ -1126,6 +1333,56 @@ private static Builder initDefaults(Builder builder) {
.setTotalTimeout(Duration.ofMillis(300000L))
.build()));
+ builder
+ .createAuthorizedViewOperationSettings()
+ .setInitialCallSettings(
+ UnaryCallSettings
+ .newUnaryCallSettingsBuilder()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"))
+ .build())
+ .setResponseTransformer(
+ ProtoOperationTransformers.ResponseTransformer.create(AuthorizedView.class))
+ .setMetadataTransformer(
+ ProtoOperationTransformers.MetadataTransformer.create(
+ CreateAuthorizedViewMetadata.class))
+ .setPollingAlgorithm(
+ OperationTimedPollAlgorithm.create(
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(5000L))
+ .setRetryDelayMultiplier(1.5)
+ .setMaxRetryDelay(Duration.ofMillis(45000L))
+ .setInitialRpcTimeout(Duration.ZERO)
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ZERO)
+ .setTotalTimeout(Duration.ofMillis(300000L))
+ .build()));
+
+ builder
+ .updateAuthorizedViewOperationSettings()
+ .setInitialCallSettings(
+ UnaryCallSettings
+ .newUnaryCallSettingsBuilder()
+ .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
+ .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"))
+ .build())
+ .setResponseTransformer(
+ ProtoOperationTransformers.ResponseTransformer.create(AuthorizedView.class))
+ .setMetadataTransformer(
+ ProtoOperationTransformers.MetadataTransformer.create(
+ UpdateAuthorizedViewMetadata.class))
+ .setPollingAlgorithm(
+ OperationTimedPollAlgorithm.create(
+ RetrySettings.newBuilder()
+ .setInitialRetryDelay(Duration.ofMillis(5000L))
+ .setRetryDelayMultiplier(1.5)
+ .setMaxRetryDelay(Duration.ofMillis(45000L))
+ .setInitialRpcTimeout(Duration.ZERO)
+ .setRpcTimeoutMultiplier(1.0)
+ .setMaxRpcTimeout(Duration.ZERO)
+ .setTotalTimeout(Duration.ofMillis(300000L))
+ .build()));
+
builder
.snapshotTableOperationSettings()
.setInitialCallSettings(
@@ -1251,8 +1508,6 @@ public UnaryCallSettings.Builder createTableSettings(
}
/** Returns the builder for the settings used for calls to createTableFromSnapshot. */
- @BetaApi(
- "The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallSettings.Builder<
CreateTableFromSnapshotRequest, Table, CreateTableFromSnapshotMetadata>
createTableFromSnapshotOperationSettings() {
@@ -1276,8 +1531,6 @@ public UnaryCallSettings.Builder updateTableSetti
}
/** Returns the builder for the settings used for calls to updateTable. */
- @BetaApi(
- "The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallSettings.Builder
updateTableOperationSettings() {
return updateTableOperationSettings;
@@ -1294,13 +1547,58 @@ public UnaryCallSettings.Builder undeleteTableS
}
/** Returns the builder for the settings used for calls to undeleteTable. */
- @BetaApi(
- "The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallSettings.Builder
undeleteTableOperationSettings() {
return undeleteTableOperationSettings;
}
+ /** Returns the builder for the settings used for calls to createAuthorizedView. */
+ public UnaryCallSettings.Builder
+ createAuthorizedViewSettings() {
+ return createAuthorizedViewSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to createAuthorizedView. */
+ public OperationCallSettings.Builder<
+ CreateAuthorizedViewRequest, AuthorizedView, CreateAuthorizedViewMetadata>
+ createAuthorizedViewOperationSettings() {
+ return createAuthorizedViewOperationSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to listAuthorizedViews. */
+ public PagedCallSettings.Builder<
+ ListAuthorizedViewsRequest,
+ ListAuthorizedViewsResponse,
+ ListAuthorizedViewsPagedResponse>
+ listAuthorizedViewsSettings() {
+ return listAuthorizedViewsSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to getAuthorizedView. */
+ public UnaryCallSettings.Builder
+ getAuthorizedViewSettings() {
+ return getAuthorizedViewSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to updateAuthorizedView. */
+ public UnaryCallSettings.Builder
+ updateAuthorizedViewSettings() {
+ return updateAuthorizedViewSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to updateAuthorizedView. */
+ public OperationCallSettings.Builder<
+ UpdateAuthorizedViewRequest, AuthorizedView, UpdateAuthorizedViewMetadata>
+ updateAuthorizedViewOperationSettings() {
+ return updateAuthorizedViewOperationSettings;
+ }
+
+ /** Returns the builder for the settings used for calls to deleteAuthorizedView. */
+ public UnaryCallSettings.Builder
+ deleteAuthorizedViewSettings() {
+ return deleteAuthorizedViewSettings;
+ }
+
/** Returns the builder for the settings used for calls to modifyColumnFamilies. */
public UnaryCallSettings.Builder
modifyColumnFamiliesSettings() {
@@ -1331,8 +1629,6 @@ public UnaryCallSettings.Builder snapshotTableS
}
/** Returns the builder for the settings used for calls to snapshotTable. */
- @BetaApi(
- "The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallSettings.Builder
snapshotTableOperationSettings() {
return snapshotTableOperationSettings;
@@ -1361,8 +1657,6 @@ public UnaryCallSettings.Builder createBackupSet
}
/** Returns the builder for the settings used for calls to createBackup. */
- @BetaApi(
- "The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallSettings.Builder
createBackupOperationSettings() {
return createBackupOperationSettings;
@@ -1396,8 +1690,6 @@ public UnaryCallSettings.Builder restoreTableSet
}
/** Returns the builder for the settings used for calls to restoreTable. */
- @BetaApi(
- "The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallSettings.Builder
restoreTableOperationSettings() {
return restoreTableOperationSettings;
@@ -1409,8 +1701,6 @@ public UnaryCallSettings.Builder copyBackupSetting
}
/** Returns the builder for the settings used for calls to copyBackup. */
- @BetaApi(
- "The surface for use by generated code is not stable yet and may change in the future.")
public OperationCallSettings.Builder
copyBackupOperationSettings() {
return copyBackupOperationSettings;
diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableTableAdminStub.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableTableAdminStub.java
index cca28bbd7b..82319941ee 100644
--- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableTableAdminStub.java
+++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableTableAdminStub.java
@@ -16,6 +16,7 @@
package com.google.cloud.bigtable.admin.v2.stub;
+import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListAuthorizedViewsPagedResponse;
import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListBackupsPagedResponse;
import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListSnapshotsPagedResponse;
import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListTablesPagedResponse;
@@ -29,25 +30,32 @@
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.RequestParamsBuilder;
import com.google.api.gax.rpc.UnaryCallable;
+import com.google.bigtable.admin.v2.AuthorizedView;
import com.google.bigtable.admin.v2.Backup;
import com.google.bigtable.admin.v2.CheckConsistencyRequest;
import com.google.bigtable.admin.v2.CheckConsistencyResponse;
import com.google.bigtable.admin.v2.CopyBackupMetadata;
import com.google.bigtable.admin.v2.CopyBackupRequest;
+import com.google.bigtable.admin.v2.CreateAuthorizedViewMetadata;
+import com.google.bigtable.admin.v2.CreateAuthorizedViewRequest;
import com.google.bigtable.admin.v2.CreateBackupMetadata;
import com.google.bigtable.admin.v2.CreateBackupRequest;
import com.google.bigtable.admin.v2.CreateTableFromSnapshotMetadata;
import com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest;
import com.google.bigtable.admin.v2.CreateTableRequest;
+import com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest;
import com.google.bigtable.admin.v2.DeleteBackupRequest;
import com.google.bigtable.admin.v2.DeleteSnapshotRequest;
import com.google.bigtable.admin.v2.DeleteTableRequest;
import com.google.bigtable.admin.v2.DropRowRangeRequest;
import com.google.bigtable.admin.v2.GenerateConsistencyTokenRequest;
import com.google.bigtable.admin.v2.GenerateConsistencyTokenResponse;
+import com.google.bigtable.admin.v2.GetAuthorizedViewRequest;
import com.google.bigtable.admin.v2.GetBackupRequest;
import com.google.bigtable.admin.v2.GetSnapshotRequest;
import com.google.bigtable.admin.v2.GetTableRequest;
+import com.google.bigtable.admin.v2.ListAuthorizedViewsRequest;
+import com.google.bigtable.admin.v2.ListAuthorizedViewsResponse;
import com.google.bigtable.admin.v2.ListBackupsRequest;
import com.google.bigtable.admin.v2.ListBackupsResponse;
import com.google.bigtable.admin.v2.ListSnapshotsRequest;
@@ -63,6 +71,8 @@
import com.google.bigtable.admin.v2.Table;
import com.google.bigtable.admin.v2.UndeleteTableMetadata;
import com.google.bigtable.admin.v2.UndeleteTableRequest;
+import com.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata;
+import com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest;
import com.google.bigtable.admin.v2.UpdateBackupRequest;
import com.google.bigtable.admin.v2.UpdateTableMetadata;
import com.google.bigtable.admin.v2.UpdateTableRequest;
@@ -147,6 +157,57 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub {
.setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
.build();
+ private static final MethodDescriptor
+ createAuthorizedViewMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.bigtable.admin.v2.BigtableTableAdmin/CreateAuthorizedView")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(CreateAuthorizedViewRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ listAuthorizedViewsMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.bigtable.admin.v2.BigtableTableAdmin/ListAuthorizedViews")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(ListAuthorizedViewsRequest.getDefaultInstance()))
+ .setResponseMarshaller(
+ ProtoUtils.marshaller(ListAuthorizedViewsResponse.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ getAuthorizedViewMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.bigtable.admin.v2.BigtableTableAdmin/GetAuthorizedView")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(GetAuthorizedViewRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(AuthorizedView.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ updateAuthorizedViewMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.bigtable.admin.v2.BigtableTableAdmin/UpdateAuthorizedView")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(UpdateAuthorizedViewRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+ .build();
+
+ private static final MethodDescriptor
+ deleteAuthorizedViewMethodDescriptor =
+ MethodDescriptor.newBuilder()
+ .setType(MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName("google.bigtable.admin.v2.BigtableTableAdmin/DeleteAuthorizedView")
+ .setRequestMarshaller(
+ ProtoUtils.marshaller(DeleteAuthorizedViewRequest.getDefaultInstance()))
+ .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance()))
+ .build();
+
private static final MethodDescriptor
modifyColumnFamiliesMethodDescriptor =
MethodDescriptor.newBuilder()
@@ -332,6 +393,20 @@ public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub {
private final UnaryCallable undeleteTableCallable;
private final OperationCallable
undeleteTableOperationCallable;
+ private final UnaryCallable createAuthorizedViewCallable;
+ private final OperationCallable<
+ CreateAuthorizedViewRequest, AuthorizedView, CreateAuthorizedViewMetadata>
+ createAuthorizedViewOperationCallable;
+ private final UnaryCallable
+ listAuthorizedViewsCallable;
+ private final UnaryCallable
+ listAuthorizedViewsPagedCallable;
+ private final UnaryCallable getAuthorizedViewCallable;
+ private final UnaryCallable updateAuthorizedViewCallable;
+ private final OperationCallable<
+ UpdateAuthorizedViewRequest, AuthorizedView, UpdateAuthorizedViewMetadata>
+ updateAuthorizedViewOperationCallable;
+ private final UnaryCallable deleteAuthorizedViewCallable;
private final UnaryCallable modifyColumnFamiliesCallable;
private final UnaryCallable dropRowRangeCallable;
private final UnaryCallable
@@ -481,6 +556,59 @@ protected GrpcBigtableTableAdminStub(
return builder.build();
})
.build();
+ GrpcCallSettings createAuthorizedViewTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(createAuthorizedViewMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("parent", String.valueOf(request.getParent()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings
+ listAuthorizedViewsTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(listAuthorizedViewsMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("parent", String.valueOf(request.getParent()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings getAuthorizedViewTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(getAuthorizedViewMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("name", String.valueOf(request.getName()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings updateAuthorizedViewTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(updateAuthorizedViewMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add(
+ "authorized_view.name",
+ String.valueOf(request.getAuthorizedView().getName()));
+ return builder.build();
+ })
+ .build();
+ GrpcCallSettings deleteAuthorizedViewTransportSettings =
+ GrpcCallSettings.newBuilder()
+ .setMethodDescriptor(deleteAuthorizedViewMethodDescriptor)
+ .setParamsExtractor(
+ request -> {
+ RequestParamsBuilder builder = RequestParamsBuilder.create();
+ builder.add("name", String.valueOf(request.getName()));
+ return builder.build();
+ })
+ .build();
GrpcCallSettings modifyColumnFamiliesTransportSettings =
GrpcCallSettings.newBuilder()
.setMethodDescriptor(modifyColumnFamiliesMethodDescriptor)
@@ -710,6 +838,48 @@ protected GrpcBigtableTableAdminStub(
settings.undeleteTableOperationSettings(),
clientContext,
operationsStub);
+ this.createAuthorizedViewCallable =
+ callableFactory.createUnaryCallable(
+ createAuthorizedViewTransportSettings,
+ settings.createAuthorizedViewSettings(),
+ clientContext);
+ this.createAuthorizedViewOperationCallable =
+ callableFactory.createOperationCallable(
+ createAuthorizedViewTransportSettings,
+ settings.createAuthorizedViewOperationSettings(),
+ clientContext,
+ operationsStub);
+ this.listAuthorizedViewsCallable =
+ callableFactory.createUnaryCallable(
+ listAuthorizedViewsTransportSettings,
+ settings.listAuthorizedViewsSettings(),
+ clientContext);
+ this.listAuthorizedViewsPagedCallable =
+ callableFactory.createPagedCallable(
+ listAuthorizedViewsTransportSettings,
+ settings.listAuthorizedViewsSettings(),
+ clientContext);
+ this.getAuthorizedViewCallable =
+ callableFactory.createUnaryCallable(
+ getAuthorizedViewTransportSettings,
+ settings.getAuthorizedViewSettings(),
+ clientContext);
+ this.updateAuthorizedViewCallable =
+ callableFactory.createUnaryCallable(
+ updateAuthorizedViewTransportSettings,
+ settings.updateAuthorizedViewSettings(),
+ clientContext);
+ this.updateAuthorizedViewOperationCallable =
+ callableFactory.createOperationCallable(
+ updateAuthorizedViewTransportSettings,
+ settings.updateAuthorizedViewOperationSettings(),
+ clientContext,
+ operationsStub);
+ this.deleteAuthorizedViewCallable =
+ callableFactory.createUnaryCallable(
+ deleteAuthorizedViewTransportSettings,
+ settings.deleteAuthorizedViewSettings(),
+ clientContext);
this.modifyColumnFamiliesCallable =
callableFactory.createUnaryCallable(
modifyColumnFamiliesTransportSettings,
@@ -868,6 +1038,52 @@ public UnaryCallable undeleteTableCallable() {
return undeleteTableOperationCallable;
}
+ @Override
+ public UnaryCallable createAuthorizedViewCallable() {
+ return createAuthorizedViewCallable;
+ }
+
+ @Override
+ public OperationCallable<
+ CreateAuthorizedViewRequest, AuthorizedView, CreateAuthorizedViewMetadata>
+ createAuthorizedViewOperationCallable() {
+ return createAuthorizedViewOperationCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ listAuthorizedViewsCallable() {
+ return listAuthorizedViewsCallable;
+ }
+
+ @Override
+ public UnaryCallable
+ listAuthorizedViewsPagedCallable() {
+ return listAuthorizedViewsPagedCallable;
+ }
+
+ @Override
+ public UnaryCallable getAuthorizedViewCallable() {
+ return getAuthorizedViewCallable;
+ }
+
+ @Override
+ public UnaryCallable updateAuthorizedViewCallable() {
+ return updateAuthorizedViewCallable;
+ }
+
+ @Override
+ public OperationCallable<
+ UpdateAuthorizedViewRequest, AuthorizedView, UpdateAuthorizedViewMetadata>
+ updateAuthorizedViewOperationCallable() {
+ return updateAuthorizedViewOperationCallable;
+ }
+
+ @Override
+ public UnaryCallable deleteAuthorizedViewCallable() {
+ return deleteAuthorizedViewCallable;
+ }
+
@Override
public UnaryCallable modifyColumnFamiliesCallable() {
return modifyColumnFamiliesCallable;
diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/GrpcBigtableStub.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/GrpcBigtableStub.java
index 3c57d05fd0..60f611e636 100644
--- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/GrpcBigtableStub.java
+++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/GrpcBigtableStub.java
@@ -181,22 +181,37 @@ public class GrpcBigtableStub extends BigtableStub {
PathTemplate.create("{table_name=projects/*/instances/*/tables/*}");
private static final PathTemplate READ_ROWS_1_PATH_TEMPLATE =
PathTemplate.create("{app_profile_id=**}");
+ private static final PathTemplate READ_ROWS_2_PATH_TEMPLATE =
+ PathTemplate.create(
+ "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}");
private static final PathTemplate SAMPLE_ROW_KEYS_0_PATH_TEMPLATE =
PathTemplate.create("{table_name=projects/*/instances/*/tables/*}");
private static final PathTemplate SAMPLE_ROW_KEYS_1_PATH_TEMPLATE =
PathTemplate.create("{app_profile_id=**}");
+ private static final PathTemplate SAMPLE_ROW_KEYS_2_PATH_TEMPLATE =
+ PathTemplate.create(
+ "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}");
private static final PathTemplate MUTATE_ROW_0_PATH_TEMPLATE =
PathTemplate.create("{table_name=projects/*/instances/*/tables/*}");
private static final PathTemplate MUTATE_ROW_1_PATH_TEMPLATE =
PathTemplate.create("{app_profile_id=**}");
+ private static final PathTemplate MUTATE_ROW_2_PATH_TEMPLATE =
+ PathTemplate.create(
+ "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}");
private static final PathTemplate MUTATE_ROWS_0_PATH_TEMPLATE =
PathTemplate.create("{table_name=projects/*/instances/*/tables/*}");
private static final PathTemplate MUTATE_ROWS_1_PATH_TEMPLATE =
PathTemplate.create("{app_profile_id=**}");
+ private static final PathTemplate MUTATE_ROWS_2_PATH_TEMPLATE =
+ PathTemplate.create(
+ "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}");
private static final PathTemplate CHECK_AND_MUTATE_ROW_0_PATH_TEMPLATE =
PathTemplate.create("{table_name=projects/*/instances/*/tables/*}");
private static final PathTemplate CHECK_AND_MUTATE_ROW_1_PATH_TEMPLATE =
PathTemplate.create("{app_profile_id=**}");
+ private static final PathTemplate CHECK_AND_MUTATE_ROW_2_PATH_TEMPLATE =
+ PathTemplate.create(
+ "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}");
private static final PathTemplate PING_AND_WARM_0_PATH_TEMPLATE =
PathTemplate.create("{name=projects/*/instances/*}");
private static final PathTemplate PING_AND_WARM_1_PATH_TEMPLATE =
@@ -205,6 +220,9 @@ public class GrpcBigtableStub extends BigtableStub {
PathTemplate.create("{table_name=projects/*/instances/*/tables/*}");
private static final PathTemplate READ_MODIFY_WRITE_ROW_1_PATH_TEMPLATE =
PathTemplate.create("{app_profile_id=**}");
+ private static final PathTemplate READ_MODIFY_WRITE_ROW_2_PATH_TEMPLATE =
+ PathTemplate.create(
+ "{authorized_view_name=projects/*/instances/*/tables/*/authorizedViews/*}");
public static final GrpcBigtableStub create(BigtableStubSettings settings) throws IOException {
return new GrpcBigtableStub(settings, ClientContext.create(settings));
@@ -250,6 +268,10 @@ protected GrpcBigtableStub(
builder.add(request.getTableName(), "table_name", READ_ROWS_0_PATH_TEMPLATE);
builder.add(
request.getAppProfileId(), "app_profile_id", READ_ROWS_1_PATH_TEMPLATE);
+ builder.add(
+ request.getAuthorizedViewName(),
+ "authorized_view_name",
+ READ_ROWS_2_PATH_TEMPLATE);
return builder.build();
})
.build();
@@ -263,6 +285,10 @@ protected GrpcBigtableStub(
request.getTableName(), "table_name", SAMPLE_ROW_KEYS_0_PATH_TEMPLATE);
builder.add(
request.getAppProfileId(), "app_profile_id", SAMPLE_ROW_KEYS_1_PATH_TEMPLATE);
+ builder.add(
+ request.getAuthorizedViewName(),
+ "authorized_view_name",
+ SAMPLE_ROW_KEYS_2_PATH_TEMPLATE);
return builder.build();
})
.build();
@@ -275,6 +301,10 @@ protected GrpcBigtableStub(
builder.add(request.getTableName(), "table_name", MUTATE_ROW_0_PATH_TEMPLATE);
builder.add(
request.getAppProfileId(), "app_profile_id", MUTATE_ROW_1_PATH_TEMPLATE);
+ builder.add(
+ request.getAuthorizedViewName(),
+ "authorized_view_name",
+ MUTATE_ROW_2_PATH_TEMPLATE);
return builder.build();
})
.build();
@@ -287,6 +317,10 @@ protected GrpcBigtableStub(
builder.add(request.getTableName(), "table_name", MUTATE_ROWS_0_PATH_TEMPLATE);
builder.add(
request.getAppProfileId(), "app_profile_id", MUTATE_ROWS_1_PATH_TEMPLATE);
+ builder.add(
+ request.getAuthorizedViewName(),
+ "authorized_view_name",
+ MUTATE_ROWS_2_PATH_TEMPLATE);
return builder.build();
})
.build();
@@ -305,6 +339,10 @@ protected GrpcBigtableStub(
request.getAppProfileId(),
"app_profile_id",
CHECK_AND_MUTATE_ROW_1_PATH_TEMPLATE);
+ builder.add(
+ request.getAuthorizedViewName(),
+ "authorized_view_name",
+ CHECK_AND_MUTATE_ROW_2_PATH_TEMPLATE);
return builder.build();
})
.build();
@@ -335,6 +373,10 @@ protected GrpcBigtableStub(
request.getAppProfileId(),
"app_profile_id",
READ_MODIFY_WRITE_ROW_1_PATH_TEMPLATE);
+ builder.add(
+ request.getAuthorizedViewName(),
+ "authorized_view_name",
+ READ_MODIFY_WRITE_ROW_2_PATH_TEMPLATE);
return builder.build();
})
.build();
diff --git a/google-cloud-bigtable/src/main/resources/META-INF/native-image/com.google.cloud.bigtable.admin.v2/reflect-config.json b/google-cloud-bigtable/src/main/resources/META-INF/native-image/com.google.cloud.bigtable.admin.v2/reflect-config.json
index 7a72cb06c3..74f45e0f33 100644
--- a/google-cloud-bigtable/src/main/resources/META-INF/native-image/com.google.cloud.bigtable.admin.v2/reflect-config.json
+++ b/google-cloud-bigtable/src/main/resources/META-INF/native-image/com.google.cloud.bigtable.admin.v2/reflect-config.json
@@ -458,6 +458,69 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
+ {
+ "name": "com.google.bigtable.admin.v2.AuthorizedView",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.bigtable.admin.v2.AuthorizedView$Builder",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.bigtable.admin.v2.AuthorizedView$FamilySubsets",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.bigtable.admin.v2.AuthorizedView$FamilySubsets$Builder",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.bigtable.admin.v2.AuthorizedView$ResponseView",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.bigtable.admin.v2.AuthorizedView$SubsetView",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.bigtable.admin.v2.AuthorizedView$SubsetView$Builder",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
{
"name": "com.google.bigtable.admin.v2.AutoscalingLimits",
"queryAllDeclaredConstructors": true,
@@ -746,6 +809,42 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
+ {
+ "name": "com.google.bigtable.admin.v2.CreateAuthorizedViewMetadata",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.bigtable.admin.v2.CreateAuthorizedViewMetadata$Builder",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.bigtable.admin.v2.CreateAuthorizedViewRequest",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.bigtable.admin.v2.CreateAuthorizedViewRequest$Builder",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
{
"name": "com.google.bigtable.admin.v2.CreateBackupMetadata",
"queryAllDeclaredConstructors": true,
@@ -971,6 +1070,24 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
+ {
+ "name": "com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest$Builder",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
{
"name": "com.google.bigtable.admin.v2.DeleteBackupRequest",
"queryAllDeclaredConstructors": true,
@@ -1214,6 +1331,24 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
+ {
+ "name": "com.google.bigtable.admin.v2.GetAuthorizedViewRequest",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.bigtable.admin.v2.GetAuthorizedViewRequest$Builder",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
{
"name": "com.google.bigtable.admin.v2.GetBackupRequest",
"queryAllDeclaredConstructors": true,
@@ -1394,6 +1529,42 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
+ {
+ "name": "com.google.bigtable.admin.v2.ListAuthorizedViewsRequest",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.bigtable.admin.v2.ListAuthorizedViewsRequest$Builder",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.bigtable.admin.v2.ListAuthorizedViewsResponse",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.bigtable.admin.v2.ListAuthorizedViewsResponse$Builder",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
{
"name": "com.google.bigtable.admin.v2.ListBackupsRequest",
"queryAllDeclaredConstructors": true,
@@ -2006,6 +2177,42 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
+ {
+ "name": "com.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.bigtable.admin.v2.UpdateAuthorizedViewMetadata$Builder",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest$Builder",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
{
"name": "com.google.bigtable.admin.v2.UpdateBackupRequest",
"queryAllDeclaredConstructors": true,
diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClientTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClientTest.java
index cdbac53200..44e2f63211 100644
--- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClientTest.java
+++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminClientTest.java
@@ -16,6 +16,7 @@
package com.google.cloud.bigtable.admin.v2;
+import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListAuthorizedViewsPagedResponse;
import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListBackupsPagedResponse;
import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListSnapshotsPagedResponse;
import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListTablesPagedResponse;
@@ -29,6 +30,8 @@
import com.google.api.gax.rpc.InvalidArgumentException;
import com.google.api.gax.rpc.StatusCode;
import com.google.api.resourcenames.ResourceName;
+import com.google.bigtable.admin.v2.AuthorizedView;
+import com.google.bigtable.admin.v2.AuthorizedViewName;
import com.google.bigtable.admin.v2.Backup;
import com.google.bigtable.admin.v2.BackupName;
import com.google.bigtable.admin.v2.ChangeStreamConfig;
@@ -37,9 +40,11 @@
import com.google.bigtable.admin.v2.ClusterName;
import com.google.bigtable.admin.v2.ColumnFamily;
import com.google.bigtable.admin.v2.CopyBackupRequest;
+import com.google.bigtable.admin.v2.CreateAuthorizedViewRequest;
import com.google.bigtable.admin.v2.CreateBackupRequest;
import com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest;
import com.google.bigtable.admin.v2.CreateTableRequest;
+import com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest;
import com.google.bigtable.admin.v2.DeleteBackupRequest;
import com.google.bigtable.admin.v2.DeleteSnapshotRequest;
import com.google.bigtable.admin.v2.DeleteTableRequest;
@@ -47,10 +52,13 @@
import com.google.bigtable.admin.v2.EncryptionInfo;
import com.google.bigtable.admin.v2.GenerateConsistencyTokenRequest;
import com.google.bigtable.admin.v2.GenerateConsistencyTokenResponse;
+import com.google.bigtable.admin.v2.GetAuthorizedViewRequest;
import com.google.bigtable.admin.v2.GetBackupRequest;
import com.google.bigtable.admin.v2.GetSnapshotRequest;
import com.google.bigtable.admin.v2.GetTableRequest;
import com.google.bigtable.admin.v2.InstanceName;
+import com.google.bigtable.admin.v2.ListAuthorizedViewsRequest;
+import com.google.bigtable.admin.v2.ListAuthorizedViewsResponse;
import com.google.bigtable.admin.v2.ListBackupsRequest;
import com.google.bigtable.admin.v2.ListBackupsResponse;
import com.google.bigtable.admin.v2.ListSnapshotsRequest;
@@ -66,6 +74,7 @@
import com.google.bigtable.admin.v2.Table;
import com.google.bigtable.admin.v2.TableName;
import com.google.bigtable.admin.v2.UndeleteTableRequest;
+import com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest;
import com.google.bigtable.admin.v2.UpdateBackupRequest;
import com.google.bigtable.admin.v2.UpdateTableRequest;
import com.google.common.collect.Lists;
@@ -873,6 +882,423 @@ public void undeleteTableExceptionTest2() throws Exception {
}
}
+ @Test
+ public void createAuthorizedViewTest() throws Exception {
+ AuthorizedView expectedResponse =
+ AuthorizedView.newBuilder()
+ .setName(
+ AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]")
+ .toString())
+ .setEtag("etag3123477")
+ .setDeletionProtection(true)
+ .build();
+ Operation resultOperation =
+ Operation.newBuilder()
+ .setName("createAuthorizedViewTest")
+ .setDone(true)
+ .setResponse(Any.pack(expectedResponse))
+ .build();
+ mockBigtableTableAdmin.addResponse(resultOperation);
+
+ TableName parent = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
+ AuthorizedView authorizedView = AuthorizedView.newBuilder().build();
+ String authorizedViewId = "authorizedViewId-2074136549";
+
+ AuthorizedView actualResponse =
+ client.createAuthorizedViewAsync(parent, authorizedView, authorizedViewId).get();
+ Assert.assertEquals(expectedResponse, actualResponse);
+
+ List actualRequests = mockBigtableTableAdmin.getRequests();
+ Assert.assertEquals(1, actualRequests.size());
+ CreateAuthorizedViewRequest actualRequest =
+ ((CreateAuthorizedViewRequest) actualRequests.get(0));
+
+ Assert.assertEquals(parent.toString(), actualRequest.getParent());
+ Assert.assertEquals(authorizedView, actualRequest.getAuthorizedView());
+ Assert.assertEquals(authorizedViewId, actualRequest.getAuthorizedViewId());
+ Assert.assertTrue(
+ channelProvider.isHeaderSent(
+ ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+ GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+ }
+
+ @Test
+ public void createAuthorizedViewExceptionTest() throws Exception {
+ StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+ mockBigtableTableAdmin.addException(exception);
+
+ try {
+ TableName parent = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
+ AuthorizedView authorizedView = AuthorizedView.newBuilder().build();
+ String authorizedViewId = "authorizedViewId-2074136549";
+ client.createAuthorizedViewAsync(parent, authorizedView, authorizedViewId).get();
+ Assert.fail("No exception raised");
+ } catch (ExecutionException e) {
+ Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass());
+ InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause());
+ Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode());
+ }
+ }
+
+ @Test
+ public void createAuthorizedViewTest2() throws Exception {
+ AuthorizedView expectedResponse =
+ AuthorizedView.newBuilder()
+ .setName(
+ AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]")
+ .toString())
+ .setEtag("etag3123477")
+ .setDeletionProtection(true)
+ .build();
+ Operation resultOperation =
+ Operation.newBuilder()
+ .setName("createAuthorizedViewTest")
+ .setDone(true)
+ .setResponse(Any.pack(expectedResponse))
+ .build();
+ mockBigtableTableAdmin.addResponse(resultOperation);
+
+ String parent = "parent-995424086";
+ AuthorizedView authorizedView = AuthorizedView.newBuilder().build();
+ String authorizedViewId = "authorizedViewId-2074136549";
+
+ AuthorizedView actualResponse =
+ client.createAuthorizedViewAsync(parent, authorizedView, authorizedViewId).get();
+ Assert.assertEquals(expectedResponse, actualResponse);
+
+ List actualRequests = mockBigtableTableAdmin.getRequests();
+ Assert.assertEquals(1, actualRequests.size());
+ CreateAuthorizedViewRequest actualRequest =
+ ((CreateAuthorizedViewRequest) actualRequests.get(0));
+
+ Assert.assertEquals(parent, actualRequest.getParent());
+ Assert.assertEquals(authorizedView, actualRequest.getAuthorizedView());
+ Assert.assertEquals(authorizedViewId, actualRequest.getAuthorizedViewId());
+ Assert.assertTrue(
+ channelProvider.isHeaderSent(
+ ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+ GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+ }
+
+ @Test
+ public void createAuthorizedViewExceptionTest2() throws Exception {
+ StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+ mockBigtableTableAdmin.addException(exception);
+
+ try {
+ String parent = "parent-995424086";
+ AuthorizedView authorizedView = AuthorizedView.newBuilder().build();
+ String authorizedViewId = "authorizedViewId-2074136549";
+ client.createAuthorizedViewAsync(parent, authorizedView, authorizedViewId).get();
+ Assert.fail("No exception raised");
+ } catch (ExecutionException e) {
+ Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass());
+ InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause());
+ Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode());
+ }
+ }
+
+ @Test
+ public void listAuthorizedViewsTest() throws Exception {
+ AuthorizedView responsesElement = AuthorizedView.newBuilder().build();
+ ListAuthorizedViewsResponse expectedResponse =
+ ListAuthorizedViewsResponse.newBuilder()
+ .setNextPageToken("")
+ .addAllAuthorizedViews(Arrays.asList(responsesElement))
+ .build();
+ mockBigtableTableAdmin.addResponse(expectedResponse);
+
+ TableName parent = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
+
+ ListAuthorizedViewsPagedResponse pagedListResponse = client.listAuthorizedViews(parent);
+
+ List resources = Lists.newArrayList(pagedListResponse.iterateAll());
+
+ Assert.assertEquals(1, resources.size());
+ Assert.assertEquals(expectedResponse.getAuthorizedViewsList().get(0), resources.get(0));
+
+ List actualRequests = mockBigtableTableAdmin.getRequests();
+ Assert.assertEquals(1, actualRequests.size());
+ ListAuthorizedViewsRequest actualRequest = ((ListAuthorizedViewsRequest) actualRequests.get(0));
+
+ Assert.assertEquals(parent.toString(), actualRequest.getParent());
+ Assert.assertTrue(
+ channelProvider.isHeaderSent(
+ ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+ GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+ }
+
+ @Test
+ public void listAuthorizedViewsExceptionTest() throws Exception {
+ StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+ mockBigtableTableAdmin.addException(exception);
+
+ try {
+ TableName parent = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
+ client.listAuthorizedViews(parent);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception.
+ }
+ }
+
+ @Test
+ public void listAuthorizedViewsTest2() throws Exception {
+ AuthorizedView responsesElement = AuthorizedView.newBuilder().build();
+ ListAuthorizedViewsResponse expectedResponse =
+ ListAuthorizedViewsResponse.newBuilder()
+ .setNextPageToken("")
+ .addAllAuthorizedViews(Arrays.asList(responsesElement))
+ .build();
+ mockBigtableTableAdmin.addResponse(expectedResponse);
+
+ String parent = "parent-995424086";
+
+ ListAuthorizedViewsPagedResponse pagedListResponse = client.listAuthorizedViews(parent);
+
+ List resources = Lists.newArrayList(pagedListResponse.iterateAll());
+
+ Assert.assertEquals(1, resources.size());
+ Assert.assertEquals(expectedResponse.getAuthorizedViewsList().get(0), resources.get(0));
+
+ List actualRequests = mockBigtableTableAdmin.getRequests();
+ Assert.assertEquals(1, actualRequests.size());
+ ListAuthorizedViewsRequest actualRequest = ((ListAuthorizedViewsRequest) actualRequests.get(0));
+
+ Assert.assertEquals(parent, actualRequest.getParent());
+ Assert.assertTrue(
+ channelProvider.isHeaderSent(
+ ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+ GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+ }
+
+ @Test
+ public void listAuthorizedViewsExceptionTest2() throws Exception {
+ StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+ mockBigtableTableAdmin.addException(exception);
+
+ try {
+ String parent = "parent-995424086";
+ client.listAuthorizedViews(parent);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception.
+ }
+ }
+
+ @Test
+ public void getAuthorizedViewTest() throws Exception {
+ AuthorizedView expectedResponse =
+ AuthorizedView.newBuilder()
+ .setName(
+ AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]")
+ .toString())
+ .setEtag("etag3123477")
+ .setDeletionProtection(true)
+ .build();
+ mockBigtableTableAdmin.addResponse(expectedResponse);
+
+ AuthorizedViewName name =
+ AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]");
+
+ AuthorizedView actualResponse = client.getAuthorizedView(name);
+ Assert.assertEquals(expectedResponse, actualResponse);
+
+ List actualRequests = mockBigtableTableAdmin.getRequests();
+ Assert.assertEquals(1, actualRequests.size());
+ GetAuthorizedViewRequest actualRequest = ((GetAuthorizedViewRequest) actualRequests.get(0));
+
+ Assert.assertEquals(name.toString(), actualRequest.getName());
+ Assert.assertTrue(
+ channelProvider.isHeaderSent(
+ ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+ GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+ }
+
+ @Test
+ public void getAuthorizedViewExceptionTest() throws Exception {
+ StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+ mockBigtableTableAdmin.addException(exception);
+
+ try {
+ AuthorizedViewName name =
+ AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]");
+ client.getAuthorizedView(name);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception.
+ }
+ }
+
+ @Test
+ public void getAuthorizedViewTest2() throws Exception {
+ AuthorizedView expectedResponse =
+ AuthorizedView.newBuilder()
+ .setName(
+ AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]")
+ .toString())
+ .setEtag("etag3123477")
+ .setDeletionProtection(true)
+ .build();
+ mockBigtableTableAdmin.addResponse(expectedResponse);
+
+ String name = "name3373707";
+
+ AuthorizedView actualResponse = client.getAuthorizedView(name);
+ Assert.assertEquals(expectedResponse, actualResponse);
+
+ List actualRequests = mockBigtableTableAdmin.getRequests();
+ Assert.assertEquals(1, actualRequests.size());
+ GetAuthorizedViewRequest actualRequest = ((GetAuthorizedViewRequest) actualRequests.get(0));
+
+ Assert.assertEquals(name, actualRequest.getName());
+ Assert.assertTrue(
+ channelProvider.isHeaderSent(
+ ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+ GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+ }
+
+ @Test
+ public void getAuthorizedViewExceptionTest2() throws Exception {
+ StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+ mockBigtableTableAdmin.addException(exception);
+
+ try {
+ String name = "name3373707";
+ client.getAuthorizedView(name);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception.
+ }
+ }
+
+ @Test
+ public void updateAuthorizedViewTest() throws Exception {
+ AuthorizedView expectedResponse =
+ AuthorizedView.newBuilder()
+ .setName(
+ AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]")
+ .toString())
+ .setEtag("etag3123477")
+ .setDeletionProtection(true)
+ .build();
+ Operation resultOperation =
+ Operation.newBuilder()
+ .setName("updateAuthorizedViewTest")
+ .setDone(true)
+ .setResponse(Any.pack(expectedResponse))
+ .build();
+ mockBigtableTableAdmin.addResponse(resultOperation);
+
+ AuthorizedView authorizedView = AuthorizedView.newBuilder().build();
+ FieldMask updateMask = FieldMask.newBuilder().build();
+
+ AuthorizedView actualResponse =
+ client.updateAuthorizedViewAsync(authorizedView, updateMask).get();
+ Assert.assertEquals(expectedResponse, actualResponse);
+
+ List actualRequests = mockBigtableTableAdmin.getRequests();
+ Assert.assertEquals(1, actualRequests.size());
+ UpdateAuthorizedViewRequest actualRequest =
+ ((UpdateAuthorizedViewRequest) actualRequests.get(0));
+
+ Assert.assertEquals(authorizedView, actualRequest.getAuthorizedView());
+ Assert.assertEquals(updateMask, actualRequest.getUpdateMask());
+ Assert.assertTrue(
+ channelProvider.isHeaderSent(
+ ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+ GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+ }
+
+ @Test
+ public void updateAuthorizedViewExceptionTest() throws Exception {
+ StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+ mockBigtableTableAdmin.addException(exception);
+
+ try {
+ AuthorizedView authorizedView = AuthorizedView.newBuilder().build();
+ FieldMask updateMask = FieldMask.newBuilder().build();
+ client.updateAuthorizedViewAsync(authorizedView, updateMask).get();
+ Assert.fail("No exception raised");
+ } catch (ExecutionException e) {
+ Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass());
+ InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause());
+ Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode());
+ }
+ }
+
+ @Test
+ public void deleteAuthorizedViewTest() throws Exception {
+ Empty expectedResponse = Empty.newBuilder().build();
+ mockBigtableTableAdmin.addResponse(expectedResponse);
+
+ AuthorizedViewName name =
+ AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]");
+
+ client.deleteAuthorizedView(name);
+
+ List actualRequests = mockBigtableTableAdmin.getRequests();
+ Assert.assertEquals(1, actualRequests.size());
+ DeleteAuthorizedViewRequest actualRequest =
+ ((DeleteAuthorizedViewRequest) actualRequests.get(0));
+
+ Assert.assertEquals(name.toString(), actualRequest.getName());
+ Assert.assertTrue(
+ channelProvider.isHeaderSent(
+ ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+ GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+ }
+
+ @Test
+ public void deleteAuthorizedViewExceptionTest() throws Exception {
+ StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+ mockBigtableTableAdmin.addException(exception);
+
+ try {
+ AuthorizedViewName name =
+ AuthorizedViewName.of("[PROJECT]", "[INSTANCE]", "[TABLE]", "[AUTHORIZED_VIEW]");
+ client.deleteAuthorizedView(name);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception.
+ }
+ }
+
+ @Test
+ public void deleteAuthorizedViewTest2() throws Exception {
+ Empty expectedResponse = Empty.newBuilder().build();
+ mockBigtableTableAdmin.addResponse(expectedResponse);
+
+ String name = "name3373707";
+
+ client.deleteAuthorizedView(name);
+
+ List actualRequests = mockBigtableTableAdmin.getRequests();
+ Assert.assertEquals(1, actualRequests.size());
+ DeleteAuthorizedViewRequest actualRequest =
+ ((DeleteAuthorizedViewRequest) actualRequests.get(0));
+
+ Assert.assertEquals(name, actualRequest.getName());
+ Assert.assertTrue(
+ channelProvider.isHeaderSent(
+ ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+ GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+ }
+
+ @Test
+ public void deleteAuthorizedViewExceptionTest2() throws Exception {
+ StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+ mockBigtableTableAdmin.addException(exception);
+
+ try {
+ String name = "name3373707";
+ client.deleteAuthorizedView(name);
+ Assert.fail("No exception raised");
+ } catch (InvalidArgumentException e) {
+ // Expected exception.
+ }
+ }
+
@Test
public void modifyColumnFamiliesTest() throws Exception {
Table expectedResponse =
diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettingsTest.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettingsTest.java
index 87d5cb3a88..457ad4c637 100644
--- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettingsTest.java
+++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminSettingsTest.java
@@ -139,6 +139,13 @@ public void testStubSettings() throws IOException {
"updateTableOperationSettings",
"copyBackupSettings",
"copyBackupOperationSettings",
+ "createAuthorizedViewSettings",
+ "createAuthorizedViewOperationSettings",
+ "updateAuthorizedViewSettings",
+ "updateAuthorizedViewOperationSettings",
+ "deleteAuthorizedViewSettings",
+ "listAuthorizedViewsSettings",
+ "getAuthorizedViewSettings",
};
@Test
diff --git a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/MockBigtableTableAdminImpl.java b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/MockBigtableTableAdminImpl.java
index a315e72ccf..98b5850479 100644
--- a/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/MockBigtableTableAdminImpl.java
+++ b/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/MockBigtableTableAdminImpl.java
@@ -17,23 +17,29 @@
package com.google.cloud.bigtable.admin.v2;
import com.google.api.core.BetaApi;
+import com.google.bigtable.admin.v2.AuthorizedView;
import com.google.bigtable.admin.v2.Backup;
import com.google.bigtable.admin.v2.BigtableTableAdminGrpc.BigtableTableAdminImplBase;
import com.google.bigtable.admin.v2.CheckConsistencyRequest;
import com.google.bigtable.admin.v2.CheckConsistencyResponse;
import com.google.bigtable.admin.v2.CopyBackupRequest;
+import com.google.bigtable.admin.v2.CreateAuthorizedViewRequest;
import com.google.bigtable.admin.v2.CreateBackupRequest;
import com.google.bigtable.admin.v2.CreateTableFromSnapshotRequest;
import com.google.bigtable.admin.v2.CreateTableRequest;
+import com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest;
import com.google.bigtable.admin.v2.DeleteBackupRequest;
import com.google.bigtable.admin.v2.DeleteSnapshotRequest;
import com.google.bigtable.admin.v2.DeleteTableRequest;
import com.google.bigtable.admin.v2.DropRowRangeRequest;
import com.google.bigtable.admin.v2.GenerateConsistencyTokenRequest;
import com.google.bigtable.admin.v2.GenerateConsistencyTokenResponse;
+import com.google.bigtable.admin.v2.GetAuthorizedViewRequest;
import com.google.bigtable.admin.v2.GetBackupRequest;
import com.google.bigtable.admin.v2.GetSnapshotRequest;
import com.google.bigtable.admin.v2.GetTableRequest;
+import com.google.bigtable.admin.v2.ListAuthorizedViewsRequest;
+import com.google.bigtable.admin.v2.ListAuthorizedViewsResponse;
import com.google.bigtable.admin.v2.ListBackupsRequest;
import com.google.bigtable.admin.v2.ListBackupsResponse;
import com.google.bigtable.admin.v2.ListSnapshotsRequest;
@@ -46,6 +52,7 @@
import com.google.bigtable.admin.v2.SnapshotTableRequest;
import com.google.bigtable.admin.v2.Table;
import com.google.bigtable.admin.v2.UndeleteTableRequest;
+import com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest;
import com.google.bigtable.admin.v2.UpdateBackupRequest;
import com.google.bigtable.admin.v2.UpdateTableRequest;
import com.google.iam.v1.GetIamPolicyRequest;
@@ -238,6 +245,112 @@ public void undeleteTable(
}
}
+ @Override
+ public void createAuthorizedView(
+ CreateAuthorizedViewRequest request, StreamObserver responseObserver) {
+ Object response = responses.poll();
+ if (response instanceof Operation) {
+ requests.add(request);
+ responseObserver.onNext(((Operation) response));
+ responseObserver.onCompleted();
+ } else if (response instanceof Exception) {
+ responseObserver.onError(((Exception) response));
+ } else {
+ responseObserver.onError(
+ new IllegalArgumentException(
+ String.format(
+ "Unrecognized response type %s for method CreateAuthorizedView, expected %s or %s",
+ response == null ? "null" : response.getClass().getName(),
+ Operation.class.getName(),
+ Exception.class.getName())));
+ }
+ }
+
+ @Override
+ public void listAuthorizedViews(
+ ListAuthorizedViewsRequest request,
+ StreamObserver responseObserver) {
+ Object response = responses.poll();
+ if (response instanceof ListAuthorizedViewsResponse) {
+ requests.add(request);
+ responseObserver.onNext(((ListAuthorizedViewsResponse) response));
+ responseObserver.onCompleted();
+ } else if (response instanceof Exception) {
+ responseObserver.onError(((Exception) response));
+ } else {
+ responseObserver.onError(
+ new IllegalArgumentException(
+ String.format(
+ "Unrecognized response type %s for method ListAuthorizedViews, expected %s or %s",
+ response == null ? "null" : response.getClass().getName(),
+ ListAuthorizedViewsResponse.class.getName(),
+ Exception.class.getName())));
+ }
+ }
+
+ @Override
+ public void getAuthorizedView(
+ GetAuthorizedViewRequest request, StreamObserver responseObserver) {
+ Object response = responses.poll();
+ if (response instanceof AuthorizedView) {
+ requests.add(request);
+ responseObserver.onNext(((AuthorizedView) response));
+ responseObserver.onCompleted();
+ } else if (response instanceof Exception) {
+ responseObserver.onError(((Exception) response));
+ } else {
+ responseObserver.onError(
+ new IllegalArgumentException(
+ String.format(
+ "Unrecognized response type %s for method GetAuthorizedView, expected %s or %s",
+ response == null ? "null" : response.getClass().getName(),
+ AuthorizedView.class.getName(),
+ Exception.class.getName())));
+ }
+ }
+
+ @Override
+ public void updateAuthorizedView(
+ UpdateAuthorizedViewRequest request, StreamObserver responseObserver) {
+ Object response = responses.poll();
+ if (response instanceof Operation) {
+ requests.add(request);
+ responseObserver.onNext(((Operation) response));
+ responseObserver.onCompleted();
+ } else if (response instanceof Exception) {
+ responseObserver.onError(((Exception) response));
+ } else {
+ responseObserver.onError(
+ new IllegalArgumentException(
+ String.format(
+ "Unrecognized response type %s for method UpdateAuthorizedView, expected %s or %s",
+ response == null ? "null" : response.getClass().getName(),
+ Operation.class.getName(),
+ Exception.class.getName())));
+ }
+ }
+
+ @Override
+ public void deleteAuthorizedView(
+ DeleteAuthorizedViewRequest request, StreamObserver responseObserver) {
+ Object response = responses.poll();
+ if (response instanceof Empty) {
+ requests.add(request);
+ responseObserver.onNext(((Empty) response));
+ responseObserver.onCompleted();
+ } else if (response instanceof Exception) {
+ responseObserver.onError(((Exception) response));
+ } else {
+ responseObserver.onError(
+ new IllegalArgumentException(
+ String.format(
+ "Unrecognized response type %s for method DeleteAuthorizedView, expected %s or %s",
+ response == null ? "null" : response.getClass().getName(),
+ Empty.class.getName(),
+ Exception.class.getName())));
+ }
+ }
+
@Override
public void modifyColumnFamilies(
ModifyColumnFamiliesRequest request, StreamObserver responseObserver) {
diff --git a/grpc-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableTableAdminGrpc.java b/grpc-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableTableAdminGrpc.java
index 7802d53114..7620d7e496 100644
--- a/grpc-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableTableAdminGrpc.java
+++ b/grpc-google-cloud-bigtable-admin-v2/src/main/java/com/google/bigtable/admin/v2/BigtableTableAdminGrpc.java
@@ -342,6 +342,247 @@ private BigtableTableAdminGrpc() {}
return getUndeleteTableMethod;
}
+ private static volatile io.grpc.MethodDescriptor<
+ com.google.bigtable.admin.v2.CreateAuthorizedViewRequest,
+ com.google.longrunning.Operation>
+ getCreateAuthorizedViewMethod;
+
+ @io.grpc.stub.annotations.RpcMethod(
+ fullMethodName = SERVICE_NAME + '/' + "CreateAuthorizedView",
+ requestType = com.google.bigtable.admin.v2.CreateAuthorizedViewRequest.class,
+ responseType = com.google.longrunning.Operation.class,
+ methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+ public static io.grpc.MethodDescriptor<
+ com.google.bigtable.admin.v2.CreateAuthorizedViewRequest,
+ com.google.longrunning.Operation>
+ getCreateAuthorizedViewMethod() {
+ io.grpc.MethodDescriptor<
+ com.google.bigtable.admin.v2.CreateAuthorizedViewRequest,
+ com.google.longrunning.Operation>
+ getCreateAuthorizedViewMethod;
+ if ((getCreateAuthorizedViewMethod = BigtableTableAdminGrpc.getCreateAuthorizedViewMethod)
+ == null) {
+ synchronized (BigtableTableAdminGrpc.class) {
+ if ((getCreateAuthorizedViewMethod = BigtableTableAdminGrpc.getCreateAuthorizedViewMethod)
+ == null) {
+ BigtableTableAdminGrpc.getCreateAuthorizedViewMethod =
+ getCreateAuthorizedViewMethod =
+ io.grpc.MethodDescriptor
+ .
+ newBuilder()
+ .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ generateFullMethodName(SERVICE_NAME, "CreateAuthorizedView"))
+ .setSampledToLocalTracing(true)
+ .setRequestMarshaller(
+ io.grpc.protobuf.ProtoUtils.marshaller(
+ com.google.bigtable.admin.v2.CreateAuthorizedViewRequest
+ .getDefaultInstance()))
+ .setResponseMarshaller(
+ io.grpc.protobuf.ProtoUtils.marshaller(
+ com.google.longrunning.Operation.getDefaultInstance()))
+ .setSchemaDescriptor(
+ new BigtableTableAdminMethodDescriptorSupplier("CreateAuthorizedView"))
+ .build();
+ }
+ }
+ }
+ return getCreateAuthorizedViewMethod;
+ }
+
+ private static volatile io.grpc.MethodDescriptor<
+ com.google.bigtable.admin.v2.ListAuthorizedViewsRequest,
+ com.google.bigtable.admin.v2.ListAuthorizedViewsResponse>
+ getListAuthorizedViewsMethod;
+
+ @io.grpc.stub.annotations.RpcMethod(
+ fullMethodName = SERVICE_NAME + '/' + "ListAuthorizedViews",
+ requestType = com.google.bigtable.admin.v2.ListAuthorizedViewsRequest.class,
+ responseType = com.google.bigtable.admin.v2.ListAuthorizedViewsResponse.class,
+ methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+ public static io.grpc.MethodDescriptor<
+ com.google.bigtable.admin.v2.ListAuthorizedViewsRequest,
+ com.google.bigtable.admin.v2.ListAuthorizedViewsResponse>
+ getListAuthorizedViewsMethod() {
+ io.grpc.MethodDescriptor<
+ com.google.bigtable.admin.v2.ListAuthorizedViewsRequest,
+ com.google.bigtable.admin.v2.ListAuthorizedViewsResponse>
+ getListAuthorizedViewsMethod;
+ if ((getListAuthorizedViewsMethod = BigtableTableAdminGrpc.getListAuthorizedViewsMethod)
+ == null) {
+ synchronized (BigtableTableAdminGrpc.class) {
+ if ((getListAuthorizedViewsMethod = BigtableTableAdminGrpc.getListAuthorizedViewsMethod)
+ == null) {
+ BigtableTableAdminGrpc.getListAuthorizedViewsMethod =
+ getListAuthorizedViewsMethod =
+ io.grpc.MethodDescriptor
+ .
+ newBuilder()
+ .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ generateFullMethodName(SERVICE_NAME, "ListAuthorizedViews"))
+ .setSampledToLocalTracing(true)
+ .setRequestMarshaller(
+ io.grpc.protobuf.ProtoUtils.marshaller(
+ com.google.bigtable.admin.v2.ListAuthorizedViewsRequest
+ .getDefaultInstance()))
+ .setResponseMarshaller(
+ io.grpc.protobuf.ProtoUtils.marshaller(
+ com.google.bigtable.admin.v2.ListAuthorizedViewsResponse
+ .getDefaultInstance()))
+ .setSchemaDescriptor(
+ new BigtableTableAdminMethodDescriptorSupplier("ListAuthorizedViews"))
+ .build();
+ }
+ }
+ }
+ return getListAuthorizedViewsMethod;
+ }
+
+ private static volatile io.grpc.MethodDescriptor<
+ com.google.bigtable.admin.v2.GetAuthorizedViewRequest,
+ com.google.bigtable.admin.v2.AuthorizedView>
+ getGetAuthorizedViewMethod;
+
+ @io.grpc.stub.annotations.RpcMethod(
+ fullMethodName = SERVICE_NAME + '/' + "GetAuthorizedView",
+ requestType = com.google.bigtable.admin.v2.GetAuthorizedViewRequest.class,
+ responseType = com.google.bigtable.admin.v2.AuthorizedView.class,
+ methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+ public static io.grpc.MethodDescriptor<
+ com.google.bigtable.admin.v2.GetAuthorizedViewRequest,
+ com.google.bigtable.admin.v2.AuthorizedView>
+ getGetAuthorizedViewMethod() {
+ io.grpc.MethodDescriptor<
+ com.google.bigtable.admin.v2.GetAuthorizedViewRequest,
+ com.google.bigtable.admin.v2.AuthorizedView>
+ getGetAuthorizedViewMethod;
+ if ((getGetAuthorizedViewMethod = BigtableTableAdminGrpc.getGetAuthorizedViewMethod) == null) {
+ synchronized (BigtableTableAdminGrpc.class) {
+ if ((getGetAuthorizedViewMethod = BigtableTableAdminGrpc.getGetAuthorizedViewMethod)
+ == null) {
+ BigtableTableAdminGrpc.getGetAuthorizedViewMethod =
+ getGetAuthorizedViewMethod =
+ io.grpc.MethodDescriptor
+ .
+ newBuilder()
+ .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAuthorizedView"))
+ .setSampledToLocalTracing(true)
+ .setRequestMarshaller(
+ io.grpc.protobuf.ProtoUtils.marshaller(
+ com.google.bigtable.admin.v2.GetAuthorizedViewRequest
+ .getDefaultInstance()))
+ .setResponseMarshaller(
+ io.grpc.protobuf.ProtoUtils.marshaller(
+ com.google.bigtable.admin.v2.AuthorizedView.getDefaultInstance()))
+ .setSchemaDescriptor(
+ new BigtableTableAdminMethodDescriptorSupplier("GetAuthorizedView"))
+ .build();
+ }
+ }
+ }
+ return getGetAuthorizedViewMethod;
+ }
+
+ private static volatile io.grpc.MethodDescriptor<
+ com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest,
+ com.google.longrunning.Operation>
+ getUpdateAuthorizedViewMethod;
+
+ @io.grpc.stub.annotations.RpcMethod(
+ fullMethodName = SERVICE_NAME + '/' + "UpdateAuthorizedView",
+ requestType = com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest.class,
+ responseType = com.google.longrunning.Operation.class,
+ methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+ public static io.grpc.MethodDescriptor<
+ com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest,
+ com.google.longrunning.Operation>
+ getUpdateAuthorizedViewMethod() {
+ io.grpc.MethodDescriptor<
+ com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest,
+ com.google.longrunning.Operation>
+ getUpdateAuthorizedViewMethod;
+ if ((getUpdateAuthorizedViewMethod = BigtableTableAdminGrpc.getUpdateAuthorizedViewMethod)
+ == null) {
+ synchronized (BigtableTableAdminGrpc.class) {
+ if ((getUpdateAuthorizedViewMethod = BigtableTableAdminGrpc.getUpdateAuthorizedViewMethod)
+ == null) {
+ BigtableTableAdminGrpc.getUpdateAuthorizedViewMethod =
+ getUpdateAuthorizedViewMethod =
+ io.grpc.MethodDescriptor
+ .
+ newBuilder()
+ .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ generateFullMethodName(SERVICE_NAME, "UpdateAuthorizedView"))
+ .setSampledToLocalTracing(true)
+ .setRequestMarshaller(
+ io.grpc.protobuf.ProtoUtils.marshaller(
+ com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest
+ .getDefaultInstance()))
+ .setResponseMarshaller(
+ io.grpc.protobuf.ProtoUtils.marshaller(
+ com.google.longrunning.Operation.getDefaultInstance()))
+ .setSchemaDescriptor(
+ new BigtableTableAdminMethodDescriptorSupplier("UpdateAuthorizedView"))
+ .build();
+ }
+ }
+ }
+ return getUpdateAuthorizedViewMethod;
+ }
+
+ private static volatile io.grpc.MethodDescriptor<
+ com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest, com.google.protobuf.Empty>
+ getDeleteAuthorizedViewMethod;
+
+ @io.grpc.stub.annotations.RpcMethod(
+ fullMethodName = SERVICE_NAME + '/' + "DeleteAuthorizedView",
+ requestType = com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest.class,
+ responseType = com.google.protobuf.Empty.class,
+ methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+ public static io.grpc.MethodDescriptor<
+ com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest, com.google.protobuf.Empty>
+ getDeleteAuthorizedViewMethod() {
+ io.grpc.MethodDescriptor<
+ com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest, com.google.protobuf.Empty>
+ getDeleteAuthorizedViewMethod;
+ if ((getDeleteAuthorizedViewMethod = BigtableTableAdminGrpc.getDeleteAuthorizedViewMethod)
+ == null) {
+ synchronized (BigtableTableAdminGrpc.class) {
+ if ((getDeleteAuthorizedViewMethod = BigtableTableAdminGrpc.getDeleteAuthorizedViewMethod)
+ == null) {
+ BigtableTableAdminGrpc.getDeleteAuthorizedViewMethod =
+ getDeleteAuthorizedViewMethod =
+ io.grpc.MethodDescriptor
+ .
+ newBuilder()
+ .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(
+ generateFullMethodName(SERVICE_NAME, "DeleteAuthorizedView"))
+ .setSampledToLocalTracing(true)
+ .setRequestMarshaller(
+ io.grpc.protobuf.ProtoUtils.marshaller(
+ com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest
+ .getDefaultInstance()))
+ .setResponseMarshaller(
+ io.grpc.protobuf.ProtoUtils.marshaller(
+ com.google.protobuf.Empty.getDefaultInstance()))
+ .setSchemaDescriptor(
+ new BigtableTableAdminMethodDescriptorSupplier("DeleteAuthorizedView"))
+ .build();
+ }
+ }
+ }
+ return getDeleteAuthorizedViewMethod;
+ }
+
private static volatile io.grpc.MethodDescriptor<
com.google.bigtable.admin.v2.ModifyColumnFamiliesRequest,
com.google.bigtable.admin.v2.Table>
@@ -1290,6 +1531,77 @@ default void undeleteTable(
getUndeleteTableMethod(), responseObserver);
}
+ /**
+ *
+ *
+ *
+ * Creates a new AuthorizedView in a table.
+ *
+ */
+ default void createAuthorizedView(
+ com.google.bigtable.admin.v2.CreateAuthorizedViewRequest request,
+ io.grpc.stub.StreamObserver responseObserver) {
+ io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
+ getCreateAuthorizedViewMethod(), responseObserver);
+ }
+
+ /**
+ *
+ *
+ *
+ * Lists all AuthorizedViews from a specific table.
+ *
+ */
+ default void listAuthorizedViews(
+ com.google.bigtable.admin.v2.ListAuthorizedViewsRequest request,
+ io.grpc.stub.StreamObserver
+ responseObserver) {
+ io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
+ getListAuthorizedViewsMethod(), responseObserver);
+ }
+
+ /**
+ *
+ *
+ *
+ * Gets information from a specified AuthorizedView.
+ *
+ */
+ default void getAuthorizedView(
+ com.google.bigtable.admin.v2.GetAuthorizedViewRequest request,
+ io.grpc.stub.StreamObserver responseObserver) {
+ io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
+ getGetAuthorizedViewMethod(), responseObserver);
+ }
+
+ /**
+ *
+ *
+ *
+ * Updates an AuthorizedView in a table.
+ *
+ */
+ default void updateAuthorizedView(
+ com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest request,
+ io.grpc.stub.StreamObserver responseObserver) {
+ io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
+ getUpdateAuthorizedViewMethod(), responseObserver);
+ }
+
+ /**
+ *
+ *
+ *
+ * Permanently deletes a specified AuthorizedView.
+ *
+ */
+ default void deleteAuthorizedView(
+ com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest request,
+ io.grpc.stub.StreamObserver responseObserver) {
+ io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
+ getDeleteAuthorizedViewMethod(), responseObserver);
+ }
+
/**
*
*
@@ -1752,6 +2064,87 @@ public void undeleteTable(
responseObserver);
}
+ /**
+ *
+ *
+ *
+ * Creates a new AuthorizedView in a table.
+ *
+ */
+ public void createAuthorizedView(
+ com.google.bigtable.admin.v2.CreateAuthorizedViewRequest request,
+ io.grpc.stub.StreamObserver responseObserver) {
+ io.grpc.stub.ClientCalls.asyncUnaryCall(
+ getChannel().newCall(getCreateAuthorizedViewMethod(), getCallOptions()),
+ request,
+ responseObserver);
+ }
+
+ /**
+ *
+ *
+ *
+ * Lists all AuthorizedViews from a specific table.
+ *
+ */
+ public void listAuthorizedViews(
+ com.google.bigtable.admin.v2.ListAuthorizedViewsRequest request,
+ io.grpc.stub.StreamObserver
+ responseObserver) {
+ io.grpc.stub.ClientCalls.asyncUnaryCall(
+ getChannel().newCall(getListAuthorizedViewsMethod(), getCallOptions()),
+ request,
+ responseObserver);
+ }
+
+ /**
+ *
+ *
+ *
+ * Gets information from a specified AuthorizedView.
+ *
+ */
+ public void getAuthorizedView(
+ com.google.bigtable.admin.v2.GetAuthorizedViewRequest request,
+ io.grpc.stub.StreamObserver responseObserver) {
+ io.grpc.stub.ClientCalls.asyncUnaryCall(
+ getChannel().newCall(getGetAuthorizedViewMethod(), getCallOptions()),
+ request,
+ responseObserver);
+ }
+
+ /**
+ *
+ *
+ *
+ * Updates an AuthorizedView in a table.
+ *
+ */
+ public void updateAuthorizedView(
+ com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest request,
+ io.grpc.stub.StreamObserver responseObserver) {
+ io.grpc.stub.ClientCalls.asyncUnaryCall(
+ getChannel().newCall(getUpdateAuthorizedViewMethod(), getCallOptions()),
+ request,
+ responseObserver);
+ }
+
+ /**
+ *
+ *
+ *
+ * Permanently deletes a specified AuthorizedView.
+ *
+ */
+ public void deleteAuthorizedView(
+ com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest request,
+ io.grpc.stub.StreamObserver responseObserver) {
+ io.grpc.stub.ClientCalls.asyncUnaryCall(
+ getChannel().newCall(getDeleteAuthorizedViewMethod(), getCallOptions()),
+ request,
+ responseObserver);
+ }
+
/**
*
*
@@ -2213,6 +2606,71 @@ public com.google.longrunning.Operation undeleteTable(
getChannel(), getUndeleteTableMethod(), getCallOptions(), request);
}
+ /**
+ *
+ *
+ *
+ * Creates a new AuthorizedView in a table.
+ *
+ */
+ public com.google.longrunning.Operation createAuthorizedView(
+ com.google.bigtable.admin.v2.CreateAuthorizedViewRequest request) {
+ return io.grpc.stub.ClientCalls.blockingUnaryCall(
+ getChannel(), getCreateAuthorizedViewMethod(), getCallOptions(), request);
+ }
+
+ /**
+ *
+ *
+ *
+ * Lists all AuthorizedViews from a specific table.
+ *
+ */
+ public com.google.bigtable.admin.v2.ListAuthorizedViewsResponse listAuthorizedViews(
+ com.google.bigtable.admin.v2.ListAuthorizedViewsRequest request) {
+ return io.grpc.stub.ClientCalls.blockingUnaryCall(
+ getChannel(), getListAuthorizedViewsMethod(), getCallOptions(), request);
+ }
+
+ /**
+ *
+ *
+ *
+ * Gets information from a specified AuthorizedView.
+ *
+ */
+ public com.google.bigtable.admin.v2.AuthorizedView getAuthorizedView(
+ com.google.bigtable.admin.v2.GetAuthorizedViewRequest request) {
+ return io.grpc.stub.ClientCalls.blockingUnaryCall(
+ getChannel(), getGetAuthorizedViewMethod(), getCallOptions(), request);
+ }
+
+ /**
+ *
+ *
+ *
+ * Updates an AuthorizedView in a table.
+ *
+ */
+ public com.google.longrunning.Operation updateAuthorizedView(
+ com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest request) {
+ return io.grpc.stub.ClientCalls.blockingUnaryCall(
+ getChannel(), getUpdateAuthorizedViewMethod(), getCallOptions(), request);
+ }
+
+ /**
+ *
+ *
+ *
+ * Permanently deletes a specified AuthorizedView.
+ *
+ */
+ public com.google.protobuf.Empty deleteAuthorizedView(
+ com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest request) {
+ return io.grpc.stub.ClientCalls.blockingUnaryCall(
+ getChannel(), getDeleteAuthorizedViewMethod(), getCallOptions(), request);
+ }
+
/**
*
*
@@ -2618,6 +3076,73 @@ protected BigtableTableAdminFutureStub build(
getChannel().newCall(getUndeleteTableMethod(), getCallOptions()), request);
}
+ /**
+ *
+ *
+ *
+ * Creates a new AuthorizedView in a table.
+ *
+ */
+ public com.google.common.util.concurrent.ListenableFuture
+ createAuthorizedView(com.google.bigtable.admin.v2.CreateAuthorizedViewRequest request) {
+ return io.grpc.stub.ClientCalls.futureUnaryCall(
+ getChannel().newCall(getCreateAuthorizedViewMethod(), getCallOptions()), request);
+ }
+
+ /**
+ *
+ *
+ *
+ * Lists all AuthorizedViews from a specific table.
+ *
+ */
+ public com.google.common.util.concurrent.ListenableFuture<
+ com.google.bigtable.admin.v2.ListAuthorizedViewsResponse>
+ listAuthorizedViews(com.google.bigtable.admin.v2.ListAuthorizedViewsRequest request) {
+ return io.grpc.stub.ClientCalls.futureUnaryCall(
+ getChannel().newCall(getListAuthorizedViewsMethod(), getCallOptions()), request);
+ }
+
+ /**
+ *
+ *
+ *
+ * Gets information from a specified AuthorizedView.
+ *
+ */
+ public com.google.common.util.concurrent.ListenableFuture<
+ com.google.bigtable.admin.v2.AuthorizedView>
+ getAuthorizedView(com.google.bigtable.admin.v2.GetAuthorizedViewRequest request) {
+ return io.grpc.stub.ClientCalls.futureUnaryCall(
+ getChannel().newCall(getGetAuthorizedViewMethod(), getCallOptions()), request);
+ }
+
+ /**
+ *
+ *
+ *
+ * Updates an AuthorizedView in a table.
+ *
+ */
+ public com.google.common.util.concurrent.ListenableFuture
+ updateAuthorizedView(com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest request) {
+ return io.grpc.stub.ClientCalls.futureUnaryCall(
+ getChannel().newCall(getUpdateAuthorizedViewMethod(), getCallOptions()), request);
+ }
+
+ /**
+ *
+ *
+ *
+ * Permanently deletes a specified AuthorizedView.
+ *
+ */
+ public com.google.common.util.concurrent.ListenableFuture
+ deleteAuthorizedView(com.google.bigtable.admin.v2.DeleteAuthorizedViewRequest request) {
+ return io.grpc.stub.ClientCalls.futureUnaryCall(
+ getChannel().newCall(getDeleteAuthorizedViewMethod(), getCallOptions()), request);
+ }
+
/**
*
*
@@ -2916,24 +3441,29 @@ protected BigtableTableAdminFutureStub build(
private static final int METHODID_UPDATE_TABLE = 4;
private static final int METHODID_DELETE_TABLE = 5;
private static final int METHODID_UNDELETE_TABLE = 6;
- private static final int METHODID_MODIFY_COLUMN_FAMILIES = 7;
- private static final int METHODID_DROP_ROW_RANGE = 8;
- private static final int METHODID_GENERATE_CONSISTENCY_TOKEN = 9;
- private static final int METHODID_CHECK_CONSISTENCY = 10;
- private static final int METHODID_SNAPSHOT_TABLE = 11;
- private static final int METHODID_GET_SNAPSHOT = 12;
- private static final int METHODID_LIST_SNAPSHOTS = 13;
- private static final int METHODID_DELETE_SNAPSHOT = 14;
- private static final int METHODID_CREATE_BACKUP = 15;
- private static final int METHODID_GET_BACKUP = 16;
- private static final int METHODID_UPDATE_BACKUP = 17;
- private static final int METHODID_DELETE_BACKUP = 18;
- private static final int METHODID_LIST_BACKUPS = 19;
- private static final int METHODID_RESTORE_TABLE = 20;
- private static final int METHODID_COPY_BACKUP = 21;
- private static final int METHODID_GET_IAM_POLICY = 22;
- private static final int METHODID_SET_IAM_POLICY = 23;
- private static final int METHODID_TEST_IAM_PERMISSIONS = 24;
+ private static final int METHODID_CREATE_AUTHORIZED_VIEW = 7;
+ private static final int METHODID_LIST_AUTHORIZED_VIEWS = 8;
+ private static final int METHODID_GET_AUTHORIZED_VIEW = 9;
+ private static final int METHODID_UPDATE_AUTHORIZED_VIEW = 10;
+ private static final int METHODID_DELETE_AUTHORIZED_VIEW = 11;
+ private static final int METHODID_MODIFY_COLUMN_FAMILIES = 12;
+ private static final int METHODID_DROP_ROW_RANGE = 13;
+ private static final int METHODID_GENERATE_CONSISTENCY_TOKEN = 14;
+ private static final int METHODID_CHECK_CONSISTENCY = 15;
+ private static final int METHODID_SNAPSHOT_TABLE = 16;
+ private static final int METHODID_GET_SNAPSHOT = 17;
+ private static final int METHODID_LIST_SNAPSHOTS = 18;
+ private static final int METHODID_DELETE_SNAPSHOT = 19;
+ private static final int METHODID_CREATE_BACKUP = 20;
+ private static final int METHODID_GET_BACKUP = 21;
+ private static final int METHODID_UPDATE_BACKUP = 22;
+ private static final int METHODID_DELETE_BACKUP = 23;
+ private static final int METHODID_LIST_BACKUPS = 24;
+ private static final int METHODID_RESTORE_TABLE = 25;
+ private static final int METHODID_COPY_BACKUP = 26;
+ private static final int METHODID_GET_IAM_POLICY = 27;
+ private static final int METHODID_SET_IAM_POLICY = 28;
+ private static final int METHODID_TEST_IAM_PERMISSIONS = 29;
private static final class MethodHandlers
implements io.grpc.stub.ServerCalls.UnaryMethod,
@@ -2988,6 +3518,34 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv
(com.google.bigtable.admin.v2.UndeleteTableRequest) request,
(io.grpc.stub.StreamObserver) responseObserver);
break;
+ case METHODID_CREATE_AUTHORIZED_VIEW:
+ serviceImpl.createAuthorizedView(
+ (com.google.bigtable.admin.v2.CreateAuthorizedViewRequest) request,
+ (io.grpc.stub.StreamObserver) responseObserver);
+ break;
+ case METHODID_LIST_AUTHORIZED_VIEWS:
+ serviceImpl.listAuthorizedViews(
+ (com.google.bigtable.admin.v2.ListAuthorizedViewsRequest) request,
+ (io.grpc.stub.StreamObserver<
+ com.google.bigtable.admin.v2.ListAuthorizedViewsResponse>)
+ responseObserver);
+ break;
+ case METHODID_GET_AUTHORIZED_VIEW:
+ serviceImpl.getAuthorizedView(
+ (com.google.bigtable.admin.v2.GetAuthorizedViewRequest) request,
+ (io.grpc.stub.StreamObserver)
+ responseObserver);
+ break;
+ case METHODID_UPDATE_AUTHORIZED_VIEW:
+ serviceImpl.updateAuthorizedView(
+ (com.google.bigtable.admin.v2.UpdateAuthorizedViewRequest) request,
+ (io.grpc.stub.StreamObserver