diff --git a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java index 17868a28b00d..29c071eb3836 100644 --- a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java +++ b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminClient.java @@ -19,6 +19,7 @@ import com.google.api.core.ApiFuture; import com.google.api.core.ApiFutures; import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.longrunning.OperationFuture; import com.google.api.gax.paging.AbstractFixedSizeCollection; @@ -75,76 +76,9 @@ import javax.annotation.Generated; // AUTO-GENERATED DOCUMENTATION AND SERVICE -/** - * Service Description: Service for creating, configuring, and deleting Cloud Bigtable Instances and - * Clusters. Provides access to the Instance and Cluster schemas only, not the tables' metadata or - * data stored in those tables. - * - *
This class provides the ability to make remote calls to the backing service through method - * calls that map to API methods. Sample code to get started: - * - *
- *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * Instance response = baseBigtableInstanceAdminClient.getInstance(name);
- * }
- *
- *
- *
- * Note: close() needs to be called on the baseBigtableInstanceAdminClient object to clean up - * resources such as threads. In the example above, try-with-resources is used, which automatically - * calls close(). - * - *
The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *
See the individual methods for example code. - * - *
Many parameters require resource names to be formatted in a particular way. To assist with - * these names, this class includes a format method for each type of name, and additionally a parse - * method to extract the individual identifiers contained within names that are returned. - * - *
This class can be customized by passing in a custom instance of - * BaseBigtableInstanceAdminSettings to create(). For example: - * - *
To customize credentials: - * - *
- *
- * BaseBigtableInstanceAdminSettings baseBigtableInstanceAdminSettings =
- * BaseBigtableInstanceAdminSettings.newBuilder()
- * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- * .build();
- * BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
- * BaseBigtableInstanceAdminClient.create(baseBigtableInstanceAdminSettings);
- *
- *
- *
- * To customize the endpoint:
- *
- *
- *
- * BaseBigtableInstanceAdminSettings baseBigtableInstanceAdminSettings =
- * BaseBigtableInstanceAdminSettings.newBuilder().setEndpoint(myEndpoint).build();
- * BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
- * BaseBigtableInstanceAdminClient.create(baseBigtableInstanceAdminSettings);
- *
- *
- */
+/** For internal use only. */
@Generated("by gapic-generator")
-@BetaApi
+@InternalApi
public class BaseBigtableInstanceAdminClient implements BackgroundResource {
private final BaseBigtableInstanceAdminSettings settings;
private final BigtableInstanceAdminStub stub;
diff --git a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminSettings.java b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminSettings.java
index 0b8f4025d53a..1a917e098983 100644
--- a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminSettings.java
+++ b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableInstanceAdminSettings.java
@@ -19,6 +19,7 @@
import com.google.api.core.ApiFunction;
import com.google.api.core.BetaApi;
+import com.google.api.core.InternalApi;
import com.google.api.gax.core.GoogleCredentialsProvider;
import com.google.api.gax.core.InstantiatingExecutorProvider;
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
@@ -67,33 +68,9 @@
import javax.annotation.Generated;
// AUTO-GENERATED DOCUMENTATION AND CLASS
-/**
- * Settings class to configure an instance of {@link BaseBigtableInstanceAdminClient}.
- *
- * The default instance has everything set to sensible defaults: - * - *
The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. For - * example, to set the total timeout of getInstance to 30 seconds: - * - *
- *
- * BaseBigtableInstanceAdminSettings.Builder baseBigtableInstanceAdminSettingsBuilder =
- * BaseBigtableInstanceAdminSettings.newBuilder();
- * baseBigtableInstanceAdminSettingsBuilder.getInstanceSettings().getRetrySettings().toBuilder()
- * .setTotalTimeout(Duration.ofSeconds(30));
- * BaseBigtableInstanceAdminSettings baseBigtableInstanceAdminSettings = baseBigtableInstanceAdminSettingsBuilder.build();
- *
- *
- */
+/** For internal use only. */
@Generated("by gapic-generator")
-@BetaApi
+@InternalApi
public class BaseBigtableInstanceAdminSettings
extends ClientSettingsProvides access to the table schemas only, not the data stored within the tables. - * - *
This class provides the ability to make remote calls to the backing service through method - * calls that map to API methods. Sample code to get started: - * - *
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * String tableId = "";
- * Table table = Table.newBuilder().build();
- * Table response = baseBigtableTableAdminClient.createTable(parent, tableId, table);
- * }
- *
- *
- *
- * Note: close() needs to be called on the baseBigtableTableAdminClient object to clean up - * resources such as threads. In the example above, try-with-resources is used, which automatically - * calls close(). - * - *
The surface of this class includes several types of Java methods for each of the API's - * methods: - * - *
See the individual methods for example code. - * - *
Many parameters require resource names to be formatted in a particular way. To assist with - * these names, this class includes a format method for each type of name, and additionally a parse - * method to extract the individual identifiers contained within names that are returned. - * - *
This class can be customized by passing in a custom instance of BaseBigtableTableAdminSettings - * to create(). For example: - * - *
To customize credentials: - * - *
- *
- * BaseBigtableTableAdminSettings baseBigtableTableAdminSettings =
- * BaseBigtableTableAdminSettings.newBuilder()
- * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- * .build();
- * BaseBigtableTableAdminClient baseBigtableTableAdminClient =
- * BaseBigtableTableAdminClient.create(baseBigtableTableAdminSettings);
- *
- *
- *
- * To customize the endpoint:
- *
- *
- *
- * BaseBigtableTableAdminSettings baseBigtableTableAdminSettings =
- * BaseBigtableTableAdminSettings.newBuilder().setEndpoint(myEndpoint).build();
- * BaseBigtableTableAdminClient baseBigtableTableAdminClient =
- * BaseBigtableTableAdminClient.create(baseBigtableTableAdminSettings);
- *
- *
- */
+/** For internal use only. */
@Generated("by gapic-generator")
-@BetaApi
+@InternalApi
public class BaseBigtableTableAdminClient implements BackgroundResource {
private final BaseBigtableTableAdminSettings settings;
private final BigtableTableAdminStub stub;
diff --git a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminSettings.java b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminSettings.java
index 3ce390b3e554..c3fa3a40d80a 100644
--- a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminSettings.java
+++ b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BaseBigtableTableAdminSettings.java
@@ -20,6 +20,7 @@
import com.google.api.core.ApiFunction;
import com.google.api.core.BetaApi;
+import com.google.api.core.InternalApi;
import com.google.api.gax.core.GoogleCredentialsProvider;
import com.google.api.gax.core.InstantiatingExecutorProvider;
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
@@ -59,33 +60,9 @@
import javax.annotation.Generated;
// AUTO-GENERATED DOCUMENTATION AND CLASS
-/**
- * Settings class to configure an instance of {@link BaseBigtableTableAdminClient}.
- *
- * The default instance has everything set to sensible defaults: - * - *
The builder of this class is recursive, so contained classes are themselves builders. When - * build() is called, the tree of builders is called to create the complete settings object. For - * example, to set the total timeout of createTable to 30 seconds: - * - *
- *
- * BaseBigtableTableAdminSettings.Builder baseBigtableTableAdminSettingsBuilder =
- * BaseBigtableTableAdminSettings.newBuilder();
- * baseBigtableTableAdminSettingsBuilder.createTableSettings().getRetrySettings().toBuilder()
- * .setTotalTimeout(Duration.ofSeconds(30));
- * BaseBigtableTableAdminSettings baseBigtableTableAdminSettings = baseBigtableTableAdminSettingsBuilder.build();
- *
- *
- */
+/** For internal use only. */
@Generated("by gapic-generator")
-@BetaApi
+@InternalApi
public class BaseBigtableTableAdminSettings extends ClientSettingsThe interfaces provided are listed below, along with usage samples. + *
These APIs allow callers to create and manage Cloud Bigtable resources. * - *
=============================== BaseBigtableInstanceAdminClient - * =============================== - * - *
Service Description: Service for creating, configuring, and deleting Cloud Bigtable Instances - * and Clusters. Provides access to the Instance and Cluster schemas only, not the tables' metadata - * or data stored in those tables. - * - *
Sample for BaseBigtableInstanceAdminClient: - * - *
- *
- * try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
- * InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * Instance response = baseBigtableInstanceAdminClient.getInstance(name);
- * }
- *
- *
- *
- * ============================ BaseBigtableTableAdminClient ============================
- *
- * Service Description: Service for creating, configuring, and deleting Cloud Bigtable tables. - * - *
Provides access to the table schemas only, not the data stored within the tables. - * - *
Sample for BaseBigtableTableAdminClient: - * - *
- *
- * try (BaseBigtableTableAdminClient baseBigtableTableAdminClient = BaseBigtableTableAdminClient.create()) {
- * InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
- * String tableId = "";
- * Table table = Table.newBuilder().build();
- * Table response = baseBigtableTableAdminClient.createTable(parent, tableId, table);
- * }
- *
- *
+ * @see com.google.cloud.bigtable.admin.v2.BigtableInstanceAdminClient for instance level API.
+ * @see com.google.cloud.bigtable.admin.v2.BigtableTableAdminClient for table level API.
*/
package com.google.cloud.bigtable.admin.v2;
diff --git a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStub.java b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStub.java
index a394891f96ba..264af82f3c4a 100644
--- a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStub.java
+++ b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableInstanceAdminStub.java
@@ -18,6 +18,7 @@
import static com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListAppProfilesPagedResponse;
import com.google.api.core.BetaApi;
+import com.google.api.core.InternalApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.rpc.OperationCallable;
import com.google.api.gax.rpc.UnaryCallable;
@@ -57,13 +58,9 @@
import javax.annotation.Generated;
// AUTO-GENERATED DOCUMENTATION AND CLASS
-/**
- * Base stub class for Cloud Bigtable Admin API.
- *
- * This class is for advanced usage and reflects the underlying API directly. - */ +/** For internal use only. */ @Generated("by gapic-generator") -@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +@InternalApi public abstract class BigtableInstanceAdminStub implements BackgroundResource { @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") diff --git a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStub.java b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStub.java index 463589fb4e32..8a4354273184 100644 --- a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStub.java +++ b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/BigtableTableAdminStub.java @@ -19,6 +19,7 @@ import static com.google.cloud.bigtable.admin.v2.BaseBigtableTableAdminClient.ListTablesPagedResponse; import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; @@ -49,13 +50,9 @@ import javax.annotation.Generated; // AUTO-GENERATED DOCUMENTATION AND CLASS -/** - * Base stub class for Cloud Bigtable Admin API. - * - *
This class is for advanced usage and reflects the underlying API directly. - */ +/** For internal use only. */ @Generated("by gapic-generator") -@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +@InternalApi public abstract class BigtableTableAdminStub implements BackgroundResource { @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") diff --git a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableInstanceAdminCallableFactory.java b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableInstanceAdminCallableFactory.java index 025403e7a437..76ffdc7bde63 100644 --- a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableInstanceAdminCallableFactory.java +++ b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/stub/GrpcBigtableInstanceAdminCallableFactory.java @@ -16,6 +16,7 @@ package com.google.cloud.bigtable.admin.v2.stub; import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; import com.google.api.gax.grpc.GrpcCallSettings; import com.google.api.gax.grpc.GrpcCallableFactory; import com.google.api.gax.grpc.GrpcStubCallableFactory; @@ -35,13 +36,9 @@ import javax.annotation.Generated; // AUTO-GENERATED DOCUMENTATION AND CLASS -/** - * gRPC callable factory implementation for Cloud Bigtable Admin API. - * - *
This class is for advanced usage.
- */
+/** For internal use only. */
@Generated("by gapic-generator")
-@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+@InternalApi
public class GrpcBigtableInstanceAdminCallableFactory implements GrpcStubCallableFactory {
@Override
public This class is for advanced usage and reflects the underlying API directly.
- */
+/** For internal use only. */
@Generated("by gapic-generator")
-@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+@InternalApi
public class GrpcBigtableInstanceAdminStub extends BigtableInstanceAdminStub {
private static final MethodDescriptor This class is for advanced usage.
- */
+/** For internal use only. */
@Generated("by gapic-generator")
-@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+@InternalApi
public class GrpcBigtableTableAdminCallableFactory implements GrpcStubCallableFactory {
@Override
public This class is for advanced usage and reflects the underlying API directly.
- */
+/** For internal use only. */
@Generated("by gapic-generator")
-@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+@InternalApi
public class GrpcBigtableTableAdminStub extends BigtableTableAdminStub {
private static final MethodDescriptor This class provides the ability to make remote calls to the backing service through method
- * calls that map to API methods. Sample code to get started:
- *
- * Note: close() needs to be called on the baseBigtableDataClient object to clean up resources
- * such as threads. In the example above, try-with-resources is used, which automatically calls
- * close().
- *
- * The surface of this class includes several types of Java methods for each of the API's
- * methods:
- *
- * See the individual methods for example code.
- *
- * Many parameters require resource names to be formatted in a particular way. To assist with
- * these names, this class includes a format method for each type of name, and additionally a parse
- * method to extract the individual identifiers contained within names that are returned.
- *
- * This class can be customized by passing in a custom instance of BaseBigtableDataSettings to
- * create(). For example:
- *
- * To customize credentials:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * Sample code:
- *
- * The default instance has everything set to sensible defaults:
- *
- * The builder of this class is recursive, so contained classes are themselves builders. When
- * build() is called, the tree of builders is called to create the complete settings object. For
- * example, to set the total timeout of mutateRow to 30 seconds:
- *
- * Note: This method does not support applying settings to streaming methods.
- */
- public Builder applyToAllUnaryMethods(
- ApiFunction Most defaults are extracted from BaseBigtableDataSettings, however some of the more
+ * Most defaults are extracted from {@link
+ * com.google.cloud.bigtable.data.v2.stub.BigtableStubSettings}, however some of the more
* complex defaults are configured explicitly here. Once the overlayed defaults are configured,
* the base settings are augmented to work with overlayed functionality (like disabling retries
* in the underlying GAPIC client for batching).
diff --git a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/package-info.java b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/package-info.java
index 0f3011b71eed..5f4193d06365 100644
--- a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/package-info.java
+++ b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/package-info.java
@@ -15,25 +15,8 @@
*/
/**
- * A client to Cloud Bigtable API.
+ * A client for the Cloud Bigtable data API.
*
- * The interfaces provided are listed below, along with usage samples.
- *
- * ====================== BaseBigtableDataClient ======================
- *
- * Service Description: Service for reading from and writing to existing Bigtable tables.
- *
- * Sample for BaseBigtableDataClient:
- *
- * This class is for advanced usage and reflects the underlying API directly.
- */
+/** For internal use only. */
@Generated("by gapic-generator")
-@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+@InternalApi
public abstract class BigtableStub implements BackgroundResource {
public ServerStreamingCallable The default instance has everything set to sensible defaults:
- *
- * The builder of this class is recursive, so contained classes are themselves builders. When
- * build() is called, the tree of builders is called to create the complete settings object. For
- * example, to set the total timeout of mutateRow to 30 seconds:
- *
- * This class is considered an internal implementation detail and not meant to be used by
- * applications.
*/
-@InternalApi
public class EnhancedBigtableStubSettings extends StubSettings This class is for advanced usage.
- */
+/** For internal use only. */
@Generated("by gapic-generator")
-@BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+@InternalApi
public class GrpcBigtableCallableFactory implements GrpcStubCallableFactory {
@Override
public This class is for advanced usage and reflects the underlying API directly.
- */
+/** For internal use only. */
@Generated("by gapic-generator")
-@BetaApi("A restructuring of stub classes is planned, so this may break in the future")
+@InternalApi
public class GrpcBigtableStub extends BigtableStub {
private static final MethodDescriptor For internal use, public for technical reasons.
+ */
+@InternalApi
package com.google.cloud.bigtable.gaxx;
+
+import com.google.api.core.InternalApi;
diff --git a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/reframing/package-info.java b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/reframing/package-info.java
index db5b7a4238a2..2c3157249a9f 100644
--- a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/reframing/package-info.java
+++ b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/reframing/package-info.java
@@ -19,5 +19,10 @@
* It is intended for situations when a stream needs to be transformed in such a way where the
* incoming responses do not map 1:1 to the output responses. This is used to transform
* ReadRowsResponse chunks into logical rows, but is generic enough to be used for other purposes.
+ *
+ * For internal use, public for technical reasons.
*/
+@InternalApi
package com.google.cloud.bigtable.gaxx.reframing;
+
+import com.google.api.core.InternalApi;
diff --git a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/retrying/ApiResultRetryAlgorithm.java b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/retrying/ApiResultRetryAlgorithm.java
index 776208d95026..c7f3d18b6241 100644
--- a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/retrying/ApiResultRetryAlgorithm.java
+++ b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/gaxx/retrying/ApiResultRetryAlgorithm.java
@@ -15,12 +15,15 @@
*/
package com.google.cloud.bigtable.gaxx.retrying;
+import com.google.api.core.InternalApi;
import com.google.api.gax.retrying.ResultRetryAlgorithm;
import com.google.api.gax.retrying.TimedAttemptSettings;
import com.google.api.gax.rpc.ApiException;
import com.google.api.gax.rpc.DeadlineExceededException;
import org.threeten.bp.Duration;
+/** For internal use, public for technical reasons. */
+@InternalApi
public class ApiResultRetryAlgorithm Conceptually Cloud Bigtable is composed of instances, clusters nodes and Tables.
+ *
+ * The Cloud Bigtable API consists of 2 parts:
+ *
+ *
- *
- *
- *
- * try (BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create()) {
- * TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * ByteString rowKey = ByteString.copyFromUtf8("");
- * List<Mutation> mutations = new ArrayList<>();
- * MutateRowResponse response = baseBigtableDataClient.mutateRow(tableName, rowKey, mutations);
- * }
- *
- *
- *
- *
- *
- *
- *
- * To customize the endpoint:
- *
- *
- * BaseBigtableDataSettings baseBigtableDataSettings =
- * BaseBigtableDataSettings.newBuilder()
- * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- * .build();
- * BaseBigtableDataClient baseBigtableDataClient =
- * BaseBigtableDataClient.create(baseBigtableDataSettings);
- *
- *
- *
- */
-@Generated("by gapic-generator")
-@BetaApi
-public class BaseBigtableDataClient implements BackgroundResource {
- private final BaseBigtableDataSettings settings;
- private final BigtableStub stub;
-
- /** Constructs an instance of BaseBigtableDataClient with default settings. */
- public static final BaseBigtableDataClient create() throws IOException {
- return create(BaseBigtableDataSettings.newBuilder().build());
- }
-
- /**
- * Constructs an instance of BaseBigtableDataClient, using the given settings. The channels are
- * created based on the settings passed in, or defaults for any settings that are not set.
- */
- public static final BaseBigtableDataClient create(BaseBigtableDataSettings settings)
- throws IOException {
- return new BaseBigtableDataClient(settings);
- }
-
- /**
- * Constructs an instance of BaseBigtableDataClient, using the given stub for making calls. This
- * is for advanced usage - prefer to use BaseBigtableDataSettings}.
- */
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
- public static final BaseBigtableDataClient create(BigtableStub stub) {
- return new BaseBigtableDataClient(stub);
- }
-
- /**
- * Constructs an instance of BaseBigtableDataClient, using the given settings. This is protected
- * so that it is easy to make a subclass, but otherwise, the static factory methods should be
- * preferred.
- */
- protected BaseBigtableDataClient(BaseBigtableDataSettings settings) throws IOException {
- this.settings = settings;
- this.stub = ((BigtableStubSettings) settings.getStubSettings()).createStub();
- }
-
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
- protected BaseBigtableDataClient(BigtableStub stub) {
- this.settings = null;
- this.stub = stub;
- }
-
- public final BaseBigtableDataSettings getSettings() {
- return settings;
- }
-
- @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
- public BigtableStub getStub() {
- return stub;
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Streams back the contents of all requested rows in key order, optionally applying the same
- * Reader filter to each. Depending on their size, rows and cells may be broken up across multiple
- * responses, but atomicity of each row will still be preserved. See the ReadRowsResponse
- * documentation for details.
- *
- *
- * BaseBigtableDataSettings baseBigtableDataSettings =
- * BaseBigtableDataSettings.newBuilder().setEndpoint(myEndpoint).build();
- * BaseBigtableDataClient baseBigtableDataClient =
- * BaseBigtableDataClient.create(baseBigtableDataSettings);
- *
- *
- */
- public final ServerStreamingCallable
- * try (BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create()) {
- * TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * ReadRowsRequest request = ReadRowsRequest.newBuilder()
- * .setTableName(tableName.toString())
- * .build();
- *
- * ServerStream<ReadRowsResponse> stream = baseBigtableDataClient.readRowsCallable().call(request);
- * for (ReadRowsResponse response : stream) {
- * // Do something when receive a response
- * }
- * }
- *
- */
- public final ServerStreamingCallable
- * try (BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create()) {
- * TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * SampleRowKeysRequest request = SampleRowKeysRequest.newBuilder()
- * .setTableName(tableName.toString())
- * .build();
- *
- * ServerStream<SampleRowKeysResponse> stream = baseBigtableDataClient.sampleRowKeysCallable().call(request);
- * for (SampleRowKeysResponse response : stream) {
- * // Do something when receive a response
- * }
- * }
- *
- *
- * @param tableName The unique name of the table to which the mutation should be applied. Values
- * are of the form `projects/<project>/instances/<instance>/tables/<table>`.
- * @param rowKey The key of the row to which the mutation should be applied.
- * @param mutations Changes to be atomically applied to the specified row. Entries are applied in
- * order, meaning that earlier mutations can be masked by later ones. Must contain at least
- * one entry and at most 100000.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final MutateRowResponse mutateRow(
- TableName tableName, ByteString rowKey, List
- * try (BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create()) {
- * TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * ByteString rowKey = ByteString.copyFromUtf8("");
- * List<Mutation> mutations = new ArrayList<>();
- * MutateRowResponse response = baseBigtableDataClient.mutateRow(tableName, rowKey, mutations);
- * }
- *
- *
- * @param tableName The unique name of the table to which the mutation should be applied. Values
- * are of the form `projects/<project>/instances/<instance>/tables/<table>`.
- * @param rowKey The key of the row to which the mutation should be applied.
- * @param mutations Changes to be atomically applied to the specified row. Entries are applied in
- * order, meaning that earlier mutations can be masked by later ones. Must contain at least
- * one entry and at most 100000.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final MutateRowResponse mutateRow(
- String tableName, ByteString rowKey, List
- * try (BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create()) {
- * TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * ByteString rowKey = ByteString.copyFromUtf8("");
- * List<Mutation> mutations = new ArrayList<>();
- * MutateRowResponse response = baseBigtableDataClient.mutateRow(tableName.toString(), rowKey, mutations);
- * }
- *
- *
- * @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 MutateRowResponse mutateRow(MutateRowRequest request) {
- return mutateRowCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Mutates a row atomically. Cells already present in the row are left unchanged unless explicitly
- * changed by `mutation`.
- *
- *
- * try (BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create()) {
- * TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * ByteString rowKey = ByteString.copyFromUtf8("");
- * List<Mutation> mutations = new ArrayList<>();
- * MutateRowRequest request = MutateRowRequest.newBuilder()
- * .setTableName(tableName.toString())
- * .setRowKey(rowKey)
- * .addAllMutations(mutations)
- * .build();
- * MutateRowResponse response = baseBigtableDataClient.mutateRow(request);
- * }
- *
- */
- public final UnaryCallable
- * try (BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create()) {
- * TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * ByteString rowKey = ByteString.copyFromUtf8("");
- * List<Mutation> mutations = new ArrayList<>();
- * MutateRowRequest request = MutateRowRequest.newBuilder()
- * .setTableName(tableName.toString())
- * .setRowKey(rowKey)
- * .addAllMutations(mutations)
- * .build();
- * ApiFuture<MutateRowResponse> future = baseBigtableDataClient.mutateRowCallable().futureCall(request);
- * // Do something
- * MutateRowResponse response = future.get();
- * }
- *
- */
- public final ServerStreamingCallable
- * try (BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create()) {
- * TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * List<MutateRowsRequest.Entry> entries = new ArrayList<>();
- * MutateRowsRequest request = MutateRowsRequest.newBuilder()
- * .setTableName(tableName.toString())
- * .addAllEntries(entries)
- * .build();
- *
- * ServerStream<MutateRowsResponse> stream = baseBigtableDataClient.mutateRowsCallable().call(request);
- * for (MutateRowsResponse response : stream) {
- * // Do something when receive a response
- * }
- * }
- *
- *
- * @param tableName The unique name of the table to which the conditional mutation should be
- * applied. Values are of the form
- * `projects/<project>/instances/<instance>/tables/<table>`.
- * @param rowKey The key of the row to which the conditional mutation should be applied.
- * @param predicateFilter The filter to be applied to the contents of the specified row. Depending
- * on whether or not any results are yielded, either `true_mutations` or `false_mutations`
- * will be executed. If unset, checks that the row contains any values at all.
- * @param trueMutations Changes to be atomically applied to the specified row if
- * `predicate_filter` yields at least one cell when applied to `row_key`. Entries are applied
- * in order, meaning that earlier mutations can be masked by later ones. Must contain at least
- * one entry if `false_mutations` is empty, and at most 100000.
- * @param falseMutations Changes to be atomically applied to the specified row if
- * `predicate_filter` does not yield any cells when applied to `row_key`. Entries are applied
- * in order, meaning that earlier mutations can be masked by later ones. Must contain at least
- * one entry if `true_mutations` is empty, and at most 100000.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final CheckAndMutateRowResponse checkAndMutateRow(
- TableName tableName,
- ByteString rowKey,
- RowFilter predicateFilter,
- List
- * try (BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create()) {
- * TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * ByteString rowKey = ByteString.copyFromUtf8("");
- * RowFilter predicateFilter = RowFilter.newBuilder().build();
- * List<Mutation> trueMutations = new ArrayList<>();
- * List<Mutation> falseMutations = new ArrayList<>();
- * CheckAndMutateRowResponse response = baseBigtableDataClient.checkAndMutateRow(tableName, rowKey, predicateFilter, trueMutations, falseMutations);
- * }
- *
- *
- * @param tableName The unique name of the table to which the conditional mutation should be
- * applied. Values are of the form
- * `projects/<project>/instances/<instance>/tables/<table>`.
- * @param rowKey The key of the row to which the conditional mutation should be applied.
- * @param predicateFilter The filter to be applied to the contents of the specified row. Depending
- * on whether or not any results are yielded, either `true_mutations` or `false_mutations`
- * will be executed. If unset, checks that the row contains any values at all.
- * @param trueMutations Changes to be atomically applied to the specified row if
- * `predicate_filter` yields at least one cell when applied to `row_key`. Entries are applied
- * in order, meaning that earlier mutations can be masked by later ones. Must contain at least
- * one entry if `false_mutations` is empty, and at most 100000.
- * @param falseMutations Changes to be atomically applied to the specified row if
- * `predicate_filter` does not yield any cells when applied to `row_key`. Entries are applied
- * in order, meaning that earlier mutations can be masked by later ones. Must contain at least
- * one entry if `true_mutations` is empty, and at most 100000.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final CheckAndMutateRowResponse checkAndMutateRow(
- String tableName,
- ByteString rowKey,
- RowFilter predicateFilter,
- List
- * try (BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create()) {
- * TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * ByteString rowKey = ByteString.copyFromUtf8("");
- * RowFilter predicateFilter = RowFilter.newBuilder().build();
- * List<Mutation> trueMutations = new ArrayList<>();
- * List<Mutation> falseMutations = new ArrayList<>();
- * CheckAndMutateRowResponse response = baseBigtableDataClient.checkAndMutateRow(tableName.toString(), rowKey, predicateFilter, trueMutations, falseMutations);
- * }
- *
- *
- * @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 CheckAndMutateRowResponse checkAndMutateRow(CheckAndMutateRowRequest request) {
- return checkAndMutateRowCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Mutates a row atomically based on the output of a predicate Reader filter.
- *
- *
- * try (BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create()) {
- * TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * ByteString rowKey = ByteString.copyFromUtf8("");
- * CheckAndMutateRowRequest request = CheckAndMutateRowRequest.newBuilder()
- * .setTableName(tableName.toString())
- * .setRowKey(rowKey)
- * .build();
- * CheckAndMutateRowResponse response = baseBigtableDataClient.checkAndMutateRow(request);
- * }
- *
- */
- public final UnaryCallable
- * try (BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create()) {
- * TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * ByteString rowKey = ByteString.copyFromUtf8("");
- * CheckAndMutateRowRequest request = CheckAndMutateRowRequest.newBuilder()
- * .setTableName(tableName.toString())
- * .setRowKey(rowKey)
- * .build();
- * ApiFuture<CheckAndMutateRowResponse> future = baseBigtableDataClient.checkAndMutateRowCallable().futureCall(request);
- * // Do something
- * CheckAndMutateRowResponse response = future.get();
- * }
- *
- *
- * @param tableName The unique name of the table to which the read/modify/write rules should be
- * applied. Values are of the form
- * `projects/<project>/instances/<instance>/tables/<table>`.
- * @param rowKey The key of the row to which the read/modify/write rules should be applied.
- * @param rules Rules specifying how the specified row's contents are to be transformed into
- * writes. Entries are applied in order, meaning that earlier rules will affect the results of
- * later ones.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ReadModifyWriteRowResponse readModifyWriteRow(
- TableName tableName, ByteString rowKey, List
- * try (BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create()) {
- * TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * ByteString rowKey = ByteString.copyFromUtf8("");
- * List<ReadModifyWriteRule> rules = new ArrayList<>();
- * ReadModifyWriteRowResponse response = baseBigtableDataClient.readModifyWriteRow(tableName, rowKey, rules);
- * }
- *
- *
- * @param tableName The unique name of the table to which the read/modify/write rules should be
- * applied. Values are of the form
- * `projects/<project>/instances/<instance>/tables/<table>`.
- * @param rowKey The key of the row to which the read/modify/write rules should be applied.
- * @param rules Rules specifying how the specified row's contents are to be transformed into
- * writes. Entries are applied in order, meaning that earlier rules will affect the results of
- * later ones.
- * @throws com.google.api.gax.rpc.ApiException if the remote call fails
- */
- public final ReadModifyWriteRowResponse readModifyWriteRow(
- String tableName, ByteString rowKey, List
- * try (BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create()) {
- * TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * ByteString rowKey = ByteString.copyFromUtf8("");
- * List<ReadModifyWriteRule> rules = new ArrayList<>();
- * ReadModifyWriteRowResponse response = baseBigtableDataClient.readModifyWriteRow(tableName.toString(), rowKey, rules);
- * }
- *
- *
- * @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 ReadModifyWriteRowResponse readModifyWriteRow(ReadModifyWriteRowRequest request) {
- return readModifyWriteRowCallable().call(request);
- }
-
- // AUTO-GENERATED DOCUMENTATION AND METHOD
- /**
- * Modifies a row atomically on the server. The method reads the latest existing timestamp and
- * value from the specified columns and writes a new entry based on pre-defined read/modify/write
- * rules. The new value for the timestamp is the greater of the existing timestamp or the current
- * server time. The method returns the new contents of all modified cells.
- *
- *
- * try (BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create()) {
- * TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * ByteString rowKey = ByteString.copyFromUtf8("");
- * List<ReadModifyWriteRule> rules = new ArrayList<>();
- * ReadModifyWriteRowRequest request = ReadModifyWriteRowRequest.newBuilder()
- * .setTableName(tableName.toString())
- * .setRowKey(rowKey)
- * .addAllRules(rules)
- * .build();
- * ReadModifyWriteRowResponse response = baseBigtableDataClient.readModifyWriteRow(request);
- * }
- *
- */
- public final UnaryCallable
- * try (BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create()) {
- * TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * ByteString rowKey = ByteString.copyFromUtf8("");
- * List<ReadModifyWriteRule> rules = new ArrayList<>();
- * ReadModifyWriteRowRequest request = ReadModifyWriteRowRequest.newBuilder()
- * .setTableName(tableName.toString())
- * .setRowKey(rowKey)
- * .addAllRules(rules)
- * .build();
- * ApiFuture<ReadModifyWriteRowResponse> future = baseBigtableDataClient.readModifyWriteRowCallable().futureCall(request);
- * // Do something
- * ReadModifyWriteRowResponse response = future.get();
- * }
- *
- *
- *
- *
- *
- */
-@Generated("by gapic-generator")
-@BetaApi
-public class BaseBigtableDataSettings extends ClientSettings
- * BaseBigtableDataSettings.Builder baseBigtableDataSettingsBuilder =
- * BaseBigtableDataSettings.newBuilder();
- * baseBigtableDataSettingsBuilder.mutateRowSettings().getRetrySettings().toBuilder()
- * .setTotalTimeout(Duration.ofSeconds(30));
- * BaseBigtableDataSettings baseBigtableDataSettings = baseBigtableDataSettingsBuilder.build();
- *
- *
- *
+ * @see com.google.cloud.bigtable.data.v2.BigtableDataClient for usage.
*/
package com.google.cloud.bigtable.data.v2;
diff --git a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStub.java b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStub.java
index a2d51e0db1a1..dbbb01230653 100644
--- a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStub.java
+++ b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/BigtableStub.java
@@ -15,7 +15,7 @@
*/
package com.google.cloud.bigtable.data.v2.stub;
-import com.google.api.core.BetaApi;
+import com.google.api.core.InternalApi;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.rpc.ServerStreamingCallable;
import com.google.api.gax.rpc.UnaryCallable;
@@ -34,13 +34,9 @@
import javax.annotation.Generated;
// AUTO-GENERATED DOCUMENTATION AND CLASS
-/**
- * Base stub class for Cloud Bigtable API.
- *
- *
- * try (BaseBigtableDataClient baseBigtableDataClient = BaseBigtableDataClient.create()) {
- * TableName tableName = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
- * ByteString rowKey = ByteString.copyFromUtf8("");
- * List<Mutation> mutations = new ArrayList<>();
- * MutateRowResponse response = baseBigtableDataClient.mutateRow(tableName, rowKey, mutations);
- * }
- *
- *
- *
- *
- *
- *
- */
+/** For internal use only. */
@Generated("by gapic-generator")
-@BetaApi
+@InternalApi
public class BigtableStubSettings extends StubSettings
- * BigtableStubSettings.Builder baseBigtableDataSettingsBuilder =
- * BigtableStubSettings.newBuilder();
- * baseBigtableDataSettingsBuilder.mutateRowSettings().getRetrySettings().toBuilder()
- * .setTotalTimeout(Duration.ofSeconds(30));
- * BigtableStubSettings baseBigtableDataSettings = baseBigtableDataSettingsBuilder.build();
- *
- * Concepts
+ *
+ *
+ *
+ *
+ * Clients
+ *
+ *
+ *
+ *
* @see com.google.cloud.bigtable.data.v2.BigtableDataClient For the data client.
+ * @see com.google.cloud.bigtable.admin.v2.BigtableInstanceAdminSettings For the instance admin
+ * client.
+ * @see com.google.cloud.bigtable.admin.v2.BigtableTableAdminClient For the table admin client.
*/
package com.google.cloud.bigtable;
diff --git a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/HiddenGapicApiTest.java b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/HiddenGapicApiTest.java
new file mode 100644
index 000000000000..354a725b6e5c
--- /dev/null
+++ b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/admin/v2/HiddenGapicApiTest.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2019 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.cloud.bigtable.admin.v2;
+
+import static com.google.common.truth.Truth.assertWithMessage;
+
+import com.google.api.core.InternalApi;
+import com.google.cloud.bigtable.admin.v2.stub.BigtableInstanceAdminStub;
+import com.google.cloud.bigtable.admin.v2.stub.BigtableTableAdminStub;
+import com.google.cloud.bigtable.admin.v2.stub.GrpcBigtableInstanceAdminCallableFactory;
+import com.google.cloud.bigtable.admin.v2.stub.GrpcBigtableInstanceAdminStub;
+import com.google.cloud.bigtable.admin.v2.stub.GrpcBigtableTableAdminCallableFactory;
+import com.google.cloud.bigtable.admin.v2.stub.GrpcBigtableTableAdminStub;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+
+/**
+ * Tests that the underlying GAPIC api is marked as {@code @InternalApi}. This transformation
+ * happens in synth.py.
+ */
+@RunWith(Parameterized.class)
+public class HiddenGapicApiTest {
+ private Class> testClass;
+
+ @Parameters
+ public static Object[] data() {
+ return new Object[] {
+ GrpcBigtableInstanceAdminCallableFactory.class,
+ GrpcBigtableInstanceAdminStub.class,
+ BaseBigtableInstanceAdminSettings.class,
+ GrpcBigtableTableAdminCallableFactory.class,
+ GrpcBigtableTableAdminStub.class,
+ BaseBigtableTableAdminSettings.class,
+ BigtableInstanceAdminStub.class,
+ BigtableTableAdminStub.class,
+ BaseBigtableInstanceAdminClient.class,
+ BaseBigtableTableAdminClient.class,
+ };
+ }
+
+ public HiddenGapicApiTest(Class> testClass) {
+ this.testClass = testClass;
+ }
+
+ @Test
+ public void test() {
+ assertWithMessage("%s should be annotated with @InternaOnly", testClass.getName())
+ .that(testClass.getAnnotation(InternalApi.class))
+ .isNotNull();
+ }
+}
diff --git a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BaseBigtableDataClientTest.java b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BaseBigtableDataClientTest.java
deleted file mode 100644
index b42279ebc2ff..000000000000
--- a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/BaseBigtableDataClientTest.java
+++ /dev/null
@@ -1,383 +0,0 @@
-/*
- * Copyright 2019 Google LLC
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.google.cloud.bigtable.data.v2;
-
-import com.google.api.gax.core.NoCredentialsProvider;
-import com.google.api.gax.grpc.GaxGrpcProperties;
-import com.google.api.gax.grpc.testing.LocalChannelProvider;
-import com.google.api.gax.grpc.testing.MockGrpcService;
-import com.google.api.gax.grpc.testing.MockServiceHelper;
-import com.google.api.gax.grpc.testing.MockStreamObserver;
-import com.google.api.gax.rpc.ApiClientHeaderProvider;
-import com.google.api.gax.rpc.InvalidArgumentException;
-import com.google.api.gax.rpc.ServerStreamingCallable;
-import com.google.api.gax.rpc.StatusCode;
-import com.google.bigtable.v2.CheckAndMutateRowRequest;
-import com.google.bigtable.v2.CheckAndMutateRowResponse;
-import com.google.bigtable.v2.MutateRowRequest;
-import com.google.bigtable.v2.MutateRowResponse;
-import com.google.bigtable.v2.MutateRowsRequest;
-import com.google.bigtable.v2.MutateRowsResponse;
-import com.google.bigtable.v2.Mutation;
-import com.google.bigtable.v2.ReadModifyWriteRowRequest;
-import com.google.bigtable.v2.ReadModifyWriteRowResponse;
-import com.google.bigtable.v2.ReadModifyWriteRule;
-import com.google.bigtable.v2.ReadRowsRequest;
-import com.google.bigtable.v2.ReadRowsResponse;
-import com.google.bigtable.v2.RowFilter;
-import com.google.bigtable.v2.SampleRowKeysRequest;
-import com.google.bigtable.v2.SampleRowKeysResponse;
-import com.google.bigtable.v2.TableName;
-import com.google.protobuf.AbstractMessage;
-import com.google.protobuf.ByteString;
-import io.grpc.Status;
-import io.grpc.StatusRuntimeException;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.concurrent.ExecutionException;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-@javax.annotation.Generated("by GAPIC")
-public class BaseBigtableDataClientTest {
- private static MockBigtable mockBigtable;
- private static MockServiceHelper serviceHelper;
- private BaseBigtableDataClient client;
- private LocalChannelProvider channelProvider;
-
- @BeforeClass
- public static void startStaticServer() {
- mockBigtable = new MockBigtable();
- serviceHelper =
- new MockServiceHelper("in-process-1", Arrays.
+ *
+ *