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: gax::options::RequestOptions,
46    ) -> impl std::future::Future<
47        Output = crate::Result<gax::response::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: gax::options::RequestOptions,
57    ) -> impl std::future::Future<
58        Output = crate::Result<gax::response::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: gax::options::RequestOptions,
68    ) -> impl std::future::Future<
69        Output = crate::Result<gax::response::Response<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: 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::InstanceAdmin::delete_instance_config].
86    fn delete_instance_config(
87        &self,
88        _req: crate::model::DeleteInstanceConfigRequest,
89        _options: gax::options::RequestOptions,
90    ) -> impl std::future::Future<Output = crate::Result<gax::response::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: gax::options::RequestOptions,
99    ) -> impl std::future::Future<
100        Output = crate::Result<
101            gax::response::Response<crate::model::ListInstanceConfigOperationsResponse>,
102        >,
103    > + Send {
104        gaxi::unimplemented::unimplemented_stub()
105    }
106
107    /// Implements [super::client::InstanceAdmin::list_instances].
108    fn list_instances(
109        &self,
110        _req: crate::model::ListInstancesRequest,
111        _options: gax::options::RequestOptions,
112    ) -> impl std::future::Future<
113        Output = crate::Result<gax::response::Response<crate::model::ListInstancesResponse>>,
114    > + Send {
115        gaxi::unimplemented::unimplemented_stub()
116    }
117
118    /// Implements [super::client::InstanceAdmin::list_instance_partitions].
119    fn list_instance_partitions(
120        &self,
121        _req: crate::model::ListInstancePartitionsRequest,
122        _options: gax::options::RequestOptions,
123    ) -> impl std::future::Future<
124        Output = crate::Result<
125            gax::response::Response<crate::model::ListInstancePartitionsResponse>,
126        >,
127    > + Send {
128        gaxi::unimplemented::unimplemented_stub()
129    }
130
131    /// Implements [super::client::InstanceAdmin::get_instance].
132    fn get_instance(
133        &self,
134        _req: crate::model::GetInstanceRequest,
135        _options: gax::options::RequestOptions,
136    ) -> impl std::future::Future<
137        Output = crate::Result<gax::response::Response<crate::model::Instance>>,
138    > + Send {
139        gaxi::unimplemented::unimplemented_stub()
140    }
141
142    /// Implements [super::client::InstanceAdmin::create_instance].
143    fn create_instance(
144        &self,
145        _req: crate::model::CreateInstanceRequest,
146        _options: gax::options::RequestOptions,
147    ) -> impl std::future::Future<
148        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
149    > + Send {
150        gaxi::unimplemented::unimplemented_stub()
151    }
152
153    /// Implements [super::client::InstanceAdmin::update_instance].
154    fn update_instance(
155        &self,
156        _req: crate::model::UpdateInstanceRequest,
157        _options: gax::options::RequestOptions,
158    ) -> impl std::future::Future<
159        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
160    > + Send {
161        gaxi::unimplemented::unimplemented_stub()
162    }
163
164    /// Implements [super::client::InstanceAdmin::delete_instance].
165    fn delete_instance(
166        &self,
167        _req: crate::model::DeleteInstanceRequest,
168        _options: gax::options::RequestOptions,
169    ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<()>>> + Send {
170        gaxi::unimplemented::unimplemented_stub()
171    }
172
173    /// Implements [super::client::InstanceAdmin::set_iam_policy].
174    fn set_iam_policy(
175        &self,
176        _req: iam_v1::model::SetIamPolicyRequest,
177        _options: gax::options::RequestOptions,
178    ) -> impl std::future::Future<
179        Output = crate::Result<gax::response::Response<iam_v1::model::Policy>>,
180    > + Send {
181        gaxi::unimplemented::unimplemented_stub()
182    }
183
184    /// Implements [super::client::InstanceAdmin::get_iam_policy].
185    fn get_iam_policy(
186        &self,
187        _req: iam_v1::model::GetIamPolicyRequest,
188        _options: gax::options::RequestOptions,
189    ) -> impl std::future::Future<
190        Output = crate::Result<gax::response::Response<iam_v1::model::Policy>>,
191    > + Send {
192        gaxi::unimplemented::unimplemented_stub()
193    }
194
195    /// Implements [super::client::InstanceAdmin::test_iam_permissions].
196    fn test_iam_permissions(
197        &self,
198        _req: iam_v1::model::TestIamPermissionsRequest,
199        _options: gax::options::RequestOptions,
200    ) -> impl std::future::Future<
201        Output = crate::Result<gax::response::Response<iam_v1::model::TestIamPermissionsResponse>>,
202    > + Send {
203        gaxi::unimplemented::unimplemented_stub()
204    }
205
206    /// Implements [super::client::InstanceAdmin::get_instance_partition].
207    fn get_instance_partition(
208        &self,
209        _req: crate::model::GetInstancePartitionRequest,
210        _options: gax::options::RequestOptions,
211    ) -> impl std::future::Future<
212        Output = crate::Result<gax::response::Response<crate::model::InstancePartition>>,
213    > + Send {
214        gaxi::unimplemented::unimplemented_stub()
215    }
216
217    /// Implements [super::client::InstanceAdmin::create_instance_partition].
218    fn create_instance_partition(
219        &self,
220        _req: crate::model::CreateInstancePartitionRequest,
221        _options: gax::options::RequestOptions,
222    ) -> impl std::future::Future<
223        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
224    > + Send {
225        gaxi::unimplemented::unimplemented_stub()
226    }
227
228    /// Implements [super::client::InstanceAdmin::delete_instance_partition].
229    fn delete_instance_partition(
230        &self,
231        _req: crate::model::DeleteInstancePartitionRequest,
232        _options: gax::options::RequestOptions,
233    ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<()>>> + Send {
234        gaxi::unimplemented::unimplemented_stub()
235    }
236
237    /// Implements [super::client::InstanceAdmin::update_instance_partition].
238    fn update_instance_partition(
239        &self,
240        _req: crate::model::UpdateInstancePartitionRequest,
241        _options: gax::options::RequestOptions,
242    ) -> impl std::future::Future<
243        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
244    > + Send {
245        gaxi::unimplemented::unimplemented_stub()
246    }
247
248    /// Implements [super::client::InstanceAdmin::list_instance_partition_operations].
249    fn list_instance_partition_operations(
250        &self,
251        _req: crate::model::ListInstancePartitionOperationsRequest,
252        _options: gax::options::RequestOptions,
253    ) -> impl std::future::Future<
254        Output = crate::Result<
255            gax::response::Response<crate::model::ListInstancePartitionOperationsResponse>,
256        >,
257    > + Send {
258        gaxi::unimplemented::unimplemented_stub()
259    }
260
261    /// Implements [super::client::InstanceAdmin::move_instance].
262    fn move_instance(
263        &self,
264        _req: crate::model::MoveInstanceRequest,
265        _options: gax::options::RequestOptions,
266    ) -> impl std::future::Future<
267        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
268    > + Send {
269        gaxi::unimplemented::unimplemented_stub()
270    }
271
272    /// Implements [super::client::InstanceAdmin::list_operations].
273    fn list_operations(
274        &self,
275        _req: longrunning::model::ListOperationsRequest,
276        _options: gax::options::RequestOptions,
277    ) -> impl std::future::Future<
278        Output = crate::Result<gax::response::Response<longrunning::model::ListOperationsResponse>>,
279    > + Send {
280        gaxi::unimplemented::unimplemented_stub()
281    }
282
283    /// Implements [super::client::InstanceAdmin::get_operation].
284    fn get_operation(
285        &self,
286        _req: longrunning::model::GetOperationRequest,
287        _options: gax::options::RequestOptions,
288    ) -> impl std::future::Future<
289        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
290    > + Send {
291        gaxi::unimplemented::unimplemented_stub()
292    }
293
294    /// Implements [super::client::InstanceAdmin::delete_operation].
295    fn delete_operation(
296        &self,
297        _req: longrunning::model::DeleteOperationRequest,
298        _options: gax::options::RequestOptions,
299    ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<()>>> + Send {
300        gaxi::unimplemented::unimplemented_stub()
301    }
302
303    /// Implements [super::client::InstanceAdmin::cancel_operation].
304    fn cancel_operation(
305        &self,
306        _req: longrunning::model::CancelOperationRequest,
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    /// Returns the polling error policy.
313    ///
314    /// When mocking, this method is typically irrelevant. Do not try to verify
315    /// it is called by your mocks.
316    fn get_polling_error_policy(
317        &self,
318        _options: &gax::options::RequestOptions,
319    ) -> std::sync::Arc<dyn gax::polling_error_policy::PollingErrorPolicy> {
320        std::sync::Arc::new(gax::polling_error_policy::Aip194Strict)
321    }
322
323    /// Returns the polling backoff policy.
324    ///
325    /// When mocking, this method is typically irrelevant. Do not try to verify
326    /// it is called by your mocks.
327    fn get_polling_backoff_policy(
328        &self,
329        _options: &gax::options::RequestOptions,
330    ) -> std::sync::Arc<dyn gax::polling_backoff_policy::PollingBackoffPolicy> {
331        std::sync::Arc::new(gax::exponential_backoff::ExponentialBackoff::default())
332    }
333}