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: gax::options::RequestOptions,
46    ) -> impl std::future::Future<
47        Output = crate::Result<gax::response::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: gax::options::RequestOptions,
57    ) -> impl std::future::Future<
58        Output = crate::Result<gax::response::Response<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: gax::options::RequestOptions,
68    ) -> impl std::future::Future<
69        Output = crate::Result<gax::response::Response<crate::model::Database>>,
70    > + Send {
71        gaxi::unimplemented::unimplemented_stub()
72    }
73
74    /// Implements [super::client::DatabaseAdmin::update_database].
75    fn update_database(
76        &self,
77        _req: crate::model::UpdateDatabaseRequest,
78        _options: gax::options::RequestOptions,
79    ) -> impl std::future::Future<
80        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
81    > + Send {
82        gaxi::unimplemented::unimplemented_stub()
83    }
84
85    /// Implements [super::client::DatabaseAdmin::update_database_ddl].
86    fn update_database_ddl(
87        &self,
88        _req: crate::model::UpdateDatabaseDdlRequest,
89        _options: gax::options::RequestOptions,
90    ) -> impl std::future::Future<
91        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
92    > + Send {
93        gaxi::unimplemented::unimplemented_stub()
94    }
95
96    /// Implements [super::client::DatabaseAdmin::drop_database].
97    fn drop_database(
98        &self,
99        _req: crate::model::DropDatabaseRequest,
100        _options: gax::options::RequestOptions,
101    ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<()>>> + Send {
102        gaxi::unimplemented::unimplemented_stub()
103    }
104
105    /// Implements [super::client::DatabaseAdmin::get_database_ddl].
106    fn get_database_ddl(
107        &self,
108        _req: crate::model::GetDatabaseDdlRequest,
109        _options: gax::options::RequestOptions,
110    ) -> impl std::future::Future<
111        Output = crate::Result<gax::response::Response<crate::model::GetDatabaseDdlResponse>>,
112    > + Send {
113        gaxi::unimplemented::unimplemented_stub()
114    }
115
116    /// Implements [super::client::DatabaseAdmin::set_iam_policy].
117    fn set_iam_policy(
118        &self,
119        _req: iam_v1::model::SetIamPolicyRequest,
120        _options: gax::options::RequestOptions,
121    ) -> impl std::future::Future<
122        Output = crate::Result<gax::response::Response<iam_v1::model::Policy>>,
123    > + Send {
124        gaxi::unimplemented::unimplemented_stub()
125    }
126
127    /// Implements [super::client::DatabaseAdmin::get_iam_policy].
128    fn get_iam_policy(
129        &self,
130        _req: iam_v1::model::GetIamPolicyRequest,
131        _options: gax::options::RequestOptions,
132    ) -> impl std::future::Future<
133        Output = crate::Result<gax::response::Response<iam_v1::model::Policy>>,
134    > + Send {
135        gaxi::unimplemented::unimplemented_stub()
136    }
137
138    /// Implements [super::client::DatabaseAdmin::test_iam_permissions].
139    fn test_iam_permissions(
140        &self,
141        _req: iam_v1::model::TestIamPermissionsRequest,
142        _options: gax::options::RequestOptions,
143    ) -> impl std::future::Future<
144        Output = crate::Result<gax::response::Response<iam_v1::model::TestIamPermissionsResponse>>,
145    > + Send {
146        gaxi::unimplemented::unimplemented_stub()
147    }
148
149    /// Implements [super::client::DatabaseAdmin::create_backup].
150    fn create_backup(
151        &self,
152        _req: crate::model::CreateBackupRequest,
153        _options: gax::options::RequestOptions,
154    ) -> impl std::future::Future<
155        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
156    > + Send {
157        gaxi::unimplemented::unimplemented_stub()
158    }
159
160    /// Implements [super::client::DatabaseAdmin::copy_backup].
161    fn copy_backup(
162        &self,
163        _req: crate::model::CopyBackupRequest,
164        _options: gax::options::RequestOptions,
165    ) -> impl std::future::Future<
166        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
167    > + Send {
168        gaxi::unimplemented::unimplemented_stub()
169    }
170
171    /// Implements [super::client::DatabaseAdmin::get_backup].
172    fn get_backup(
173        &self,
174        _req: crate::model::GetBackupRequest,
175        _options: gax::options::RequestOptions,
176    ) -> impl std::future::Future<
177        Output = crate::Result<gax::response::Response<crate::model::Backup>>,
178    > + Send {
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: gax::options::RequestOptions,
187    ) -> impl std::future::Future<
188        Output = crate::Result<gax::response::Response<crate::model::Backup>>,
189    > + Send {
190        gaxi::unimplemented::unimplemented_stub()
191    }
192
193    /// Implements [super::client::DatabaseAdmin::delete_backup].
194    fn delete_backup(
195        &self,
196        _req: crate::model::DeleteBackupRequest,
197        _options: gax::options::RequestOptions,
198    ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<()>>> + Send {
199        gaxi::unimplemented::unimplemented_stub()
200    }
201
202    /// Implements [super::client::DatabaseAdmin::list_backups].
203    fn list_backups(
204        &self,
205        _req: crate::model::ListBackupsRequest,
206        _options: gax::options::RequestOptions,
207    ) -> impl std::future::Future<
208        Output = crate::Result<gax::response::Response<crate::model::ListBackupsResponse>>,
209    > + Send {
210        gaxi::unimplemented::unimplemented_stub()
211    }
212
213    /// Implements [super::client::DatabaseAdmin::restore_database].
214    fn restore_database(
215        &self,
216        _req: crate::model::RestoreDatabaseRequest,
217        _options: gax::options::RequestOptions,
218    ) -> impl std::future::Future<
219        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
220    > + Send {
221        gaxi::unimplemented::unimplemented_stub()
222    }
223
224    /// Implements [super::client::DatabaseAdmin::list_database_operations].
225    fn list_database_operations(
226        &self,
227        _req: crate::model::ListDatabaseOperationsRequest,
228        _options: gax::options::RequestOptions,
229    ) -> impl std::future::Future<
230        Output = crate::Result<
231            gax::response::Response<crate::model::ListDatabaseOperationsResponse>,
232        >,
233    > + Send {
234        gaxi::unimplemented::unimplemented_stub()
235    }
236
237    /// Implements [super::client::DatabaseAdmin::list_backup_operations].
238    fn list_backup_operations(
239        &self,
240        _req: crate::model::ListBackupOperationsRequest,
241        _options: gax::options::RequestOptions,
242    ) -> impl std::future::Future<
243        Output = crate::Result<gax::response::Response<crate::model::ListBackupOperationsResponse>>,
244    > + Send {
245        gaxi::unimplemented::unimplemented_stub()
246    }
247
248    /// Implements [super::client::DatabaseAdmin::list_database_roles].
249    fn list_database_roles(
250        &self,
251        _req: crate::model::ListDatabaseRolesRequest,
252        _options: gax::options::RequestOptions,
253    ) -> impl std::future::Future<
254        Output = crate::Result<gax::response::Response<crate::model::ListDatabaseRolesResponse>>,
255    > + Send {
256        gaxi::unimplemented::unimplemented_stub()
257    }
258
259    /// Implements [super::client::DatabaseAdmin::add_split_points].
260    fn add_split_points(
261        &self,
262        _req: crate::model::AddSplitPointsRequest,
263        _options: gax::options::RequestOptions,
264    ) -> impl std::future::Future<
265        Output = crate::Result<gax::response::Response<crate::model::AddSplitPointsResponse>>,
266    > + Send {
267        gaxi::unimplemented::unimplemented_stub()
268    }
269
270    /// Implements [super::client::DatabaseAdmin::create_backup_schedule].
271    fn create_backup_schedule(
272        &self,
273        _req: crate::model::CreateBackupScheduleRequest,
274        _options: gax::options::RequestOptions,
275    ) -> impl std::future::Future<
276        Output = crate::Result<gax::response::Response<crate::model::BackupSchedule>>,
277    > + Send {
278        gaxi::unimplemented::unimplemented_stub()
279    }
280
281    /// Implements [super::client::DatabaseAdmin::get_backup_schedule].
282    fn get_backup_schedule(
283        &self,
284        _req: crate::model::GetBackupScheduleRequest,
285        _options: gax::options::RequestOptions,
286    ) -> impl std::future::Future<
287        Output = crate::Result<gax::response::Response<crate::model::BackupSchedule>>,
288    > + Send {
289        gaxi::unimplemented::unimplemented_stub()
290    }
291
292    /// Implements [super::client::DatabaseAdmin::update_backup_schedule].
293    fn update_backup_schedule(
294        &self,
295        _req: crate::model::UpdateBackupScheduleRequest,
296        _options: gax::options::RequestOptions,
297    ) -> impl std::future::Future<
298        Output = crate::Result<gax::response::Response<crate::model::BackupSchedule>>,
299    > + Send {
300        gaxi::unimplemented::unimplemented_stub()
301    }
302
303    /// Implements [super::client::DatabaseAdmin::delete_backup_schedule].
304    fn delete_backup_schedule(
305        &self,
306        _req: crate::model::DeleteBackupScheduleRequest,
307        _options: gax::options::RequestOptions,
308    ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<()>>> + Send {
309        gaxi::unimplemented::unimplemented_stub()
310    }
311
312    /// Implements [super::client::DatabaseAdmin::list_backup_schedules].
313    fn list_backup_schedules(
314        &self,
315        _req: crate::model::ListBackupSchedulesRequest,
316        _options: gax::options::RequestOptions,
317    ) -> impl std::future::Future<
318        Output = crate::Result<gax::response::Response<crate::model::ListBackupSchedulesResponse>>,
319    > + Send {
320        gaxi::unimplemented::unimplemented_stub()
321    }
322
323    /// Implements [super::client::DatabaseAdmin::list_operations].
324    fn list_operations(
325        &self,
326        _req: longrunning::model::ListOperationsRequest,
327        _options: gax::options::RequestOptions,
328    ) -> impl std::future::Future<
329        Output = crate::Result<gax::response::Response<longrunning::model::ListOperationsResponse>>,
330    > + Send {
331        gaxi::unimplemented::unimplemented_stub()
332    }
333
334    /// Implements [super::client::DatabaseAdmin::get_operation].
335    fn get_operation(
336        &self,
337        _req: longrunning::model::GetOperationRequest,
338        _options: gax::options::RequestOptions,
339    ) -> impl std::future::Future<
340        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
341    > + Send {
342        gaxi::unimplemented::unimplemented_stub()
343    }
344
345    /// Implements [super::client::DatabaseAdmin::delete_operation].
346    fn delete_operation(
347        &self,
348        _req: longrunning::model::DeleteOperationRequest,
349        _options: gax::options::RequestOptions,
350    ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<()>>> + Send {
351        gaxi::unimplemented::unimplemented_stub()
352    }
353
354    /// Implements [super::client::DatabaseAdmin::cancel_operation].
355    fn cancel_operation(
356        &self,
357        _req: longrunning::model::CancelOperationRequest,
358        _options: gax::options::RequestOptions,
359    ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<()>>> + Send {
360        gaxi::unimplemented::unimplemented_stub()
361    }
362
363    /// Returns the polling error policy.
364    ///
365    /// When mocking, this method is typically irrelevant. Do not try to verify
366    /// it is called by your mocks.
367    fn get_polling_error_policy(
368        &self,
369        _options: &gax::options::RequestOptions,
370    ) -> std::sync::Arc<dyn gax::polling_error_policy::PollingErrorPolicy> {
371        std::sync::Arc::new(gax::polling_error_policy::Aip194Strict)
372    }
373
374    /// Returns the polling backoff policy.
375    ///
376    /// When mocking, this method is typically irrelevant. Do not try to verify
377    /// it is called by your mocks.
378    fn get_polling_backoff_policy(
379        &self,
380        _options: &gax::options::RequestOptions,
381    ) -> std::sync::Arc<dyn gax::polling_backoff_policy::PollingBackoffPolicy> {
382        std::sync::Arc::new(gax::exponential_backoff::ExponentialBackoff::default())
383    }
384}