google_cloud_datafusion_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::DataFusion].
30///
31/// Application developers may need to implement this trait to mock
32/// `client::DataFusion`.  In other use-cases, application developers only
33/// use `client::DataFusion` 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 DataFusion: std::fmt::Debug + Send + Sync {
41    /// Implements [super::client::DataFusion::list_available_versions].
42    fn list_available_versions(
43        &self,
44        _req: crate::model::ListAvailableVersionsRequest,
45        _options: gax::options::RequestOptions,
46    ) -> impl std::future::Future<
47        Output = crate::Result<
48            gax::response::Response<crate::model::ListAvailableVersionsResponse>,
49        >,
50    > + Send {
51        gaxi::unimplemented::unimplemented_stub()
52    }
53
54    /// Implements [super::client::DataFusion::list_instances].
55    fn list_instances(
56        &self,
57        _req: crate::model::ListInstancesRequest,
58        _options: gax::options::RequestOptions,
59    ) -> impl std::future::Future<
60        Output = crate::Result<gax::response::Response<crate::model::ListInstancesResponse>>,
61    > + Send {
62        gaxi::unimplemented::unimplemented_stub()
63    }
64
65    /// Implements [super::client::DataFusion::get_instance].
66    fn get_instance(
67        &self,
68        _req: crate::model::GetInstanceRequest,
69        _options: gax::options::RequestOptions,
70    ) -> impl std::future::Future<
71        Output = crate::Result<gax::response::Response<crate::model::Instance>>,
72    > + Send {
73        gaxi::unimplemented::unimplemented_stub()
74    }
75
76    /// Implements [super::client::DataFusion::create_instance].
77    fn create_instance(
78        &self,
79        _req: crate::model::CreateInstanceRequest,
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::DataFusion::delete_instance].
88    fn delete_instance(
89        &self,
90        _req: crate::model::DeleteInstanceRequest,
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::DataFusion::update_instance].
99    fn update_instance(
100        &self,
101        _req: crate::model::UpdateInstanceRequest,
102        _options: gax::options::RequestOptions,
103    ) -> impl std::future::Future<
104        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
105    > + Send {
106        gaxi::unimplemented::unimplemented_stub()
107    }
108
109    /// Implements [super::client::DataFusion::restart_instance].
110    fn restart_instance(
111        &self,
112        _req: crate::model::RestartInstanceRequest,
113        _options: gax::options::RequestOptions,
114    ) -> impl std::future::Future<
115        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
116    > + Send {
117        gaxi::unimplemented::unimplemented_stub()
118    }
119
120    /// Implements [super::client::DataFusion::list_operations].
121    fn list_operations(
122        &self,
123        _req: longrunning::model::ListOperationsRequest,
124        _options: gax::options::RequestOptions,
125    ) -> impl std::future::Future<
126        Output = crate::Result<gax::response::Response<longrunning::model::ListOperationsResponse>>,
127    > + Send {
128        gaxi::unimplemented::unimplemented_stub()
129    }
130
131    /// Implements [super::client::DataFusion::get_operation].
132    fn get_operation(
133        &self,
134        _req: longrunning::model::GetOperationRequest,
135        _options: gax::options::RequestOptions,
136    ) -> impl std::future::Future<
137        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
138    > + Send {
139        gaxi::unimplemented::unimplemented_stub()
140    }
141
142    /// Implements [super::client::DataFusion::delete_operation].
143    fn delete_operation(
144        &self,
145        _req: longrunning::model::DeleteOperationRequest,
146        _options: gax::options::RequestOptions,
147    ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<()>>> + Send {
148        gaxi::unimplemented::unimplemented_stub()
149    }
150
151    /// Implements [super::client::DataFusion::cancel_operation].
152    fn cancel_operation(
153        &self,
154        _req: longrunning::model::CancelOperationRequest,
155        _options: gax::options::RequestOptions,
156    ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<()>>> + Send {
157        gaxi::unimplemented::unimplemented_stub()
158    }
159
160    /// Returns the polling error policy.
161    ///
162    /// When mocking, this method is typically irrelevant. Do not try to verify
163    /// it is called by your mocks.
164    fn get_polling_error_policy(
165        &self,
166        _options: &gax::options::RequestOptions,
167    ) -> std::sync::Arc<dyn gax::polling_error_policy::PollingErrorPolicy> {
168        std::sync::Arc::new(gax::polling_error_policy::Aip194Strict)
169    }
170
171    /// Returns the polling backoff policy.
172    ///
173    /// When mocking, this method is typically irrelevant. Do not try to verify
174    /// it is called by your mocks.
175    fn get_polling_backoff_policy(
176        &self,
177        _options: &gax::options::RequestOptions,
178    ) -> std::sync::Arc<dyn gax::polling_backoff_policy::PollingBackoffPolicy> {
179        std::sync::Arc::new(gax::exponential_backoff::ExponentialBackoff::default())
180    }
181}