Skip to main content

google_cloud_logging_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::LoggingServiceV2].
30///
31/// Application developers may need to implement this trait to mock
32/// `client::LoggingServiceV2`.  In other use-cases, application developers only
33/// use `client::LoggingServiceV2` 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 LoggingServiceV2: std::fmt::Debug + Send + Sync {
41    /// Implements [super::client::LoggingServiceV2::delete_log].
42    fn delete_log(
43        &self,
44        _req: crate::model::DeleteLogRequest,
45        _options: crate::RequestOptions,
46    ) -> impl std::future::Future<Output = crate::Result<crate::Response<()>>> + Send {
47        gaxi::unimplemented::unimplemented_stub()
48    }
49
50    /// Implements [super::client::LoggingServiceV2::write_log_entries].
51    fn write_log_entries(
52        &self,
53        _req: crate::model::WriteLogEntriesRequest,
54        _options: crate::RequestOptions,
55    ) -> impl std::future::Future<
56        Output = crate::Result<crate::Response<crate::model::WriteLogEntriesResponse>>,
57    > + Send {
58        gaxi::unimplemented::unimplemented_stub()
59    }
60
61    /// Implements [super::client::LoggingServiceV2::list_log_entries].
62    fn list_log_entries(
63        &self,
64        _req: crate::model::ListLogEntriesRequest,
65        _options: crate::RequestOptions,
66    ) -> impl std::future::Future<
67        Output = crate::Result<crate::Response<crate::model::ListLogEntriesResponse>>,
68    > + Send {
69        gaxi::unimplemented::unimplemented_stub()
70    }
71
72    /// Implements [super::client::LoggingServiceV2::list_monitored_resource_descriptors].
73    fn list_monitored_resource_descriptors(
74        &self,
75        _req: crate::model::ListMonitoredResourceDescriptorsRequest,
76        _options: crate::RequestOptions,
77    ) -> impl std::future::Future<
78        Output = crate::Result<
79            crate::Response<crate::model::ListMonitoredResourceDescriptorsResponse>,
80        >,
81    > + Send {
82        gaxi::unimplemented::unimplemented_stub()
83    }
84
85    /// Implements [super::client::LoggingServiceV2::list_logs].
86    fn list_logs(
87        &self,
88        _req: crate::model::ListLogsRequest,
89        _options: crate::RequestOptions,
90    ) -> impl std::future::Future<
91        Output = crate::Result<crate::Response<crate::model::ListLogsResponse>>,
92    > + Send {
93        gaxi::unimplemented::unimplemented_stub()
94    }
95
96    /// Implements [super::client::LoggingServiceV2::list_operations].
97    fn list_operations(
98        &self,
99        _req: google_cloud_longrunning::model::ListOperationsRequest,
100        _options: crate::RequestOptions,
101    ) -> impl std::future::Future<
102        Output = crate::Result<
103            crate::Response<google_cloud_longrunning::model::ListOperationsResponse>,
104        >,
105    > + Send {
106        gaxi::unimplemented::unimplemented_stub()
107    }
108
109    /// Implements [super::client::LoggingServiceV2::get_operation].
110    fn get_operation(
111        &self,
112        _req: google_cloud_longrunning::model::GetOperationRequest,
113        _options: crate::RequestOptions,
114    ) -> impl std::future::Future<
115        Output = crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>,
116    > + Send {
117        gaxi::unimplemented::unimplemented_stub()
118    }
119
120    /// Implements [super::client::LoggingServiceV2::cancel_operation].
121    fn cancel_operation(
122        &self,
123        _req: google_cloud_longrunning::model::CancelOperationRequest,
124        _options: crate::RequestOptions,
125    ) -> impl std::future::Future<Output = crate::Result<crate::Response<()>>> + Send {
126        gaxi::unimplemented::unimplemented_stub()
127    }
128}
129
130/// Defines the trait used to implement [super::client::ConfigServiceV2].
131///
132/// Application developers may need to implement this trait to mock
133/// `client::ConfigServiceV2`.  In other use-cases, application developers only
134/// use `client::ConfigServiceV2` and need not be concerned with this trait or
135/// its implementations.
136///
137/// Services gain new RPCs routinely. Consequently, this trait gains new methods
138/// too. To avoid breaking applications the trait provides a default
139/// implementation of each method. Most of these implementations just return an
140/// error.
141pub trait ConfigServiceV2: std::fmt::Debug + Send + Sync {
142    /// Implements [super::client::ConfigServiceV2::list_buckets].
143    fn list_buckets(
144        &self,
145        _req: crate::model::ListBucketsRequest,
146        _options: crate::RequestOptions,
147    ) -> impl std::future::Future<
148        Output = crate::Result<crate::Response<crate::model::ListBucketsResponse>>,
149    > + Send {
150        gaxi::unimplemented::unimplemented_stub()
151    }
152
153    /// Implements [super::client::ConfigServiceV2::get_bucket].
154    fn get_bucket(
155        &self,
156        _req: crate::model::GetBucketRequest,
157        _options: crate::RequestOptions,
158    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::LogBucket>>> + Send
159    {
160        gaxi::unimplemented::unimplemented_stub()
161    }
162
163    /// Implements [super::client::ConfigServiceV2::create_bucket_async].
164    fn create_bucket_async(
165        &self,
166        _req: crate::model::CreateBucketRequest,
167        _options: crate::RequestOptions,
168    ) -> impl std::future::Future<
169        Output = crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>,
170    > + Send {
171        gaxi::unimplemented::unimplemented_stub()
172    }
173
174    /// Implements [super::client::ConfigServiceV2::update_bucket_async].
175    fn update_bucket_async(
176        &self,
177        _req: crate::model::UpdateBucketRequest,
178        _options: crate::RequestOptions,
179    ) -> impl std::future::Future<
180        Output = crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>,
181    > + Send {
182        gaxi::unimplemented::unimplemented_stub()
183    }
184
185    /// Implements [super::client::ConfigServiceV2::create_bucket].
186    fn create_bucket(
187        &self,
188        _req: crate::model::CreateBucketRequest,
189        _options: crate::RequestOptions,
190    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::LogBucket>>> + Send
191    {
192        gaxi::unimplemented::unimplemented_stub()
193    }
194
195    /// Implements [super::client::ConfigServiceV2::update_bucket].
196    fn update_bucket(
197        &self,
198        _req: crate::model::UpdateBucketRequest,
199        _options: crate::RequestOptions,
200    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::LogBucket>>> + Send
201    {
202        gaxi::unimplemented::unimplemented_stub()
203    }
204
205    /// Implements [super::client::ConfigServiceV2::delete_bucket].
206    fn delete_bucket(
207        &self,
208        _req: crate::model::DeleteBucketRequest,
209        _options: crate::RequestOptions,
210    ) -> impl std::future::Future<Output = crate::Result<crate::Response<()>>> + Send {
211        gaxi::unimplemented::unimplemented_stub()
212    }
213
214    /// Implements [super::client::ConfigServiceV2::undelete_bucket].
215    fn undelete_bucket(
216        &self,
217        _req: crate::model::UndeleteBucketRequest,
218        _options: crate::RequestOptions,
219    ) -> impl std::future::Future<Output = crate::Result<crate::Response<()>>> + Send {
220        gaxi::unimplemented::unimplemented_stub()
221    }
222
223    /// Implements [super::client::ConfigServiceV2::list_views].
224    fn list_views(
225        &self,
226        _req: crate::model::ListViewsRequest,
227        _options: crate::RequestOptions,
228    ) -> impl std::future::Future<
229        Output = crate::Result<crate::Response<crate::model::ListViewsResponse>>,
230    > + Send {
231        gaxi::unimplemented::unimplemented_stub()
232    }
233
234    /// Implements [super::client::ConfigServiceV2::get_view].
235    fn get_view(
236        &self,
237        _req: crate::model::GetViewRequest,
238        _options: crate::RequestOptions,
239    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::LogView>>> + Send
240    {
241        gaxi::unimplemented::unimplemented_stub()
242    }
243
244    /// Implements [super::client::ConfigServiceV2::create_view].
245    fn create_view(
246        &self,
247        _req: crate::model::CreateViewRequest,
248        _options: crate::RequestOptions,
249    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::LogView>>> + Send
250    {
251        gaxi::unimplemented::unimplemented_stub()
252    }
253
254    /// Implements [super::client::ConfigServiceV2::update_view].
255    fn update_view(
256        &self,
257        _req: crate::model::UpdateViewRequest,
258        _options: crate::RequestOptions,
259    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::LogView>>> + Send
260    {
261        gaxi::unimplemented::unimplemented_stub()
262    }
263
264    /// Implements [super::client::ConfigServiceV2::delete_view].
265    fn delete_view(
266        &self,
267        _req: crate::model::DeleteViewRequest,
268        _options: crate::RequestOptions,
269    ) -> impl std::future::Future<Output = crate::Result<crate::Response<()>>> + Send {
270        gaxi::unimplemented::unimplemented_stub()
271    }
272
273    /// Implements [super::client::ConfigServiceV2::list_sinks].
274    fn list_sinks(
275        &self,
276        _req: crate::model::ListSinksRequest,
277        _options: crate::RequestOptions,
278    ) -> impl std::future::Future<
279        Output = crate::Result<crate::Response<crate::model::ListSinksResponse>>,
280    > + Send {
281        gaxi::unimplemented::unimplemented_stub()
282    }
283
284    /// Implements [super::client::ConfigServiceV2::get_sink].
285    fn get_sink(
286        &self,
287        _req: crate::model::GetSinkRequest,
288        _options: crate::RequestOptions,
289    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::LogSink>>> + Send
290    {
291        gaxi::unimplemented::unimplemented_stub()
292    }
293
294    /// Implements [super::client::ConfigServiceV2::create_sink].
295    fn create_sink(
296        &self,
297        _req: crate::model::CreateSinkRequest,
298        _options: crate::RequestOptions,
299    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::LogSink>>> + Send
300    {
301        gaxi::unimplemented::unimplemented_stub()
302    }
303
304    /// Implements [super::client::ConfigServiceV2::update_sink].
305    fn update_sink(
306        &self,
307        _req: crate::model::UpdateSinkRequest,
308        _options: crate::RequestOptions,
309    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::LogSink>>> + Send
310    {
311        gaxi::unimplemented::unimplemented_stub()
312    }
313
314    /// Implements [super::client::ConfigServiceV2::delete_sink].
315    fn delete_sink(
316        &self,
317        _req: crate::model::DeleteSinkRequest,
318        _options: crate::RequestOptions,
319    ) -> impl std::future::Future<Output = crate::Result<crate::Response<()>>> + Send {
320        gaxi::unimplemented::unimplemented_stub()
321    }
322
323    /// Implements [super::client::ConfigServiceV2::create_link].
324    fn create_link(
325        &self,
326        _req: crate::model::CreateLinkRequest,
327        _options: crate::RequestOptions,
328    ) -> impl std::future::Future<
329        Output = crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>,
330    > + Send {
331        gaxi::unimplemented::unimplemented_stub()
332    }
333
334    /// Implements [super::client::ConfigServiceV2::delete_link].
335    fn delete_link(
336        &self,
337        _req: crate::model::DeleteLinkRequest,
338        _options: crate::RequestOptions,
339    ) -> impl std::future::Future<
340        Output = crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>,
341    > + Send {
342        gaxi::unimplemented::unimplemented_stub()
343    }
344
345    /// Implements [super::client::ConfigServiceV2::list_links].
346    fn list_links(
347        &self,
348        _req: crate::model::ListLinksRequest,
349        _options: crate::RequestOptions,
350    ) -> impl std::future::Future<
351        Output = crate::Result<crate::Response<crate::model::ListLinksResponse>>,
352    > + Send {
353        gaxi::unimplemented::unimplemented_stub()
354    }
355
356    /// Implements [super::client::ConfigServiceV2::get_link].
357    fn get_link(
358        &self,
359        _req: crate::model::GetLinkRequest,
360        _options: crate::RequestOptions,
361    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::Link>>> + Send
362    {
363        gaxi::unimplemented::unimplemented_stub()
364    }
365
366    /// Implements [super::client::ConfigServiceV2::list_exclusions].
367    fn list_exclusions(
368        &self,
369        _req: crate::model::ListExclusionsRequest,
370        _options: crate::RequestOptions,
371    ) -> impl std::future::Future<
372        Output = crate::Result<crate::Response<crate::model::ListExclusionsResponse>>,
373    > + Send {
374        gaxi::unimplemented::unimplemented_stub()
375    }
376
377    /// Implements [super::client::ConfigServiceV2::get_exclusion].
378    fn get_exclusion(
379        &self,
380        _req: crate::model::GetExclusionRequest,
381        _options: crate::RequestOptions,
382    ) -> impl std::future::Future<
383        Output = crate::Result<crate::Response<crate::model::LogExclusion>>,
384    > + Send {
385        gaxi::unimplemented::unimplemented_stub()
386    }
387
388    /// Implements [super::client::ConfigServiceV2::create_exclusion].
389    fn create_exclusion(
390        &self,
391        _req: crate::model::CreateExclusionRequest,
392        _options: crate::RequestOptions,
393    ) -> impl std::future::Future<
394        Output = crate::Result<crate::Response<crate::model::LogExclusion>>,
395    > + Send {
396        gaxi::unimplemented::unimplemented_stub()
397    }
398
399    /// Implements [super::client::ConfigServiceV2::update_exclusion].
400    fn update_exclusion(
401        &self,
402        _req: crate::model::UpdateExclusionRequest,
403        _options: crate::RequestOptions,
404    ) -> impl std::future::Future<
405        Output = crate::Result<crate::Response<crate::model::LogExclusion>>,
406    > + Send {
407        gaxi::unimplemented::unimplemented_stub()
408    }
409
410    /// Implements [super::client::ConfigServiceV2::delete_exclusion].
411    fn delete_exclusion(
412        &self,
413        _req: crate::model::DeleteExclusionRequest,
414        _options: crate::RequestOptions,
415    ) -> impl std::future::Future<Output = crate::Result<crate::Response<()>>> + Send {
416        gaxi::unimplemented::unimplemented_stub()
417    }
418
419    /// Implements [super::client::ConfigServiceV2::get_cmek_settings].
420    fn get_cmek_settings(
421        &self,
422        _req: crate::model::GetCmekSettingsRequest,
423        _options: crate::RequestOptions,
424    ) -> impl std::future::Future<
425        Output = crate::Result<crate::Response<crate::model::CmekSettings>>,
426    > + Send {
427        gaxi::unimplemented::unimplemented_stub()
428    }
429
430    /// Implements [super::client::ConfigServiceV2::update_cmek_settings].
431    fn update_cmek_settings(
432        &self,
433        _req: crate::model::UpdateCmekSettingsRequest,
434        _options: crate::RequestOptions,
435    ) -> impl std::future::Future<
436        Output = crate::Result<crate::Response<crate::model::CmekSettings>>,
437    > + Send {
438        gaxi::unimplemented::unimplemented_stub()
439    }
440
441    /// Implements [super::client::ConfigServiceV2::get_settings].
442    fn get_settings(
443        &self,
444        _req: crate::model::GetSettingsRequest,
445        _options: crate::RequestOptions,
446    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::Settings>>> + Send
447    {
448        gaxi::unimplemented::unimplemented_stub()
449    }
450
451    /// Implements [super::client::ConfigServiceV2::update_settings].
452    fn update_settings(
453        &self,
454        _req: crate::model::UpdateSettingsRequest,
455        _options: crate::RequestOptions,
456    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::Settings>>> + Send
457    {
458        gaxi::unimplemented::unimplemented_stub()
459    }
460
461    /// Implements [super::client::ConfigServiceV2::copy_log_entries].
462    fn copy_log_entries(
463        &self,
464        _req: crate::model::CopyLogEntriesRequest,
465        _options: crate::RequestOptions,
466    ) -> impl std::future::Future<
467        Output = crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>,
468    > + Send {
469        gaxi::unimplemented::unimplemented_stub()
470    }
471
472    /// Implements [super::client::ConfigServiceV2::list_operations].
473    fn list_operations(
474        &self,
475        _req: google_cloud_longrunning::model::ListOperationsRequest,
476        _options: crate::RequestOptions,
477    ) -> impl std::future::Future<
478        Output = crate::Result<
479            crate::Response<google_cloud_longrunning::model::ListOperationsResponse>,
480        >,
481    > + Send {
482        gaxi::unimplemented::unimplemented_stub()
483    }
484
485    /// Implements [super::client::ConfigServiceV2::get_operation].
486    fn get_operation(
487        &self,
488        _req: google_cloud_longrunning::model::GetOperationRequest,
489        _options: crate::RequestOptions,
490    ) -> impl std::future::Future<
491        Output = crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>,
492    > + Send {
493        gaxi::unimplemented::unimplemented_stub()
494    }
495
496    /// Implements [super::client::ConfigServiceV2::cancel_operation].
497    fn cancel_operation(
498        &self,
499        _req: google_cloud_longrunning::model::CancelOperationRequest,
500        _options: crate::RequestOptions,
501    ) -> impl std::future::Future<Output = crate::Result<crate::Response<()>>> + Send {
502        gaxi::unimplemented::unimplemented_stub()
503    }
504
505    /// Returns the polling error policy.
506    ///
507    /// When mocking, this method is typically irrelevant. Do not try to verify
508    /// it is called by your mocks.
509    fn get_polling_error_policy(
510        &self,
511        _options: &crate::RequestOptions,
512    ) -> std::sync::Arc<dyn google_cloud_gax::polling_error_policy::PollingErrorPolicy> {
513        std::sync::Arc::new(google_cloud_gax::polling_error_policy::Aip194Strict)
514    }
515
516    /// Returns the polling backoff policy.
517    ///
518    /// When mocking, this method is typically irrelevant. Do not try to verify
519    /// it is called by your mocks.
520    fn get_polling_backoff_policy(
521        &self,
522        _options: &crate::RequestOptions,
523    ) -> std::sync::Arc<dyn google_cloud_gax::polling_backoff_policy::PollingBackoffPolicy> {
524        std::sync::Arc::new(google_cloud_gax::exponential_backoff::ExponentialBackoff::default())
525    }
526}
527
528/// Defines the trait used to implement [super::client::MetricsServiceV2].
529///
530/// Application developers may need to implement this trait to mock
531/// `client::MetricsServiceV2`.  In other use-cases, application developers only
532/// use `client::MetricsServiceV2` and need not be concerned with this trait or
533/// its implementations.
534///
535/// Services gain new RPCs routinely. Consequently, this trait gains new methods
536/// too. To avoid breaking applications the trait provides a default
537/// implementation of each method. Most of these implementations just return an
538/// error.
539pub trait MetricsServiceV2: std::fmt::Debug + Send + Sync {
540    /// Implements [super::client::MetricsServiceV2::list_log_metrics].
541    fn list_log_metrics(
542        &self,
543        _req: crate::model::ListLogMetricsRequest,
544        _options: crate::RequestOptions,
545    ) -> impl std::future::Future<
546        Output = crate::Result<crate::Response<crate::model::ListLogMetricsResponse>>,
547    > + Send {
548        gaxi::unimplemented::unimplemented_stub()
549    }
550
551    /// Implements [super::client::MetricsServiceV2::get_log_metric].
552    fn get_log_metric(
553        &self,
554        _req: crate::model::GetLogMetricRequest,
555        _options: crate::RequestOptions,
556    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::LogMetric>>> + Send
557    {
558        gaxi::unimplemented::unimplemented_stub()
559    }
560
561    /// Implements [super::client::MetricsServiceV2::create_log_metric].
562    fn create_log_metric(
563        &self,
564        _req: crate::model::CreateLogMetricRequest,
565        _options: crate::RequestOptions,
566    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::LogMetric>>> + Send
567    {
568        gaxi::unimplemented::unimplemented_stub()
569    }
570
571    /// Implements [super::client::MetricsServiceV2::update_log_metric].
572    fn update_log_metric(
573        &self,
574        _req: crate::model::UpdateLogMetricRequest,
575        _options: crate::RequestOptions,
576    ) -> impl std::future::Future<Output = crate::Result<crate::Response<crate::model::LogMetric>>> + Send
577    {
578        gaxi::unimplemented::unimplemented_stub()
579    }
580
581    /// Implements [super::client::MetricsServiceV2::delete_log_metric].
582    fn delete_log_metric(
583        &self,
584        _req: crate::model::DeleteLogMetricRequest,
585        _options: crate::RequestOptions,
586    ) -> impl std::future::Future<Output = crate::Result<crate::Response<()>>> + Send {
587        gaxi::unimplemented::unimplemented_stub()
588    }
589
590    /// Implements [super::client::MetricsServiceV2::list_operations].
591    fn list_operations(
592        &self,
593        _req: google_cloud_longrunning::model::ListOperationsRequest,
594        _options: crate::RequestOptions,
595    ) -> impl std::future::Future<
596        Output = crate::Result<
597            crate::Response<google_cloud_longrunning::model::ListOperationsResponse>,
598        >,
599    > + Send {
600        gaxi::unimplemented::unimplemented_stub()
601    }
602
603    /// Implements [super::client::MetricsServiceV2::get_operation].
604    fn get_operation(
605        &self,
606        _req: google_cloud_longrunning::model::GetOperationRequest,
607        _options: crate::RequestOptions,
608    ) -> impl std::future::Future<
609        Output = crate::Result<crate::Response<google_cloud_longrunning::model::Operation>>,
610    > + Send {
611        gaxi::unimplemented::unimplemented_stub()
612    }
613
614    /// Implements [super::client::MetricsServiceV2::cancel_operation].
615    fn cancel_operation(
616        &self,
617        _req: google_cloud_longrunning::model::CancelOperationRequest,
618        _options: crate::RequestOptions,
619    ) -> impl std::future::Future<Output = crate::Result<crate::Response<()>>> + Send {
620        gaxi::unimplemented::unimplemented_stub()
621    }
622}