Skip to content
This repository was archived by the owner on May 8, 2026. It is now read-only.

Commit 2a6e35c

Browse files
committed
feat: Expose autogenerated GAPIC client via getNewApi()
This change adds a `getNewApi()` method to `BigtableTableAdminClient` which returns the underlying `BaseBigtableTableAdminClient`. By using composition, we expose the fully generated GAPIC client to users, allowing them to access the newest features and proto-based methods. This maintains the legacy client as a backward-compatible facade without risking method signature collisions. This addresses the legacy client integration phase of the Admin API GAPIC upgrade. Tracking Bug: b/475818901
1 parent 5de9d30 commit 2a6e35c

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/admin/v2/BigtableTableAdminClient.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ public final class BigtableTableAdminClient implements AutoCloseable {
151151
private final EnhancedBigtableTableAdminStub stub;
152152
private final String projectId;
153153
private final String instanceId;
154+
private final BaseBigtableTableAdminClient newApi;
154155

155156
/** Constructs an instance of BigtableTableAdminClient with the given project and instance IDs. */
156157
public static BigtableTableAdminClient create(
@@ -190,6 +191,7 @@ private BigtableTableAdminClient(
190191
this.projectId = projectId;
191192
this.instanceId = instanceId;
192193
this.stub = stub;
194+
this.newApi = BaseBigtableTableAdminClient.create(stub);
193195
}
194196

195197
/** Gets the project ID of the instance whose tables this client manages. */
@@ -202,6 +204,14 @@ public String getInstanceId() {
202204
return instanceId;
203205
}
204206

207+
/**
208+
* Returns the underlying autogenerated GAPIC client.
209+
* This provides access to the newest features and proto-based methods.
210+
*/
211+
public BaseBigtableTableAdminClient getNewApi() {
212+
return newApi;
213+
}
214+
205215
@Override
206216
public void close() {
207217
stub.close();

0 commit comments

Comments
 (0)