google_cloud_managedkafka_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::ManagedKafka].
30///
31/// Application developers may need to implement this trait to mock
32/// `client::ManagedKafka`.  In other use-cases, application developers only
33/// use `client::ManagedKafka` 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 ManagedKafka: std::fmt::Debug + Send + Sync {
41    /// Implements [super::client::ManagedKafka::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::ManagedKafka::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::ManagedKafka::create_cluster].
64    fn create_cluster(
65        &self,
66        _req: crate::model::CreateClusterRequest,
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::ManagedKafka::update_cluster].
75    fn update_cluster(
76        &self,
77        _req: crate::model::UpdateClusterRequest,
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::ManagedKafka::delete_cluster].
86    fn delete_cluster(
87        &self,
88        _req: crate::model::DeleteClusterRequest,
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::ManagedKafka::list_topics].
97    fn list_topics(
98        &self,
99        _req: crate::model::ListTopicsRequest,
100        _options: gax::options::RequestOptions,
101    ) -> impl std::future::Future<
102        Output = crate::Result<gax::response::Response<crate::model::ListTopicsResponse>>,
103    > + Send {
104        gaxi::unimplemented::unimplemented_stub()
105    }
106
107    /// Implements [super::client::ManagedKafka::get_topic].
108    fn get_topic(
109        &self,
110        _req: crate::model::GetTopicRequest,
111        _options: gax::options::RequestOptions,
112    ) -> impl std::future::Future<
113        Output = crate::Result<gax::response::Response<crate::model::Topic>>,
114    > + Send {
115        gaxi::unimplemented::unimplemented_stub()
116    }
117
118    /// Implements [super::client::ManagedKafka::create_topic].
119    fn create_topic(
120        &self,
121        _req: crate::model::CreateTopicRequest,
122        _options: gax::options::RequestOptions,
123    ) -> impl std::future::Future<
124        Output = crate::Result<gax::response::Response<crate::model::Topic>>,
125    > + Send {
126        gaxi::unimplemented::unimplemented_stub()
127    }
128
129    /// Implements [super::client::ManagedKafka::update_topic].
130    fn update_topic(
131        &self,
132        _req: crate::model::UpdateTopicRequest,
133        _options: gax::options::RequestOptions,
134    ) -> impl std::future::Future<
135        Output = crate::Result<gax::response::Response<crate::model::Topic>>,
136    > + Send {
137        gaxi::unimplemented::unimplemented_stub()
138    }
139
140    /// Implements [super::client::ManagedKafka::delete_topic].
141    fn delete_topic(
142        &self,
143        _req: crate::model::DeleteTopicRequest,
144        _options: gax::options::RequestOptions,
145    ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<()>>> + Send {
146        gaxi::unimplemented::unimplemented_stub()
147    }
148
149    /// Implements [super::client::ManagedKafka::list_consumer_groups].
150    fn list_consumer_groups(
151        &self,
152        _req: crate::model::ListConsumerGroupsRequest,
153        _options: gax::options::RequestOptions,
154    ) -> impl std::future::Future<
155        Output = crate::Result<gax::response::Response<crate::model::ListConsumerGroupsResponse>>,
156    > + Send {
157        gaxi::unimplemented::unimplemented_stub()
158    }
159
160    /// Implements [super::client::ManagedKafka::get_consumer_group].
161    fn get_consumer_group(
162        &self,
163        _req: crate::model::GetConsumerGroupRequest,
164        _options: gax::options::RequestOptions,
165    ) -> impl std::future::Future<
166        Output = crate::Result<gax::response::Response<crate::model::ConsumerGroup>>,
167    > + Send {
168        gaxi::unimplemented::unimplemented_stub()
169    }
170
171    /// Implements [super::client::ManagedKafka::update_consumer_group].
172    fn update_consumer_group(
173        &self,
174        _req: crate::model::UpdateConsumerGroupRequest,
175        _options: gax::options::RequestOptions,
176    ) -> impl std::future::Future<
177        Output = crate::Result<gax::response::Response<crate::model::ConsumerGroup>>,
178    > + Send {
179        gaxi::unimplemented::unimplemented_stub()
180    }
181
182    /// Implements [super::client::ManagedKafka::delete_consumer_group].
183    fn delete_consumer_group(
184        &self,
185        _req: crate::model::DeleteConsumerGroupRequest,
186        _options: gax::options::RequestOptions,
187    ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<()>>> + Send {
188        gaxi::unimplemented::unimplemented_stub()
189    }
190
191    /// Implements [super::client::ManagedKafka::list_acls].
192    fn list_acls(
193        &self,
194        _req: crate::model::ListAclsRequest,
195        _options: gax::options::RequestOptions,
196    ) -> impl std::future::Future<
197        Output = crate::Result<gax::response::Response<crate::model::ListAclsResponse>>,
198    > + Send {
199        gaxi::unimplemented::unimplemented_stub()
200    }
201
202    /// Implements [super::client::ManagedKafka::get_acl].
203    fn get_acl(
204        &self,
205        _req: crate::model::GetAclRequest,
206        _options: gax::options::RequestOptions,
207    ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<crate::model::Acl>>>
208    + Send {
209        gaxi::unimplemented::unimplemented_stub()
210    }
211
212    /// Implements [super::client::ManagedKafka::create_acl].
213    fn create_acl(
214        &self,
215        _req: crate::model::CreateAclRequest,
216        _options: gax::options::RequestOptions,
217    ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<crate::model::Acl>>>
218    + Send {
219        gaxi::unimplemented::unimplemented_stub()
220    }
221
222    /// Implements [super::client::ManagedKafka::update_acl].
223    fn update_acl(
224        &self,
225        _req: crate::model::UpdateAclRequest,
226        _options: gax::options::RequestOptions,
227    ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<crate::model::Acl>>>
228    + Send {
229        gaxi::unimplemented::unimplemented_stub()
230    }
231
232    /// Implements [super::client::ManagedKafka::delete_acl].
233    fn delete_acl(
234        &self,
235        _req: crate::model::DeleteAclRequest,
236        _options: gax::options::RequestOptions,
237    ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<()>>> + Send {
238        gaxi::unimplemented::unimplemented_stub()
239    }
240
241    /// Implements [super::client::ManagedKafka::add_acl_entry].
242    fn add_acl_entry(
243        &self,
244        _req: crate::model::AddAclEntryRequest,
245        _options: gax::options::RequestOptions,
246    ) -> impl std::future::Future<
247        Output = crate::Result<gax::response::Response<crate::model::AddAclEntryResponse>>,
248    > + Send {
249        gaxi::unimplemented::unimplemented_stub()
250    }
251
252    /// Implements [super::client::ManagedKafka::remove_acl_entry].
253    fn remove_acl_entry(
254        &self,
255        _req: crate::model::RemoveAclEntryRequest,
256        _options: gax::options::RequestOptions,
257    ) -> impl std::future::Future<
258        Output = crate::Result<gax::response::Response<crate::model::RemoveAclEntryResponse>>,
259    > + Send {
260        gaxi::unimplemented::unimplemented_stub()
261    }
262
263    /// Implements [super::client::ManagedKafka::list_locations].
264    fn list_locations(
265        &self,
266        _req: location::model::ListLocationsRequest,
267        _options: gax::options::RequestOptions,
268    ) -> impl std::future::Future<
269        Output = crate::Result<gax::response::Response<location::model::ListLocationsResponse>>,
270    > + Send {
271        gaxi::unimplemented::unimplemented_stub()
272    }
273
274    /// Implements [super::client::ManagedKafka::get_location].
275    fn get_location(
276        &self,
277        _req: location::model::GetLocationRequest,
278        _options: gax::options::RequestOptions,
279    ) -> impl std::future::Future<
280        Output = crate::Result<gax::response::Response<location::model::Location>>,
281    > + Send {
282        gaxi::unimplemented::unimplemented_stub()
283    }
284
285    /// Implements [super::client::ManagedKafka::list_operations].
286    fn list_operations(
287        &self,
288        _req: longrunning::model::ListOperationsRequest,
289        _options: gax::options::RequestOptions,
290    ) -> impl std::future::Future<
291        Output = crate::Result<gax::response::Response<longrunning::model::ListOperationsResponse>>,
292    > + Send {
293        gaxi::unimplemented::unimplemented_stub()
294    }
295
296    /// Implements [super::client::ManagedKafka::get_operation].
297    fn get_operation(
298        &self,
299        _req: longrunning::model::GetOperationRequest,
300        _options: gax::options::RequestOptions,
301    ) -> impl std::future::Future<
302        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
303    > + Send {
304        gaxi::unimplemented::unimplemented_stub()
305    }
306
307    /// Implements [super::client::ManagedKafka::delete_operation].
308    fn delete_operation(
309        &self,
310        _req: longrunning::model::DeleteOperationRequest,
311        _options: gax::options::RequestOptions,
312    ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<()>>> + Send {
313        gaxi::unimplemented::unimplemented_stub()
314    }
315
316    /// Implements [super::client::ManagedKafka::cancel_operation].
317    fn cancel_operation(
318        &self,
319        _req: longrunning::model::CancelOperationRequest,
320        _options: gax::options::RequestOptions,
321    ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<()>>> + Send {
322        gaxi::unimplemented::unimplemented_stub()
323    }
324
325    /// Returns the polling error policy.
326    ///
327    /// When mocking, this method is typically irrelevant. Do not try to verify
328    /// it is called by your mocks.
329    fn get_polling_error_policy(
330        &self,
331        _options: &gax::options::RequestOptions,
332    ) -> std::sync::Arc<dyn gax::polling_error_policy::PollingErrorPolicy> {
333        std::sync::Arc::new(gax::polling_error_policy::Aip194Strict)
334    }
335
336    /// Returns the polling backoff policy.
337    ///
338    /// When mocking, this method is typically irrelevant. Do not try to verify
339    /// it is called by your mocks.
340    fn get_polling_backoff_policy(
341        &self,
342        _options: &gax::options::RequestOptions,
343    ) -> std::sync::Arc<dyn gax::polling_backoff_policy::PollingBackoffPolicy> {
344        std::sync::Arc::new(gax::exponential_backoff::ExponentialBackoff::default())
345    }
346}
347
348/// Defines the trait used to implement [super::client::ManagedKafkaConnect].
349///
350/// Application developers may need to implement this trait to mock
351/// `client::ManagedKafkaConnect`.  In other use-cases, application developers only
352/// use `client::ManagedKafkaConnect` and need not be concerned with this trait or
353/// its implementations.
354///
355/// Services gain new RPCs routinely. Consequently, this trait gains new methods
356/// too. To avoid breaking applications the trait provides a default
357/// implementation of each method. Most of these implementations just return an
358/// error.
359pub trait ManagedKafkaConnect: std::fmt::Debug + Send + Sync {
360    /// Implements [super::client::ManagedKafkaConnect::list_connect_clusters].
361    fn list_connect_clusters(
362        &self,
363        _req: crate::model::ListConnectClustersRequest,
364        _options: gax::options::RequestOptions,
365    ) -> impl std::future::Future<
366        Output = crate::Result<gax::response::Response<crate::model::ListConnectClustersResponse>>,
367    > + Send {
368        gaxi::unimplemented::unimplemented_stub()
369    }
370
371    /// Implements [super::client::ManagedKafkaConnect::get_connect_cluster].
372    fn get_connect_cluster(
373        &self,
374        _req: crate::model::GetConnectClusterRequest,
375        _options: gax::options::RequestOptions,
376    ) -> impl std::future::Future<
377        Output = crate::Result<gax::response::Response<crate::model::ConnectCluster>>,
378    > + Send {
379        gaxi::unimplemented::unimplemented_stub()
380    }
381
382    /// Implements [super::client::ManagedKafkaConnect::create_connect_cluster].
383    fn create_connect_cluster(
384        &self,
385        _req: crate::model::CreateConnectClusterRequest,
386        _options: gax::options::RequestOptions,
387    ) -> impl std::future::Future<
388        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
389    > + Send {
390        gaxi::unimplemented::unimplemented_stub()
391    }
392
393    /// Implements [super::client::ManagedKafkaConnect::update_connect_cluster].
394    fn update_connect_cluster(
395        &self,
396        _req: crate::model::UpdateConnectClusterRequest,
397        _options: gax::options::RequestOptions,
398    ) -> impl std::future::Future<
399        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
400    > + Send {
401        gaxi::unimplemented::unimplemented_stub()
402    }
403
404    /// Implements [super::client::ManagedKafkaConnect::delete_connect_cluster].
405    fn delete_connect_cluster(
406        &self,
407        _req: crate::model::DeleteConnectClusterRequest,
408        _options: gax::options::RequestOptions,
409    ) -> impl std::future::Future<
410        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
411    > + Send {
412        gaxi::unimplemented::unimplemented_stub()
413    }
414
415    /// Implements [super::client::ManagedKafkaConnect::list_connectors].
416    fn list_connectors(
417        &self,
418        _req: crate::model::ListConnectorsRequest,
419        _options: gax::options::RequestOptions,
420    ) -> impl std::future::Future<
421        Output = crate::Result<gax::response::Response<crate::model::ListConnectorsResponse>>,
422    > + Send {
423        gaxi::unimplemented::unimplemented_stub()
424    }
425
426    /// Implements [super::client::ManagedKafkaConnect::get_connector].
427    fn get_connector(
428        &self,
429        _req: crate::model::GetConnectorRequest,
430        _options: gax::options::RequestOptions,
431    ) -> impl std::future::Future<
432        Output = crate::Result<gax::response::Response<crate::model::Connector>>,
433    > + Send {
434        gaxi::unimplemented::unimplemented_stub()
435    }
436
437    /// Implements [super::client::ManagedKafkaConnect::create_connector].
438    fn create_connector(
439        &self,
440        _req: crate::model::CreateConnectorRequest,
441        _options: gax::options::RequestOptions,
442    ) -> impl std::future::Future<
443        Output = crate::Result<gax::response::Response<crate::model::Connector>>,
444    > + Send {
445        gaxi::unimplemented::unimplemented_stub()
446    }
447
448    /// Implements [super::client::ManagedKafkaConnect::update_connector].
449    fn update_connector(
450        &self,
451        _req: crate::model::UpdateConnectorRequest,
452        _options: gax::options::RequestOptions,
453    ) -> impl std::future::Future<
454        Output = crate::Result<gax::response::Response<crate::model::Connector>>,
455    > + Send {
456        gaxi::unimplemented::unimplemented_stub()
457    }
458
459    /// Implements [super::client::ManagedKafkaConnect::delete_connector].
460    fn delete_connector(
461        &self,
462        _req: crate::model::DeleteConnectorRequest,
463        _options: gax::options::RequestOptions,
464    ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<()>>> + Send {
465        gaxi::unimplemented::unimplemented_stub()
466    }
467
468    /// Implements [super::client::ManagedKafkaConnect::pause_connector].
469    fn pause_connector(
470        &self,
471        _req: crate::model::PauseConnectorRequest,
472        _options: gax::options::RequestOptions,
473    ) -> impl std::future::Future<
474        Output = crate::Result<gax::response::Response<crate::model::PauseConnectorResponse>>,
475    > + Send {
476        gaxi::unimplemented::unimplemented_stub()
477    }
478
479    /// Implements [super::client::ManagedKafkaConnect::resume_connector].
480    fn resume_connector(
481        &self,
482        _req: crate::model::ResumeConnectorRequest,
483        _options: gax::options::RequestOptions,
484    ) -> impl std::future::Future<
485        Output = crate::Result<gax::response::Response<crate::model::ResumeConnectorResponse>>,
486    > + Send {
487        gaxi::unimplemented::unimplemented_stub()
488    }
489
490    /// Implements [super::client::ManagedKafkaConnect::restart_connector].
491    fn restart_connector(
492        &self,
493        _req: crate::model::RestartConnectorRequest,
494        _options: gax::options::RequestOptions,
495    ) -> impl std::future::Future<
496        Output = crate::Result<gax::response::Response<crate::model::RestartConnectorResponse>>,
497    > + Send {
498        gaxi::unimplemented::unimplemented_stub()
499    }
500
501    /// Implements [super::client::ManagedKafkaConnect::stop_connector].
502    fn stop_connector(
503        &self,
504        _req: crate::model::StopConnectorRequest,
505        _options: gax::options::RequestOptions,
506    ) -> impl std::future::Future<
507        Output = crate::Result<gax::response::Response<crate::model::StopConnectorResponse>>,
508    > + Send {
509        gaxi::unimplemented::unimplemented_stub()
510    }
511
512    /// Implements [super::client::ManagedKafkaConnect::list_locations].
513    fn list_locations(
514        &self,
515        _req: location::model::ListLocationsRequest,
516        _options: gax::options::RequestOptions,
517    ) -> impl std::future::Future<
518        Output = crate::Result<gax::response::Response<location::model::ListLocationsResponse>>,
519    > + Send {
520        gaxi::unimplemented::unimplemented_stub()
521    }
522
523    /// Implements [super::client::ManagedKafkaConnect::get_location].
524    fn get_location(
525        &self,
526        _req: location::model::GetLocationRequest,
527        _options: gax::options::RequestOptions,
528    ) -> impl std::future::Future<
529        Output = crate::Result<gax::response::Response<location::model::Location>>,
530    > + Send {
531        gaxi::unimplemented::unimplemented_stub()
532    }
533
534    /// Implements [super::client::ManagedKafkaConnect::list_operations].
535    fn list_operations(
536        &self,
537        _req: longrunning::model::ListOperationsRequest,
538        _options: gax::options::RequestOptions,
539    ) -> impl std::future::Future<
540        Output = crate::Result<gax::response::Response<longrunning::model::ListOperationsResponse>>,
541    > + Send {
542        gaxi::unimplemented::unimplemented_stub()
543    }
544
545    /// Implements [super::client::ManagedKafkaConnect::get_operation].
546    fn get_operation(
547        &self,
548        _req: longrunning::model::GetOperationRequest,
549        _options: gax::options::RequestOptions,
550    ) -> impl std::future::Future<
551        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
552    > + Send {
553        gaxi::unimplemented::unimplemented_stub()
554    }
555
556    /// Implements [super::client::ManagedKafkaConnect::delete_operation].
557    fn delete_operation(
558        &self,
559        _req: longrunning::model::DeleteOperationRequest,
560        _options: gax::options::RequestOptions,
561    ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<()>>> + Send {
562        gaxi::unimplemented::unimplemented_stub()
563    }
564
565    /// Implements [super::client::ManagedKafkaConnect::cancel_operation].
566    fn cancel_operation(
567        &self,
568        _req: longrunning::model::CancelOperationRequest,
569        _options: gax::options::RequestOptions,
570    ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<()>>> + Send {
571        gaxi::unimplemented::unimplemented_stub()
572    }
573
574    /// Returns the polling error policy.
575    ///
576    /// When mocking, this method is typically irrelevant. Do not try to verify
577    /// it is called by your mocks.
578    fn get_polling_error_policy(
579        &self,
580        _options: &gax::options::RequestOptions,
581    ) -> std::sync::Arc<dyn gax::polling_error_policy::PollingErrorPolicy> {
582        std::sync::Arc::new(gax::polling_error_policy::Aip194Strict)
583    }
584
585    /// Returns the polling backoff policy.
586    ///
587    /// When mocking, this method is typically irrelevant. Do not try to verify
588    /// it is called by your mocks.
589    fn get_polling_backoff_policy(
590        &self,
591        _options: &gax::options::RequestOptions,
592    ) -> std::sync::Arc<dyn gax::polling_backoff_policy::PollingBackoffPolicy> {
593        std::sync::Arc::new(gax::exponential_backoff::ExponentialBackoff::default())
594    }
595}