google_cloud_developerconnect_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::DeveloperConnect].
30///
31/// Application developers may need to implement this trait to mock
32/// `client::DeveloperConnect`.  In other use-cases, application developers only
33/// use `client::DeveloperConnect` 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 DeveloperConnect: std::fmt::Debug + Send + Sync {
41    /// Implements [super::client::DeveloperConnect::list_connections].
42    fn list_connections(
43        &self,
44        _req: crate::model::ListConnectionsRequest,
45        _options: gax::options::RequestOptions,
46    ) -> impl std::future::Future<
47        Output = crate::Result<gax::response::Response<crate::model::ListConnectionsResponse>>,
48    > + Send {
49        gaxi::unimplemented::unimplemented_stub()
50    }
51
52    /// Implements [super::client::DeveloperConnect::get_connection].
53    fn get_connection(
54        &self,
55        _req: crate::model::GetConnectionRequest,
56        _options: gax::options::RequestOptions,
57    ) -> impl std::future::Future<
58        Output = crate::Result<gax::response::Response<crate::model::Connection>>,
59    > + Send {
60        gaxi::unimplemented::unimplemented_stub()
61    }
62
63    /// Implements [super::client::DeveloperConnect::create_connection].
64    fn create_connection(
65        &self,
66        _req: crate::model::CreateConnectionRequest,
67        _options: gax::options::RequestOptions,
68    ) -> impl std::future::Future<
69        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
70    > + Send {
71        gaxi::unimplemented::unimplemented_stub()
72    }
73
74    /// Implements [super::client::DeveloperConnect::update_connection].
75    fn update_connection(
76        &self,
77        _req: crate::model::UpdateConnectionRequest,
78        _options: gax::options::RequestOptions,
79    ) -> impl std::future::Future<
80        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
81    > + Send {
82        gaxi::unimplemented::unimplemented_stub()
83    }
84
85    /// Implements [super::client::DeveloperConnect::delete_connection].
86    fn delete_connection(
87        &self,
88        _req: crate::model::DeleteConnectionRequest,
89        _options: gax::options::RequestOptions,
90    ) -> impl std::future::Future<
91        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
92    > + Send {
93        gaxi::unimplemented::unimplemented_stub()
94    }
95
96    /// Implements [super::client::DeveloperConnect::create_git_repository_link].
97    fn create_git_repository_link(
98        &self,
99        _req: crate::model::CreateGitRepositoryLinkRequest,
100        _options: gax::options::RequestOptions,
101    ) -> impl std::future::Future<
102        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
103    > + Send {
104        gaxi::unimplemented::unimplemented_stub()
105    }
106
107    /// Implements [super::client::DeveloperConnect::delete_git_repository_link].
108    fn delete_git_repository_link(
109        &self,
110        _req: crate::model::DeleteGitRepositoryLinkRequest,
111        _options: gax::options::RequestOptions,
112    ) -> impl std::future::Future<
113        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
114    > + Send {
115        gaxi::unimplemented::unimplemented_stub()
116    }
117
118    /// Implements [super::client::DeveloperConnect::list_git_repository_links].
119    fn list_git_repository_links(
120        &self,
121        _req: crate::model::ListGitRepositoryLinksRequest,
122        _options: gax::options::RequestOptions,
123    ) -> impl std::future::Future<
124        Output = crate::Result<
125            gax::response::Response<crate::model::ListGitRepositoryLinksResponse>,
126        >,
127    > + Send {
128        gaxi::unimplemented::unimplemented_stub()
129    }
130
131    /// Implements [super::client::DeveloperConnect::get_git_repository_link].
132    fn get_git_repository_link(
133        &self,
134        _req: crate::model::GetGitRepositoryLinkRequest,
135        _options: gax::options::RequestOptions,
136    ) -> impl std::future::Future<
137        Output = crate::Result<gax::response::Response<crate::model::GitRepositoryLink>>,
138    > + Send {
139        gaxi::unimplemented::unimplemented_stub()
140    }
141
142    /// Implements [super::client::DeveloperConnect::fetch_read_write_token].
143    fn fetch_read_write_token(
144        &self,
145        _req: crate::model::FetchReadWriteTokenRequest,
146        _options: gax::options::RequestOptions,
147    ) -> impl std::future::Future<
148        Output = crate::Result<gax::response::Response<crate::model::FetchReadWriteTokenResponse>>,
149    > + Send {
150        gaxi::unimplemented::unimplemented_stub()
151    }
152
153    /// Implements [super::client::DeveloperConnect::fetch_read_token].
154    fn fetch_read_token(
155        &self,
156        _req: crate::model::FetchReadTokenRequest,
157        _options: gax::options::RequestOptions,
158    ) -> impl std::future::Future<
159        Output = crate::Result<gax::response::Response<crate::model::FetchReadTokenResponse>>,
160    > + Send {
161        gaxi::unimplemented::unimplemented_stub()
162    }
163
164    /// Implements [super::client::DeveloperConnect::fetch_linkable_git_repositories].
165    fn fetch_linkable_git_repositories(
166        &self,
167        _req: crate::model::FetchLinkableGitRepositoriesRequest,
168        _options: gax::options::RequestOptions,
169    ) -> impl std::future::Future<
170        Output = crate::Result<
171            gax::response::Response<crate::model::FetchLinkableGitRepositoriesResponse>,
172        >,
173    > + Send {
174        gaxi::unimplemented::unimplemented_stub()
175    }
176
177    /// Implements [super::client::DeveloperConnect::fetch_git_hub_installations].
178    fn fetch_git_hub_installations(
179        &self,
180        _req: crate::model::FetchGitHubInstallationsRequest,
181        _options: gax::options::RequestOptions,
182    ) -> impl std::future::Future<
183        Output = crate::Result<
184            gax::response::Response<crate::model::FetchGitHubInstallationsResponse>,
185        >,
186    > + Send {
187        gaxi::unimplemented::unimplemented_stub()
188    }
189
190    /// Implements [super::client::DeveloperConnect::fetch_git_refs].
191    fn fetch_git_refs(
192        &self,
193        _req: crate::model::FetchGitRefsRequest,
194        _options: gax::options::RequestOptions,
195    ) -> impl std::future::Future<
196        Output = crate::Result<gax::response::Response<crate::model::FetchGitRefsResponse>>,
197    > + Send {
198        gaxi::unimplemented::unimplemented_stub()
199    }
200
201    /// Implements [super::client::DeveloperConnect::list_locations].
202    fn list_locations(
203        &self,
204        _req: location::model::ListLocationsRequest,
205        _options: gax::options::RequestOptions,
206    ) -> impl std::future::Future<
207        Output = crate::Result<gax::response::Response<location::model::ListLocationsResponse>>,
208    > + Send {
209        gaxi::unimplemented::unimplemented_stub()
210    }
211
212    /// Implements [super::client::DeveloperConnect::get_location].
213    fn get_location(
214        &self,
215        _req: location::model::GetLocationRequest,
216        _options: gax::options::RequestOptions,
217    ) -> impl std::future::Future<
218        Output = crate::Result<gax::response::Response<location::model::Location>>,
219    > + Send {
220        gaxi::unimplemented::unimplemented_stub()
221    }
222
223    /// Implements [super::client::DeveloperConnect::list_operations].
224    fn list_operations(
225        &self,
226        _req: longrunning::model::ListOperationsRequest,
227        _options: gax::options::RequestOptions,
228    ) -> impl std::future::Future<
229        Output = crate::Result<gax::response::Response<longrunning::model::ListOperationsResponse>>,
230    > + Send {
231        gaxi::unimplemented::unimplemented_stub()
232    }
233
234    /// Implements [super::client::DeveloperConnect::get_operation].
235    fn get_operation(
236        &self,
237        _req: longrunning::model::GetOperationRequest,
238        _options: gax::options::RequestOptions,
239    ) -> impl std::future::Future<
240        Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
241    > + Send {
242        gaxi::unimplemented::unimplemented_stub()
243    }
244
245    /// Implements [super::client::DeveloperConnect::delete_operation].
246    fn delete_operation(
247        &self,
248        _req: longrunning::model::DeleteOperationRequest,
249        _options: gax::options::RequestOptions,
250    ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<()>>> + Send {
251        gaxi::unimplemented::unimplemented_stub()
252    }
253
254    /// Implements [super::client::DeveloperConnect::cancel_operation].
255    fn cancel_operation(
256        &self,
257        _req: longrunning::model::CancelOperationRequest,
258        _options: gax::options::RequestOptions,
259    ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<()>>> + Send {
260        gaxi::unimplemented::unimplemented_stub()
261    }
262
263    /// Returns the polling error policy.
264    ///
265    /// When mocking, this method is typically irrelevant. Do not try to verify
266    /// it is called by your mocks.
267    fn get_polling_error_policy(
268        &self,
269        _options: &gax::options::RequestOptions,
270    ) -> std::sync::Arc<dyn gax::polling_error_policy::PollingErrorPolicy> {
271        std::sync::Arc::new(gax::polling_error_policy::Aip194Strict)
272    }
273
274    /// Returns the polling backoff policy.
275    ///
276    /// When mocking, this method is typically irrelevant. Do not try to verify
277    /// it is called by your mocks.
278    fn get_polling_backoff_policy(
279        &self,
280        _options: &gax::options::RequestOptions,
281    ) -> std::sync::Arc<dyn gax::polling_backoff_policy::PollingBackoffPolicy> {
282        std::sync::Arc::new(gax::exponential_backoff::ExponentialBackoff::default())
283    }
284}