google_cloud_redis_cluster_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::CloudRedisCluster].
30///
31/// Application developers may need to implement this trait to mock
32/// `client::CloudRedisCluster`.  In other use-cases, application developers only
33/// use `client::CloudRedisCluster` 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 CloudRedisCluster: std::fmt::Debug + Send + Sync {
41    /// Implements [super::client::CloudRedisCluster::list_clusters].
42    fn list_clusters(
43        &self,
44        _req: crate::model::ListClustersRequest,
45        _options: gax::options::RequestOptions,
46    ) -> impl std::future::Future<
47        Output = crate::Result<gax::response::Response<crate::model::ListClustersResponse>>,
48    > + Send {
49        gaxi::unimplemented::unimplemented_stub()
50    }
51
52    /// Implements [super::client::CloudRedisCluster::get_cluster].
53    fn get_cluster(
54        &self,
55        _req: crate::model::GetClusterRequest,
56        _options: gax::options::RequestOptions,
57    ) -> impl std::future::Future<
58        Output = crate::Result<gax::response::Response<crate::model::Cluster>>,
59    > + Send {
60        gaxi::unimplemented::unimplemented_stub()
61    }
62
63    /// Implements [super::client::CloudRedisCluster::update_cluster].
64    fn update_cluster(
65        &self,
66        _req: crate::model::UpdateClusterRequest,
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::CloudRedisCluster::delete_cluster].
75    fn delete_cluster(
76        &self,
77        _req: crate::model::DeleteClusterRequest,
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::CloudRedisCluster::create_cluster].
86    fn create_cluster(
87        &self,
88        _req: crate::model::CreateClusterRequest,
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::CloudRedisCluster::get_cluster_certificate_authority].
97    fn get_cluster_certificate_authority(
98        &self,
99        _req: crate::model::GetClusterCertificateAuthorityRequest,
100        _options: gax::options::RequestOptions,
101    ) -> impl std::future::Future<
102        Output = crate::Result<gax::response::Response<crate::model::CertificateAuthority>>,
103    > + Send {
104        gaxi::unimplemented::unimplemented_stub()
105    }
106
107    /// Implements [super::client::CloudRedisCluster::reschedule_cluster_maintenance].
108    fn reschedule_cluster_maintenance(
109        &self,
110        _req: crate::model::RescheduleClusterMaintenanceRequest,
111        _options: gax::options::RequestOptions,
112    ) -> impl std::future::Future<
113        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
114    > + Send {
115        gaxi::unimplemented::unimplemented_stub()
116    }
117
118    /// Implements [super::client::CloudRedisCluster::list_backup_collections].
119    fn list_backup_collections(
120        &self,
121        _req: crate::model::ListBackupCollectionsRequest,
122        _options: gax::options::RequestOptions,
123    ) -> impl std::future::Future<
124        Output = crate::Result<
125            gax::response::Response<crate::model::ListBackupCollectionsResponse>,
126        >,
127    > + Send {
128        gaxi::unimplemented::unimplemented_stub()
129    }
130
131    /// Implements [super::client::CloudRedisCluster::get_backup_collection].
132    fn get_backup_collection(
133        &self,
134        _req: crate::model::GetBackupCollectionRequest,
135        _options: gax::options::RequestOptions,
136    ) -> impl std::future::Future<
137        Output = crate::Result<gax::response::Response<crate::model::BackupCollection>>,
138    > + Send {
139        gaxi::unimplemented::unimplemented_stub()
140    }
141
142    /// Implements [super::client::CloudRedisCluster::list_backups].
143    fn list_backups(
144        &self,
145        _req: crate::model::ListBackupsRequest,
146        _options: gax::options::RequestOptions,
147    ) -> impl std::future::Future<
148        Output = crate::Result<gax::response::Response<crate::model::ListBackupsResponse>>,
149    > + Send {
150        gaxi::unimplemented::unimplemented_stub()
151    }
152
153    /// Implements [super::client::CloudRedisCluster::get_backup].
154    fn get_backup(
155        &self,
156        _req: crate::model::GetBackupRequest,
157        _options: gax::options::RequestOptions,
158    ) -> impl std::future::Future<
159        Output = crate::Result<gax::response::Response<crate::model::Backup>>,
160    > + Send {
161        gaxi::unimplemented::unimplemented_stub()
162    }
163
164    /// Implements [super::client::CloudRedisCluster::delete_backup].
165    fn delete_backup(
166        &self,
167        _req: crate::model::DeleteBackupRequest,
168        _options: gax::options::RequestOptions,
169    ) -> impl std::future::Future<
170        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
171    > + Send {
172        gaxi::unimplemented::unimplemented_stub()
173    }
174
175    /// Implements [super::client::CloudRedisCluster::export_backup].
176    fn export_backup(
177        &self,
178        _req: crate::model::ExportBackupRequest,
179        _options: gax::options::RequestOptions,
180    ) -> impl std::future::Future<
181        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
182    > + Send {
183        gaxi::unimplemented::unimplemented_stub()
184    }
185
186    /// Implements [super::client::CloudRedisCluster::backup_cluster].
187    fn backup_cluster(
188        &self,
189        _req: crate::model::BackupClusterRequest,
190        _options: gax::options::RequestOptions,
191    ) -> impl std::future::Future<
192        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
193    > + Send {
194        gaxi::unimplemented::unimplemented_stub()
195    }
196
197    /// Implements [super::client::CloudRedisCluster::list_locations].
198    fn list_locations(
199        &self,
200        _req: location::model::ListLocationsRequest,
201        _options: gax::options::RequestOptions,
202    ) -> impl std::future::Future<
203        Output = crate::Result<gax::response::Response<location::model::ListLocationsResponse>>,
204    > + Send {
205        gaxi::unimplemented::unimplemented_stub()
206    }
207
208    /// Implements [super::client::CloudRedisCluster::get_location].
209    fn get_location(
210        &self,
211        _req: location::model::GetLocationRequest,
212        _options: gax::options::RequestOptions,
213    ) -> impl std::future::Future<
214        Output = crate::Result<gax::response::Response<location::model::Location>>,
215    > + Send {
216        gaxi::unimplemented::unimplemented_stub()
217    }
218
219    /// Implements [super::client::CloudRedisCluster::list_operations].
220    fn list_operations(
221        &self,
222        _req: longrunning::model::ListOperationsRequest,
223        _options: gax::options::RequestOptions,
224    ) -> impl std::future::Future<
225        Output = crate::Result<gax::response::Response<longrunning::model::ListOperationsResponse>>,
226    > + Send {
227        gaxi::unimplemented::unimplemented_stub()
228    }
229
230    /// Implements [super::client::CloudRedisCluster::get_operation].
231    fn get_operation(
232        &self,
233        _req: longrunning::model::GetOperationRequest,
234        _options: gax::options::RequestOptions,
235    ) -> impl std::future::Future<
236        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
237    > + Send {
238        gaxi::unimplemented::unimplemented_stub()
239    }
240
241    /// Implements [super::client::CloudRedisCluster::delete_operation].
242    fn delete_operation(
243        &self,
244        _req: longrunning::model::DeleteOperationRequest,
245        _options: gax::options::RequestOptions,
246    ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<()>>> + Send {
247        gaxi::unimplemented::unimplemented_stub()
248    }
249
250    /// Implements [super::client::CloudRedisCluster::cancel_operation].
251    fn cancel_operation(
252        &self,
253        _req: longrunning::model::CancelOperationRequest,
254        _options: gax::options::RequestOptions,
255    ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<()>>> + Send {
256        gaxi::unimplemented::unimplemented_stub()
257    }
258
259    /// Returns the polling error policy.
260    ///
261    /// When mocking, this method is typically irrelevant. Do not try to verify
262    /// it is called by your mocks.
263    fn get_polling_error_policy(
264        &self,
265        _options: &gax::options::RequestOptions,
266    ) -> std::sync::Arc<dyn gax::polling_error_policy::PollingErrorPolicy> {
267        std::sync::Arc::new(gax::polling_error_policy::Aip194Strict)
268    }
269
270    /// Returns the polling backoff policy.
271    ///
272    /// When mocking, this method is typically irrelevant. Do not try to verify
273    /// it is called by your mocks.
274    fn get_polling_backoff_policy(
275        &self,
276        _options: &gax::options::RequestOptions,
277    ) -> std::sync::Arc<dyn gax::polling_backoff_policy::PollingBackoffPolicy> {
278        std::sync::Arc::new(gax::exponential_backoff::ExponentialBackoff::default())
279    }
280}