google_cloud_spanner_admin_database_v1/
client.rs

1// Copyright 2025 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// Code generated by sidekick. DO NOT EDIT.
16#![allow(rustdoc::redundant_explicit_links)]
17#![allow(rustdoc::broken_intra_doc_links)]
18
19/// Implements a client for the Cloud Spanner API.
20///
21/// # Example
22/// ```
23/// # tokio_test::block_on(async {
24/// # use google_cloud_spanner_admin_database_v1::client::DatabaseAdmin;
25/// let client = DatabaseAdmin::builder().build().await?;
26/// // use `client` to make requests to the Cloud Spanner API.
27/// # gax::client_builder::Result::<()>::Ok(()) });
28/// ```
29///
30/// # Service Description
31///
32/// Cloud Spanner Database Admin API
33///
34/// The Cloud Spanner Database Admin API can be used to:
35///
36/// * create, drop, and list databases
37/// * update the schema of pre-existing databases
38/// * create, delete, copy and list backups for a database
39/// * restore a database from an existing backup
40///
41/// # Configuration
42///
43/// To configure `DatabaseAdmin` use the `with_*` methods in the type returned
44/// by [builder()][DatabaseAdmin::builder]. The default configuration should
45/// work for most applications. Common configuration changes include
46///
47/// * [with_endpoint()]: by default this client uses the global default endpoint
48///   (`https://spanner.googleapis.com`). Applications using regional
49///   endpoints or running in restricted networks (e.g. a network configured
50//    with [Private Google Access with VPC Service Controls]) may want to
51///   override this default.
52/// * [with_credentials()]: by default this client uses
53///   [Application Default Credentials]. Applications using custom
54///   authentication may need to override this default.
55///
56/// [with_endpoint()]: super::builder::database_admin::ClientBuilder::with_endpoint
57/// [with_credentials()]: super::builder::database_admin::ClientBuilder::credentials
58/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
59/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
60///
61/// # Pooling and Cloning
62///
63/// `DatabaseAdmin` holds a connection pool internally, it is advised to
64/// create one and the reuse it.  You do not need to wrap `DatabaseAdmin` in
65/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
66/// already uses an `Arc` internally.
67#[derive(Clone, Debug)]
68pub struct DatabaseAdmin {
69    inner: std::sync::Arc<dyn super::stub::dynamic::DatabaseAdmin>,
70}
71
72impl DatabaseAdmin {
73    /// Returns a builder for [DatabaseAdmin].
74    ///
75    /// ```
76    /// # tokio_test::block_on(async {
77    /// # use google_cloud_spanner_admin_database_v1::client::DatabaseAdmin;
78    /// let client = DatabaseAdmin::builder().build().await?;
79    /// # gax::client_builder::Result::<()>::Ok(()) });
80    /// ```
81    pub fn builder() -> super::builder::database_admin::ClientBuilder {
82        gax::client_builder::internal::new_builder(super::builder::database_admin::client::Factory)
83    }
84
85    /// Creates a new client from the provided stub.
86    ///
87    /// The most common case for calling this function is in tests mocking the
88    /// client's behavior.
89    pub fn from_stub<T>(stub: T) -> Self
90    where
91        T: super::stub::DatabaseAdmin + 'static,
92    {
93        Self {
94            inner: std::sync::Arc::new(stub),
95        }
96    }
97
98    pub(crate) async fn new(
99        config: gaxi::options::ClientConfig,
100    ) -> gax::client_builder::Result<Self> {
101        let inner = Self::build_inner(config).await?;
102        Ok(Self { inner })
103    }
104
105    async fn build_inner(
106        conf: gaxi::options::ClientConfig,
107    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::DatabaseAdmin>> {
108        if gaxi::options::tracing_enabled(&conf) {
109            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
110        }
111        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
112    }
113
114    async fn build_transport(
115        conf: gaxi::options::ClientConfig,
116    ) -> gax::client_builder::Result<impl super::stub::DatabaseAdmin> {
117        super::transport::DatabaseAdmin::new(conf).await
118    }
119
120    async fn build_with_tracing(
121        conf: gaxi::options::ClientConfig,
122    ) -> gax::client_builder::Result<impl super::stub::DatabaseAdmin> {
123        Self::build_transport(conf)
124            .await
125            .map(super::tracing::DatabaseAdmin::new)
126    }
127
128    /// Lists Cloud Spanner databases.
129    pub fn list_databases(&self) -> super::builder::database_admin::ListDatabases {
130        super::builder::database_admin::ListDatabases::new(self.inner.clone())
131    }
132
133    /// Creates a new Cloud Spanner database and starts to prepare it for serving.
134    /// The returned [long-running operation][google.longrunning.Operation] will
135    /// have a name of the format `<database_name>/operations/<operation_id>` and
136    /// can be used to track preparation of the database. The
137    /// [metadata][google.longrunning.Operation.metadata] field type is
138    /// [CreateDatabaseMetadata][google.spanner.admin.database.v1.CreateDatabaseMetadata].
139    /// The [response][google.longrunning.Operation.response] field type is
140    /// [Database][google.spanner.admin.database.v1.Database], if successful.
141    ///
142    /// [google.longrunning.Operation]: longrunning::model::Operation
143    /// [google.longrunning.Operation.metadata]: longrunning::model::Operation::metadata
144    /// [google.longrunning.Operation.response]: longrunning::model::Operation::result
145    /// [google.spanner.admin.database.v1.CreateDatabaseMetadata]: crate::model::CreateDatabaseMetadata
146    /// [google.spanner.admin.database.v1.Database]: crate::model::Database
147    ///
148    /// # Long running operations
149    ///
150    /// This method is used to start, and/or poll a [long-running Operation].
151    /// The [Working with long-running operations] chapter in the [user guide]
152    /// covers these operations in detail.
153    ///
154    /// [long-running operation]: https://google.aip.dev/151
155    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
156    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
157    pub fn create_database(&self) -> super::builder::database_admin::CreateDatabase {
158        super::builder::database_admin::CreateDatabase::new(self.inner.clone())
159    }
160
161    /// Gets the state of a Cloud Spanner database.
162    pub fn get_database(&self) -> super::builder::database_admin::GetDatabase {
163        super::builder::database_admin::GetDatabase::new(self.inner.clone())
164    }
165
166    /// Updates a Cloud Spanner database. The returned
167    /// [long-running operation][google.longrunning.Operation] can be used to track
168    /// the progress of updating the database. If the named database does not
169    /// exist, returns `NOT_FOUND`.
170    ///
171    /// While the operation is pending:
172    ///
173    /// * The database's
174    ///   [reconciling][google.spanner.admin.database.v1.Database.reconciling]
175    ///   field is set to true.
176    /// * Cancelling the operation is best-effort. If the cancellation succeeds,
177    ///   the operation metadata's
178    ///   [cancel_time][google.spanner.admin.database.v1.UpdateDatabaseMetadata.cancel_time]
179    ///   is set, the updates are reverted, and the operation terminates with a
180    ///   `CANCELLED` status.
181    /// * New UpdateDatabase requests will return a `FAILED_PRECONDITION` error
182    ///   until the pending operation is done (returns successfully or with
183    ///   error).
184    /// * Reading the database via the API continues to give the pre-request
185    ///   values.
186    ///
187    /// Upon completion of the returned operation:
188    ///
189    /// * The new values are in effect and readable via the API.
190    /// * The database's
191    ///   [reconciling][google.spanner.admin.database.v1.Database.reconciling]
192    ///   field becomes false.
193    ///
194    /// The returned [long-running operation][google.longrunning.Operation] will
195    /// have a name of the format
196    /// `projects/<project>/instances/<instance>/databases/<database>/operations/<operation_id>`
197    /// and can be used to track the database modification. The
198    /// [metadata][google.longrunning.Operation.metadata] field type is
199    /// [UpdateDatabaseMetadata][google.spanner.admin.database.v1.UpdateDatabaseMetadata].
200    /// The [response][google.longrunning.Operation.response] field type is
201    /// [Database][google.spanner.admin.database.v1.Database], if successful.
202    ///
203    /// [google.longrunning.Operation]: longrunning::model::Operation
204    /// [google.longrunning.Operation.metadata]: longrunning::model::Operation::metadata
205    /// [google.longrunning.Operation.response]: longrunning::model::Operation::result
206    /// [google.spanner.admin.database.v1.Database]: crate::model::Database
207    /// [google.spanner.admin.database.v1.Database.reconciling]: crate::model::Database::reconciling
208    /// [google.spanner.admin.database.v1.UpdateDatabaseMetadata]: crate::model::UpdateDatabaseMetadata
209    /// [google.spanner.admin.database.v1.UpdateDatabaseMetadata.cancel_time]: crate::model::UpdateDatabaseMetadata::cancel_time
210    ///
211    /// # Long running operations
212    ///
213    /// This method is used to start, and/or poll a [long-running Operation].
214    /// The [Working with long-running operations] chapter in the [user guide]
215    /// covers these operations in detail.
216    ///
217    /// [long-running operation]: https://google.aip.dev/151
218    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
219    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
220    pub fn update_database(&self) -> super::builder::database_admin::UpdateDatabase {
221        super::builder::database_admin::UpdateDatabase::new(self.inner.clone())
222    }
223
224    /// Updates the schema of a Cloud Spanner database by
225    /// creating/altering/dropping tables, columns, indexes, etc. The returned
226    /// [long-running operation][google.longrunning.Operation] will have a name of
227    /// the format `<database_name>/operations/<operation_id>` and can be used to
228    /// track execution of the schema change(s). The
229    /// [metadata][google.longrunning.Operation.metadata] field type is
230    /// [UpdateDatabaseDdlMetadata][google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata].
231    /// The operation has no response.
232    ///
233    /// [google.longrunning.Operation]: longrunning::model::Operation
234    /// [google.longrunning.Operation.metadata]: longrunning::model::Operation::metadata
235    /// [google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata]: crate::model::UpdateDatabaseDdlMetadata
236    ///
237    /// # Long running operations
238    ///
239    /// This method is used to start, and/or poll a [long-running Operation].
240    /// The [Working with long-running operations] chapter in the [user guide]
241    /// covers these operations in detail.
242    ///
243    /// [long-running operation]: https://google.aip.dev/151
244    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
245    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
246    pub fn update_database_ddl(&self) -> super::builder::database_admin::UpdateDatabaseDdl {
247        super::builder::database_admin::UpdateDatabaseDdl::new(self.inner.clone())
248    }
249
250    /// Drops (aka deletes) a Cloud Spanner database.
251    /// Completed backups for the database will be retained according to their
252    /// `expire_time`.
253    /// Note: Cloud Spanner might continue to accept requests for a few seconds
254    /// after the database has been deleted.
255    pub fn drop_database(&self) -> super::builder::database_admin::DropDatabase {
256        super::builder::database_admin::DropDatabase::new(self.inner.clone())
257    }
258
259    /// Returns the schema of a Cloud Spanner database as a list of formatted
260    /// DDL statements. This method does not show pending schema updates, those may
261    /// be queried using the [Operations][google.longrunning.Operations] API.
262    ///
263    /// [google.longrunning.Operations]: longrunning::client::Operations
264    pub fn get_database_ddl(&self) -> super::builder::database_admin::GetDatabaseDdl {
265        super::builder::database_admin::GetDatabaseDdl::new(self.inner.clone())
266    }
267
268    /// Sets the access control policy on a database or backup resource.
269    /// Replaces any existing policy.
270    ///
271    /// Authorization requires `spanner.databases.setIamPolicy`
272    /// permission on [resource][google.iam.v1.SetIamPolicyRequest.resource].
273    /// For backups, authorization requires `spanner.backups.setIamPolicy`
274    /// permission on [resource][google.iam.v1.SetIamPolicyRequest.resource].
275    ///
276    /// [google.iam.v1.SetIamPolicyRequest.resource]: iam_v1::model::SetIamPolicyRequest::resource
277    pub fn set_iam_policy(&self) -> super::builder::database_admin::SetIamPolicy {
278        super::builder::database_admin::SetIamPolicy::new(self.inner.clone())
279    }
280
281    /// Gets the access control policy for a database or backup resource.
282    /// Returns an empty policy if a database or backup exists but does not have a
283    /// policy set.
284    ///
285    /// Authorization requires `spanner.databases.getIamPolicy` permission on
286    /// [resource][google.iam.v1.GetIamPolicyRequest.resource].
287    /// For backups, authorization requires `spanner.backups.getIamPolicy`
288    /// permission on [resource][google.iam.v1.GetIamPolicyRequest.resource].
289    ///
290    /// [google.iam.v1.GetIamPolicyRequest.resource]: iam_v1::model::GetIamPolicyRequest::resource
291    pub fn get_iam_policy(&self) -> super::builder::database_admin::GetIamPolicy {
292        super::builder::database_admin::GetIamPolicy::new(self.inner.clone())
293    }
294
295    /// Returns permissions that the caller has on the specified database or backup
296    /// resource.
297    ///
298    /// Attempting this RPC on a non-existent Cloud Spanner database will
299    /// result in a NOT_FOUND error if the user has
300    /// `spanner.databases.list` permission on the containing Cloud
301    /// Spanner instance. Otherwise returns an empty set of permissions.
302    /// Calling this method on a backup that does not exist will
303    /// result in a NOT_FOUND error if the user has
304    /// `spanner.backups.list` permission on the containing instance.
305    pub fn test_iam_permissions(&self) -> super::builder::database_admin::TestIamPermissions {
306        super::builder::database_admin::TestIamPermissions::new(self.inner.clone())
307    }
308
309    /// Starts creating a new Cloud Spanner Backup.
310    /// The returned backup [long-running operation][google.longrunning.Operation]
311    /// will have a name of the format
312    /// `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>`
313    /// and can be used to track creation of the backup. The
314    /// [metadata][google.longrunning.Operation.metadata] field type is
315    /// [CreateBackupMetadata][google.spanner.admin.database.v1.CreateBackupMetadata].
316    /// The [response][google.longrunning.Operation.response] field type is
317    /// [Backup][google.spanner.admin.database.v1.Backup], if successful.
318    /// Cancelling the returned operation will stop the creation and delete the
319    /// backup. There can be only one pending backup creation per database. Backup
320    /// creation of different databases can run concurrently.
321    ///
322    /// [google.longrunning.Operation]: longrunning::model::Operation
323    /// [google.longrunning.Operation.metadata]: longrunning::model::Operation::metadata
324    /// [google.longrunning.Operation.response]: longrunning::model::Operation::result
325    /// [google.spanner.admin.database.v1.Backup]: crate::model::Backup
326    /// [google.spanner.admin.database.v1.CreateBackupMetadata]: crate::model::CreateBackupMetadata
327    ///
328    /// # Long running operations
329    ///
330    /// This method is used to start, and/or poll a [long-running Operation].
331    /// The [Working with long-running operations] chapter in the [user guide]
332    /// covers these operations in detail.
333    ///
334    /// [long-running operation]: https://google.aip.dev/151
335    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
336    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
337    pub fn create_backup(&self) -> super::builder::database_admin::CreateBackup {
338        super::builder::database_admin::CreateBackup::new(self.inner.clone())
339    }
340
341    /// Starts copying a Cloud Spanner Backup.
342    /// The returned backup [long-running operation][google.longrunning.Operation]
343    /// will have a name of the format
344    /// `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation_id>`
345    /// and can be used to track copying of the backup. The operation is associated
346    /// with the destination backup.
347    /// The [metadata][google.longrunning.Operation.metadata] field type is
348    /// [CopyBackupMetadata][google.spanner.admin.database.v1.CopyBackupMetadata].
349    /// The [response][google.longrunning.Operation.response] field type is
350    /// [Backup][google.spanner.admin.database.v1.Backup], if successful.
351    /// Cancelling the returned operation will stop the copying and delete the
352    /// destination backup. Concurrent CopyBackup requests can run on the same
353    /// source backup.
354    ///
355    /// [google.longrunning.Operation]: longrunning::model::Operation
356    /// [google.longrunning.Operation.metadata]: longrunning::model::Operation::metadata
357    /// [google.longrunning.Operation.response]: longrunning::model::Operation::result
358    /// [google.spanner.admin.database.v1.Backup]: crate::model::Backup
359    /// [google.spanner.admin.database.v1.CopyBackupMetadata]: crate::model::CopyBackupMetadata
360    ///
361    /// # Long running operations
362    ///
363    /// This method is used to start, and/or poll a [long-running Operation].
364    /// The [Working with long-running operations] chapter in the [user guide]
365    /// covers these operations in detail.
366    ///
367    /// [long-running operation]: https://google.aip.dev/151
368    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
369    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
370    pub fn copy_backup(&self) -> super::builder::database_admin::CopyBackup {
371        super::builder::database_admin::CopyBackup::new(self.inner.clone())
372    }
373
374    /// Gets metadata on a pending or completed
375    /// [Backup][google.spanner.admin.database.v1.Backup].
376    ///
377    /// [google.spanner.admin.database.v1.Backup]: crate::model::Backup
378    pub fn get_backup(&self) -> super::builder::database_admin::GetBackup {
379        super::builder::database_admin::GetBackup::new(self.inner.clone())
380    }
381
382    /// Updates a pending or completed
383    /// [Backup][google.spanner.admin.database.v1.Backup].
384    ///
385    /// [google.spanner.admin.database.v1.Backup]: crate::model::Backup
386    pub fn update_backup(&self) -> super::builder::database_admin::UpdateBackup {
387        super::builder::database_admin::UpdateBackup::new(self.inner.clone())
388    }
389
390    /// Deletes a pending or completed
391    /// [Backup][google.spanner.admin.database.v1.Backup].
392    ///
393    /// [google.spanner.admin.database.v1.Backup]: crate::model::Backup
394    pub fn delete_backup(&self) -> super::builder::database_admin::DeleteBackup {
395        super::builder::database_admin::DeleteBackup::new(self.inner.clone())
396    }
397
398    /// Lists completed and pending backups.
399    /// Backups returned are ordered by `create_time` in descending order,
400    /// starting from the most recent `create_time`.
401    pub fn list_backups(&self) -> super::builder::database_admin::ListBackups {
402        super::builder::database_admin::ListBackups::new(self.inner.clone())
403    }
404
405    /// Create a new database by restoring from a completed backup. The new
406    /// database must be in the same project and in an instance with the same
407    /// instance configuration as the instance containing
408    /// the backup. The returned database [long-running
409    /// operation][google.longrunning.Operation] has a name of the format
410    /// `projects/<project>/instances/<instance>/databases/<database>/operations/<operation_id>`,
411    /// and can be used to track the progress of the operation, and to cancel it.
412    /// The [metadata][google.longrunning.Operation.metadata] field type is
413    /// [RestoreDatabaseMetadata][google.spanner.admin.database.v1.RestoreDatabaseMetadata].
414    /// The [response][google.longrunning.Operation.response] type
415    /// is [Database][google.spanner.admin.database.v1.Database], if
416    /// successful. Cancelling the returned operation will stop the restore and
417    /// delete the database.
418    /// There can be only one database being restored into an instance at a time.
419    /// Once the restore operation completes, a new restore operation can be
420    /// initiated, without waiting for the optimize operation associated with the
421    /// first restore to complete.
422    ///
423    /// [google.longrunning.Operation]: longrunning::model::Operation
424    /// [google.longrunning.Operation.metadata]: longrunning::model::Operation::metadata
425    /// [google.longrunning.Operation.response]: longrunning::model::Operation::result
426    /// [google.spanner.admin.database.v1.Database]: crate::model::Database
427    /// [google.spanner.admin.database.v1.RestoreDatabaseMetadata]: crate::model::RestoreDatabaseMetadata
428    ///
429    /// # Long running operations
430    ///
431    /// This method is used to start, and/or poll a [long-running Operation].
432    /// The [Working with long-running operations] chapter in the [user guide]
433    /// covers these operations in detail.
434    ///
435    /// [long-running operation]: https://google.aip.dev/151
436    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
437    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
438    pub fn restore_database(&self) -> super::builder::database_admin::RestoreDatabase {
439        super::builder::database_admin::RestoreDatabase::new(self.inner.clone())
440    }
441
442    /// Lists database [longrunning-operations][google.longrunning.Operation].
443    /// A database operation has a name of the form
444    /// `projects/<project>/instances/<instance>/databases/<database>/operations/<operation>`.
445    /// The long-running operation
446    /// [metadata][google.longrunning.Operation.metadata] field type
447    /// `metadata.type_url` describes the type of the metadata. Operations returned
448    /// include those that have completed/failed/canceled within the last 7 days,
449    /// and pending operations.
450    ///
451    /// [google.longrunning.Operation]: longrunning::model::Operation
452    /// [google.longrunning.Operation.metadata]: longrunning::model::Operation::metadata
453    pub fn list_database_operations(
454        &self,
455    ) -> super::builder::database_admin::ListDatabaseOperations {
456        super::builder::database_admin::ListDatabaseOperations::new(self.inner.clone())
457    }
458
459    /// Lists the backup [long-running operations][google.longrunning.Operation] in
460    /// the given instance. A backup operation has a name of the form
461    /// `projects/<project>/instances/<instance>/backups/<backup>/operations/<operation>`.
462    /// The long-running operation
463    /// [metadata][google.longrunning.Operation.metadata] field type
464    /// `metadata.type_url` describes the type of the metadata. Operations returned
465    /// include those that have completed/failed/canceled within the last 7 days,
466    /// and pending operations. Operations returned are ordered by
467    /// `operation.metadata.value.progress.start_time` in descending order starting
468    /// from the most recently started operation.
469    ///
470    /// [google.longrunning.Operation]: longrunning::model::Operation
471    /// [google.longrunning.Operation.metadata]: longrunning::model::Operation::metadata
472    pub fn list_backup_operations(&self) -> super::builder::database_admin::ListBackupOperations {
473        super::builder::database_admin::ListBackupOperations::new(self.inner.clone())
474    }
475
476    /// Lists Cloud Spanner database roles.
477    pub fn list_database_roles(&self) -> super::builder::database_admin::ListDatabaseRoles {
478        super::builder::database_admin::ListDatabaseRoles::new(self.inner.clone())
479    }
480
481    /// Adds split points to specified tables, indexes of a database.
482    pub fn add_split_points(&self) -> super::builder::database_admin::AddSplitPoints {
483        super::builder::database_admin::AddSplitPoints::new(self.inner.clone())
484    }
485
486    /// Creates a new backup schedule.
487    pub fn create_backup_schedule(&self) -> super::builder::database_admin::CreateBackupSchedule {
488        super::builder::database_admin::CreateBackupSchedule::new(self.inner.clone())
489    }
490
491    /// Gets backup schedule for the input schedule name.
492    pub fn get_backup_schedule(&self) -> super::builder::database_admin::GetBackupSchedule {
493        super::builder::database_admin::GetBackupSchedule::new(self.inner.clone())
494    }
495
496    /// Updates a backup schedule.
497    pub fn update_backup_schedule(&self) -> super::builder::database_admin::UpdateBackupSchedule {
498        super::builder::database_admin::UpdateBackupSchedule::new(self.inner.clone())
499    }
500
501    /// Deletes a backup schedule.
502    pub fn delete_backup_schedule(&self) -> super::builder::database_admin::DeleteBackupSchedule {
503        super::builder::database_admin::DeleteBackupSchedule::new(self.inner.clone())
504    }
505
506    /// Lists all the backup schedules for the database.
507    pub fn list_backup_schedules(&self) -> super::builder::database_admin::ListBackupSchedules {
508        super::builder::database_admin::ListBackupSchedules::new(self.inner.clone())
509    }
510
511    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
512    ///
513    /// [google.longrunning.Operations]: longrunning::client::Operations
514    pub fn list_operations(&self) -> super::builder::database_admin::ListOperations {
515        super::builder::database_admin::ListOperations::new(self.inner.clone())
516    }
517
518    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
519    ///
520    /// [google.longrunning.Operations]: longrunning::client::Operations
521    pub fn get_operation(&self) -> super::builder::database_admin::GetOperation {
522        super::builder::database_admin::GetOperation::new(self.inner.clone())
523    }
524
525    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
526    ///
527    /// [google.longrunning.Operations]: longrunning::client::Operations
528    pub fn delete_operation(&self) -> super::builder::database_admin::DeleteOperation {
529        super::builder::database_admin::DeleteOperation::new(self.inner.clone())
530    }
531
532    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
533    ///
534    /// [google.longrunning.Operations]: longrunning::client::Operations
535    pub fn cancel_operation(&self) -> super::builder::database_admin::CancelOperation {
536        super::builder::database_admin::CancelOperation::new(self.inner.clone())
537    }
538}