Skip to main content

google_cloud_bigquery_v2/
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::DatasetService].
30///
31/// Application developers may need to implement this trait to mock
32/// `client::DatasetService`.  In other use-cases, application developers only
33/// use `client::DatasetService` 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 DatasetService: std::fmt::Debug + Send + Sync {
41    /// Implements [super::client::DatasetService::get_dataset].
42    fn get_dataset(
43        &self,
44        _req: crate::model::GetDatasetRequest,
45        _options: crate::RequestOptions,
46    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::Dataset>>> + Send
47    {
48        gaxi::unimplemented::unimplemented_stub()
49    }
50
51    /// Implements [super::client::DatasetService::insert_dataset].
52    fn insert_dataset(
53        &self,
54        _req: crate::model::InsertDatasetRequest,
55        _options: crate::RequestOptions,
56    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::Dataset>>> + Send
57    {
58        gaxi::unimplemented::unimplemented_stub()
59    }
60
61    /// Implements [super::client::DatasetService::patch_dataset].
62    fn patch_dataset(
63        &self,
64        _req: crate::model::UpdateOrPatchDatasetRequest,
65        _options: crate::RequestOptions,
66    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::Dataset>>> + Send
67    {
68        gaxi::unimplemented::unimplemented_stub()
69    }
70
71    /// Implements [super::client::DatasetService::update_dataset].
72    fn update_dataset(
73        &self,
74        _req: crate::model::UpdateOrPatchDatasetRequest,
75        _options: crate::RequestOptions,
76    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::Dataset>>> + Send
77    {
78        gaxi::unimplemented::unimplemented_stub()
79    }
80
81    /// Implements [super::client::DatasetService::delete_dataset].
82    fn delete_dataset(
83        &self,
84        _req: crate::model::DeleteDatasetRequest,
85        _options: crate::RequestOptions,
86    ) -> impl std::future::Future<Output = crate::Result<crate::Response<()>>> + Send {
87        gaxi::unimplemented::unimplemented_stub()
88    }
89
90    /// Implements [super::client::DatasetService::list_datasets].
91    fn list_datasets(
92        &self,
93        _req: crate::model::ListDatasetsRequest,
94        _options: crate::RequestOptions,
95    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::DatasetList>>>
96    + Send {
97        gaxi::unimplemented::unimplemented_stub()
98    }
99
100    /// Implements [super::client::DatasetService::undelete_dataset].
101    fn undelete_dataset(
102        &self,
103        _req: crate::model::UndeleteDatasetRequest,
104        _options: crate::RequestOptions,
105    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::Dataset>>> + Send
106    {
107        gaxi::unimplemented::unimplemented_stub()
108    }
109}
110
111/// Defines the trait used to implement [super::client::JobService].
112///
113/// Application developers may need to implement this trait to mock
114/// `client::JobService`.  In other use-cases, application developers only
115/// use `client::JobService` and need not be concerned with this trait or
116/// its implementations.
117///
118/// Services gain new RPCs routinely. Consequently, this trait gains new methods
119/// too. To avoid breaking applications the trait provides a default
120/// implementation of each method. Most of these implementations just return an
121/// error.
122pub trait JobService: std::fmt::Debug + Send + Sync {
123    /// Implements [super::client::JobService::cancel_job].
124    fn cancel_job(
125        &self,
126        _req: crate::model::CancelJobRequest,
127        _options: crate::RequestOptions,
128    ) -> impl std::future::Future<
129        Output = crate::Result<crate::Response<crate::model::JobCancelResponse>>,
130    > + Send {
131        gaxi::unimplemented::unimplemented_stub()
132    }
133
134    /// Implements [super::client::JobService::get_job].
135    fn get_job(
136        &self,
137        _req: crate::model::GetJobRequest,
138        _options: crate::RequestOptions,
139    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::Job>>> + Send
140    {
141        gaxi::unimplemented::unimplemented_stub()
142    }
143
144    /// Implements [super::client::JobService::insert_job].
145    fn insert_job(
146        &self,
147        _req: crate::model::InsertJobRequest,
148        _options: crate::RequestOptions,
149    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::Job>>> + Send
150    {
151        gaxi::unimplemented::unimplemented_stub()
152    }
153
154    /// Implements [super::client::JobService::delete_job].
155    fn delete_job(
156        &self,
157        _req: crate::model::DeleteJobRequest,
158        _options: crate::RequestOptions,
159    ) -> impl std::future::Future<Output = crate::Result<crate::Response<()>>> + Send {
160        gaxi::unimplemented::unimplemented_stub()
161    }
162
163    /// Implements [super::client::JobService::list_jobs].
164    fn list_jobs(
165        &self,
166        _req: crate::model::ListJobsRequest,
167        _options: crate::RequestOptions,
168    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::JobList>>> + Send
169    {
170        gaxi::unimplemented::unimplemented_stub()
171    }
172
173    /// Implements [super::client::JobService::get_query_results].
174    fn get_query_results(
175        &self,
176        _req: crate::model::GetQueryResultsRequest,
177        _options: crate::RequestOptions,
178    ) -> impl std::future::Future<
179        Output = crate::Result<crate::Response<crate::model::GetQueryResultsResponse>>,
180    > + Send {
181        gaxi::unimplemented::unimplemented_stub()
182    }
183
184    /// Implements [super::client::JobService::query].
185    fn query(
186        &self,
187        _req: crate::model::PostQueryRequest,
188        _options: crate::RequestOptions,
189    ) -> impl std::future::Future<
190        Output = crate::Result<crate::Response<crate::model::QueryResponse>>,
191    > + Send {
192        gaxi::unimplemented::unimplemented_stub()
193    }
194}
195
196/// Defines the trait used to implement [super::client::ModelService].
197///
198/// Application developers may need to implement this trait to mock
199/// `client::ModelService`.  In other use-cases, application developers only
200/// use `client::ModelService` and need not be concerned with this trait or
201/// its implementations.
202///
203/// Services gain new RPCs routinely. Consequently, this trait gains new methods
204/// too. To avoid breaking applications the trait provides a default
205/// implementation of each method. Most of these implementations just return an
206/// error.
207pub trait ModelService: std::fmt::Debug + Send + Sync {
208    /// Implements [super::client::ModelService::get_model].
209    fn get_model(
210        &self,
211        _req: crate::model::GetModelRequest,
212        _options: crate::RequestOptions,
213    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::Model>>> + Send
214    {
215        gaxi::unimplemented::unimplemented_stub()
216    }
217
218    /// Implements [super::client::ModelService::list_models].
219    fn list_models(
220        &self,
221        _req: crate::model::ListModelsRequest,
222        _options: crate::RequestOptions,
223    ) -> impl std::future::Future<
224        Output = crate::Result<crate::Response<crate::model::ListModelsResponse>>,
225    > + Send {
226        gaxi::unimplemented::unimplemented_stub()
227    }
228
229    /// Implements [super::client::ModelService::patch_model].
230    fn patch_model(
231        &self,
232        _req: crate::model::PatchModelRequest,
233        _options: crate::RequestOptions,
234    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::Model>>> + Send
235    {
236        gaxi::unimplemented::unimplemented_stub()
237    }
238
239    /// Implements [super::client::ModelService::delete_model].
240    fn delete_model(
241        &self,
242        _req: crate::model::DeleteModelRequest,
243        _options: crate::RequestOptions,
244    ) -> impl std::future::Future<Output = crate::Result<crate::Response<()>>> + Send {
245        gaxi::unimplemented::unimplemented_stub()
246    }
247}
248
249/// Defines the trait used to implement [super::client::ProjectService].
250///
251/// Application developers may need to implement this trait to mock
252/// `client::ProjectService`.  In other use-cases, application developers only
253/// use `client::ProjectService` and need not be concerned with this trait or
254/// its implementations.
255///
256/// Services gain new RPCs routinely. Consequently, this trait gains new methods
257/// too. To avoid breaking applications the trait provides a default
258/// implementation of each method. Most of these implementations just return an
259/// error.
260pub trait ProjectService: std::fmt::Debug + Send + Sync {
261    /// Implements [super::client::ProjectService::get_service_account].
262    fn get_service_account(
263        &self,
264        _req: crate::model::GetServiceAccountRequest,
265        _options: crate::RequestOptions,
266    ) -> impl std::future::Future<
267        Output = crate::Result<crate::Response<crate::model::GetServiceAccountResponse>>,
268    > + Send {
269        gaxi::unimplemented::unimplemented_stub()
270    }
271}
272
273/// Defines the trait used to implement [super::client::RoutineService].
274///
275/// Application developers may need to implement this trait to mock
276/// `client::RoutineService`.  In other use-cases, application developers only
277/// use `client::RoutineService` and need not be concerned with this trait or
278/// its implementations.
279///
280/// Services gain new RPCs routinely. Consequently, this trait gains new methods
281/// too. To avoid breaking applications the trait provides a default
282/// implementation of each method. Most of these implementations just return an
283/// error.
284pub trait RoutineService: std::fmt::Debug + Send + Sync {
285    /// Implements [super::client::RoutineService::get_routine].
286    fn get_routine(
287        &self,
288        _req: crate::model::GetRoutineRequest,
289        _options: crate::RequestOptions,
290    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::Routine>>> + Send
291    {
292        gaxi::unimplemented::unimplemented_stub()
293    }
294
295    /// Implements [super::client::RoutineService::insert_routine].
296    fn insert_routine(
297        &self,
298        _req: crate::model::InsertRoutineRequest,
299        _options: crate::RequestOptions,
300    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::Routine>>> + Send
301    {
302        gaxi::unimplemented::unimplemented_stub()
303    }
304
305    /// Implements [super::client::RoutineService::update_routine].
306    fn update_routine(
307        &self,
308        _req: crate::model::UpdateRoutineRequest,
309        _options: crate::RequestOptions,
310    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::Routine>>> + Send
311    {
312        gaxi::unimplemented::unimplemented_stub()
313    }
314
315    /// Implements [super::client::RoutineService::delete_routine].
316    fn delete_routine(
317        &self,
318        _req: crate::model::DeleteRoutineRequest,
319        _options: crate::RequestOptions,
320    ) -> impl std::future::Future<Output = crate::Result<crate::Response<()>>> + Send {
321        gaxi::unimplemented::unimplemented_stub()
322    }
323
324    /// Implements [super::client::RoutineService::list_routines].
325    fn list_routines(
326        &self,
327        _req: crate::model::ListRoutinesRequest,
328        _options: crate::RequestOptions,
329    ) -> impl std::future::Future<
330        Output = crate::Result<crate::Response<crate::model::ListRoutinesResponse>>,
331    > + Send {
332        gaxi::unimplemented::unimplemented_stub()
333    }
334}
335
336/// Defines the trait used to implement [super::client::RowAccessPolicyService].
337///
338/// Application developers may need to implement this trait to mock
339/// `client::RowAccessPolicyService`.  In other use-cases, application developers only
340/// use `client::RowAccessPolicyService` and need not be concerned with this trait or
341/// its implementations.
342///
343/// Services gain new RPCs routinely. Consequently, this trait gains new methods
344/// too. To avoid breaking applications the trait provides a default
345/// implementation of each method. Most of these implementations just return an
346/// error.
347pub trait RowAccessPolicyService: std::fmt::Debug + Send + Sync {
348    /// Implements [super::client::RowAccessPolicyService::list_row_access_policies].
349    fn list_row_access_policies(
350        &self,
351        _req: crate::model::ListRowAccessPoliciesRequest,
352        _options: crate::RequestOptions,
353    ) -> impl std::future::Future<
354        Output = crate::Result<crate::Response<crate::model::ListRowAccessPoliciesResponse>>,
355    > + Send {
356        gaxi::unimplemented::unimplemented_stub()
357    }
358
359    /// Implements [super::client::RowAccessPolicyService::get_row_access_policy].
360    fn get_row_access_policy(
361        &self,
362        _req: crate::model::GetRowAccessPolicyRequest,
363        _options: crate::RequestOptions,
364    ) -> impl std::future::Future<
365        Output = crate::Result<crate::Response<crate::model::RowAccessPolicy>>,
366    > + Send {
367        gaxi::unimplemented::unimplemented_stub()
368    }
369
370    /// Implements [super::client::RowAccessPolicyService::create_row_access_policy].
371    fn create_row_access_policy(
372        &self,
373        _req: crate::model::CreateRowAccessPolicyRequest,
374        _options: crate::RequestOptions,
375    ) -> impl std::future::Future<
376        Output = crate::Result<crate::Response<crate::model::RowAccessPolicy>>,
377    > + Send {
378        gaxi::unimplemented::unimplemented_stub()
379    }
380
381    /// Implements [super::client::RowAccessPolicyService::update_row_access_policy].
382    fn update_row_access_policy(
383        &self,
384        _req: crate::model::UpdateRowAccessPolicyRequest,
385        _options: crate::RequestOptions,
386    ) -> impl std::future::Future<
387        Output = crate::Result<crate::Response<crate::model::RowAccessPolicy>>,
388    > + Send {
389        gaxi::unimplemented::unimplemented_stub()
390    }
391
392    /// Implements [super::client::RowAccessPolicyService::delete_row_access_policy].
393    fn delete_row_access_policy(
394        &self,
395        _req: crate::model::DeleteRowAccessPolicyRequest,
396        _options: crate::RequestOptions,
397    ) -> impl std::future::Future<Output = crate::Result<crate::Response<()>>> + Send {
398        gaxi::unimplemented::unimplemented_stub()
399    }
400
401    /// Implements [super::client::RowAccessPolicyService::batch_delete_row_access_policies].
402    fn batch_delete_row_access_policies(
403        &self,
404        _req: crate::model::BatchDeleteRowAccessPoliciesRequest,
405        _options: crate::RequestOptions,
406    ) -> impl std::future::Future<Output = crate::Result<crate::Response<()>>> + Send {
407        gaxi::unimplemented::unimplemented_stub()
408    }
409}
410
411/// Defines the trait used to implement [super::client::TableService].
412///
413/// Application developers may need to implement this trait to mock
414/// `client::TableService`.  In other use-cases, application developers only
415/// use `client::TableService` and need not be concerned with this trait or
416/// its implementations.
417///
418/// Services gain new RPCs routinely. Consequently, this trait gains new methods
419/// too. To avoid breaking applications the trait provides a default
420/// implementation of each method. Most of these implementations just return an
421/// error.
422pub trait TableService: std::fmt::Debug + Send + Sync {
423    /// Implements [super::client::TableService::get_table].
424    fn get_table(
425        &self,
426        _req: crate::model::GetTableRequest,
427        _options: crate::RequestOptions,
428    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::Table>>> + Send
429    {
430        gaxi::unimplemented::unimplemented_stub()
431    }
432
433    /// Implements [super::client::TableService::insert_table].
434    fn insert_table(
435        &self,
436        _req: crate::model::InsertTableRequest,
437        _options: crate::RequestOptions,
438    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::Table>>> + Send
439    {
440        gaxi::unimplemented::unimplemented_stub()
441    }
442
443    /// Implements [super::client::TableService::patch_table].
444    fn patch_table(
445        &self,
446        _req: crate::model::UpdateOrPatchTableRequest,
447        _options: crate::RequestOptions,
448    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::Table>>> + Send
449    {
450        gaxi::unimplemented::unimplemented_stub()
451    }
452
453    /// Implements [super::client::TableService::update_table].
454    fn update_table(
455        &self,
456        _req: crate::model::UpdateOrPatchTableRequest,
457        _options: crate::RequestOptions,
458    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::Table>>> + Send
459    {
460        gaxi::unimplemented::unimplemented_stub()
461    }
462
463    /// Implements [super::client::TableService::delete_table].
464    fn delete_table(
465        &self,
466        _req: crate::model::DeleteTableRequest,
467        _options: crate::RequestOptions,
468    ) -> impl std::future::Future<Output = crate::Result<crate::Response<()>>> + Send {
469        gaxi::unimplemented::unimplemented_stub()
470    }
471
472    /// Implements [super::client::TableService::list_tables].
473    fn list_tables(
474        &self,
475        _req: crate::model::ListTablesRequest,
476        _options: crate::RequestOptions,
477    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::TableList>>> + Send
478    {
479        gaxi::unimplemented::unimplemented_stub()
480    }
481}