google_cloud_bigquery_datatransfer_v1/
stubs.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
27use gax::error::Error;
28
29pub(crate) mod dynamic;
30
31/// Defines the trait used to implement [crate::client::DataTransferService].
32///
33/// Application developers may need to implement this trait to mock
34/// `client::DataTransferService`.  In other use-cases, application developers only
35/// use `client::DataTransferService` and need not be concerned with this trait or
36/// its implementations.
37///
38/// Services gain new RPCs routinely. Consequently, this trait gains new methods
39/// too. To avoid breaking applications the trait provides a default
40/// implementation of each method. Most of these implementations just return an
41/// error.
42pub trait DataTransferService: std::fmt::Debug + Send + Sync {
43    /// Implements [crate::client::DataTransferService::get_data_source].
44    fn get_data_source(
45        &self,
46        _req: crate::model::GetDataSourceRequest,
47        _options: gax::options::RequestOptions,
48    ) -> impl std::future::Future<Output = crate::Result<crate::model::DataSource>> + Send {
49        std::future::ready::<crate::Result<crate::model::DataSource>>(Err(Error::other(
50            "unimplemented",
51        )))
52    }
53
54    /// Implements [crate::client::DataTransferService::list_data_sources].
55    fn list_data_sources(
56        &self,
57        _req: crate::model::ListDataSourcesRequest,
58        _options: gax::options::RequestOptions,
59    ) -> impl std::future::Future<Output = crate::Result<crate::model::ListDataSourcesResponse>> + Send
60    {
61        std::future::ready::<crate::Result<crate::model::ListDataSourcesResponse>>(Err(
62            Error::other("unimplemented"),
63        ))
64    }
65
66    /// Implements [crate::client::DataTransferService::create_transfer_config].
67    fn create_transfer_config(
68        &self,
69        _req: crate::model::CreateTransferConfigRequest,
70        _options: gax::options::RequestOptions,
71    ) -> impl std::future::Future<Output = crate::Result<crate::model::TransferConfig>> + Send {
72        std::future::ready::<crate::Result<crate::model::TransferConfig>>(Err(Error::other(
73            "unimplemented",
74        )))
75    }
76
77    /// Implements [crate::client::DataTransferService::update_transfer_config].
78    fn update_transfer_config(
79        &self,
80        _req: crate::model::UpdateTransferConfigRequest,
81        _options: gax::options::RequestOptions,
82    ) -> impl std::future::Future<Output = crate::Result<crate::model::TransferConfig>> + Send {
83        std::future::ready::<crate::Result<crate::model::TransferConfig>>(Err(Error::other(
84            "unimplemented",
85        )))
86    }
87
88    /// Implements [crate::client::DataTransferService::delete_transfer_config].
89    fn delete_transfer_config(
90        &self,
91        _req: crate::model::DeleteTransferConfigRequest,
92        _options: gax::options::RequestOptions,
93    ) -> impl std::future::Future<Output = crate::Result<wkt::Empty>> + Send {
94        std::future::ready::<crate::Result<wkt::Empty>>(Err(Error::other("unimplemented")))
95    }
96
97    /// Implements [crate::client::DataTransferService::get_transfer_config].
98    fn get_transfer_config(
99        &self,
100        _req: crate::model::GetTransferConfigRequest,
101        _options: gax::options::RequestOptions,
102    ) -> impl std::future::Future<Output = crate::Result<crate::model::TransferConfig>> + Send {
103        std::future::ready::<crate::Result<crate::model::TransferConfig>>(Err(Error::other(
104            "unimplemented",
105        )))
106    }
107
108    /// Implements [crate::client::DataTransferService::list_transfer_configs].
109    fn list_transfer_configs(
110        &self,
111        _req: crate::model::ListTransferConfigsRequest,
112        _options: gax::options::RequestOptions,
113    ) -> impl std::future::Future<Output = crate::Result<crate::model::ListTransferConfigsResponse>> + Send
114    {
115        std::future::ready::<crate::Result<crate::model::ListTransferConfigsResponse>>(Err(
116            Error::other("unimplemented"),
117        ))
118    }
119
120    /// Implements [crate::client::DataTransferService::schedule_transfer_runs].
121    fn schedule_transfer_runs(
122        &self,
123        _req: crate::model::ScheduleTransferRunsRequest,
124        _options: gax::options::RequestOptions,
125    ) -> impl std::future::Future<Output = crate::Result<crate::model::ScheduleTransferRunsResponse>>
126           + Send {
127        std::future::ready::<crate::Result<crate::model::ScheduleTransferRunsResponse>>(Err(
128            Error::other("unimplemented"),
129        ))
130    }
131
132    /// Implements [crate::client::DataTransferService::start_manual_transfer_runs].
133    fn start_manual_transfer_runs(
134        &self,
135        _req: crate::model::StartManualTransferRunsRequest,
136        _options: gax::options::RequestOptions,
137    ) -> impl std::future::Future<
138        Output = crate::Result<crate::model::StartManualTransferRunsResponse>,
139    > + Send {
140        std::future::ready::<crate::Result<crate::model::StartManualTransferRunsResponse>>(Err(
141            Error::other("unimplemented"),
142        ))
143    }
144
145    /// Implements [crate::client::DataTransferService::get_transfer_run].
146    fn get_transfer_run(
147        &self,
148        _req: crate::model::GetTransferRunRequest,
149        _options: gax::options::RequestOptions,
150    ) -> impl std::future::Future<Output = crate::Result<crate::model::TransferRun>> + Send {
151        std::future::ready::<crate::Result<crate::model::TransferRun>>(Err(Error::other(
152            "unimplemented",
153        )))
154    }
155
156    /// Implements [crate::client::DataTransferService::delete_transfer_run].
157    fn delete_transfer_run(
158        &self,
159        _req: crate::model::DeleteTransferRunRequest,
160        _options: gax::options::RequestOptions,
161    ) -> impl std::future::Future<Output = crate::Result<wkt::Empty>> + Send {
162        std::future::ready::<crate::Result<wkt::Empty>>(Err(Error::other("unimplemented")))
163    }
164
165    /// Implements [crate::client::DataTransferService::list_transfer_runs].
166    fn list_transfer_runs(
167        &self,
168        _req: crate::model::ListTransferRunsRequest,
169        _options: gax::options::RequestOptions,
170    ) -> impl std::future::Future<Output = crate::Result<crate::model::ListTransferRunsResponse>> + Send
171    {
172        std::future::ready::<crate::Result<crate::model::ListTransferRunsResponse>>(Err(
173            Error::other("unimplemented"),
174        ))
175    }
176
177    /// Implements [crate::client::DataTransferService::list_transfer_logs].
178    fn list_transfer_logs(
179        &self,
180        _req: crate::model::ListTransferLogsRequest,
181        _options: gax::options::RequestOptions,
182    ) -> impl std::future::Future<Output = crate::Result<crate::model::ListTransferLogsResponse>> + Send
183    {
184        std::future::ready::<crate::Result<crate::model::ListTransferLogsResponse>>(Err(
185            Error::other("unimplemented"),
186        ))
187    }
188
189    /// Implements [crate::client::DataTransferService::check_valid_creds].
190    fn check_valid_creds(
191        &self,
192        _req: crate::model::CheckValidCredsRequest,
193        _options: gax::options::RequestOptions,
194    ) -> impl std::future::Future<Output = crate::Result<crate::model::CheckValidCredsResponse>> + Send
195    {
196        std::future::ready::<crate::Result<crate::model::CheckValidCredsResponse>>(Err(
197            Error::other("unimplemented"),
198        ))
199    }
200
201    /// Implements [crate::client::DataTransferService::enroll_data_sources].
202    fn enroll_data_sources(
203        &self,
204        _req: crate::model::EnrollDataSourcesRequest,
205        _options: gax::options::RequestOptions,
206    ) -> impl std::future::Future<Output = crate::Result<wkt::Empty>> + Send {
207        std::future::ready::<crate::Result<wkt::Empty>>(Err(Error::other("unimplemented")))
208    }
209
210    /// Implements [crate::client::DataTransferService::unenroll_data_sources].
211    fn unenroll_data_sources(
212        &self,
213        _req: crate::model::UnenrollDataSourcesRequest,
214        _options: gax::options::RequestOptions,
215    ) -> impl std::future::Future<Output = crate::Result<wkt::Empty>> + Send {
216        std::future::ready::<crate::Result<wkt::Empty>>(Err(Error::other("unimplemented")))
217    }
218
219    /// Implements [crate::client::DataTransferService::list_locations].
220    fn list_locations(
221        &self,
222        _req: location::model::ListLocationsRequest,
223        _options: gax::options::RequestOptions,
224    ) -> impl std::future::Future<Output = crate::Result<location::model::ListLocationsResponse>> + Send
225    {
226        std::future::ready::<crate::Result<location::model::ListLocationsResponse>>(Err(
227            Error::other("unimplemented"),
228        ))
229    }
230
231    /// Implements [crate::client::DataTransferService::get_location].
232    fn get_location(
233        &self,
234        _req: location::model::GetLocationRequest,
235        _options: gax::options::RequestOptions,
236    ) -> impl std::future::Future<Output = crate::Result<location::model::Location>> + Send {
237        std::future::ready::<crate::Result<location::model::Location>>(Err(Error::other(
238            "unimplemented",
239        )))
240    }
241}