google_cloud_datastream_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::Datastream].
30///
31/// Application developers may need to implement this trait to mock
32/// `client::Datastream`.  In other use-cases, application developers only
33/// use `client::Datastream` 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 Datastream: std::fmt::Debug + Send + Sync {
41    /// Implements [super::client::Datastream::list_connection_profiles].
42    fn list_connection_profiles(
43        &self,
44        _req: crate::model::ListConnectionProfilesRequest,
45        _options: gax::options::RequestOptions,
46    ) -> impl std::future::Future<
47        Output = crate::Result<
48            gax::response::Response<crate::model::ListConnectionProfilesResponse>,
49        >,
50    > + Send {
51        gaxi::unimplemented::unimplemented_stub()
52    }
53
54    /// Implements [super::client::Datastream::get_connection_profile].
55    fn get_connection_profile(
56        &self,
57        _req: crate::model::GetConnectionProfileRequest,
58        _options: gax::options::RequestOptions,
59    ) -> impl std::future::Future<
60        Output = crate::Result<gax::response::Response<crate::model::ConnectionProfile>>,
61    > + Send {
62        gaxi::unimplemented::unimplemented_stub()
63    }
64
65    /// Implements [super::client::Datastream::create_connection_profile].
66    fn create_connection_profile(
67        &self,
68        _req: crate::model::CreateConnectionProfileRequest,
69        _options: gax::options::RequestOptions,
70    ) -> impl std::future::Future<
71        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
72    > + Send {
73        gaxi::unimplemented::unimplemented_stub()
74    }
75
76    /// Implements [super::client::Datastream::update_connection_profile].
77    fn update_connection_profile(
78        &self,
79        _req: crate::model::UpdateConnectionProfileRequest,
80        _options: gax::options::RequestOptions,
81    ) -> impl std::future::Future<
82        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
83    > + Send {
84        gaxi::unimplemented::unimplemented_stub()
85    }
86
87    /// Implements [super::client::Datastream::delete_connection_profile].
88    fn delete_connection_profile(
89        &self,
90        _req: crate::model::DeleteConnectionProfileRequest,
91        _options: gax::options::RequestOptions,
92    ) -> impl std::future::Future<
93        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
94    > + Send {
95        gaxi::unimplemented::unimplemented_stub()
96    }
97
98    /// Implements [super::client::Datastream::discover_connection_profile].
99    fn discover_connection_profile(
100        &self,
101        _req: crate::model::DiscoverConnectionProfileRequest,
102        _options: gax::options::RequestOptions,
103    ) -> impl std::future::Future<
104        Output = crate::Result<
105            gax::response::Response<crate::model::DiscoverConnectionProfileResponse>,
106        >,
107    > + Send {
108        gaxi::unimplemented::unimplemented_stub()
109    }
110
111    /// Implements [super::client::Datastream::list_streams].
112    fn list_streams(
113        &self,
114        _req: crate::model::ListStreamsRequest,
115        _options: gax::options::RequestOptions,
116    ) -> impl std::future::Future<
117        Output = crate::Result<gax::response::Response<crate::model::ListStreamsResponse>>,
118    > + Send {
119        gaxi::unimplemented::unimplemented_stub()
120    }
121
122    /// Implements [super::client::Datastream::get_stream].
123    fn get_stream(
124        &self,
125        _req: crate::model::GetStreamRequest,
126        _options: gax::options::RequestOptions,
127    ) -> impl std::future::Future<
128        Output = crate::Result<gax::response::Response<crate::model::Stream>>,
129    > + Send {
130        gaxi::unimplemented::unimplemented_stub()
131    }
132
133    /// Implements [super::client::Datastream::create_stream].
134    fn create_stream(
135        &self,
136        _req: crate::model::CreateStreamRequest,
137        _options: gax::options::RequestOptions,
138    ) -> impl std::future::Future<
139        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
140    > + Send {
141        gaxi::unimplemented::unimplemented_stub()
142    }
143
144    /// Implements [super::client::Datastream::update_stream].
145    fn update_stream(
146        &self,
147        _req: crate::model::UpdateStreamRequest,
148        _options: gax::options::RequestOptions,
149    ) -> impl std::future::Future<
150        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
151    > + Send {
152        gaxi::unimplemented::unimplemented_stub()
153    }
154
155    /// Implements [super::client::Datastream::delete_stream].
156    fn delete_stream(
157        &self,
158        _req: crate::model::DeleteStreamRequest,
159        _options: gax::options::RequestOptions,
160    ) -> impl std::future::Future<
161        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
162    > + Send {
163        gaxi::unimplemented::unimplemented_stub()
164    }
165
166    /// Implements [super::client::Datastream::run_stream].
167    fn run_stream(
168        &self,
169        _req: crate::model::RunStreamRequest,
170        _options: gax::options::RequestOptions,
171    ) -> impl std::future::Future<
172        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
173    > + Send {
174        gaxi::unimplemented::unimplemented_stub()
175    }
176
177    /// Implements [super::client::Datastream::get_stream_object].
178    fn get_stream_object(
179        &self,
180        _req: crate::model::GetStreamObjectRequest,
181        _options: gax::options::RequestOptions,
182    ) -> impl std::future::Future<
183        Output = crate::Result<gax::response::Response<crate::model::StreamObject>>,
184    > + Send {
185        gaxi::unimplemented::unimplemented_stub()
186    }
187
188    /// Implements [super::client::Datastream::lookup_stream_object].
189    fn lookup_stream_object(
190        &self,
191        _req: crate::model::LookupStreamObjectRequest,
192        _options: gax::options::RequestOptions,
193    ) -> impl std::future::Future<
194        Output = crate::Result<gax::response::Response<crate::model::StreamObject>>,
195    > + Send {
196        gaxi::unimplemented::unimplemented_stub()
197    }
198
199    /// Implements [super::client::Datastream::list_stream_objects].
200    fn list_stream_objects(
201        &self,
202        _req: crate::model::ListStreamObjectsRequest,
203        _options: gax::options::RequestOptions,
204    ) -> impl std::future::Future<
205        Output = crate::Result<gax::response::Response<crate::model::ListStreamObjectsResponse>>,
206    > + Send {
207        gaxi::unimplemented::unimplemented_stub()
208    }
209
210    /// Implements [super::client::Datastream::start_backfill_job].
211    fn start_backfill_job(
212        &self,
213        _req: crate::model::StartBackfillJobRequest,
214        _options: gax::options::RequestOptions,
215    ) -> impl std::future::Future<
216        Output = crate::Result<gax::response::Response<crate::model::StartBackfillJobResponse>>,
217    > + Send {
218        gaxi::unimplemented::unimplemented_stub()
219    }
220
221    /// Implements [super::client::Datastream::stop_backfill_job].
222    fn stop_backfill_job(
223        &self,
224        _req: crate::model::StopBackfillJobRequest,
225        _options: gax::options::RequestOptions,
226    ) -> impl std::future::Future<
227        Output = crate::Result<gax::response::Response<crate::model::StopBackfillJobResponse>>,
228    > + Send {
229        gaxi::unimplemented::unimplemented_stub()
230    }
231
232    /// Implements [super::client::Datastream::fetch_static_ips].
233    fn fetch_static_ips(
234        &self,
235        _req: crate::model::FetchStaticIpsRequest,
236        _options: gax::options::RequestOptions,
237    ) -> impl std::future::Future<
238        Output = crate::Result<gax::response::Response<crate::model::FetchStaticIpsResponse>>,
239    > + Send {
240        gaxi::unimplemented::unimplemented_stub()
241    }
242
243    /// Implements [super::client::Datastream::create_private_connection].
244    fn create_private_connection(
245        &self,
246        _req: crate::model::CreatePrivateConnectionRequest,
247        _options: gax::options::RequestOptions,
248    ) -> impl std::future::Future<
249        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
250    > + Send {
251        gaxi::unimplemented::unimplemented_stub()
252    }
253
254    /// Implements [super::client::Datastream::get_private_connection].
255    fn get_private_connection(
256        &self,
257        _req: crate::model::GetPrivateConnectionRequest,
258        _options: gax::options::RequestOptions,
259    ) -> impl std::future::Future<
260        Output = crate::Result<gax::response::Response<crate::model::PrivateConnection>>,
261    > + Send {
262        gaxi::unimplemented::unimplemented_stub()
263    }
264
265    /// Implements [super::client::Datastream::list_private_connections].
266    fn list_private_connections(
267        &self,
268        _req: crate::model::ListPrivateConnectionsRequest,
269        _options: gax::options::RequestOptions,
270    ) -> impl std::future::Future<
271        Output = crate::Result<
272            gax::response::Response<crate::model::ListPrivateConnectionsResponse>,
273        >,
274    > + Send {
275        gaxi::unimplemented::unimplemented_stub()
276    }
277
278    /// Implements [super::client::Datastream::delete_private_connection].
279    fn delete_private_connection(
280        &self,
281        _req: crate::model::DeletePrivateConnectionRequest,
282        _options: gax::options::RequestOptions,
283    ) -> impl std::future::Future<
284        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
285    > + Send {
286        gaxi::unimplemented::unimplemented_stub()
287    }
288
289    /// Implements [super::client::Datastream::create_route].
290    fn create_route(
291        &self,
292        _req: crate::model::CreateRouteRequest,
293        _options: gax::options::RequestOptions,
294    ) -> impl std::future::Future<
295        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
296    > + Send {
297        gaxi::unimplemented::unimplemented_stub()
298    }
299
300    /// Implements [super::client::Datastream::get_route].
301    fn get_route(
302        &self,
303        _req: crate::model::GetRouteRequest,
304        _options: gax::options::RequestOptions,
305    ) -> impl std::future::Future<
306        Output = crate::Result<gax::response::Response<crate::model::Route>>,
307    > + Send {
308        gaxi::unimplemented::unimplemented_stub()
309    }
310
311    /// Implements [super::client::Datastream::list_routes].
312    fn list_routes(
313        &self,
314        _req: crate::model::ListRoutesRequest,
315        _options: gax::options::RequestOptions,
316    ) -> impl std::future::Future<
317        Output = crate::Result<gax::response::Response<crate::model::ListRoutesResponse>>,
318    > + Send {
319        gaxi::unimplemented::unimplemented_stub()
320    }
321
322    /// Implements [super::client::Datastream::delete_route].
323    fn delete_route(
324        &self,
325        _req: crate::model::DeleteRouteRequest,
326        _options: gax::options::RequestOptions,
327    ) -> impl std::future::Future<
328        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
329    > + Send {
330        gaxi::unimplemented::unimplemented_stub()
331    }
332
333    /// Implements [super::client::Datastream::list_locations].
334    fn list_locations(
335        &self,
336        _req: location::model::ListLocationsRequest,
337        _options: gax::options::RequestOptions,
338    ) -> impl std::future::Future<
339        Output = crate::Result<gax::response::Response<location::model::ListLocationsResponse>>,
340    > + Send {
341        gaxi::unimplemented::unimplemented_stub()
342    }
343
344    /// Implements [super::client::Datastream::get_location].
345    fn get_location(
346        &self,
347        _req: location::model::GetLocationRequest,
348        _options: gax::options::RequestOptions,
349    ) -> impl std::future::Future<
350        Output = crate::Result<gax::response::Response<location::model::Location>>,
351    > + Send {
352        gaxi::unimplemented::unimplemented_stub()
353    }
354
355    /// Implements [super::client::Datastream::list_operations].
356    fn list_operations(
357        &self,
358        _req: longrunning::model::ListOperationsRequest,
359        _options: gax::options::RequestOptions,
360    ) -> impl std::future::Future<
361        Output = crate::Result<gax::response::Response<longrunning::model::ListOperationsResponse>>,
362    > + Send {
363        gaxi::unimplemented::unimplemented_stub()
364    }
365
366    /// Implements [super::client::Datastream::get_operation].
367    fn get_operation(
368        &self,
369        _req: longrunning::model::GetOperationRequest,
370        _options: gax::options::RequestOptions,
371    ) -> impl std::future::Future<
372        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
373    > + Send {
374        gaxi::unimplemented::unimplemented_stub()
375    }
376
377    /// Implements [super::client::Datastream::delete_operation].
378    fn delete_operation(
379        &self,
380        _req: longrunning::model::DeleteOperationRequest,
381        _options: gax::options::RequestOptions,
382    ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<()>>> + Send {
383        gaxi::unimplemented::unimplemented_stub()
384    }
385
386    /// Implements [super::client::Datastream::cancel_operation].
387    fn cancel_operation(
388        &self,
389        _req: longrunning::model::CancelOperationRequest,
390        _options: gax::options::RequestOptions,
391    ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<()>>> + Send {
392        gaxi::unimplemented::unimplemented_stub()
393    }
394
395    /// Returns the polling error policy.
396    ///
397    /// When mocking, this method is typically irrelevant. Do not try to verify
398    /// it is called by your mocks.
399    fn get_polling_error_policy(
400        &self,
401        _options: &gax::options::RequestOptions,
402    ) -> std::sync::Arc<dyn gax::polling_error_policy::PollingErrorPolicy> {
403        std::sync::Arc::new(gax::polling_error_policy::Aip194Strict)
404    }
405
406    /// Returns the polling backoff policy.
407    ///
408    /// When mocking, this method is typically irrelevant. Do not try to verify
409    /// it is called by your mocks.
410    fn get_polling_backoff_policy(
411        &self,
412        _options: &gax::options::RequestOptions,
413    ) -> std::sync::Arc<dyn gax::polling_backoff_policy::PollingBackoffPolicy> {
414        std::sync::Arc::new(gax::exponential_backoff::ExponentialBackoff::default())
415    }
416}