|
5 | 5 | * you may not use this file except in compliance with the License.
|
6 | 6 | * You may obtain a copy of the License at
|
7 | 7 | *
|
8 |
| -* https://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +* https://www.apache.org/licenses/LICENSE-2.0 |
9 | 9 | *
|
10 | 10 | * Unless required by applicable law or agreed to in writing, software
|
11 | 11 | * distributed under the License is distributed on an "AS IS" BASIS,
|
12 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13 | 13 | * See the License for the specific language governing permissions and
|
14 | 14 | * limitations under the License.
|
15 | 15 | */
|
| 16 | + |
16 | 17 | package com.google.cloud.spanner.admin.database.v1;
|
17 | 18 |
|
18 | 19 | import static com.google.cloud.spanner.admin.database.v1.DatabaseAdminClient.ListBackupOperationsPagedResponse;
|
|
69 | 70 | import java.util.List;
|
70 | 71 | import javax.annotation.Generated;
|
71 | 72 |
|
72 |
| -// AUTO-GENERATED DOCUMENTATION AND CLASS |
| 73 | +// AUTO-GENERATED DOCUMENTATION AND CLASS. |
73 | 74 | /**
|
74 | 75 | * Settings class to configure an instance of {@link DatabaseAdminClient}.
|
75 | 76 | *
|
|
86 | 87 | *
|
87 | 88 | * <p>For example, to set the total timeout of getDatabase to 30 seconds:
|
88 | 89 | *
|
89 |
| -* <pre> |
90 |
| -* <code> |
91 |
| -* DatabaseAdminSettings.Builder databaseAdminSettingsBuilder = |
92 |
| -* DatabaseAdminSettings.newBuilder(); |
| 90 | +* <pre>{@code |
| 91 | +* DatabaseAdminSettings.Builder databaseAdminSettingsBuilder = DatabaseAdminSettings.newBuilder(); |
93 | 92 | * databaseAdminSettingsBuilder
|
94 | 93 | * .getDatabaseSettings()
|
95 | 94 | * .setRetrySettings(
|
96 |
| -* databaseAdminSettingsBuilder.getDatabaseSettings().getRetrySettings().toBuilder() |
| 95 | +* databaseAdminSettingsBuilder |
| 96 | +* .getDatabaseSettings() |
| 97 | +* .getRetrySettings() |
| 98 | +* .toBuilder() |
97 | 99 | * .setTotalTimeout(Duration.ofSeconds(30))
|
98 | 100 | * .build());
|
99 | 101 | * DatabaseAdminSettings databaseAdminSettings = databaseAdminSettingsBuilder.build();
|
100 |
| -* </code> |
101 |
| -* </pre> |
| 102 | +* }</pre> |
102 | 103 | */
|
103 |
| -@Generated("by gapic-generator") |
104 |
| -@BetaApi |
| 104 | +@Generated("by gapic-generator-java") |
105 | 105 | public class DatabaseAdminSettings extends ClientSettings<DatabaseAdminSettings> {
|
| 106 | + |
| 107 | +/** Returns the object with the settings used for calls to listDatabases. */ |
| 108 | +public PagedCallSettings<ListDatabasesRequest, ListDatabasesResponse, ListDatabasesPagedResponse> |
| 109 | +listDatabasesSettings() { |
| 110 | +return ((DatabaseAdminStubSettings) getStubSettings()).listDatabasesSettings(); |
| 111 | +} |
| 112 | + |
106 | 113 | /** Returns the object with the settings used for calls to createDatabase. */
|
107 | 114 | public UnaryCallSettings<CreateDatabaseRequest, Operation> createDatabaseSettings() {
|
108 | 115 | return ((DatabaseAdminStubSettings) getStubSettings()).createDatabaseSettings();
|
109 | 116 | }
|
110 | 117 |
|
111 | 118 | /** Returns the object with the settings used for calls to createDatabase. */
|
112 |
| -@BetaApi( |
113 |
| -"The surface for long-running operations is not stable yet and may change in the future.") |
114 | 119 | public OperationCallSettings<CreateDatabaseRequest, Database, CreateDatabaseMetadata>
|
115 | 120 | createDatabaseOperationSettings() {
|
116 | 121 | return ((DatabaseAdminStubSettings) getStubSettings()).createDatabaseOperationSettings();
|
117 | 122 | }
|
118 | 123 |
|
| 124 | +/** Returns the object with the settings used for calls to getDatabase. */ |
| 125 | +public UnaryCallSettings<GetDatabaseRequest, Database> getDatabaseSettings() { |
| 126 | +return ((DatabaseAdminStubSettings) getStubSettings()).getDatabaseSettings(); |
| 127 | +} |
| 128 | + |
119 | 129 | /** Returns the object with the settings used for calls to updateDatabaseDdl. */
|
120 | 130 | public UnaryCallSettings<UpdateDatabaseDdlRequest, Operation> updateDatabaseDdlSettings() {
|
121 | 131 | return ((DatabaseAdminStubSettings) getStubSettings()).updateDatabaseDdlSettings();
|
122 | 132 | }
|
123 | 133 |
|
124 | 134 | /** Returns the object with the settings used for calls to updateDatabaseDdl. */
|
125 |
| -@BetaApi( |
126 |
| -"The surface for long-running operations is not stable yet and may change in the future.") |
127 | 135 | public OperationCallSettings<UpdateDatabaseDdlRequest, Empty, UpdateDatabaseDdlMetadata>
|
128 | 136 | updateDatabaseDdlOperationSettings() {
|
129 | 137 | return ((DatabaseAdminStubSettings) getStubSettings()).updateDatabaseDdlOperationSettings();
|
130 | 138 | }
|
131 | 139 |
|
132 |
| -/** Returns the object with the settings used for calls to createBackup. */ |
133 |
| -public UnaryCallSettings<CreateBackupRequest, Operation> createBackupSettings() { |
134 |
| -return ((DatabaseAdminStubSettings) getStubSettings()).createBackupSettings(); |
135 |
| -} |
136 |
| - |
137 |
| -/** Returns the object with the settings used for calls to createBackup. */ |
138 |
| -@BetaApi( |
139 |
| -"The surface for long-running operations is not stable yet and may change in the future.") |
140 |
| -public OperationCallSettings<CreateBackupRequest, Backup, CreateBackupMetadata> |
141 |
| -createBackupOperationSettings() { |
142 |
| -return ((DatabaseAdminStubSettings) getStubSettings()).createBackupOperationSettings(); |
143 |
| -} |
144 |
| - |
145 |
| -/** Returns the object with the settings used for calls to restoreDatabase. */ |
146 |
| -public UnaryCallSettings<RestoreDatabaseRequest, Operation> restoreDatabaseSettings() { |
147 |
| -return ((DatabaseAdminStubSettings) getStubSettings()).restoreDatabaseSettings(); |
148 |
| -} |
149 |
| - |
150 |
| -/** Returns the object with the settings used for calls to restoreDatabase. */ |
151 |
| -@BetaApi( |
152 |
| -"The surface for long-running operations is not stable yet and may change in the future.") |
153 |
| -public OperationCallSettings<RestoreDatabaseRequest, Database, RestoreDatabaseMetadata> |
154 |
| -restoreDatabaseOperationSettings() { |
155 |
| -return ((DatabaseAdminStubSettings) getStubSettings()).restoreDatabaseOperationSettings(); |
156 |
| -} |
157 |
| - |
158 |
| -/** Returns the object with the settings used for calls to listDatabases. */ |
159 |
| -public PagedCallSettings<ListDatabasesRequest, ListDatabasesResponse, ListDatabasesPagedResponse> |
160 |
| -listDatabasesSettings() { |
161 |
| -return ((DatabaseAdminStubSettings) getStubSettings()).listDatabasesSettings(); |
162 |
| -} |
163 |
| - |
164 |
| -/** Returns the object with the settings used for calls to getDatabase. */ |
165 |
| -public UnaryCallSettings<GetDatabaseRequest, Database> getDatabaseSettings() { |
166 |
| -return ((DatabaseAdminStubSettings) getStubSettings()).getDatabaseSettings(); |
167 |
| -} |
168 |
| - |
169 | 140 | /** Returns the object with the settings used for calls to dropDatabase. */
|
170 | 141 | public UnaryCallSettings<DropDatabaseRequest, Empty> dropDatabaseSettings() {
|
171 | 142 | return ((DatabaseAdminStubSettings) getStubSettings()).dropDatabaseSettings();
|
@@ -192,6 +163,17 @@ public UnaryCallSettings<GetIamPolicyRequest, Policy> getIamPolicySettings() {
|
192 | 163 | return ((DatabaseAdminStubSettings) getStubSettings()).testIamPermissionsSettings();
|
193 | 164 | }
|
194 | 165 |
|
| 166 | +/** Returns the object with the settings used for calls to createBackup. */ |
| 167 | +public UnaryCallSettings<CreateBackupRequest, Operation> createBackupSettings() { |
| 168 | +return ((DatabaseAdminStubSettings) getStubSettings()).createBackupSettings(); |
| 169 | +} |
| 170 | + |
| 171 | +/** Returns the object with the settings used for calls to createBackup. */ |
| 172 | +public OperationCallSettings<CreateBackupRequest, Backup, CreateBackupMetadata> |
| 173 | +createBackupOperationSettings() { |
| 174 | +return ((DatabaseAdminStubSettings) getStubSettings()).createBackupOperationSettings(); |
| 175 | +} |
| 176 | + |
195 | 177 | /** Returns the object with the settings used for calls to getBackup. */
|
196 | 178 | public UnaryCallSettings<GetBackupRequest, Backup> getBackupSettings() {
|
197 | 179 | return ((DatabaseAdminStubSettings) getStubSettings()).getBackupSettings();
|
@@ -213,6 +195,17 @@ public UnaryCallSettings<DeleteBackupRequest, Empty> deleteBackupSettings() {
|
213 | 195 | return ((DatabaseAdminStubSettings) getStubSettings()).listBackupsSettings();
|
214 | 196 | }
|
215 | 197 |
|
| 198 | +/** Returns the object with the settings used for calls to restoreDatabase. */ |
| 199 | +public UnaryCallSettings<RestoreDatabaseRequest, Operation> restoreDatabaseSettings() { |
| 200 | +return ((DatabaseAdminStubSettings) getStubSettings()).restoreDatabaseSettings(); |
| 201 | +} |
| 202 | + |
| 203 | +/** Returns the object with the settings used for calls to restoreDatabase. */ |
| 204 | +public OperationCallSettings<RestoreDatabaseRequest, Database, RestoreDatabaseMetadata> |
| 205 | +restoreDatabaseOperationSettings() { |
| 206 | +return ((DatabaseAdminStubSettings) getStubSettings()).restoreDatabaseOperationSettings(); |
| 207 | +} |
| 208 | + |
216 | 209 | /** Returns the object with the settings used for calls to listDatabaseOperations. */
|
217 | 210 | public PagedCallSettings<
|
218 | 211 | ListDatabaseOperationsRequest,
|
@@ -291,18 +284,15 @@ protected DatabaseAdminSettings(Builder settingsBuilder) throws IOException {
|
291 | 284 |
|
292 | 285 | /** Builder for DatabaseAdminSettings. */
|
293 | 286 | public static class Builder extends ClientSettings.Builder<DatabaseAdminSettings, Builder> {
|
| 287 | + |
294 | 288 | protected Builder() throws IOException {
|
295 |
| -this((ClientContext) null); |
| 289 | +this(((ClientContext) null)); |
296 | 290 | }
|
297 | 291 |
|
298 | 292 | protected Builder(ClientContext clientContext) {
|
299 | 293 | super(DatabaseAdminStubSettings.newBuilder(clientContext));
|
300 | 294 | }
|
301 | 295 |
|
302 |
| -private static Builder createDefault() { |
303 |
| -return new Builder(DatabaseAdminStubSettings.newBuilder()); |
304 |
| -} |
305 |
| - |
306 | 296 | protected Builder(DatabaseAdminSettings settings) {
|
307 | 297 | super(settings.getStubSettings().toBuilder());
|
308 | 298 | }
|
@@ -311,11 +301,15 @@ protected Builder(DatabaseAdminStubSettings.Builder stubSettings) {
|
311 | 301 | super(stubSettings);
|
312 | 302 | }
|
313 | 303 |
|
| 304 | +private static Builder createDefault() { |
| 305 | +return new Builder(DatabaseAdminStubSettings.newBuilder()); |
| 306 | +} |
| 307 | + |
314 | 308 | public DatabaseAdminStubSettings.Builder getStubSettingsBuilder() {
|
315 | 309 | return ((DatabaseAdminStubSettings.Builder) getStubSettings());
|
316 | 310 | }
|
317 | 311 |
|
318 |
| -// NEXT_MAJOR_VER: remove 'throws Exception' |
| 312 | +// NEXT_MAJOR_VER: remove 'throws Exception'. |
319 | 313 | /**
|
320 | 314 | * Applies the given settings updater function to all of the unary API methods in this service.
|
321 | 315 | *
|
@@ -328,71 +322,41 @@ public Builder applyToAllUnaryMethods(
|
328 | 322 | return this;
|
329 | 323 | }
|
330 | 324 |
|
| 325 | +/** Returns the builder for the settings used for calls to listDatabases. */ |
| 326 | +public PagedCallSettings.Builder< |
| 327 | +ListDatabasesRequest, ListDatabasesResponse, ListDatabasesPagedResponse> |
| 328 | +listDatabasesSettings() { |
| 329 | +return getStubSettingsBuilder().listDatabasesSettings(); |
| 330 | +} |
| 331 | + |
331 | 332 | /** Returns the builder for the settings used for calls to createDatabase. */
|
332 | 333 | public UnaryCallSettings.Builder<CreateDatabaseRequest, Operation> createDatabaseSettings() {
|
333 | 334 | return getStubSettingsBuilder().createDatabaseSettings();
|
334 | 335 | }
|
335 | 336 |
|
336 | 337 | /** Returns the builder for the settings used for calls to createDatabase. */
|
337 |
| -@BetaApi( |
338 |
| -"The surface for long-running operations is not stable yet and may change in the future.") |
339 | 338 | public OperationCallSettings.Builder<CreateDatabaseRequest, Database, CreateDatabaseMetadata>
|
340 | 339 | createDatabaseOperationSettings() {
|
341 | 340 | return getStubSettingsBuilder().createDatabaseOperationSettings();
|
342 | 341 | }
|
343 | 342 |
|
| 343 | +/** Returns the builder for the settings used for calls to getDatabase. */ |
| 344 | +public UnaryCallSettings.Builder<GetDatabaseRequest, Database> getDatabaseSettings() { |
| 345 | +return getStubSettingsBuilder().getDatabaseSettings(); |
| 346 | +} |
| 347 | + |
344 | 348 | /** Returns the builder for the settings used for calls to updateDatabaseDdl. */
|
345 | 349 | public UnaryCallSettings.Builder<UpdateDatabaseDdlRequest, Operation>
|
346 | 350 | updateDatabaseDdlSettings() {
|
347 | 351 | return getStubSettingsBuilder().updateDatabaseDdlSettings();
|
348 | 352 | }
|
349 | 353 |
|
350 | 354 | /** Returns the builder for the settings used for calls to updateDatabaseDdl. */
|
351 |
| -@BetaApi( |
352 |
| -"The surface for long-running operations is not stable yet and may change in the future.") |
353 | 355 | public OperationCallSettings.Builder<UpdateDatabaseDdlRequest, Empty, UpdateDatabaseDdlMetadata>
|
354 | 356 | updateDatabaseDdlOperationSettings() {
|
355 | 357 | return getStubSettingsBuilder().updateDatabaseDdlOperationSettings();
|
356 | 358 | }
|
357 | 359 |
|
358 |
| -/** Returns the builder for the settings used for calls to createBackup. */ |
359 |
| -public UnaryCallSettings.Builder<CreateBackupRequest, Operation> createBackupSettings() { |
360 |
| -return getStubSettingsBuilder().createBackupSettings(); |
361 |
| -} |
362 |
| - |
363 |
| -/** Returns the builder for the settings used for calls to createBackup. */ |
364 |
| -@BetaApi( |
365 |
| -"The surface for long-running operations is not stable yet and may change in the future.") |
366 |
| -public OperationCallSettings.Builder<CreateBackupRequest, Backup, CreateBackupMetadata> |
367 |
| -createBackupOperationSettings() { |
368 |
| -return getStubSettingsBuilder().createBackupOperationSettings(); |
369 |
| -} |
370 |
| - |
371 |
| -/** Returns the builder for the settings used for calls to restoreDatabase. */ |
372 |
| -public UnaryCallSettings.Builder<RestoreDatabaseRequest, Operation> restoreDatabaseSettings() { |
373 |
| -return getStubSettingsBuilder().restoreDatabaseSettings(); |
374 |
| -} |
375 |
| - |
376 |
| -/** Returns the builder for the settings used for calls to restoreDatabase. */ |
377 |
| -@BetaApi( |
378 |
| -"The surface for long-running operations is not stable yet and may change in the future.") |
379 |
| -public OperationCallSettings.Builder<RestoreDatabaseRequest, Database, RestoreDatabaseMetadata> |
380 |
| -restoreDatabaseOperationSettings() { |
381 |
| -return getStubSettingsBuilder().restoreDatabaseOperationSettings(); |
382 |
| -} |
383 |
| - |
384 |
| -/** Returns the builder for the settings used for calls to listDatabases. */ |
385 |
| -public PagedCallSettings.Builder< |
386 |
| -ListDatabasesRequest, ListDatabasesResponse, ListDatabasesPagedResponse> |
387 |
| -listDatabasesSettings() { |
388 |
| -return getStubSettingsBuilder().listDatabasesSettings(); |
389 |
| -} |
390 |
| - |
391 |
| -/** Returns the builder for the settings used for calls to getDatabase. */ |
392 |
| -public UnaryCallSettings.Builder<GetDatabaseRequest, Database> getDatabaseSettings() { |
393 |
| -return getStubSettingsBuilder().getDatabaseSettings(); |
394 |
| -} |
395 |
| - |
396 | 360 | /** Returns the builder for the settings used for calls to dropDatabase. */
|
397 | 361 | public UnaryCallSettings.Builder<DropDatabaseRequest, Empty> dropDatabaseSettings() {
|
398 | 362 | return getStubSettingsBuilder().dropDatabaseSettings();
|
@@ -420,6 +384,17 @@ public UnaryCallSettings.Builder<GetIamPolicyRequest, Policy> getIamPolicySettin
|
420 | 384 | return getStubSettingsBuilder().testIamPermissionsSettings();
|
421 | 385 | }
|
422 | 386 |
|
| 387 | +/** Returns the builder for the settings used for calls to createBackup. */ |
| 388 | +public UnaryCallSettings.Builder<CreateBackupRequest, Operation> createBackupSettings() { |
| 389 | +return getStubSettingsBuilder().createBackupSettings(); |
| 390 | +} |
| 391 | + |
| 392 | +/** Returns the builder for the settings used for calls to createBackup. */ |
| 393 | +public OperationCallSettings.Builder<CreateBackupRequest, Backup, CreateBackupMetadata> |
| 394 | +createBackupOperationSettings() { |
| 395 | +return getStubSettingsBuilder().createBackupOperationSettings(); |
| 396 | +} |
| 397 | + |
423 | 398 | /** Returns the builder for the settings used for calls to getBackup. */
|
424 | 399 | public UnaryCallSettings.Builder<GetBackupRequest, Backup> getBackupSettings() {
|
425 | 400 | return getStubSettingsBuilder().getBackupSettings();
|
@@ -442,6 +417,17 @@ public UnaryCallSettings.Builder<DeleteBackupRequest, Empty> deleteBackupSetting
|
442 | 417 | return getStubSettingsBuilder().listBackupsSettings();
|
443 | 418 | }
|
444 | 419 |
|
| 420 | +/** Returns the builder for the settings used for calls to restoreDatabase. */ |
| 421 | +public UnaryCallSettings.Builder<RestoreDatabaseRequest, Operation> restoreDatabaseSettings() { |
| 422 | +return getStubSettingsBuilder().restoreDatabaseSettings(); |
| 423 | +} |
| 424 | + |
| 425 | +/** Returns the builder for the settings used for calls to restoreDatabase. */ |
| 426 | +public OperationCallSettings.Builder<RestoreDatabaseRequest, Database, RestoreDatabaseMetadata> |
| 427 | +restoreDatabaseOperationSettings() { |
| 428 | +return getStubSettingsBuilder().restoreDatabaseOperationSettings(); |
| 429 | +} |
| 430 | + |
445 | 431 | /** Returns the builder for the settings used for calls to listDatabaseOperations. */
|
446 | 432 | public PagedCallSettings.Builder<
|
447 | 433 | ListDatabaseOperationsRequest,
|
|
0 commit comments