google_cloud_bigquery_datatransfer_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
27use gax::error::Error;
28
29pub(crate) mod dynamic;
30
31/// Defines the trait used to implement [super::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 [super::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<
49        Output = crate::Result<gax::response::Response<crate::model::DataSource>>,
50    > + Send {
51        std::future::ready::<crate::Result<gax::response::Response<crate::model::DataSource>>>(Err(
52            Error::other("unimplemented"),
53        ))
54    }
55
56    /// Implements [super::client::DataTransferService::list_data_sources].
57    fn list_data_sources(
58        &self,
59        _req: crate::model::ListDataSourcesRequest,
60        _options: gax::options::RequestOptions,
61    ) -> impl std::future::Future<
62        Output = crate::Result<gax::response::Response<crate::model::ListDataSourcesResponse>>,
63    > + Send {
64        std::future::ready::<
65            crate::Result<gax::response::Response<crate::model::ListDataSourcesResponse>>,
66        >(Err(Error::other("unimplemented")))
67    }
68
69    /// Implements [super::client::DataTransferService::create_transfer_config].
70    fn create_transfer_config(
71        &self,
72        _req: crate::model::CreateTransferConfigRequest,
73        _options: gax::options::RequestOptions,
74    ) -> impl std::future::Future<
75        Output = crate::Result<gax::response::Response<crate::model::TransferConfig>>,
76    > + Send {
77        std::future::ready::<crate::Result<gax::response::Response<crate::model::TransferConfig>>>(
78            Err(Error::other("unimplemented")),
79        )
80    }
81
82    /// Implements [super::client::DataTransferService::update_transfer_config].
83    fn update_transfer_config(
84        &self,
85        _req: crate::model::UpdateTransferConfigRequest,
86        _options: gax::options::RequestOptions,
87    ) -> impl std::future::Future<
88        Output = crate::Result<gax::response::Response<crate::model::TransferConfig>>,
89    > + Send {
90        std::future::ready::<crate::Result<gax::response::Response<crate::model::TransferConfig>>>(
91            Err(Error::other("unimplemented")),
92        )
93    }
94
95    /// Implements [super::client::DataTransferService::delete_transfer_config].
96    fn delete_transfer_config(
97        &self,
98        _req: crate::model::DeleteTransferConfigRequest,
99        _options: gax::options::RequestOptions,
100    ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<()>>> + Send {
101        std::future::ready::<crate::Result<gax::response::Response<()>>>(Err(Error::other(
102            "unimplemented",
103        )))
104    }
105
106    /// Implements [super::client::DataTransferService::get_transfer_config].
107    fn get_transfer_config(
108        &self,
109        _req: crate::model::GetTransferConfigRequest,
110        _options: gax::options::RequestOptions,
111    ) -> impl std::future::Future<
112        Output = crate::Result<gax::response::Response<crate::model::TransferConfig>>,
113    > + Send {
114        std::future::ready::<crate::Result<gax::response::Response<crate::model::TransferConfig>>>(
115            Err(Error::other("unimplemented")),
116        )
117    }
118
119    /// Implements [super::client::DataTransferService::list_transfer_configs].
120    fn list_transfer_configs(
121        &self,
122        _req: crate::model::ListTransferConfigsRequest,
123        _options: gax::options::RequestOptions,
124    ) -> impl std::future::Future<
125        Output = crate::Result<gax::response::Response<crate::model::ListTransferConfigsResponse>>,
126    > + Send {
127        std::future::ready::<
128            crate::Result<gax::response::Response<crate::model::ListTransferConfigsResponse>>,
129        >(Err(Error::other("unimplemented")))
130    }
131
132    /// Implements [super::client::DataTransferService::schedule_transfer_runs].
133    fn schedule_transfer_runs(
134        &self,
135        _req: crate::model::ScheduleTransferRunsRequest,
136        _options: gax::options::RequestOptions,
137    ) -> impl std::future::Future<
138        Output = crate::Result<gax::response::Response<crate::model::ScheduleTransferRunsResponse>>,
139    > + Send {
140        std::future::ready::<
141            crate::Result<gax::response::Response<crate::model::ScheduleTransferRunsResponse>>,
142        >(Err(Error::other("unimplemented")))
143    }
144
145    /// Implements [super::client::DataTransferService::start_manual_transfer_runs].
146    fn start_manual_transfer_runs(
147        &self,
148        _req: crate::model::StartManualTransferRunsRequest,
149        _options: gax::options::RequestOptions,
150    ) -> impl std::future::Future<
151        Output = crate::Result<
152            gax::response::Response<crate::model::StartManualTransferRunsResponse>,
153        >,
154    > + Send {
155        std::future::ready::<
156            crate::Result<gax::response::Response<crate::model::StartManualTransferRunsResponse>>,
157        >(Err(Error::other("unimplemented")))
158    }
159
160    /// Implements [super::client::DataTransferService::get_transfer_run].
161    fn get_transfer_run(
162        &self,
163        _req: crate::model::GetTransferRunRequest,
164        _options: gax::options::RequestOptions,
165    ) -> impl std::future::Future<
166        Output = crate::Result<gax::response::Response<crate::model::TransferRun>>,
167    > + Send {
168        std::future::ready::<crate::Result<gax::response::Response<crate::model::TransferRun>>>(
169            Err(Error::other("unimplemented")),
170        )
171    }
172
173    /// Implements [super::client::DataTransferService::delete_transfer_run].
174    fn delete_transfer_run(
175        &self,
176        _req: crate::model::DeleteTransferRunRequest,
177        _options: gax::options::RequestOptions,
178    ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<()>>> + Send {
179        std::future::ready::<crate::Result<gax::response::Response<()>>>(Err(Error::other(
180            "unimplemented",
181        )))
182    }
183
184    /// Implements [super::client::DataTransferService::list_transfer_runs].
185    fn list_transfer_runs(
186        &self,
187        _req: crate::model::ListTransferRunsRequest,
188        _options: gax::options::RequestOptions,
189    ) -> impl std::future::Future<
190        Output = crate::Result<gax::response::Response<crate::model::ListTransferRunsResponse>>,
191    > + Send {
192        std::future::ready::<
193            crate::Result<gax::response::Response<crate::model::ListTransferRunsResponse>>,
194        >(Err(Error::other("unimplemented")))
195    }
196
197    /// Implements [super::client::DataTransferService::list_transfer_logs].
198    fn list_transfer_logs(
199        &self,
200        _req: crate::model::ListTransferLogsRequest,
201        _options: gax::options::RequestOptions,
202    ) -> impl std::future::Future<
203        Output = crate::Result<gax::response::Response<crate::model::ListTransferLogsResponse>>,
204    > + Send {
205        std::future::ready::<
206            crate::Result<gax::response::Response<crate::model::ListTransferLogsResponse>>,
207        >(Err(Error::other("unimplemented")))
208    }
209
210    /// Implements [super::client::DataTransferService::check_valid_creds].
211    fn check_valid_creds(
212        &self,
213        _req: crate::model::CheckValidCredsRequest,
214        _options: gax::options::RequestOptions,
215    ) -> impl std::future::Future<
216        Output = crate::Result<gax::response::Response<crate::model::CheckValidCredsResponse>>,
217    > + Send {
218        std::future::ready::<
219            crate::Result<gax::response::Response<crate::model::CheckValidCredsResponse>>,
220        >(Err(Error::other("unimplemented")))
221    }
222
223    /// Implements [super::client::DataTransferService::enroll_data_sources].
224    fn enroll_data_sources(
225        &self,
226        _req: crate::model::EnrollDataSourcesRequest,
227        _options: gax::options::RequestOptions,
228    ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<()>>> + Send {
229        std::future::ready::<crate::Result<gax::response::Response<()>>>(Err(Error::other(
230            "unimplemented",
231        )))
232    }
233
234    /// Implements [super::client::DataTransferService::unenroll_data_sources].
235    fn unenroll_data_sources(
236        &self,
237        _req: crate::model::UnenrollDataSourcesRequest,
238        _options: gax::options::RequestOptions,
239    ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<()>>> + Send {
240        std::future::ready::<crate::Result<gax::response::Response<()>>>(Err(Error::other(
241            "unimplemented",
242        )))
243    }
244
245    /// Implements [super::client::DataTransferService::list_locations].
246    fn list_locations(
247        &self,
248        _req: location::model::ListLocationsRequest,
249        _options: gax::options::RequestOptions,
250    ) -> impl std::future::Future<
251        Output = crate::Result<gax::response::Response<location::model::ListLocationsResponse>>,
252    > + Send {
253        std::future::ready::<
254            crate::Result<gax::response::Response<location::model::ListLocationsResponse>>,
255        >(Err(Error::other("unimplemented")))
256    }
257
258    /// Implements [super::client::DataTransferService::get_location].
259    fn get_location(
260        &self,
261        _req: location::model::GetLocationRequest,
262        _options: gax::options::RequestOptions,
263    ) -> impl std::future::Future<
264        Output = crate::Result<gax::response::Response<location::model::Location>>,
265    > + Send {
266        std::future::ready::<crate::Result<gax::response::Response<location::model::Location>>>(
267            Err(Error::other("unimplemented")),
268        )
269    }
270}