55 * you may not use this file except in compliance with the License.
66 * You may obtain a copy of the License at
77 *
8- * https://www.apache.org/licenses/LICENSE-2.0
8+ * https://www.apache.org/licenses/LICENSE-2.0
99 *
1010 * Unless required by applicable law or agreed to in writing, software
1111 * distributed under the License is distributed on an "AS IS" BASIS,
1212 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313 * See the License for the specific language governing permissions and
1414 * limitations under the License.
1515 */
16+
1617package com .google .cloud .spanner .admin .database .v1 ;
1718
1819import static com .google .cloud .spanner .admin .database .v1 .DatabaseAdminClient .ListBackupOperationsPagedResponse ;
6970import java .util .List ;
7071import javax .annotation .Generated ;
7172
72- // AUTO-GENERATED DOCUMENTATION AND CLASS
73+ // AUTO-GENERATED DOCUMENTATION AND CLASS.
7374/**
7475 * Settings class to configure an instance of {@link DatabaseAdminClient}.
7576 *
8687 *
8788 * <p>For example, to set the total timeout of getDatabase to 30 seconds:
8889 *
89- * <pre>
90- * <code>
91- * DatabaseAdminSettings.Builder databaseAdminSettingsBuilder =
92- * DatabaseAdminSettings.newBuilder();
90+ * <pre>{@code
91+ * DatabaseAdminSettings.Builder databaseAdminSettingsBuilder = DatabaseAdminSettings.newBuilder();
9392 * databaseAdminSettingsBuilder
9493 * .getDatabaseSettings()
9594 * .setRetrySettings(
96- * databaseAdminSettingsBuilder.getDatabaseSettings().getRetrySettings().toBuilder()
95+ * databaseAdminSettingsBuilder
96+ * .getDatabaseSettings()
97+ * .getRetrySettings()
98+ * .toBuilder()
9799 * .setTotalTimeout(Duration.ofSeconds(30))
98100 * .build());
99101 * DatabaseAdminSettings databaseAdminSettings = databaseAdminSettingsBuilder.build();
100- * </code>
101- * </pre>
102+ * }</pre>
102103 */
103- @ Generated ("by gapic-generator" )
104- @ BetaApi
104+ @ Generated ("by gapic-generator-java" )
105105public 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+
106113 /** Returns the object with the settings used for calls to createDatabase. */
107114 public UnaryCallSettings <CreateDatabaseRequest , Operation > createDatabaseSettings () {
108115 return ((DatabaseAdminStubSettings ) getStubSettings ()).createDatabaseSettings ();
109116 }
110117
111118 /** 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." )
114119 public OperationCallSettings <CreateDatabaseRequest , Database , CreateDatabaseMetadata >
115120 createDatabaseOperationSettings () {
116121 return ((DatabaseAdminStubSettings ) getStubSettings ()).createDatabaseOperationSettings ();
117122 }
118123
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+
119129 /** Returns the object with the settings used for calls to updateDatabaseDdl. */
120130 public UnaryCallSettings <UpdateDatabaseDdlRequest , Operation > updateDatabaseDdlSettings () {
121131 return ((DatabaseAdminStubSettings ) getStubSettings ()).updateDatabaseDdlSettings ();
122132 }
123133
124134 /** 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." )
127135 public OperationCallSettings <UpdateDatabaseDdlRequest , Empty , UpdateDatabaseDdlMetadata >
128136 updateDatabaseDdlOperationSettings () {
129137 return ((DatabaseAdminStubSettings ) getStubSettings ()).updateDatabaseDdlOperationSettings ();
130138 }
131139
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-
169140 /** Returns the object with the settings used for calls to dropDatabase. */
170141 public UnaryCallSettings <DropDatabaseRequest , Empty > dropDatabaseSettings () {
171142 return ((DatabaseAdminStubSettings ) getStubSettings ()).dropDatabaseSettings ();
@@ -192,6 +163,17 @@ public UnaryCallSettings<GetIamPolicyRequest, Policy> getIamPolicySettings() {
192163 return ((DatabaseAdminStubSettings ) getStubSettings ()).testIamPermissionsSettings ();
193164 }
194165
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+
195177 /** Returns the object with the settings used for calls to getBackup. */
196178 public UnaryCallSettings <GetBackupRequest , Backup > getBackupSettings () {
197179 return ((DatabaseAdminStubSettings ) getStubSettings ()).getBackupSettings ();
@@ -213,6 +195,17 @@ public UnaryCallSettings<DeleteBackupRequest, Empty> deleteBackupSettings() {
213195 return ((DatabaseAdminStubSettings ) getStubSettings ()).listBackupsSettings ();
214196 }
215197
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+
216209 /** Returns the object with the settings used for calls to listDatabaseOperations. */
217210 public PagedCallSettings <
218211 ListDatabaseOperationsRequest ,
@@ -291,18 +284,15 @@ protected DatabaseAdminSettings(Builder settingsBuilder) throws IOException {
291284
292285 /** Builder for DatabaseAdminSettings. */
293286 public static class Builder extends ClientSettings .Builder <DatabaseAdminSettings , Builder > {
287+
294288 protected Builder () throws IOException {
295- this ((ClientContext ) null );
289+ this ((( ClientContext ) null ) );
296290 }
297291
298292 protected Builder (ClientContext clientContext ) {
299293 super (DatabaseAdminStubSettings .newBuilder (clientContext ));
300294 }
301295
302- private static Builder createDefault () {
303- return new Builder (DatabaseAdminStubSettings .newBuilder ());
304- }
305-
306296 protected Builder (DatabaseAdminSettings settings ) {
307297 super (settings .getStubSettings ().toBuilder ());
308298 }
@@ -311,11 +301,15 @@ protected Builder(DatabaseAdminStubSettings.Builder stubSettings) {
311301 super (stubSettings );
312302 }
313303
304+ private static Builder createDefault () {
305+ return new Builder (DatabaseAdminStubSettings .newBuilder ());
306+ }
307+
314308 public DatabaseAdminStubSettings .Builder getStubSettingsBuilder () {
315309 return ((DatabaseAdminStubSettings .Builder ) getStubSettings ());
316310 }
317311
318- // NEXT_MAJOR_VER: remove 'throws Exception'
312+ // NEXT_MAJOR_VER: remove 'throws Exception'.
319313 /**
320314 * Applies the given settings updater function to all of the unary API methods in this service.
321315 *
@@ -328,71 +322,41 @@ public Builder applyToAllUnaryMethods(
328322 return this ;
329323 }
330324
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+
331332 /** Returns the builder for the settings used for calls to createDatabase. */
332333 public UnaryCallSettings .Builder <CreateDatabaseRequest , Operation > createDatabaseSettings () {
333334 return getStubSettingsBuilder ().createDatabaseSettings ();
334335 }
335336
336337 /** 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." )
339338 public OperationCallSettings .Builder <CreateDatabaseRequest , Database , CreateDatabaseMetadata >
340339 createDatabaseOperationSettings () {
341340 return getStubSettingsBuilder ().createDatabaseOperationSettings ();
342341 }
343342
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+
344348 /** Returns the builder for the settings used for calls to updateDatabaseDdl. */
345349 public UnaryCallSettings .Builder <UpdateDatabaseDdlRequest , Operation >
346350 updateDatabaseDdlSettings () {
347351 return getStubSettingsBuilder ().updateDatabaseDdlSettings ();
348352 }
349353
350354 /** 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." )
353355 public OperationCallSettings .Builder <UpdateDatabaseDdlRequest , Empty , UpdateDatabaseDdlMetadata >
354356 updateDatabaseDdlOperationSettings () {
355357 return getStubSettingsBuilder ().updateDatabaseDdlOperationSettings ();
356358 }
357359
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-
396360 /** Returns the builder for the settings used for calls to dropDatabase. */
397361 public UnaryCallSettings .Builder <DropDatabaseRequest , Empty > dropDatabaseSettings () {
398362 return getStubSettingsBuilder ().dropDatabaseSettings ();
@@ -420,6 +384,17 @@ public UnaryCallSettings.Builder<GetIamPolicyRequest, Policy> getIamPolicySettin
420384 return getStubSettingsBuilder ().testIamPermissionsSettings ();
421385 }
422386
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+
423398 /** Returns the builder for the settings used for calls to getBackup. */
424399 public UnaryCallSettings .Builder <GetBackupRequest , Backup > getBackupSettings () {
425400 return getStubSettingsBuilder ().getBackupSettings ();
@@ -442,6 +417,17 @@ public UnaryCallSettings.Builder<DeleteBackupRequest, Empty> deleteBackupSetting
442417 return getStubSettingsBuilder ().listBackupsSettings ();
443418 }
444419
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+
445431 /** Returns the builder for the settings used for calls to listDatabaseOperations. */
446432 public PagedCallSettings .Builder <
447433 ListDatabaseOperationsRequest ,
0 commit comments