Skip to content

Commit f081ff0

Browse files
build: Remove @internalapi from GAPIC Admin Base clients (#2834)
* build: Remove @internalapi from GAPIC Admin Base clients Updates owlbot.py to stop injecting `@InternalApi` into `BaseBigtableTableAdminClient`, `BaseBigtableInstanceAdminClient`, and their respective Settings classes. Since we recently exposed these Base classes to users via `getBaseClient()` as part of the GAPIC modernization effort, they are now part of the public API surface and should no longer be marked as internal. Stubs remain marked as internal. Tracking Bug: b/475818901 * chore: generate libraries at Fri Mar 6 17:26:03 UTC 2026 * chore: PR comment * chore: generate libraries at Fri Mar 6 17:57:45 UTC 2026 --------- Co-authored-by: cloud-java-bot <cloud-java-bot@google.com>
1 parent 17707be commit f081ff0

11 files changed

+1627
-63
lines changed

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

Lines changed: 671 additions & 4 deletions
Large diffs are not rendered by default.

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

Lines changed: 87 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import static com.google.cloud.bigtable.admin.v2.BaseBigtableInstanceAdminClient.ListMaterializedViewsPagedResponse;
2323

2424
import com.google.api.core.ApiFunction;
25-
import com.google.api.core.InternalApi;
2625
import com.google.api.gax.core.GoogleCredentialsProvider;
2726
import com.google.api.gax.core.InstantiatingExecutorProvider;
2827
import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
@@ -93,9 +92,83 @@
9392
import javax.annotation.Generated;
9493

9594
// AUTO-GENERATED DOCUMENTATION AND CLASS.
96-
/** For internal use only. */
97-
@Generated("by gapic-generator")
98-
@InternalApi
95+
/**
96+
* Settings class to configure an instance of {@link BaseBigtableInstanceAdminClient}.
97+
*
98+
* <p>The default instance has everything set to sensible defaults:
99+
*
100+
* <ul>
101+
* <li>The default service address (bigtableadmin.googleapis.com) and default port (443) are used.
102+
* <li>Credentials are acquired automatically through Application Default Credentials.
103+
* <li>Retries are configured for idempotent methods but not for non-idempotent methods.
104+
* </ul>
105+
*
106+
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
107+
* build() is called, the tree of builders is called to create the complete settings object.
108+
*
109+
* <p>For example, to set the
110+
* [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
111+
* of getInstance:
112+
*
113+
* <pre>{@code
114+
* // This snippet has been automatically generated and should be regarded as a code template only.
115+
* // It will require modifications to work:
116+
* // - It may require correct/in-range values for request initialization.
117+
* // - It may require specifying regional endpoints when creating the service client as shown in
118+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
119+
* BaseBigtableInstanceAdminSettings.Builder baseBigtableInstanceAdminSettingsBuilder =
120+
* BaseBigtableInstanceAdminSettings.newBuilder();
121+
* baseBigtableInstanceAdminSettingsBuilder
122+
* .getInstanceSettings()
123+
* .setRetrySettings(
124+
* baseBigtableInstanceAdminSettingsBuilder
125+
* .getInstanceSettings()
126+
* .getRetrySettings()
127+
* .toBuilder()
128+
* .setInitialRetryDelayDuration(Duration.ofSeconds(1))
129+
* .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
130+
* .setMaxAttempts(5)
131+
* .setMaxRetryDelayDuration(Duration.ofSeconds(30))
132+
* .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
133+
* .setRetryDelayMultiplier(1.3)
134+
* .setRpcTimeoutMultiplier(1.5)
135+
* .setTotalTimeoutDuration(Duration.ofSeconds(300))
136+
* .build());
137+
* BaseBigtableInstanceAdminSettings baseBigtableInstanceAdminSettings =
138+
* baseBigtableInstanceAdminSettingsBuilder.build();
139+
* }</pre>
140+
*
141+
* Please refer to the [Client Side Retry
142+
* Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting
143+
* retries.
144+
*
145+
* <p>To configure the RetrySettings of a Long Running Operation method, create an
146+
* OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to
147+
* configure the RetrySettings for createInstance:
148+
*
149+
* <pre>{@code
150+
* // This snippet has been automatically generated and should be regarded as a code template only.
151+
* // It will require modifications to work:
152+
* // - It may require correct/in-range values for request initialization.
153+
* // - It may require specifying regional endpoints when creating the service client as shown in
154+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
155+
* BaseBigtableInstanceAdminSettings.Builder baseBigtableInstanceAdminSettingsBuilder =
156+
* BaseBigtableInstanceAdminSettings.newBuilder();
157+
* TimedRetryAlgorithm timedRetryAlgorithm =
158+
* OperationalTimedPollAlgorithm.create(
159+
* RetrySettings.newBuilder()
160+
* .setInitialRetryDelayDuration(Duration.ofMillis(500))
161+
* .setRetryDelayMultiplier(1.5)
162+
* .setMaxRetryDelayDuration(Duration.ofMillis(5000))
163+
* .setTotalTimeoutDuration(Duration.ofHours(24))
164+
* .build());
165+
* baseBigtableInstanceAdminSettingsBuilder
166+
* .createClusterOperationSettings()
167+
* .setPollingAlgorithm(timedRetryAlgorithm)
168+
* .build();
169+
* }</pre>
170+
*/
171+
@Generated("by gapic-generator-java")
99172
public class BaseBigtableInstanceAdminSettings
100173
extends ClientSettings<BaseBigtableInstanceAdminSettings> {
101174

@@ -121,6 +194,11 @@ public UnaryCallSettings<ListInstancesRequest, ListInstancesResponse> listInstan
121194
return ((BigtableInstanceAdminStubSettings) getStubSettings()).listInstancesSettings();
122195
}
123196

197+
/** Returns the object with the settings used for calls to updateInstance. */
198+
public UnaryCallSettings<Instance, Instance> updateInstanceSettings() {
199+
return ((BigtableInstanceAdminStubSettings) getStubSettings()).updateInstanceSettings();
200+
}
201+
124202
/** Returns the object with the settings used for calls to partialUpdateInstance. */
125203
public UnaryCallSettings<PartialUpdateInstanceRequest, Operation>
126204
partialUpdateInstanceSettings() {
@@ -453,6 +531,11 @@ public UnaryCallSettings.Builder<GetInstanceRequest, Instance> getInstanceSettin
453531
return getStubSettingsBuilder().listInstancesSettings();
454532
}
455533

534+
/** Returns the builder for the settings used for calls to updateInstance. */
535+
public UnaryCallSettings.Builder<Instance, Instance> updateInstanceSettings() {
536+
return getStubSettingsBuilder().updateInstanceSettings();
537+
}
538+
456539
/** Returns the builder for the settings used for calls to partialUpdateInstance. */
457540
public UnaryCallSettings.Builder<PartialUpdateInstanceRequest, Operation>
458541
partialUpdateInstanceSettings() {

0 commit comments

Comments
 (0)