google_cloud_container_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::ClusterManager].
32///
33/// Application developers may need to implement this trait to mock
34/// `client::ClusterManager`.  In other use-cases, application developers only
35/// use `client::ClusterManager` 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 ClusterManager: std::fmt::Debug + Send + Sync {
43    /// Implements [super::client::ClusterManager::list_clusters].
44    fn list_clusters(
45        &self,
46        _req: crate::model::ListClustersRequest,
47        _options: gax::options::RequestOptions,
48    ) -> impl std::future::Future<
49        Output = crate::Result<gax::response::Response<crate::model::ListClustersResponse>>,
50    > + Send {
51        std::future::ready::<
52            crate::Result<gax::response::Response<crate::model::ListClustersResponse>>,
53        >(Err(Error::other("unimplemented")))
54    }
55
56    /// Implements [super::client::ClusterManager::get_cluster].
57    fn get_cluster(
58        &self,
59        _req: crate::model::GetClusterRequest,
60        _options: gax::options::RequestOptions,
61    ) -> impl std::future::Future<
62        Output = crate::Result<gax::response::Response<crate::model::Cluster>>,
63    > + Send {
64        std::future::ready::<crate::Result<gax::response::Response<crate::model::Cluster>>>(Err(
65            Error::other("unimplemented"),
66        ))
67    }
68
69    /// Implements [super::client::ClusterManager::create_cluster].
70    fn create_cluster(
71        &self,
72        _req: crate::model::CreateClusterRequest,
73        _options: gax::options::RequestOptions,
74    ) -> impl std::future::Future<
75        Output = crate::Result<gax::response::Response<crate::model::Operation>>,
76    > + Send {
77        std::future::ready::<crate::Result<gax::response::Response<crate::model::Operation>>>(Err(
78            Error::other("unimplemented"),
79        ))
80    }
81
82    /// Implements [super::client::ClusterManager::update_cluster].
83    fn update_cluster(
84        &self,
85        _req: crate::model::UpdateClusterRequest,
86        _options: gax::options::RequestOptions,
87    ) -> impl std::future::Future<
88        Output = crate::Result<gax::response::Response<crate::model::Operation>>,
89    > + Send {
90        std::future::ready::<crate::Result<gax::response::Response<crate::model::Operation>>>(Err(
91            Error::other("unimplemented"),
92        ))
93    }
94
95    /// Implements [super::client::ClusterManager::update_node_pool].
96    fn update_node_pool(
97        &self,
98        _req: crate::model::UpdateNodePoolRequest,
99        _options: gax::options::RequestOptions,
100    ) -> impl std::future::Future<
101        Output = crate::Result<gax::response::Response<crate::model::Operation>>,
102    > + Send {
103        std::future::ready::<crate::Result<gax::response::Response<crate::model::Operation>>>(Err(
104            Error::other("unimplemented"),
105        ))
106    }
107
108    /// Implements [super::client::ClusterManager::set_node_pool_autoscaling].
109    fn set_node_pool_autoscaling(
110        &self,
111        _req: crate::model::SetNodePoolAutoscalingRequest,
112        _options: gax::options::RequestOptions,
113    ) -> impl std::future::Future<
114        Output = crate::Result<gax::response::Response<crate::model::Operation>>,
115    > + Send {
116        std::future::ready::<crate::Result<gax::response::Response<crate::model::Operation>>>(Err(
117            Error::other("unimplemented"),
118        ))
119    }
120
121    /// Implements [super::client::ClusterManager::set_logging_service].
122    fn set_logging_service(
123        &self,
124        _req: crate::model::SetLoggingServiceRequest,
125        _options: gax::options::RequestOptions,
126    ) -> impl std::future::Future<
127        Output = crate::Result<gax::response::Response<crate::model::Operation>>,
128    > + Send {
129        std::future::ready::<crate::Result<gax::response::Response<crate::model::Operation>>>(Err(
130            Error::other("unimplemented"),
131        ))
132    }
133
134    /// Implements [super::client::ClusterManager::set_monitoring_service].
135    fn set_monitoring_service(
136        &self,
137        _req: crate::model::SetMonitoringServiceRequest,
138        _options: gax::options::RequestOptions,
139    ) -> impl std::future::Future<
140        Output = crate::Result<gax::response::Response<crate::model::Operation>>,
141    > + Send {
142        std::future::ready::<crate::Result<gax::response::Response<crate::model::Operation>>>(Err(
143            Error::other("unimplemented"),
144        ))
145    }
146
147    /// Implements [super::client::ClusterManager::set_addons_config].
148    fn set_addons_config(
149        &self,
150        _req: crate::model::SetAddonsConfigRequest,
151        _options: gax::options::RequestOptions,
152    ) -> impl std::future::Future<
153        Output = crate::Result<gax::response::Response<crate::model::Operation>>,
154    > + Send {
155        std::future::ready::<crate::Result<gax::response::Response<crate::model::Operation>>>(Err(
156            Error::other("unimplemented"),
157        ))
158    }
159
160    /// Implements [super::client::ClusterManager::set_locations].
161    fn set_locations(
162        &self,
163        _req: crate::model::SetLocationsRequest,
164        _options: gax::options::RequestOptions,
165    ) -> impl std::future::Future<
166        Output = crate::Result<gax::response::Response<crate::model::Operation>>,
167    > + Send {
168        std::future::ready::<crate::Result<gax::response::Response<crate::model::Operation>>>(Err(
169            Error::other("unimplemented"),
170        ))
171    }
172
173    /// Implements [super::client::ClusterManager::update_master].
174    fn update_master(
175        &self,
176        _req: crate::model::UpdateMasterRequest,
177        _options: gax::options::RequestOptions,
178    ) -> impl std::future::Future<
179        Output = crate::Result<gax::response::Response<crate::model::Operation>>,
180    > + Send {
181        std::future::ready::<crate::Result<gax::response::Response<crate::model::Operation>>>(Err(
182            Error::other("unimplemented"),
183        ))
184    }
185
186    /// Implements [super::client::ClusterManager::set_master_auth].
187    fn set_master_auth(
188        &self,
189        _req: crate::model::SetMasterAuthRequest,
190        _options: gax::options::RequestOptions,
191    ) -> impl std::future::Future<
192        Output = crate::Result<gax::response::Response<crate::model::Operation>>,
193    > + Send {
194        std::future::ready::<crate::Result<gax::response::Response<crate::model::Operation>>>(Err(
195            Error::other("unimplemented"),
196        ))
197    }
198
199    /// Implements [super::client::ClusterManager::delete_cluster].
200    fn delete_cluster(
201        &self,
202        _req: crate::model::DeleteClusterRequest,
203        _options: gax::options::RequestOptions,
204    ) -> impl std::future::Future<
205        Output = crate::Result<gax::response::Response<crate::model::Operation>>,
206    > + Send {
207        std::future::ready::<crate::Result<gax::response::Response<crate::model::Operation>>>(Err(
208            Error::other("unimplemented"),
209        ))
210    }
211
212    /// Implements [super::client::ClusterManager::list_operations].
213    fn list_operations(
214        &self,
215        _req: crate::model::ListOperationsRequest,
216        _options: gax::options::RequestOptions,
217    ) -> impl std::future::Future<
218        Output = crate::Result<gax::response::Response<crate::model::ListOperationsResponse>>,
219    > + Send {
220        std::future::ready::<
221            crate::Result<gax::response::Response<crate::model::ListOperationsResponse>>,
222        >(Err(Error::other("unimplemented")))
223    }
224
225    /// Implements [super::client::ClusterManager::get_operation].
226    fn get_operation(
227        &self,
228        _req: crate::model::GetOperationRequest,
229        _options: gax::options::RequestOptions,
230    ) -> impl std::future::Future<
231        Output = crate::Result<gax::response::Response<crate::model::Operation>>,
232    > + Send {
233        std::future::ready::<crate::Result<gax::response::Response<crate::model::Operation>>>(Err(
234            Error::other("unimplemented"),
235        ))
236    }
237
238    /// Implements [super::client::ClusterManager::cancel_operation].
239    fn cancel_operation(
240        &self,
241        _req: crate::model::CancelOperationRequest,
242        _options: gax::options::RequestOptions,
243    ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<()>>> + Send {
244        std::future::ready::<crate::Result<gax::response::Response<()>>>(Err(Error::other(
245            "unimplemented",
246        )))
247    }
248
249    /// Implements [super::client::ClusterManager::get_server_config].
250    fn get_server_config(
251        &self,
252        _req: crate::model::GetServerConfigRequest,
253        _options: gax::options::RequestOptions,
254    ) -> impl std::future::Future<
255        Output = crate::Result<gax::response::Response<crate::model::ServerConfig>>,
256    > + Send {
257        std::future::ready::<crate::Result<gax::response::Response<crate::model::ServerConfig>>>(
258            Err(Error::other("unimplemented")),
259        )
260    }
261
262    /// Implements [super::client::ClusterManager::get_json_web_keys].
263    fn get_json_web_keys(
264        &self,
265        _req: crate::model::GetJSONWebKeysRequest,
266        _options: gax::options::RequestOptions,
267    ) -> impl std::future::Future<
268        Output = crate::Result<gax::response::Response<crate::model::GetJSONWebKeysResponse>>,
269    > + Send {
270        std::future::ready::<
271            crate::Result<gax::response::Response<crate::model::GetJSONWebKeysResponse>>,
272        >(Err(Error::other("unimplemented")))
273    }
274
275    /// Implements [super::client::ClusterManager::list_node_pools].
276    fn list_node_pools(
277        &self,
278        _req: crate::model::ListNodePoolsRequest,
279        _options: gax::options::RequestOptions,
280    ) -> impl std::future::Future<
281        Output = crate::Result<gax::response::Response<crate::model::ListNodePoolsResponse>>,
282    > + Send {
283        std::future::ready::<
284            crate::Result<gax::response::Response<crate::model::ListNodePoolsResponse>>,
285        >(Err(Error::other("unimplemented")))
286    }
287
288    /// Implements [super::client::ClusterManager::get_node_pool].
289    fn get_node_pool(
290        &self,
291        _req: crate::model::GetNodePoolRequest,
292        _options: gax::options::RequestOptions,
293    ) -> impl std::future::Future<
294        Output = crate::Result<gax::response::Response<crate::model::NodePool>>,
295    > + Send {
296        std::future::ready::<crate::Result<gax::response::Response<crate::model::NodePool>>>(Err(
297            Error::other("unimplemented"),
298        ))
299    }
300
301    /// Implements [super::client::ClusterManager::create_node_pool].
302    fn create_node_pool(
303        &self,
304        _req: crate::model::CreateNodePoolRequest,
305        _options: gax::options::RequestOptions,
306    ) -> impl std::future::Future<
307        Output = crate::Result<gax::response::Response<crate::model::Operation>>,
308    > + Send {
309        std::future::ready::<crate::Result<gax::response::Response<crate::model::Operation>>>(Err(
310            Error::other("unimplemented"),
311        ))
312    }
313
314    /// Implements [super::client::ClusterManager::delete_node_pool].
315    fn delete_node_pool(
316        &self,
317        _req: crate::model::DeleteNodePoolRequest,
318        _options: gax::options::RequestOptions,
319    ) -> impl std::future::Future<
320        Output = crate::Result<gax::response::Response<crate::model::Operation>>,
321    > + Send {
322        std::future::ready::<crate::Result<gax::response::Response<crate::model::Operation>>>(Err(
323            Error::other("unimplemented"),
324        ))
325    }
326
327    /// Implements [super::client::ClusterManager::complete_node_pool_upgrade].
328    fn complete_node_pool_upgrade(
329        &self,
330        _req: crate::model::CompleteNodePoolUpgradeRequest,
331        _options: gax::options::RequestOptions,
332    ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<()>>> + Send {
333        std::future::ready::<crate::Result<gax::response::Response<()>>>(Err(Error::other(
334            "unimplemented",
335        )))
336    }
337
338    /// Implements [super::client::ClusterManager::rollback_node_pool_upgrade].
339    fn rollback_node_pool_upgrade(
340        &self,
341        _req: crate::model::RollbackNodePoolUpgradeRequest,
342        _options: gax::options::RequestOptions,
343    ) -> impl std::future::Future<
344        Output = crate::Result<gax::response::Response<crate::model::Operation>>,
345    > + Send {
346        std::future::ready::<crate::Result<gax::response::Response<crate::model::Operation>>>(Err(
347            Error::other("unimplemented"),
348        ))
349    }
350
351    /// Implements [super::client::ClusterManager::set_node_pool_management].
352    fn set_node_pool_management(
353        &self,
354        _req: crate::model::SetNodePoolManagementRequest,
355        _options: gax::options::RequestOptions,
356    ) -> impl std::future::Future<
357        Output = crate::Result<gax::response::Response<crate::model::Operation>>,
358    > + Send {
359        std::future::ready::<crate::Result<gax::response::Response<crate::model::Operation>>>(Err(
360            Error::other("unimplemented"),
361        ))
362    }
363
364    /// Implements [super::client::ClusterManager::set_labels].
365    fn set_labels(
366        &self,
367        _req: crate::model::SetLabelsRequest,
368        _options: gax::options::RequestOptions,
369    ) -> impl std::future::Future<
370        Output = crate::Result<gax::response::Response<crate::model::Operation>>,
371    > + Send {
372        std::future::ready::<crate::Result<gax::response::Response<crate::model::Operation>>>(Err(
373            Error::other("unimplemented"),
374        ))
375    }
376
377    /// Implements [super::client::ClusterManager::set_legacy_abac].
378    fn set_legacy_abac(
379        &self,
380        _req: crate::model::SetLegacyAbacRequest,
381        _options: gax::options::RequestOptions,
382    ) -> impl std::future::Future<
383        Output = crate::Result<gax::response::Response<crate::model::Operation>>,
384    > + Send {
385        std::future::ready::<crate::Result<gax::response::Response<crate::model::Operation>>>(Err(
386            Error::other("unimplemented"),
387        ))
388    }
389
390    /// Implements [super::client::ClusterManager::start_ip_rotation].
391    fn start_ip_rotation(
392        &self,
393        _req: crate::model::StartIPRotationRequest,
394        _options: gax::options::RequestOptions,
395    ) -> impl std::future::Future<
396        Output = crate::Result<gax::response::Response<crate::model::Operation>>,
397    > + Send {
398        std::future::ready::<crate::Result<gax::response::Response<crate::model::Operation>>>(Err(
399            Error::other("unimplemented"),
400        ))
401    }
402
403    /// Implements [super::client::ClusterManager::complete_ip_rotation].
404    fn complete_ip_rotation(
405        &self,
406        _req: crate::model::CompleteIPRotationRequest,
407        _options: gax::options::RequestOptions,
408    ) -> impl std::future::Future<
409        Output = crate::Result<gax::response::Response<crate::model::Operation>>,
410    > + Send {
411        std::future::ready::<crate::Result<gax::response::Response<crate::model::Operation>>>(Err(
412            Error::other("unimplemented"),
413        ))
414    }
415
416    /// Implements [super::client::ClusterManager::set_node_pool_size].
417    fn set_node_pool_size(
418        &self,
419        _req: crate::model::SetNodePoolSizeRequest,
420        _options: gax::options::RequestOptions,
421    ) -> impl std::future::Future<
422        Output = crate::Result<gax::response::Response<crate::model::Operation>>,
423    > + Send {
424        std::future::ready::<crate::Result<gax::response::Response<crate::model::Operation>>>(Err(
425            Error::other("unimplemented"),
426        ))
427    }
428
429    /// Implements [super::client::ClusterManager::set_network_policy].
430    fn set_network_policy(
431        &self,
432        _req: crate::model::SetNetworkPolicyRequest,
433        _options: gax::options::RequestOptions,
434    ) -> impl std::future::Future<
435        Output = crate::Result<gax::response::Response<crate::model::Operation>>,
436    > + Send {
437        std::future::ready::<crate::Result<gax::response::Response<crate::model::Operation>>>(Err(
438            Error::other("unimplemented"),
439        ))
440    }
441
442    /// Implements [super::client::ClusterManager::set_maintenance_policy].
443    fn set_maintenance_policy(
444        &self,
445        _req: crate::model::SetMaintenancePolicyRequest,
446        _options: gax::options::RequestOptions,
447    ) -> impl std::future::Future<
448        Output = crate::Result<gax::response::Response<crate::model::Operation>>,
449    > + Send {
450        std::future::ready::<crate::Result<gax::response::Response<crate::model::Operation>>>(Err(
451            Error::other("unimplemented"),
452        ))
453    }
454
455    /// Implements [super::client::ClusterManager::list_usable_subnetworks].
456    fn list_usable_subnetworks(
457        &self,
458        _req: crate::model::ListUsableSubnetworksRequest,
459        _options: gax::options::RequestOptions,
460    ) -> impl std::future::Future<
461        Output = crate::Result<
462            gax::response::Response<crate::model::ListUsableSubnetworksResponse>,
463        >,
464    > + Send {
465        std::future::ready::<
466            crate::Result<gax::response::Response<crate::model::ListUsableSubnetworksResponse>>,
467        >(Err(Error::other("unimplemented")))
468    }
469
470    /// Implements [super::client::ClusterManager::check_autopilot_compatibility].
471    fn check_autopilot_compatibility(
472        &self,
473        _req: crate::model::CheckAutopilotCompatibilityRequest,
474        _options: gax::options::RequestOptions,
475    ) -> impl std::future::Future<
476        Output = crate::Result<
477            gax::response::Response<crate::model::CheckAutopilotCompatibilityResponse>,
478        >,
479    > + Send {
480        std::future::ready::<
481            crate::Result<
482                gax::response::Response<crate::model::CheckAutopilotCompatibilityResponse>,
483            >,
484        >(Err(Error::other("unimplemented")))
485    }
486}