Skip to main content

google_cloud_spanner_admin_database_v1/
stub.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
17//! Traits to mock the clients in this library.
18//!
19//! Application developers may need to mock the clients in this library to test
20//! how their application works with different (and sometimes hard to trigger)
21//! client and service behavior. Such test can define mocks implementing the
22//! trait(s) defined in this module, initialize the client with an instance of
23//! this mock in their tests, and verify their application responds as expected.
24
25#![allow(rustdoc::broken_intra_doc_links)]
26
27pub(crate) mod dynamic;
28
29/// Defines the trait used to implement [super::client::DatabaseAdmin].
30///
31/// Application developers may need to implement this trait to mock
32/// `client::DatabaseAdmin`.  In other use-cases, application developers only
33/// use `client::DatabaseAdmin` and need not be concerned with this trait or
34/// its implementations.
35///
36/// Services gain new RPCs routinely. Consequently, this trait gains new methods
37/// too. To avoid breaking applications the trait provides a default
38/// implementation of each method. Most of these implementations just return an
39/// error.
40pub trait DatabaseAdmin: std::fmt::Debug + Send + Sync {
41    /// Implements [super::client::DatabaseAdmin::list_databases].
42    fn list_databases(
43        &self,
44        _req: crate::model::ListDatabasesRequest,
45        _options: crate::RequestOptions,
46    ) -> impl std::future::Future<
47        Output = crate::Result<crate::Response<crate::model::ListDatabasesResponse>>,
48    > + Send {
49        gaxi::unimplemented::unimplemented_stub()
50    }
51
52    /// Implements [super::client::DatabaseAdmin::create_database].
53    fn create_database(
54        &self,
55        _req: crate::model::CreateDatabaseRequest,
56        _options: crate::RequestOptions,
57    ) -> impl std::future::Future<
58        Output = crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>,
59    > + Send {
60        gaxi::unimplemented::unimplemented_stub()
61    }
62
63    /// Implements [super::client::DatabaseAdmin::get_database].
64    fn get_database(
65        &self,
66        _req: crate::model::GetDatabaseRequest,
67        _options: crate::RequestOptions,
68    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::Database>>> + Send
69    {
70        gaxi::unimplemented::unimplemented_stub()
71    }
72
73    /// Implements [super::client::DatabaseAdmin::update_database].
74    fn update_database(
75        &self,
76        _req: crate::model::UpdateDatabaseRequest,
77        _options: crate::RequestOptions,
78    ) -> impl std::future::Future<
79        Output = crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>,
80    > + Send {
81        gaxi::unimplemented::unimplemented_stub()
82    }
83
84    /// Implements [super::client::DatabaseAdmin::update_database_ddl].
85    fn update_database_ddl(
86        &self,
87        _req: crate::model::UpdateDatabaseDdlRequest,
88        _options: crate::RequestOptions,
89    ) -> impl std::future::Future<
90        Output = crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>,
91    > + Send {
92        gaxi::unimplemented::unimplemented_stub()
93    }
94
95    /// Implements [super::client::DatabaseAdmin::drop_database].
96    fn drop_database(
97        &self,
98        _req: crate::model::DropDatabaseRequest,
99        _options: crate::RequestOptions,
100    ) -> impl std::future::Future<Output = crate::Result<crate::Response<()>>> + Send {
101        gaxi::unimplemented::unimplemented_stub()
102    }
103
104    /// Implements [super::client::DatabaseAdmin::get_database_ddl].
105    fn get_database_ddl(
106        &self,
107        _req: crate::model::GetDatabaseDdlRequest,
108        _options: crate::RequestOptions,
109    ) -> impl std::future::Future<
110        Output = crate::Result<crate::Response<crate::model::GetDatabaseDdlResponse>>,
111    > + Send {
112        gaxi::unimplemented::unimplemented_stub()
113    }
114
115    /// Implements [super::client::DatabaseAdmin::set_iam_policy].
116    fn set_iam_policy(
117        &self,
118        _req: google_cloud_iam_v1::model::SetIamPolicyRequest,
119        _options: crate::RequestOptions,
120    ) -> impl std::future::Future<
121        Output = crate::Result<crate::Response<google_cloud_iam_v1::model::Policy>>,
122    > + Send {
123        gaxi::unimplemented::unimplemented_stub()
124    }
125
126    /// Implements [super::client::DatabaseAdmin::get_iam_policy].
127    fn get_iam_policy(
128        &self,
129        _req: google_cloud_iam_v1::model::GetIamPolicyRequest,
130        _options: crate::RequestOptions,
131    ) -> impl std::future::Future<
132        Output = crate::Result<crate::Response<google_cloud_iam_v1::model::Policy>>,
133    > + Send {
134        gaxi::unimplemented::unimplemented_stub()
135    }
136
137    /// Implements [super::client::DatabaseAdmin::test_iam_permissions].
138    fn test_iam_permissions(
139        &self,
140        _req: google_cloud_iam_v1::model::TestIamPermissionsRequest,
141        _options: crate::RequestOptions,
142    ) -> impl std::future::Future<
143        Output = crate::Result<
144            crate::Response<google_cloud_iam_v1::model::TestIamPermissionsResponse>,
145        >,
146    > + Send {
147        gaxi::unimplemented::unimplemented_stub()
148    }
149
150    /// Implements [super::client::DatabaseAdmin::create_backup].
151    fn create_backup(
152        &self,
153        _req: crate::model::CreateBackupRequest,
154        _options: crate::RequestOptions,
155    ) -> impl std::future::Future<
156        Output = crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>,
157    > + Send {
158        gaxi::unimplemented::unimplemented_stub()
159    }
160
161    /// Implements [super::client::DatabaseAdmin::copy_backup].
162    fn copy_backup(
163        &self,
164        _req: crate::model::CopyBackupRequest,
165        _options: crate::RequestOptions,
166    ) -> impl std::future::Future<
167        Output = crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>,
168    > + Send {
169        gaxi::unimplemented::unimplemented_stub()
170    }
171
172    /// Implements [super::client::DatabaseAdmin::get_backup].
173    fn get_backup(
174        &self,
175        _req: crate::model::GetBackupRequest,
176        _options: crate::RequestOptions,
177    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::Backup>>> + Send
178    {
179        gaxi::unimplemented::unimplemented_stub()
180    }
181
182    /// Implements [super::client::DatabaseAdmin::update_backup].
183    fn update_backup(
184        &self,
185        _req: crate::model::UpdateBackupRequest,
186        _options: crate::RequestOptions,
187    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::Backup>>> + Send
188    {
189        gaxi::unimplemented::unimplemented_stub()
190    }
191
192    /// Implements [super::client::DatabaseAdmin::delete_backup].
193    fn delete_backup(
194        &self,
195        _req: crate::model::DeleteBackupRequest,
196        _options: crate::RequestOptions,
197    ) -> impl std::future::Future<Output = crate::Result<crate::Response<()>>> + Send {
198        gaxi::unimplemented::unimplemented_stub()
199    }
200
201    /// Implements [super::client::DatabaseAdmin::list_backups].
202    fn list_backups(
203        &self,
204        _req: crate::model::ListBackupsRequest,
205        _options: crate::RequestOptions,
206    ) -> impl std::future::Future<
207        Output = crate::Result<crate::Response<crate::model::ListBackupsResponse>>,
208    > + Send {
209        gaxi::unimplemented::unimplemented_stub()
210    }
211
212    /// Implements [super::client::DatabaseAdmin::restore_database].
213    fn restore_database(
214        &self,
215        _req: crate::model::RestoreDatabaseRequest,
216        _options: crate::RequestOptions,
217    ) -> impl std::future::Future<
218        Output = crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>,
219    > + Send {
220        gaxi::unimplemented::unimplemented_stub()
221    }
222
223    /// Implements [super::client::DatabaseAdmin::list_database_operations].
224    fn list_database_operations(
225        &self,
226        _req: crate::model::ListDatabaseOperationsRequest,
227        _options: crate::RequestOptions,
228    ) -> impl std::future::Future<
229        Output = crate::Result<crate::Response<crate::model::ListDatabaseOperationsResponse>>,
230    > + Send {
231        gaxi::unimplemented::unimplemented_stub()
232    }
233
234    /// Implements [super::client::DatabaseAdmin::list_backup_operations].
235    fn list_backup_operations(
236        &self,
237        _req: crate::model::ListBackupOperationsRequest,
238        _options: crate::RequestOptions,
239    ) -> impl std::future::Future<
240        Output = crate::Result<crate::Response<crate::model::ListBackupOperationsResponse>>,
241    > + Send {
242        gaxi::unimplemented::unimplemented_stub()
243    }
244
245    /// Implements [super::client::DatabaseAdmin::list_database_roles].
246    fn list_database_roles(
247        &self,
248        _req: crate::model::ListDatabaseRolesRequest,
249        _options: crate::RequestOptions,
250    ) -> impl std::future::Future<
251        Output = crate::Result<crate::Response<crate::model::ListDatabaseRolesResponse>>,
252    > + Send {
253        gaxi::unimplemented::unimplemented_stub()
254    }
255
256    /// Implements [super::client::DatabaseAdmin::add_split_points].
257    fn add_split_points(
258        &self,
259        _req: crate::model::AddSplitPointsRequest,
260        _options: crate::RequestOptions,
261    ) -> impl std::future::Future<
262        Output = crate::Result<crate::Response<crate::model::AddSplitPointsResponse>>,
263    > + Send {
264        gaxi::unimplemented::unimplemented_stub()
265    }
266
267    /// Implements [super::client::DatabaseAdmin::create_backup_schedule].
268    fn create_backup_schedule(
269        &self,
270        _req: crate::model::CreateBackupScheduleRequest,
271        _options: crate::RequestOptions,
272    ) -> impl std::future::Future<
273        Output = crate::Result<crate::Response<crate::model::BackupSchedule>>,
274    > + Send {
275        gaxi::unimplemented::unimplemented_stub()
276    }
277
278    /// Implements [super::client::DatabaseAdmin::get_backup_schedule].
279    fn get_backup_schedule(
280        &self,
281        _req: crate::model::GetBackupScheduleRequest,
282        _options: crate::RequestOptions,
283    ) -> impl std::future::Future<
284        Output = crate::Result<crate::Response<crate::model::BackupSchedule>>,
285    > + Send {
286        gaxi::unimplemented::unimplemented_stub()
287    }
288
289    /// Implements [super::client::DatabaseAdmin::update_backup_schedule].
290    fn update_backup_schedule(
291        &self,
292        _req: crate::model::UpdateBackupScheduleRequest,
293        _options: crate::RequestOptions,
294    ) -> impl std::future::Future<
295        Output = crate::Result<crate::Response<crate::model::BackupSchedule>>,
296    > + Send {
297        gaxi::unimplemented::unimplemented_stub()
298    }
299
300    /// Implements [super::client::DatabaseAdmin::delete_backup_schedule].
301    fn delete_backup_schedule(
302        &self,
303        _req: crate::model::DeleteBackupScheduleRequest,
304        _options: crate::RequestOptions,
305    ) -> impl std::future::Future<Output = crate::Result<crate::Response<()>>> + Send {
306        gaxi::unimplemented::unimplemented_stub()
307    }
308
309    /// Implements [super::client::DatabaseAdmin::list_backup_schedules].
310    fn list_backup_schedules(
311        &self,
312        _req: crate::model::ListBackupSchedulesRequest,
313        _options: crate::RequestOptions,
314    ) -> impl std::future::Future<
315        Output = crate::Result<crate::Response<crate::model::ListBackupSchedulesResponse>>,
316    > + Send {
317        gaxi::unimplemented::unimplemented_stub()
318    }
319
320    /// Implements [super::client::DatabaseAdmin::list_operations].
321    fn list_operations(
322        &self,
323        _req: google_cloud_longrunning::model::ListOperationsRequest,
324        _options: crate::RequestOptions,
325    ) -> impl std::future::Future<
326        Output = crate::Result<
327            crate::Response<google_cloud_longrunning::model::ListOperationsResponse>,
328        >,
329    > + Send {
330        gaxi::unimplemented::unimplemented_stub()
331    }
332
333    /// Implements [super::client::DatabaseAdmin::get_operation].
334    fn get_operation(
335        &self,
336        _req: google_cloud_longrunning::model::GetOperationRequest,
337        _options: crate::RequestOptions,
338    ) -> impl std::future::Future<
339        Output = crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>,
340    > + Send {
341        gaxi::unimplemented::unimplemented_stub()
342    }
343
344    /// Implements [super::client::DatabaseAdmin::delete_operation].
345    fn delete_operation(
346        &self,
347        _req: google_cloud_longrunning::model::DeleteOperationRequest,
348        _options: crate::RequestOptions,
349    ) -> impl std::future::Future<Output = crate::Result<crate::Response<()>>> + Send {
350        gaxi::unimplemented::unimplemented_stub()
351    }
352
353    /// Implements [super::client::DatabaseAdmin::cancel_operation].
354    fn cancel_operation(
355        &self,
356        _req: google_cloud_longrunning::model::CancelOperationRequest,
357        _options: crate::RequestOptions,
358    ) -> impl std::future::Future<Output = crate::Result<crate::Response<()>>> + Send {
359        gaxi::unimplemented::unimplemented_stub()
360    }
361
362    /// Returns the polling error policy.
363    ///
364    /// When mocking, this method is typically irrelevant. Do not try to verify
365    /// it is called by your mocks.
366    fn get_polling_error_policy(
367        &self,
368        _options: &crate::RequestOptions,
369    ) -> std::sync::Arc<dyn google_cloud_gax::polling_error_policy::PollingErrorPolicy> {
370        std::sync::Arc::new(google_cloud_gax::polling_error_policy::Aip194Strict)
371    }
372
373    /// Returns the polling backoff policy.
374    ///
375    /// When mocking, this method is typically irrelevant. Do not try to verify
376    /// it is called by your mocks.
377    fn get_polling_backoff_policy(
378        &self,
379        _options: &crate::RequestOptions,
380    ) -> std::sync::Arc<dyn google_cloud_gax::polling_backoff_policy::PollingBackoffPolicy> {
381        std::sync::Arc::new(google_cloud_gax::exponential_backoff::ExponentialBackoff::default())
382    }
383}