Skip to content

Commit

Permalink
chore: googleapis updates (#1290)
Browse files Browse the repository at this point in the history
BEGIN_COMMIT_OVERRIDE
feat(generated): Cloud Bigtable Undelete Table service and message proto files
feat(generated): Add storage_utilization_gib_per_node to Autoscaling target
END_COMMIT_OVERRIDE

- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 458022604

Source-Link: googleapis/googleapis@e5507fc

Source-Link: googleapis/googleapis-gen@2c26a74
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMmMyNmE3NDQwODdhZDA2MzY3YWRiNDQ2NDljOTNiNzcyZjk3Y2MyNCJ9
  • Loading branch information
gcf-owl-bot[bot] committed Jun 29, 2022
1 parent e0bd6c9 commit a4c6621
Show file tree
Hide file tree
Showing 21 changed files with 3,056 additions and 296 deletions.
Expand Up @@ -63,6 +63,8 @@
import com.google.bigtable.admin.v2.SnapshotTableRequest;
import com.google.bigtable.admin.v2.Table;
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.UpdateBackupRequest;
import com.google.cloud.bigtable.admin.v2.stub.BigtableTableAdminStub;
import com.google.cloud.bigtable.admin.v2.stub.BigtableTableAdminStubSettings;
Expand Down Expand Up @@ -940,6 +942,137 @@ public final UnaryCallable<DeleteTableRequest, Empty> deleteTableCallable() {
return stub.deleteTableCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Restores a specified table which was accidentally deleted.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
* BaseBigtableTableAdminClient.create()) {
* TableName name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]");
* Table response = baseBigtableTableAdminClient.undeleteTableAsync(name).get();
* }
* }</pre>
*
* @param name Required. The unique name of the table to be restored. 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 OperationFuture<Table, UndeleteTableMetadata> undeleteTableAsync(TableName name) {
UndeleteTableRequest request =
UndeleteTableRequest.newBuilder().setName(name == null ? null : name.toString()).build();
return undeleteTableAsync(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Restores a specified table which was accidentally deleted.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
* BaseBigtableTableAdminClient.create()) {
* String name = TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString();
* Table response = baseBigtableTableAdminClient.undeleteTableAsync(name).get();
* }
* }</pre>
*
* @param name Required. The unique name of the table to be restored. 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 OperationFuture<Table, UndeleteTableMetadata> undeleteTableAsync(String name) {
UndeleteTableRequest request = UndeleteTableRequest.newBuilder().setName(name).build();
return undeleteTableAsync(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Restores a specified table which was accidentally deleted.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
* BaseBigtableTableAdminClient.create()) {
* UndeleteTableRequest request =
* UndeleteTableRequest.newBuilder()
* .setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
* .build();
* Table response = baseBigtableTableAdminClient.undeleteTableAsync(request).get();
* }
* }</pre>
*
* @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<Table, UndeleteTableMetadata> undeleteTableAsync(
UndeleteTableRequest request) {
return undeleteTableOperationCallable().futureCall(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Restores a specified table which was accidentally deleted.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
* BaseBigtableTableAdminClient.create()) {
* UndeleteTableRequest request =
* UndeleteTableRequest.newBuilder()
* .setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
* .build();
* OperationFuture<Table, UndeleteTableMetadata> future =
* baseBigtableTableAdminClient.undeleteTableOperationCallable().futureCall(request);
* // Do something.
* Table response = future.get();
* }
* }</pre>
*/
public final OperationCallable<UndeleteTableRequest, Table, UndeleteTableMetadata>
undeleteTableOperationCallable() {
return stub.undeleteTableOperationCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Restores a specified table which was accidentally deleted.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
* BaseBigtableTableAdminClient.create()) {
* UndeleteTableRequest request =
* UndeleteTableRequest.newBuilder()
* .setName(TableName.of("[PROJECT]", "[INSTANCE]", "[TABLE]").toString())
* .build();
* ApiFuture<Operation> future =
* baseBigtableTableAdminClient.undeleteTableCallable().futureCall(request);
* // Do something.
* Operation response = future.get();
* }
* }</pre>
*/
public final UnaryCallable<UndeleteTableRequest, Operation> undeleteTableCallable() {
return stub.undeleteTableCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Performs a series of column family modifications on the specified table. Either all or none of
Expand Down
Expand Up @@ -63,6 +63,8 @@
import com.google.bigtable.admin.v2.SnapshotTableMetadata;
import com.google.bigtable.admin.v2.SnapshotTableRequest;
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.UpdateBackupRequest;
import com.google.cloud.bigtable.admin.v2.stub.BigtableTableAdminStubSettings;
import com.google.iam.v1.GetIamPolicyRequest;
Expand Down Expand Up @@ -117,6 +119,17 @@ public UnaryCallSettings<DeleteTableRequest, Empty> deleteTableSettings() {
return ((BigtableTableAdminStubSettings) getStubSettings()).deleteTableSettings();
}

/** Returns the object with the settings used for calls to undeleteTable. */
public UnaryCallSettings<UndeleteTableRequest, Operation> undeleteTableSettings() {
return ((BigtableTableAdminStubSettings) getStubSettings()).undeleteTableSettings();
}

/** Returns the object with the settings used for calls to undeleteTable. */
public OperationCallSettings<UndeleteTableRequest, Table, UndeleteTableMetadata>
undeleteTableOperationSettings() {
return ((BigtableTableAdminStubSettings) getStubSettings()).undeleteTableOperationSettings();
}

/** Returns the object with the settings used for calls to modifyColumnFamilies. */
public UnaryCallSettings<ModifyColumnFamiliesRequest, Table> modifyColumnFamiliesSettings() {
return ((BigtableTableAdminStubSettings) getStubSettings()).modifyColumnFamiliesSettings();
Expand Down Expand Up @@ -357,6 +370,17 @@ public UnaryCallSettings.Builder<DeleteTableRequest, Empty> deleteTableSettings(
return getStubSettingsBuilder().deleteTableSettings();
}

/** Returns the builder for the settings used for calls to undeleteTable. */
public UnaryCallSettings.Builder<UndeleteTableRequest, Operation> undeleteTableSettings() {
return getStubSettingsBuilder().undeleteTableSettings();
}

/** Returns the builder for the settings used for calls to undeleteTable. */
public OperationCallSettings.Builder<UndeleteTableRequest, Table, UndeleteTableMetadata>
undeleteTableOperationSettings() {
return getStubSettingsBuilder().undeleteTableOperationSettings();
}

/** Returns the builder for the settings used for calls to modifyColumnFamilies. */
public UnaryCallSettings.Builder<ModifyColumnFamiliesRequest, Table>
modifyColumnFamiliesSettings() {
Expand Down
Expand Up @@ -120,6 +120,8 @@ public String toString() {
.add("restoreTableSettings", stubSettings.restoreTableSettings())
.add("restoreTableOperationSettings", stubSettings.restoreTableOperationSettings())
.add("stubSettings", stubSettings)
.add("undeleteTableSettings", stubSettings.undeleteTableSettings())
.add("undeleteTableOperationSettings", stubSettings.undeleteTableOperationSettings())
.toString();
}

Expand Down
Expand Up @@ -145,6 +145,9 @@
"TestIamPermissions": {
"methods": ["testIamPermissions", "testIamPermissions", "testIamPermissions", "testIamPermissionsCallable"]
},
"UndeleteTable": {
"methods": ["undeleteTableAsync", "undeleteTableAsync", "undeleteTableAsync", "undeleteTableOperationCallable", "undeleteTableCallable"]
},
"UpdateBackup": {
"methods": ["updateBackup", "updateBackup", "updateBackupCallable"]
}
Expand Down
Expand Up @@ -54,6 +54,8 @@
import com.google.bigtable.admin.v2.SnapshotTableMetadata;
import com.google.bigtable.admin.v2.SnapshotTableRequest;
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.UpdateBackupRequest;
import com.google.iam.v1.GetIamPolicyRequest;
import com.google.iam.v1.Policy;
Expand Down Expand Up @@ -106,6 +108,15 @@ public UnaryCallable<DeleteTableRequest, Empty> deleteTableCallable() {
throw new UnsupportedOperationException("Not implemented: deleteTableCallable()");
}

public OperationCallable<UndeleteTableRequest, Table, UndeleteTableMetadata>
undeleteTableOperationCallable() {
throw new UnsupportedOperationException("Not implemented: undeleteTableOperationCallable()");
}

public UnaryCallable<UndeleteTableRequest, Operation> undeleteTableCallable() {
throw new UnsupportedOperationException("Not implemented: undeleteTableCallable()");
}

public UnaryCallable<ModifyColumnFamiliesRequest, Table> modifyColumnFamiliesCallable() {
throw new UnsupportedOperationException("Not implemented: modifyColumnFamiliesCallable()");
}
Expand Down
Expand Up @@ -76,6 +76,8 @@
import com.google.bigtable.admin.v2.SnapshotTableMetadata;
import com.google.bigtable.admin.v2.SnapshotTableRequest;
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.UpdateBackupRequest;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
Expand Down Expand Up @@ -151,6 +153,9 @@ public class BigtableTableAdminStubSettings extends StubSettings<BigtableTableAd
listTablesSettings;
private final UnaryCallSettings<GetTableRequest, Table> getTableSettings;
private final UnaryCallSettings<DeleteTableRequest, Empty> deleteTableSettings;
private final UnaryCallSettings<UndeleteTableRequest, Operation> undeleteTableSettings;
private final OperationCallSettings<UndeleteTableRequest, Table, UndeleteTableMetadata>
undeleteTableOperationSettings;
private final UnaryCallSettings<ModifyColumnFamiliesRequest, Table> modifyColumnFamiliesSettings;
private final UnaryCallSettings<DropRowRangeRequest, Empty> dropRowRangeSettings;
private final UnaryCallSettings<GenerateConsistencyTokenRequest, GenerateConsistencyTokenResponse>
Expand Down Expand Up @@ -374,6 +379,17 @@ public UnaryCallSettings<DeleteTableRequest, Empty> deleteTableSettings() {
return deleteTableSettings;
}

/** Returns the object with the settings used for calls to undeleteTable. */
public UnaryCallSettings<UndeleteTableRequest, Operation> undeleteTableSettings() {
return undeleteTableSettings;
}

/** Returns the object with the settings used for calls to undeleteTable. */
public OperationCallSettings<UndeleteTableRequest, Table, UndeleteTableMetadata>
undeleteTableOperationSettings() {
return undeleteTableOperationSettings;
}

/** Returns the object with the settings used for calls to modifyColumnFamilies. */
public UnaryCallSettings<ModifyColumnFamiliesRequest, Table> modifyColumnFamiliesSettings() {
return modifyColumnFamiliesSettings;
Expand Down Expand Up @@ -564,6 +580,8 @@ protected BigtableTableAdminStubSettings(Builder settingsBuilder) throws IOExcep
listTablesSettings = settingsBuilder.listTablesSettings().build();
getTableSettings = settingsBuilder.getTableSettings().build();
deleteTableSettings = settingsBuilder.deleteTableSettings().build();
undeleteTableSettings = settingsBuilder.undeleteTableSettings().build();
undeleteTableOperationSettings = settingsBuilder.undeleteTableOperationSettings().build();
modifyColumnFamiliesSettings = settingsBuilder.modifyColumnFamiliesSettings().build();
dropRowRangeSettings = settingsBuilder.dropRowRangeSettings().build();
generateConsistencyTokenSettings = settingsBuilder.generateConsistencyTokenSettings().build();
Expand Down Expand Up @@ -601,6 +619,9 @@ public static class Builder
listTablesSettings;
private final UnaryCallSettings.Builder<GetTableRequest, Table> getTableSettings;
private final UnaryCallSettings.Builder<DeleteTableRequest, Empty> deleteTableSettings;
private final UnaryCallSettings.Builder<UndeleteTableRequest, Operation> undeleteTableSettings;
private final OperationCallSettings.Builder<UndeleteTableRequest, Table, UndeleteTableMetadata>
undeleteTableOperationSettings;
private final UnaryCallSettings.Builder<ModifyColumnFamiliesRequest, Table>
modifyColumnFamiliesSettings;
private final UnaryCallSettings.Builder<DropRowRangeRequest, Empty> dropRowRangeSettings;
Expand Down Expand Up @@ -729,6 +750,8 @@ protected Builder(ClientContext clientContext) {
listTablesSettings = PagedCallSettings.newBuilder(LIST_TABLES_PAGE_STR_FACT);
getTableSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
deleteTableSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
undeleteTableSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
undeleteTableOperationSettings = OperationCallSettings.newBuilder();
modifyColumnFamiliesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
dropRowRangeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
generateConsistencyTokenSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
Expand Down Expand Up @@ -757,6 +780,7 @@ protected Builder(ClientContext clientContext) {
listTablesSettings,
getTableSettings,
deleteTableSettings,
undeleteTableSettings,
modifyColumnFamiliesSettings,
dropRowRangeSettings,
generateConsistencyTokenSettings,
Expand Down Expand Up @@ -787,6 +811,8 @@ protected Builder(BigtableTableAdminStubSettings settings) {
listTablesSettings = settings.listTablesSettings.toBuilder();
getTableSettings = settings.getTableSettings.toBuilder();
deleteTableSettings = settings.deleteTableSettings.toBuilder();
undeleteTableSettings = settings.undeleteTableSettings.toBuilder();
undeleteTableOperationSettings = settings.undeleteTableOperationSettings.toBuilder();
modifyColumnFamiliesSettings = settings.modifyColumnFamiliesSettings.toBuilder();
dropRowRangeSettings = settings.dropRowRangeSettings.toBuilder();
generateConsistencyTokenSettings = settings.generateConsistencyTokenSettings.toBuilder();
Expand Down Expand Up @@ -815,6 +841,7 @@ protected Builder(BigtableTableAdminStubSettings settings) {
listTablesSettings,
getTableSettings,
deleteTableSettings,
undeleteTableSettings,
modifyColumnFamiliesSettings,
dropRowRangeSettings,
generateConsistencyTokenSettings,
Expand Down Expand Up @@ -873,6 +900,11 @@ private static Builder initDefaults(Builder builder) {
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params"));

builder
.undeleteTableSettings()
.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"))
Expand Down Expand Up @@ -983,6 +1015,30 @@ private static Builder initDefaults(Builder builder) {
.setTotalTimeout(Duration.ofMillis(3600000L))
.build()));

builder
.undeleteTableOperationSettings()
.setInitialCallSettings(
UnaryCallSettings
.<UndeleteTableRequest, OperationSnapshot>newUnaryCallSettingsBuilder()
.setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes"))
.setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params"))
.build())
.setResponseTransformer(
ProtoOperationTransformers.ResponseTransformer.create(Table.class))
.setMetadataTransformer(
ProtoOperationTransformers.MetadataTransformer.create(UndeleteTableMetadata.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(
Expand Down Expand Up @@ -1109,6 +1165,19 @@ public UnaryCallSettings.Builder<DeleteTableRequest, Empty> deleteTableSettings(
return deleteTableSettings;
}

/** Returns the builder for the settings used for calls to undeleteTable. */
public UnaryCallSettings.Builder<UndeleteTableRequest, Operation> undeleteTableSettings() {
return undeleteTableSettings;
}

/** 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<UndeleteTableRequest, Table, UndeleteTableMetadata>
undeleteTableOperationSettings() {
return undeleteTableOperationSettings;
}

/** Returns the builder for the settings used for calls to modifyColumnFamilies. */
public UnaryCallSettings.Builder<ModifyColumnFamiliesRequest, Table>
modifyColumnFamiliesSettings() {
Expand Down

0 comments on commit a4c6621

Please sign in to comment.