Skip to main content

google_cloud_spanner_admin_instance_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::InstanceAdmin].
30///
31/// Application developers may need to implement this trait to mock
32/// `client::InstanceAdmin`.  In other use-cases, application developers only
33/// use `client::InstanceAdmin` 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 InstanceAdmin: std::fmt::Debug + Send + Sync {
41    /// Implements [super::client::InstanceAdmin::list_instance_configs].
42    fn list_instance_configs(
43        &self,
44        _req: crate::model::ListInstanceConfigsRequest,
45        _options: crate::RequestOptions,
46    ) -> impl std::future::Future<
47        Output = crate::Result<crate::Response<crate::model::ListInstanceConfigsResponse>>,
48    > + Send {
49        gaxi::unimplemented::unimplemented_stub()
50    }
51
52    /// Implements [super::client::InstanceAdmin::get_instance_config].
53    fn get_instance_config(
54        &self,
55        _req: crate::model::GetInstanceConfigRequest,
56        _options: crate::RequestOptions,
57    ) -> impl std::future::Future<
58        Output = crate::Result<crate::Response<crate::model::InstanceConfig>>,
59    > + Send {
60        gaxi::unimplemented::unimplemented_stub()
61    }
62
63    /// Implements [super::client::InstanceAdmin::create_instance_config].
64    fn create_instance_config(
65        &self,
66        _req: crate::model::CreateInstanceConfigRequest,
67        _options: crate::RequestOptions,
68    ) -> impl std::future::Future<
69        Output = crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>,
70    > + Send {
71        gaxi::unimplemented::unimplemented_stub()
72    }
73
74    /// Implements [super::client::InstanceAdmin::update_instance_config].
75    fn update_instance_config(
76        &self,
77        _req: crate::model::UpdateInstanceConfigRequest,
78        _options: crate::RequestOptions,
79    ) -> impl std::future::Future<
80        Output = crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>,
81    > + Send {
82        gaxi::unimplemented::unimplemented_stub()
83    }
84
85    /// Implements [super::client::InstanceAdmin::delete_instance_config].
86    fn delete_instance_config(
87        &self,
88        _req: crate::model::DeleteInstanceConfigRequest,
89        _options: crate::RequestOptions,
90    ) -> impl std::future::Future<Output = crate::Result<crate::Response<()>>> + Send {
91        gaxi::unimplemented::unimplemented_stub()
92    }
93
94    /// Implements [super::client::InstanceAdmin::list_instance_config_operations].
95    fn list_instance_config_operations(
96        &self,
97        _req: crate::model::ListInstanceConfigOperationsRequest,
98        _options: crate::RequestOptions,
99    ) -> impl std::future::Future<
100        Output = crate::Result<crate::Response<crate::model::ListInstanceConfigOperationsResponse>>,
101    > + Send {
102        gaxi::unimplemented::unimplemented_stub()
103    }
104
105    /// Implements [super::client::InstanceAdmin::list_instances].
106    fn list_instances(
107        &self,
108        _req: crate::model::ListInstancesRequest,
109        _options: crate::RequestOptions,
110    ) -> impl std::future::Future<
111        Output = crate::Result<crate::Response<crate::model::ListInstancesResponse>>,
112    > + Send {
113        gaxi::unimplemented::unimplemented_stub()
114    }
115
116    /// Implements [super::client::InstanceAdmin::list_instance_partitions].
117    fn list_instance_partitions(
118        &self,
119        _req: crate::model::ListInstancePartitionsRequest,
120        _options: crate::RequestOptions,
121    ) -> impl std::future::Future<
122        Output = crate::Result<crate::Response<crate::model::ListInstancePartitionsResponse>>,
123    > + Send {
124        gaxi::unimplemented::unimplemented_stub()
125    }
126
127    /// Implements [super::client::InstanceAdmin::get_instance].
128    fn get_instance(
129        &self,
130        _req: crate::model::GetInstanceRequest,
131        _options: crate::RequestOptions,
132    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::Instance>>> + Send
133    {
134        gaxi::unimplemented::unimplemented_stub()
135    }
136
137    /// Implements [super::client::InstanceAdmin::create_instance].
138    fn create_instance(
139        &self,
140        _req: crate::model::CreateInstanceRequest,
141        _options: crate::RequestOptions,
142    ) -> impl std::future::Future<
143        Output = crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>,
144    > + Send {
145        gaxi::unimplemented::unimplemented_stub()
146    }
147
148    /// Implements [super::client::InstanceAdmin::update_instance].
149    fn update_instance(
150        &self,
151        _req: crate::model::UpdateInstanceRequest,
152        _options: crate::RequestOptions,
153    ) -> impl std::future::Future<
154        Output = crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>,
155    > + Send {
156        gaxi::unimplemented::unimplemented_stub()
157    }
158
159    /// Implements [super::client::InstanceAdmin::delete_instance].
160    fn delete_instance(
161        &self,
162        _req: crate::model::DeleteInstanceRequest,
163        _options: crate::RequestOptions,
164    ) -> impl std::future::Future<Output = crate::Result<crate::Response<()>>> + Send {
165        gaxi::unimplemented::unimplemented_stub()
166    }
167
168    /// Implements [super::client::InstanceAdmin::set_iam_policy].
169    fn set_iam_policy(
170        &self,
171        _req: google_cloud_iam_v1::model::SetIamPolicyRequest,
172        _options: crate::RequestOptions,
173    ) -> impl std::future::Future<
174        Output = crate::Result<crate::Response<google_cloud_iam_v1::model::Policy>>,
175    > + Send {
176        gaxi::unimplemented::unimplemented_stub()
177    }
178
179    /// Implements [super::client::InstanceAdmin::get_iam_policy].
180    fn get_iam_policy(
181        &self,
182        _req: google_cloud_iam_v1::model::GetIamPolicyRequest,
183        _options: crate::RequestOptions,
184    ) -> impl std::future::Future<
185        Output = crate::Result<crate::Response<google_cloud_iam_v1::model::Policy>>,
186    > + Send {
187        gaxi::unimplemented::unimplemented_stub()
188    }
189
190    /// Implements [super::client::InstanceAdmin::test_iam_permissions].
191    fn test_iam_permissions(
192        &self,
193        _req: google_cloud_iam_v1::model::TestIamPermissionsRequest,
194        _options: crate::RequestOptions,
195    ) -> impl std::future::Future<
196        Output = crate::Result<
197            crate::Response<google_cloud_iam_v1::model::TestIamPermissionsResponse>,
198        >,
199    > + Send {
200        gaxi::unimplemented::unimplemented_stub()
201    }
202
203    /// Implements [super::client::InstanceAdmin::get_instance_partition].
204    fn get_instance_partition(
205        &self,
206        _req: crate::model::GetInstancePartitionRequest,
207        _options: crate::RequestOptions,
208    ) -> impl std::future::Future<
209        Output = crate::Result<crate::Response<crate::model::InstancePartition>>,
210    > + Send {
211        gaxi::unimplemented::unimplemented_stub()
212    }
213
214    /// Implements [super::client::InstanceAdmin::create_instance_partition].
215    fn create_instance_partition(
216        &self,
217        _req: crate::model::CreateInstancePartitionRequest,
218        _options: crate::RequestOptions,
219    ) -> impl std::future::Future<
220        Output = crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>,
221    > + Send {
222        gaxi::unimplemented::unimplemented_stub()
223    }
224
225    /// Implements [super::client::InstanceAdmin::delete_instance_partition].
226    fn delete_instance_partition(
227        &self,
228        _req: crate::model::DeleteInstancePartitionRequest,
229        _options: crate::RequestOptions,
230    ) -> impl std::future::Future<Output = crate::Result<crate::Response<()>>> + Send {
231        gaxi::unimplemented::unimplemented_stub()
232    }
233
234    /// Implements [super::client::InstanceAdmin::update_instance_partition].
235    fn update_instance_partition(
236        &self,
237        _req: crate::model::UpdateInstancePartitionRequest,
238        _options: crate::RequestOptions,
239    ) -> impl std::future::Future<
240        Output = crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>,
241    > + Send {
242        gaxi::unimplemented::unimplemented_stub()
243    }
244
245    /// Implements [super::client::InstanceAdmin::list_instance_partition_operations].
246    fn list_instance_partition_operations(
247        &self,
248        _req: crate::model::ListInstancePartitionOperationsRequest,
249        _options: crate::RequestOptions,
250    ) -> impl std::future::Future<
251        Output = crate::Result<
252            crate::Response<crate::model::ListInstancePartitionOperationsResponse>,
253        >,
254    > + Send {
255        gaxi::unimplemented::unimplemented_stub()
256    }
257
258    /// Implements [super::client::InstanceAdmin::move_instance].
259    fn move_instance(
260        &self,
261        _req: crate::model::MoveInstanceRequest,
262        _options: crate::RequestOptions,
263    ) -> impl std::future::Future<
264        Output = crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>,
265    > + Send {
266        gaxi::unimplemented::unimplemented_stub()
267    }
268
269    /// Implements [super::client::InstanceAdmin::list_operations].
270    fn list_operations(
271        &self,
272        _req: google_cloud_longrunning::model::ListOperationsRequest,
273        _options: crate::RequestOptions,
274    ) -> impl std::future::Future<
275        Output = crate::Result<
276            crate::Response<google_cloud_longrunning::model::ListOperationsResponse>,
277        >,
278    > + Send {
279        gaxi::unimplemented::unimplemented_stub()
280    }
281
282    /// Implements [super::client::InstanceAdmin::get_operation].
283    fn get_operation(
284        &self,
285        _req: google_cloud_longrunning::model::GetOperationRequest,
286        _options: crate::RequestOptions,
287    ) -> impl std::future::Future<
288        Output = crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>,
289    > + Send {
290        gaxi::unimplemented::unimplemented_stub()
291    }
292
293    /// Implements [super::client::InstanceAdmin::delete_operation].
294    fn delete_operation(
295        &self,
296        _req: google_cloud_longrunning::model::DeleteOperationRequest,
297        _options: crate::RequestOptions,
298    ) -> impl std::future::Future<Output = crate::Result<crate::Response<()>>> + Send {
299        gaxi::unimplemented::unimplemented_stub()
300    }
301
302    /// Implements [super::client::InstanceAdmin::cancel_operation].
303    fn cancel_operation(
304        &self,
305        _req: google_cloud_longrunning::model::CancelOperationRequest,
306        _options: crate::RequestOptions,
307    ) -> impl std::future::Future<Output = crate::Result<crate::Response<()>>> + Send {
308        gaxi::unimplemented::unimplemented_stub()
309    }
310
311    /// Returns the polling error policy.
312    ///
313    /// When mocking, this method is typically irrelevant. Do not try to verify
314    /// it is called by your mocks.
315    fn get_polling_error_policy(
316        &self,
317        _options: &crate::RequestOptions,
318    ) -> std::sync::Arc<dyn google_cloud_gax::polling_error_policy::PollingErrorPolicy> {
319        std::sync::Arc::new(google_cloud_gax::polling_error_policy::Aip194Strict)
320    }
321
322    /// Returns the polling backoff policy.
323    ///
324    /// When mocking, this method is typically irrelevant. Do not try to verify
325    /// it is called by your mocks.
326    fn get_polling_backoff_policy(
327        &self,
328        _options: &crate::RequestOptions,
329    ) -> std::sync::Arc<dyn google_cloud_gax::polling_backoff_policy::PollingBackoffPolicy> {
330        std::sync::Arc::new(google_cloud_gax::exponential_backoff::ExponentialBackoff::default())
331    }
332}