|
79 | 79 | import com.google.bigtable.admin.v2.UndeleteTableMetadata; |
80 | 80 | import com.google.bigtable.admin.v2.UndeleteTableRequest; |
81 | 81 | import com.google.bigtable.admin.v2.UpdateBackupRequest; |
| 82 | +import com.google.bigtable.admin.v2.UpdateTableMetadata; |
| 83 | +import com.google.bigtable.admin.v2.UpdateTableRequest; |
82 | 84 | import com.google.common.collect.ImmutableList; |
83 | 85 | import com.google.common.collect.ImmutableMap; |
84 | 86 | import com.google.common.collect.ImmutableSet; |
|
113 | 115 | * <p>For example, to set the total timeout of createTable to 30 seconds: |
114 | 116 | * |
115 | 117 | * <pre>{@code |
116 | | - * // This snippet has been automatically generated for illustrative purposes only. |
117 | | - * // It may require modifications to work in your environment. |
| 118 | + * // This snippet has been automatically generated and should be regarded as a code template only. |
| 119 | + * // It will require modifications to work: |
| 120 | + * // - It may require correct/in-range values for request initialization. |
| 121 | + * // - It may require specifying regional endpoints when creating the service client as shown in |
| 122 | + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library |
118 | 123 | * BigtableTableAdminStubSettings.Builder baseBigtableTableAdminSettingsBuilder = |
119 | 124 | * BigtableTableAdminStubSettings.newBuilder(); |
120 | 125 | * baseBigtableTableAdminSettingsBuilder |
@@ -152,6 +157,9 @@ public class BigtableTableAdminStubSettings extends StubSettings<BigtableTableAd |
152 | 157 | private final PagedCallSettings<ListTablesRequest, ListTablesResponse, ListTablesPagedResponse> |
153 | 158 | listTablesSettings; |
154 | 159 | private final UnaryCallSettings<GetTableRequest, Table> getTableSettings; |
| 160 | + private final UnaryCallSettings<UpdateTableRequest, Operation> updateTableSettings; |
| 161 | + private final OperationCallSettings<UpdateTableRequest, Table, UpdateTableMetadata> |
| 162 | + updateTableOperationSettings; |
155 | 163 | private final UnaryCallSettings<DeleteTableRequest, Empty> deleteTableSettings; |
156 | 164 | private final UnaryCallSettings<UndeleteTableRequest, Operation> undeleteTableSettings; |
157 | 165 | private final OperationCallSettings<UndeleteTableRequest, Table, UndeleteTableMetadata> |
@@ -374,6 +382,17 @@ public UnaryCallSettings<GetTableRequest, Table> getTableSettings() { |
374 | 382 | return getTableSettings; |
375 | 383 | } |
376 | 384 |
|
| 385 | + /** Returns the object with the settings used for calls to updateTable. */ |
| 386 | + public UnaryCallSettings<UpdateTableRequest, Operation> updateTableSettings() { |
| 387 | + return updateTableSettings; |
| 388 | + } |
| 389 | + |
| 390 | + /** Returns the object with the settings used for calls to updateTable. */ |
| 391 | + public OperationCallSettings<UpdateTableRequest, Table, UpdateTableMetadata> |
| 392 | + updateTableOperationSettings() { |
| 393 | + return updateTableOperationSettings; |
| 394 | + } |
| 395 | + |
377 | 396 | /** Returns the object with the settings used for calls to deleteTable. */ |
378 | 397 | public UnaryCallSettings<DeleteTableRequest, Empty> deleteTableSettings() { |
379 | 398 | return deleteTableSettings; |
@@ -579,6 +598,8 @@ protected BigtableTableAdminStubSettings(Builder settingsBuilder) throws IOExcep |
579 | 598 | settingsBuilder.createTableFromSnapshotOperationSettings().build(); |
580 | 599 | listTablesSettings = settingsBuilder.listTablesSettings().build(); |
581 | 600 | getTableSettings = settingsBuilder.getTableSettings().build(); |
| 601 | + updateTableSettings = settingsBuilder.updateTableSettings().build(); |
| 602 | + updateTableOperationSettings = settingsBuilder.updateTableOperationSettings().build(); |
582 | 603 | deleteTableSettings = settingsBuilder.deleteTableSettings().build(); |
583 | 604 | undeleteTableSettings = settingsBuilder.undeleteTableSettings().build(); |
584 | 605 | undeleteTableOperationSettings = settingsBuilder.undeleteTableOperationSettings().build(); |
@@ -618,6 +639,9 @@ public static class Builder |
618 | 639 | ListTablesRequest, ListTablesResponse, ListTablesPagedResponse> |
619 | 640 | listTablesSettings; |
620 | 641 | private final UnaryCallSettings.Builder<GetTableRequest, Table> getTableSettings; |
| 642 | + private final UnaryCallSettings.Builder<UpdateTableRequest, Operation> updateTableSettings; |
| 643 | + private final OperationCallSettings.Builder<UpdateTableRequest, Table, UpdateTableMetadata> |
| 644 | + updateTableOperationSettings; |
621 | 645 | private final UnaryCallSettings.Builder<DeleteTableRequest, Empty> deleteTableSettings; |
622 | 646 | private final UnaryCallSettings.Builder<UndeleteTableRequest, Operation> undeleteTableSettings; |
623 | 647 | private final OperationCallSettings.Builder<UndeleteTableRequest, Table, UndeleteTableMetadata> |
@@ -749,6 +773,8 @@ protected Builder(ClientContext clientContext) { |
749 | 773 | createTableFromSnapshotOperationSettings = OperationCallSettings.newBuilder(); |
750 | 774 | listTablesSettings = PagedCallSettings.newBuilder(LIST_TABLES_PAGE_STR_FACT); |
751 | 775 | getTableSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); |
| 776 | + updateTableSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); |
| 777 | + updateTableOperationSettings = OperationCallSettings.newBuilder(); |
752 | 778 | deleteTableSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); |
753 | 779 | undeleteTableSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); |
754 | 780 | undeleteTableOperationSettings = OperationCallSettings.newBuilder(); |
@@ -779,6 +805,7 @@ protected Builder(ClientContext clientContext) { |
779 | 805 | createTableFromSnapshotSettings, |
780 | 806 | listTablesSettings, |
781 | 807 | getTableSettings, |
| 808 | + updateTableSettings, |
782 | 809 | deleteTableSettings, |
783 | 810 | undeleteTableSettings, |
784 | 811 | modifyColumnFamiliesSettings, |
@@ -810,6 +837,8 @@ protected Builder(BigtableTableAdminStubSettings settings) { |
810 | 837 | settings.createTableFromSnapshotOperationSettings.toBuilder(); |
811 | 838 | listTablesSettings = settings.listTablesSettings.toBuilder(); |
812 | 839 | getTableSettings = settings.getTableSettings.toBuilder(); |
| 840 | + updateTableSettings = settings.updateTableSettings.toBuilder(); |
| 841 | + updateTableOperationSettings = settings.updateTableOperationSettings.toBuilder(); |
813 | 842 | deleteTableSettings = settings.deleteTableSettings.toBuilder(); |
814 | 843 | undeleteTableSettings = settings.undeleteTableSettings.toBuilder(); |
815 | 844 | undeleteTableOperationSettings = settings.undeleteTableOperationSettings.toBuilder(); |
@@ -840,6 +869,7 @@ protected Builder(BigtableTableAdminStubSettings settings) { |
840 | 869 | createTableFromSnapshotSettings, |
841 | 870 | listTablesSettings, |
842 | 871 | getTableSettings, |
| 872 | + updateTableSettings, |
843 | 873 | deleteTableSettings, |
844 | 874 | undeleteTableSettings, |
845 | 875 | modifyColumnFamiliesSettings, |
@@ -895,6 +925,11 @@ private static Builder initDefaults(Builder builder) { |
895 | 925 | .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_2_codes")) |
896 | 926 | .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_2_params")); |
897 | 927 |
|
| 928 | + builder |
| 929 | + .updateTableSettings() |
| 930 | + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) |
| 931 | + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); |
| 932 | + |
898 | 933 | builder |
899 | 934 | .deleteTableSettings() |
900 | 935 | .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) |
@@ -1015,6 +1050,29 @@ private static Builder initDefaults(Builder builder) { |
1015 | 1050 | .setTotalTimeout(Duration.ofMillis(3600000L)) |
1016 | 1051 | .build())); |
1017 | 1052 |
|
| 1053 | + builder |
| 1054 | + .updateTableOperationSettings() |
| 1055 | + .setInitialCallSettings( |
| 1056 | + UnaryCallSettings.<UpdateTableRequest, OperationSnapshot>newUnaryCallSettingsBuilder() |
| 1057 | + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) |
| 1058 | + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) |
| 1059 | + .build()) |
| 1060 | + .setResponseTransformer( |
| 1061 | + ProtoOperationTransformers.ResponseTransformer.create(Table.class)) |
| 1062 | + .setMetadataTransformer( |
| 1063 | + ProtoOperationTransformers.MetadataTransformer.create(UpdateTableMetadata.class)) |
| 1064 | + .setPollingAlgorithm( |
| 1065 | + OperationTimedPollAlgorithm.create( |
| 1066 | + RetrySettings.newBuilder() |
| 1067 | + .setInitialRetryDelay(Duration.ofMillis(5000L)) |
| 1068 | + .setRetryDelayMultiplier(1.5) |
| 1069 | + .setMaxRetryDelay(Duration.ofMillis(45000L)) |
| 1070 | + .setInitialRpcTimeout(Duration.ZERO) |
| 1071 | + .setRpcTimeoutMultiplier(1.0) |
| 1072 | + .setMaxRpcTimeout(Duration.ZERO) |
| 1073 | + .setTotalTimeout(Duration.ofMillis(300000L)) |
| 1074 | + .build())); |
| 1075 | + |
1018 | 1076 | builder |
1019 | 1077 | .undeleteTableOperationSettings() |
1020 | 1078 | .setInitialCallSettings( |
@@ -1160,6 +1218,19 @@ public UnaryCallSettings.Builder<GetTableRequest, Table> getTableSettings() { |
1160 | 1218 | return getTableSettings; |
1161 | 1219 | } |
1162 | 1220 |
|
| 1221 | + /** Returns the builder for the settings used for calls to updateTable. */ |
| 1222 | + public UnaryCallSettings.Builder<UpdateTableRequest, Operation> updateTableSettings() { |
| 1223 | + return updateTableSettings; |
| 1224 | + } |
| 1225 | + |
| 1226 | + /** Returns the builder for the settings used for calls to updateTable. */ |
| 1227 | + @BetaApi( |
| 1228 | + "The surface for use by generated code is not stable yet and may change in the future.") |
| 1229 | + public OperationCallSettings.Builder<UpdateTableRequest, Table, UpdateTableMetadata> |
| 1230 | + updateTableOperationSettings() { |
| 1231 | + return updateTableOperationSettings; |
| 1232 | + } |
| 1233 | + |
1163 | 1234 | /** Returns the builder for the settings used for calls to deleteTable. */ |
1164 | 1235 | public UnaryCallSettings.Builder<DeleteTableRequest, Empty> deleteTableSettings() { |
1165 | 1236 | return deleteTableSettings; |
|
0 commit comments