Skip to main content

google_cloud_chronicle_v1/
builder.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/// Request and client builders for [BigQueryExportService][crate::client::BigQueryExportService].
18pub mod big_query_export_service {
19    use crate::Result;
20
21    /// A builder for [BigQueryExportService][crate::client::BigQueryExportService].
22    ///
23    /// ```
24    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
25    /// # use google_cloud_chronicle_v1::*;
26    /// # use builder::big_query_export_service::ClientBuilder;
27    /// # use client::BigQueryExportService;
28    /// let builder : ClientBuilder = BigQueryExportService::builder();
29    /// let client = builder
30    ///     .with_endpoint("https://chronicle.googleapis.com")
31    ///     .build().await?;
32    /// # Ok(()) }
33    /// ```
34    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
35
36    pub(crate) mod client {
37        use super::super::super::client::BigQueryExportService;
38        pub struct Factory;
39        impl crate::ClientFactory for Factory {
40            type Client = BigQueryExportService;
41            type Credentials = gaxi::options::Credentials;
42            async fn build(
43                self,
44                config: gaxi::options::ClientConfig,
45            ) -> crate::ClientBuilderResult<Self::Client> {
46                Self::Client::new(config).await
47            }
48        }
49    }
50
51    /// Common implementation for [crate::client::BigQueryExportService] request builders.
52    #[derive(Clone, Debug)]
53    pub(crate) struct RequestBuilder<R: std::default::Default> {
54        stub: std::sync::Arc<dyn super::super::stub::dynamic::BigQueryExportService>,
55        request: R,
56        options: crate::RequestOptions,
57    }
58
59    impl<R> RequestBuilder<R>
60    where
61        R: std::default::Default,
62    {
63        pub(crate) fn new(
64            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigQueryExportService>,
65        ) -> Self {
66            Self {
67                stub,
68                request: R::default(),
69                options: crate::RequestOptions::default(),
70            }
71        }
72    }
73
74    /// The request builder for [BigQueryExportService::get_big_query_export][crate::client::BigQueryExportService::get_big_query_export] calls.
75    ///
76    /// # Example
77    /// ```
78    /// # use google_cloud_chronicle_v1::builder::big_query_export_service::GetBigQueryExport;
79    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
80    ///
81    /// let builder = prepare_request_builder();
82    /// let response = builder.send().await?;
83    /// # Ok(()) }
84    ///
85    /// fn prepare_request_builder() -> GetBigQueryExport {
86    ///   # panic!();
87    ///   // ... details omitted ...
88    /// }
89    /// ```
90    #[derive(Clone, Debug)]
91    pub struct GetBigQueryExport(RequestBuilder<crate::model::GetBigQueryExportRequest>);
92
93    impl GetBigQueryExport {
94        pub(crate) fn new(
95            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigQueryExportService>,
96        ) -> Self {
97            Self(RequestBuilder::new(stub))
98        }
99
100        /// Sets the full request, replacing any prior values.
101        pub fn with_request<V: Into<crate::model::GetBigQueryExportRequest>>(
102            mut self,
103            v: V,
104        ) -> Self {
105            self.0.request = v.into();
106            self
107        }
108
109        /// Sets all the options, replacing any prior values.
110        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
111            self.0.options = v.into();
112            self
113        }
114
115        /// Sends the request.
116        pub async fn send(self) -> Result<crate::model::BigQueryExport> {
117            (*self.0.stub)
118                .get_big_query_export(self.0.request, self.0.options)
119                .await
120                .map(crate::Response::into_body)
121        }
122
123        /// Sets the value of [name][crate::model::GetBigQueryExportRequest::name].
124        ///
125        /// This is a **required** field for requests.
126        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
127            self.0.request.name = v.into();
128            self
129        }
130    }
131
132    #[doc(hidden)]
133    impl crate::RequestBuilder for GetBigQueryExport {
134        fn request_options(&mut self) -> &mut crate::RequestOptions {
135            &mut self.0.options
136        }
137    }
138
139    /// The request builder for [BigQueryExportService::update_big_query_export][crate::client::BigQueryExportService::update_big_query_export] calls.
140    ///
141    /// # Example
142    /// ```
143    /// # use google_cloud_chronicle_v1::builder::big_query_export_service::UpdateBigQueryExport;
144    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
145    ///
146    /// let builder = prepare_request_builder();
147    /// let response = builder.send().await?;
148    /// # Ok(()) }
149    ///
150    /// fn prepare_request_builder() -> UpdateBigQueryExport {
151    ///   # panic!();
152    ///   // ... details omitted ...
153    /// }
154    /// ```
155    #[derive(Clone, Debug)]
156    pub struct UpdateBigQueryExport(RequestBuilder<crate::model::UpdateBigQueryExportRequest>);
157
158    impl UpdateBigQueryExport {
159        pub(crate) fn new(
160            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigQueryExportService>,
161        ) -> Self {
162            Self(RequestBuilder::new(stub))
163        }
164
165        /// Sets the full request, replacing any prior values.
166        pub fn with_request<V: Into<crate::model::UpdateBigQueryExportRequest>>(
167            mut self,
168            v: V,
169        ) -> Self {
170            self.0.request = v.into();
171            self
172        }
173
174        /// Sets all the options, replacing any prior values.
175        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
176            self.0.options = v.into();
177            self
178        }
179
180        /// Sends the request.
181        pub async fn send(self) -> Result<crate::model::BigQueryExport> {
182            (*self.0.stub)
183                .update_big_query_export(self.0.request, self.0.options)
184                .await
185                .map(crate::Response::into_body)
186        }
187
188        /// Sets the value of [big_query_export][crate::model::UpdateBigQueryExportRequest::big_query_export].
189        ///
190        /// This is a **required** field for requests.
191        pub fn set_big_query_export<T>(mut self, v: T) -> Self
192        where
193            T: std::convert::Into<crate::model::BigQueryExport>,
194        {
195            self.0.request.big_query_export = std::option::Option::Some(v.into());
196            self
197        }
198
199        /// Sets or clears the value of [big_query_export][crate::model::UpdateBigQueryExportRequest::big_query_export].
200        ///
201        /// This is a **required** field for requests.
202        pub fn set_or_clear_big_query_export<T>(mut self, v: std::option::Option<T>) -> Self
203        where
204            T: std::convert::Into<crate::model::BigQueryExport>,
205        {
206            self.0.request.big_query_export = v.map(|x| x.into());
207            self
208        }
209
210        /// Sets the value of [update_mask][crate::model::UpdateBigQueryExportRequest::update_mask].
211        pub fn set_update_mask<T>(mut self, v: T) -> Self
212        where
213            T: std::convert::Into<wkt::FieldMask>,
214        {
215            self.0.request.update_mask = std::option::Option::Some(v.into());
216            self
217        }
218
219        /// Sets or clears the value of [update_mask][crate::model::UpdateBigQueryExportRequest::update_mask].
220        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
221        where
222            T: std::convert::Into<wkt::FieldMask>,
223        {
224            self.0.request.update_mask = v.map(|x| x.into());
225            self
226        }
227    }
228
229    #[doc(hidden)]
230    impl crate::RequestBuilder for UpdateBigQueryExport {
231        fn request_options(&mut self) -> &mut crate::RequestOptions {
232            &mut self.0.options
233        }
234    }
235
236    /// The request builder for [BigQueryExportService::provision_big_query_export][crate::client::BigQueryExportService::provision_big_query_export] calls.
237    ///
238    /// # Example
239    /// ```
240    /// # use google_cloud_chronicle_v1::builder::big_query_export_service::ProvisionBigQueryExport;
241    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
242    ///
243    /// let builder = prepare_request_builder();
244    /// let response = builder.send().await?;
245    /// # Ok(()) }
246    ///
247    /// fn prepare_request_builder() -> ProvisionBigQueryExport {
248    ///   # panic!();
249    ///   // ... details omitted ...
250    /// }
251    /// ```
252    #[derive(Clone, Debug)]
253    pub struct ProvisionBigQueryExport(
254        RequestBuilder<crate::model::ProvisionBigQueryExportRequest>,
255    );
256
257    impl ProvisionBigQueryExport {
258        pub(crate) fn new(
259            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigQueryExportService>,
260        ) -> Self {
261            Self(RequestBuilder::new(stub))
262        }
263
264        /// Sets the full request, replacing any prior values.
265        pub fn with_request<V: Into<crate::model::ProvisionBigQueryExportRequest>>(
266            mut self,
267            v: V,
268        ) -> Self {
269            self.0.request = v.into();
270            self
271        }
272
273        /// Sets all the options, replacing any prior values.
274        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
275            self.0.options = v.into();
276            self
277        }
278
279        /// Sends the request.
280        pub async fn send(self) -> Result<crate::model::BigQueryExport> {
281            (*self.0.stub)
282                .provision_big_query_export(self.0.request, self.0.options)
283                .await
284                .map(crate::Response::into_body)
285        }
286
287        /// Sets the value of [parent][crate::model::ProvisionBigQueryExportRequest::parent].
288        ///
289        /// This is a **required** field for requests.
290        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
291            self.0.request.parent = v.into();
292            self
293        }
294    }
295
296    #[doc(hidden)]
297    impl crate::RequestBuilder for ProvisionBigQueryExport {
298        fn request_options(&mut self) -> &mut crate::RequestOptions {
299            &mut self.0.options
300        }
301    }
302
303    /// The request builder for [BigQueryExportService::list_operations][crate::client::BigQueryExportService::list_operations] calls.
304    ///
305    /// # Example
306    /// ```
307    /// # use google_cloud_chronicle_v1::builder::big_query_export_service::ListOperations;
308    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
309    /// use google_cloud_gax::paginator::ItemPaginator;
310    ///
311    /// let builder = prepare_request_builder();
312    /// let mut items = builder.by_item();
313    /// while let Some(result) = items.next().await {
314    ///   let item = result?;
315    /// }
316    /// # Ok(()) }
317    ///
318    /// fn prepare_request_builder() -> ListOperations {
319    ///   # panic!();
320    ///   // ... details omitted ...
321    /// }
322    /// ```
323    #[derive(Clone, Debug)]
324    pub struct ListOperations(
325        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
326    );
327
328    impl ListOperations {
329        pub(crate) fn new(
330            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigQueryExportService>,
331        ) -> Self {
332            Self(RequestBuilder::new(stub))
333        }
334
335        /// Sets the full request, replacing any prior values.
336        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
337            mut self,
338            v: V,
339        ) -> Self {
340            self.0.request = v.into();
341            self
342        }
343
344        /// Sets all the options, replacing any prior values.
345        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
346            self.0.options = v.into();
347            self
348        }
349
350        /// Sends the request.
351        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
352            (*self.0.stub)
353                .list_operations(self.0.request, self.0.options)
354                .await
355                .map(crate::Response::into_body)
356        }
357
358        /// Streams each page in the collection.
359        pub fn by_page(
360            self,
361        ) -> impl google_cloud_gax::paginator::Paginator<
362            google_cloud_longrunning::model::ListOperationsResponse,
363            crate::Error,
364        > {
365            use std::clone::Clone;
366            let token = self.0.request.page_token.clone();
367            let execute = move |token: String| {
368                let mut builder = self.clone();
369                builder.0.request = builder.0.request.set_page_token(token);
370                builder.send()
371            };
372            google_cloud_gax::paginator::internal::new_paginator(token, execute)
373        }
374
375        /// Streams each item in the collection.
376        pub fn by_item(
377            self,
378        ) -> impl google_cloud_gax::paginator::ItemPaginator<
379            google_cloud_longrunning::model::ListOperationsResponse,
380            crate::Error,
381        > {
382            use google_cloud_gax::paginator::Paginator;
383            self.by_page().items()
384        }
385
386        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
387        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
388            self.0.request.name = v.into();
389            self
390        }
391
392        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
393        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
394            self.0.request.filter = v.into();
395            self
396        }
397
398        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
399        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
400            self.0.request.page_size = v.into();
401            self
402        }
403
404        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
405        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
406            self.0.request.page_token = v.into();
407            self
408        }
409
410        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
411        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
412            self.0.request.return_partial_success = v.into();
413            self
414        }
415    }
416
417    #[doc(hidden)]
418    impl crate::RequestBuilder for ListOperations {
419        fn request_options(&mut self) -> &mut crate::RequestOptions {
420            &mut self.0.options
421        }
422    }
423
424    /// The request builder for [BigQueryExportService::get_operation][crate::client::BigQueryExportService::get_operation] calls.
425    ///
426    /// # Example
427    /// ```
428    /// # use google_cloud_chronicle_v1::builder::big_query_export_service::GetOperation;
429    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
430    ///
431    /// let builder = prepare_request_builder();
432    /// let response = builder.send().await?;
433    /// # Ok(()) }
434    ///
435    /// fn prepare_request_builder() -> GetOperation {
436    ///   # panic!();
437    ///   // ... details omitted ...
438    /// }
439    /// ```
440    #[derive(Clone, Debug)]
441    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
442
443    impl GetOperation {
444        pub(crate) fn new(
445            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigQueryExportService>,
446        ) -> Self {
447            Self(RequestBuilder::new(stub))
448        }
449
450        /// Sets the full request, replacing any prior values.
451        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
452            mut self,
453            v: V,
454        ) -> Self {
455            self.0.request = v.into();
456            self
457        }
458
459        /// Sets all the options, replacing any prior values.
460        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
461            self.0.options = v.into();
462            self
463        }
464
465        /// Sends the request.
466        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
467            (*self.0.stub)
468                .get_operation(self.0.request, self.0.options)
469                .await
470                .map(crate::Response::into_body)
471        }
472
473        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
474        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
475            self.0.request.name = v.into();
476            self
477        }
478    }
479
480    #[doc(hidden)]
481    impl crate::RequestBuilder for GetOperation {
482        fn request_options(&mut self) -> &mut crate::RequestOptions {
483            &mut self.0.options
484        }
485    }
486
487    /// The request builder for [BigQueryExportService::delete_operation][crate::client::BigQueryExportService::delete_operation] calls.
488    ///
489    /// # Example
490    /// ```
491    /// # use google_cloud_chronicle_v1::builder::big_query_export_service::DeleteOperation;
492    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
493    ///
494    /// let builder = prepare_request_builder();
495    /// let response = builder.send().await?;
496    /// # Ok(()) }
497    ///
498    /// fn prepare_request_builder() -> DeleteOperation {
499    ///   # panic!();
500    ///   // ... details omitted ...
501    /// }
502    /// ```
503    #[derive(Clone, Debug)]
504    pub struct DeleteOperation(
505        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
506    );
507
508    impl DeleteOperation {
509        pub(crate) fn new(
510            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigQueryExportService>,
511        ) -> Self {
512            Self(RequestBuilder::new(stub))
513        }
514
515        /// Sets the full request, replacing any prior values.
516        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
517            mut self,
518            v: V,
519        ) -> Self {
520            self.0.request = v.into();
521            self
522        }
523
524        /// Sets all the options, replacing any prior values.
525        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
526            self.0.options = v.into();
527            self
528        }
529
530        /// Sends the request.
531        pub async fn send(self) -> Result<()> {
532            (*self.0.stub)
533                .delete_operation(self.0.request, self.0.options)
534                .await
535                .map(crate::Response::into_body)
536        }
537
538        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
539        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
540            self.0.request.name = v.into();
541            self
542        }
543    }
544
545    #[doc(hidden)]
546    impl crate::RequestBuilder for DeleteOperation {
547        fn request_options(&mut self) -> &mut crate::RequestOptions {
548            &mut self.0.options
549        }
550    }
551
552    /// The request builder for [BigQueryExportService::cancel_operation][crate::client::BigQueryExportService::cancel_operation] calls.
553    ///
554    /// # Example
555    /// ```
556    /// # use google_cloud_chronicle_v1::builder::big_query_export_service::CancelOperation;
557    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
558    ///
559    /// let builder = prepare_request_builder();
560    /// let response = builder.send().await?;
561    /// # Ok(()) }
562    ///
563    /// fn prepare_request_builder() -> CancelOperation {
564    ///   # panic!();
565    ///   // ... details omitted ...
566    /// }
567    /// ```
568    #[derive(Clone, Debug)]
569    pub struct CancelOperation(
570        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
571    );
572
573    impl CancelOperation {
574        pub(crate) fn new(
575            stub: std::sync::Arc<dyn super::super::stub::dynamic::BigQueryExportService>,
576        ) -> Self {
577            Self(RequestBuilder::new(stub))
578        }
579
580        /// Sets the full request, replacing any prior values.
581        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
582            mut self,
583            v: V,
584        ) -> Self {
585            self.0.request = v.into();
586            self
587        }
588
589        /// Sets all the options, replacing any prior values.
590        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
591            self.0.options = v.into();
592            self
593        }
594
595        /// Sends the request.
596        pub async fn send(self) -> Result<()> {
597            (*self.0.stub)
598                .cancel_operation(self.0.request, self.0.options)
599                .await
600                .map(crate::Response::into_body)
601        }
602
603        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
604        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
605            self.0.request.name = v.into();
606            self
607        }
608    }
609
610    #[doc(hidden)]
611    impl crate::RequestBuilder for CancelOperation {
612        fn request_options(&mut self) -> &mut crate::RequestOptions {
613            &mut self.0.options
614        }
615    }
616}
617
618/// Request and client builders for [DashboardChartService][crate::client::DashboardChartService].
619pub mod dashboard_chart_service {
620    use crate::Result;
621
622    /// A builder for [DashboardChartService][crate::client::DashboardChartService].
623    ///
624    /// ```
625    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
626    /// # use google_cloud_chronicle_v1::*;
627    /// # use builder::dashboard_chart_service::ClientBuilder;
628    /// # use client::DashboardChartService;
629    /// let builder : ClientBuilder = DashboardChartService::builder();
630    /// let client = builder
631    ///     .with_endpoint("https://chronicle.googleapis.com")
632    ///     .build().await?;
633    /// # Ok(()) }
634    /// ```
635    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
636
637    pub(crate) mod client {
638        use super::super::super::client::DashboardChartService;
639        pub struct Factory;
640        impl crate::ClientFactory for Factory {
641            type Client = DashboardChartService;
642            type Credentials = gaxi::options::Credentials;
643            async fn build(
644                self,
645                config: gaxi::options::ClientConfig,
646            ) -> crate::ClientBuilderResult<Self::Client> {
647                Self::Client::new(config).await
648            }
649        }
650    }
651
652    /// Common implementation for [crate::client::DashboardChartService] request builders.
653    #[derive(Clone, Debug)]
654    pub(crate) struct RequestBuilder<R: std::default::Default> {
655        stub: std::sync::Arc<dyn super::super::stub::dynamic::DashboardChartService>,
656        request: R,
657        options: crate::RequestOptions,
658    }
659
660    impl<R> RequestBuilder<R>
661    where
662        R: std::default::Default,
663    {
664        pub(crate) fn new(
665            stub: std::sync::Arc<dyn super::super::stub::dynamic::DashboardChartService>,
666        ) -> Self {
667            Self {
668                stub,
669                request: R::default(),
670                options: crate::RequestOptions::default(),
671            }
672        }
673    }
674
675    /// The request builder for [DashboardChartService::get_dashboard_chart][crate::client::DashboardChartService::get_dashboard_chart] calls.
676    ///
677    /// # Example
678    /// ```
679    /// # use google_cloud_chronicle_v1::builder::dashboard_chart_service::GetDashboardChart;
680    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
681    ///
682    /// let builder = prepare_request_builder();
683    /// let response = builder.send().await?;
684    /// # Ok(()) }
685    ///
686    /// fn prepare_request_builder() -> GetDashboardChart {
687    ///   # panic!();
688    ///   // ... details omitted ...
689    /// }
690    /// ```
691    #[derive(Clone, Debug)]
692    pub struct GetDashboardChart(RequestBuilder<crate::model::GetDashboardChartRequest>);
693
694    impl GetDashboardChart {
695        pub(crate) fn new(
696            stub: std::sync::Arc<dyn super::super::stub::dynamic::DashboardChartService>,
697        ) -> Self {
698            Self(RequestBuilder::new(stub))
699        }
700
701        /// Sets the full request, replacing any prior values.
702        pub fn with_request<V: Into<crate::model::GetDashboardChartRequest>>(
703            mut self,
704            v: V,
705        ) -> Self {
706            self.0.request = v.into();
707            self
708        }
709
710        /// Sets all the options, replacing any prior values.
711        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
712            self.0.options = v.into();
713            self
714        }
715
716        /// Sends the request.
717        pub async fn send(self) -> Result<crate::model::DashboardChart> {
718            (*self.0.stub)
719                .get_dashboard_chart(self.0.request, self.0.options)
720                .await
721                .map(crate::Response::into_body)
722        }
723
724        /// Sets the value of [name][crate::model::GetDashboardChartRequest::name].
725        ///
726        /// This is a **required** field for requests.
727        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
728            self.0.request.name = v.into();
729            self
730        }
731    }
732
733    #[doc(hidden)]
734    impl crate::RequestBuilder for GetDashboardChart {
735        fn request_options(&mut self) -> &mut crate::RequestOptions {
736            &mut self.0.options
737        }
738    }
739
740    /// The request builder for [DashboardChartService::batch_get_dashboard_charts][crate::client::DashboardChartService::batch_get_dashboard_charts] calls.
741    ///
742    /// # Example
743    /// ```
744    /// # use google_cloud_chronicle_v1::builder::dashboard_chart_service::BatchGetDashboardCharts;
745    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
746    ///
747    /// let builder = prepare_request_builder();
748    /// let response = builder.send().await?;
749    /// # Ok(()) }
750    ///
751    /// fn prepare_request_builder() -> BatchGetDashboardCharts {
752    ///   # panic!();
753    ///   // ... details omitted ...
754    /// }
755    /// ```
756    #[derive(Clone, Debug)]
757    pub struct BatchGetDashboardCharts(
758        RequestBuilder<crate::model::BatchGetDashboardChartsRequest>,
759    );
760
761    impl BatchGetDashboardCharts {
762        pub(crate) fn new(
763            stub: std::sync::Arc<dyn super::super::stub::dynamic::DashboardChartService>,
764        ) -> Self {
765            Self(RequestBuilder::new(stub))
766        }
767
768        /// Sets the full request, replacing any prior values.
769        pub fn with_request<V: Into<crate::model::BatchGetDashboardChartsRequest>>(
770            mut self,
771            v: V,
772        ) -> Self {
773            self.0.request = v.into();
774            self
775        }
776
777        /// Sets all the options, replacing any prior values.
778        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
779            self.0.options = v.into();
780            self
781        }
782
783        /// Sends the request.
784        pub async fn send(self) -> Result<crate::model::BatchGetDashboardChartsResponse> {
785            (*self.0.stub)
786                .batch_get_dashboard_charts(self.0.request, self.0.options)
787                .await
788                .map(crate::Response::into_body)
789        }
790
791        /// Sets the value of [parent][crate::model::BatchGetDashboardChartsRequest::parent].
792        ///
793        /// This is a **required** field for requests.
794        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
795            self.0.request.parent = v.into();
796            self
797        }
798
799        /// Sets the value of [names][crate::model::BatchGetDashboardChartsRequest::names].
800        ///
801        /// This is a **required** field for requests.
802        pub fn set_names<T, V>(mut self, v: T) -> Self
803        where
804            T: std::iter::IntoIterator<Item = V>,
805            V: std::convert::Into<std::string::String>,
806        {
807            use std::iter::Iterator;
808            self.0.request.names = v.into_iter().map(|i| i.into()).collect();
809            self
810        }
811    }
812
813    #[doc(hidden)]
814    impl crate::RequestBuilder for BatchGetDashboardCharts {
815        fn request_options(&mut self) -> &mut crate::RequestOptions {
816            &mut self.0.options
817        }
818    }
819
820    /// The request builder for [DashboardChartService::list_operations][crate::client::DashboardChartService::list_operations] calls.
821    ///
822    /// # Example
823    /// ```
824    /// # use google_cloud_chronicle_v1::builder::dashboard_chart_service::ListOperations;
825    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
826    /// use google_cloud_gax::paginator::ItemPaginator;
827    ///
828    /// let builder = prepare_request_builder();
829    /// let mut items = builder.by_item();
830    /// while let Some(result) = items.next().await {
831    ///   let item = result?;
832    /// }
833    /// # Ok(()) }
834    ///
835    /// fn prepare_request_builder() -> ListOperations {
836    ///   # panic!();
837    ///   // ... details omitted ...
838    /// }
839    /// ```
840    #[derive(Clone, Debug)]
841    pub struct ListOperations(
842        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
843    );
844
845    impl ListOperations {
846        pub(crate) fn new(
847            stub: std::sync::Arc<dyn super::super::stub::dynamic::DashboardChartService>,
848        ) -> Self {
849            Self(RequestBuilder::new(stub))
850        }
851
852        /// Sets the full request, replacing any prior values.
853        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
854            mut self,
855            v: V,
856        ) -> Self {
857            self.0.request = v.into();
858            self
859        }
860
861        /// Sets all the options, replacing any prior values.
862        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
863            self.0.options = v.into();
864            self
865        }
866
867        /// Sends the request.
868        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
869            (*self.0.stub)
870                .list_operations(self.0.request, self.0.options)
871                .await
872                .map(crate::Response::into_body)
873        }
874
875        /// Streams each page in the collection.
876        pub fn by_page(
877            self,
878        ) -> impl google_cloud_gax::paginator::Paginator<
879            google_cloud_longrunning::model::ListOperationsResponse,
880            crate::Error,
881        > {
882            use std::clone::Clone;
883            let token = self.0.request.page_token.clone();
884            let execute = move |token: String| {
885                let mut builder = self.clone();
886                builder.0.request = builder.0.request.set_page_token(token);
887                builder.send()
888            };
889            google_cloud_gax::paginator::internal::new_paginator(token, execute)
890        }
891
892        /// Streams each item in the collection.
893        pub fn by_item(
894            self,
895        ) -> impl google_cloud_gax::paginator::ItemPaginator<
896            google_cloud_longrunning::model::ListOperationsResponse,
897            crate::Error,
898        > {
899            use google_cloud_gax::paginator::Paginator;
900            self.by_page().items()
901        }
902
903        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
904        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
905            self.0.request.name = v.into();
906            self
907        }
908
909        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
910        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
911            self.0.request.filter = v.into();
912            self
913        }
914
915        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
916        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
917            self.0.request.page_size = v.into();
918            self
919        }
920
921        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
922        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
923            self.0.request.page_token = v.into();
924            self
925        }
926
927        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
928        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
929            self.0.request.return_partial_success = v.into();
930            self
931        }
932    }
933
934    #[doc(hidden)]
935    impl crate::RequestBuilder for ListOperations {
936        fn request_options(&mut self) -> &mut crate::RequestOptions {
937            &mut self.0.options
938        }
939    }
940
941    /// The request builder for [DashboardChartService::get_operation][crate::client::DashboardChartService::get_operation] calls.
942    ///
943    /// # Example
944    /// ```
945    /// # use google_cloud_chronicle_v1::builder::dashboard_chart_service::GetOperation;
946    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
947    ///
948    /// let builder = prepare_request_builder();
949    /// let response = builder.send().await?;
950    /// # Ok(()) }
951    ///
952    /// fn prepare_request_builder() -> GetOperation {
953    ///   # panic!();
954    ///   // ... details omitted ...
955    /// }
956    /// ```
957    #[derive(Clone, Debug)]
958    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
959
960    impl GetOperation {
961        pub(crate) fn new(
962            stub: std::sync::Arc<dyn super::super::stub::dynamic::DashboardChartService>,
963        ) -> Self {
964            Self(RequestBuilder::new(stub))
965        }
966
967        /// Sets the full request, replacing any prior values.
968        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
969            mut self,
970            v: V,
971        ) -> Self {
972            self.0.request = v.into();
973            self
974        }
975
976        /// Sets all the options, replacing any prior values.
977        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
978            self.0.options = v.into();
979            self
980        }
981
982        /// Sends the request.
983        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
984            (*self.0.stub)
985                .get_operation(self.0.request, self.0.options)
986                .await
987                .map(crate::Response::into_body)
988        }
989
990        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
991        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
992            self.0.request.name = v.into();
993            self
994        }
995    }
996
997    #[doc(hidden)]
998    impl crate::RequestBuilder for GetOperation {
999        fn request_options(&mut self) -> &mut crate::RequestOptions {
1000            &mut self.0.options
1001        }
1002    }
1003
1004    /// The request builder for [DashboardChartService::delete_operation][crate::client::DashboardChartService::delete_operation] calls.
1005    ///
1006    /// # Example
1007    /// ```
1008    /// # use google_cloud_chronicle_v1::builder::dashboard_chart_service::DeleteOperation;
1009    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
1010    ///
1011    /// let builder = prepare_request_builder();
1012    /// let response = builder.send().await?;
1013    /// # Ok(()) }
1014    ///
1015    /// fn prepare_request_builder() -> DeleteOperation {
1016    ///   # panic!();
1017    ///   // ... details omitted ...
1018    /// }
1019    /// ```
1020    #[derive(Clone, Debug)]
1021    pub struct DeleteOperation(
1022        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
1023    );
1024
1025    impl DeleteOperation {
1026        pub(crate) fn new(
1027            stub: std::sync::Arc<dyn super::super::stub::dynamic::DashboardChartService>,
1028        ) -> Self {
1029            Self(RequestBuilder::new(stub))
1030        }
1031
1032        /// Sets the full request, replacing any prior values.
1033        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
1034            mut self,
1035            v: V,
1036        ) -> Self {
1037            self.0.request = v.into();
1038            self
1039        }
1040
1041        /// Sets all the options, replacing any prior values.
1042        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1043            self.0.options = v.into();
1044            self
1045        }
1046
1047        /// Sends the request.
1048        pub async fn send(self) -> Result<()> {
1049            (*self.0.stub)
1050                .delete_operation(self.0.request, self.0.options)
1051                .await
1052                .map(crate::Response::into_body)
1053        }
1054
1055        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
1056        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1057            self.0.request.name = v.into();
1058            self
1059        }
1060    }
1061
1062    #[doc(hidden)]
1063    impl crate::RequestBuilder for DeleteOperation {
1064        fn request_options(&mut self) -> &mut crate::RequestOptions {
1065            &mut self.0.options
1066        }
1067    }
1068
1069    /// The request builder for [DashboardChartService::cancel_operation][crate::client::DashboardChartService::cancel_operation] calls.
1070    ///
1071    /// # Example
1072    /// ```
1073    /// # use google_cloud_chronicle_v1::builder::dashboard_chart_service::CancelOperation;
1074    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
1075    ///
1076    /// let builder = prepare_request_builder();
1077    /// let response = builder.send().await?;
1078    /// # Ok(()) }
1079    ///
1080    /// fn prepare_request_builder() -> CancelOperation {
1081    ///   # panic!();
1082    ///   // ... details omitted ...
1083    /// }
1084    /// ```
1085    #[derive(Clone, Debug)]
1086    pub struct CancelOperation(
1087        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
1088    );
1089
1090    impl CancelOperation {
1091        pub(crate) fn new(
1092            stub: std::sync::Arc<dyn super::super::stub::dynamic::DashboardChartService>,
1093        ) -> Self {
1094            Self(RequestBuilder::new(stub))
1095        }
1096
1097        /// Sets the full request, replacing any prior values.
1098        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
1099            mut self,
1100            v: V,
1101        ) -> Self {
1102            self.0.request = v.into();
1103            self
1104        }
1105
1106        /// Sets all the options, replacing any prior values.
1107        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1108            self.0.options = v.into();
1109            self
1110        }
1111
1112        /// Sends the request.
1113        pub async fn send(self) -> Result<()> {
1114            (*self.0.stub)
1115                .cancel_operation(self.0.request, self.0.options)
1116                .await
1117                .map(crate::Response::into_body)
1118        }
1119
1120        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
1121        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1122            self.0.request.name = v.into();
1123            self
1124        }
1125    }
1126
1127    #[doc(hidden)]
1128    impl crate::RequestBuilder for CancelOperation {
1129        fn request_options(&mut self) -> &mut crate::RequestOptions {
1130            &mut self.0.options
1131        }
1132    }
1133}
1134
1135/// Request and client builders for [DashboardQueryService][crate::client::DashboardQueryService].
1136pub mod dashboard_query_service {
1137    use crate::Result;
1138
1139    /// A builder for [DashboardQueryService][crate::client::DashboardQueryService].
1140    ///
1141    /// ```
1142    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
1143    /// # use google_cloud_chronicle_v1::*;
1144    /// # use builder::dashboard_query_service::ClientBuilder;
1145    /// # use client::DashboardQueryService;
1146    /// let builder : ClientBuilder = DashboardQueryService::builder();
1147    /// let client = builder
1148    ///     .with_endpoint("https://chronicle.googleapis.com")
1149    ///     .build().await?;
1150    /// # Ok(()) }
1151    /// ```
1152    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
1153
1154    pub(crate) mod client {
1155        use super::super::super::client::DashboardQueryService;
1156        pub struct Factory;
1157        impl crate::ClientFactory for Factory {
1158            type Client = DashboardQueryService;
1159            type Credentials = gaxi::options::Credentials;
1160            async fn build(
1161                self,
1162                config: gaxi::options::ClientConfig,
1163            ) -> crate::ClientBuilderResult<Self::Client> {
1164                Self::Client::new(config).await
1165            }
1166        }
1167    }
1168
1169    /// Common implementation for [crate::client::DashboardQueryService] request builders.
1170    #[derive(Clone, Debug)]
1171    pub(crate) struct RequestBuilder<R: std::default::Default> {
1172        stub: std::sync::Arc<dyn super::super::stub::dynamic::DashboardQueryService>,
1173        request: R,
1174        options: crate::RequestOptions,
1175    }
1176
1177    impl<R> RequestBuilder<R>
1178    where
1179        R: std::default::Default,
1180    {
1181        pub(crate) fn new(
1182            stub: std::sync::Arc<dyn super::super::stub::dynamic::DashboardQueryService>,
1183        ) -> Self {
1184            Self {
1185                stub,
1186                request: R::default(),
1187                options: crate::RequestOptions::default(),
1188            }
1189        }
1190    }
1191
1192    /// The request builder for [DashboardQueryService::get_dashboard_query][crate::client::DashboardQueryService::get_dashboard_query] calls.
1193    ///
1194    /// # Example
1195    /// ```
1196    /// # use google_cloud_chronicle_v1::builder::dashboard_query_service::GetDashboardQuery;
1197    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
1198    ///
1199    /// let builder = prepare_request_builder();
1200    /// let response = builder.send().await?;
1201    /// # Ok(()) }
1202    ///
1203    /// fn prepare_request_builder() -> GetDashboardQuery {
1204    ///   # panic!();
1205    ///   // ... details omitted ...
1206    /// }
1207    /// ```
1208    #[derive(Clone, Debug)]
1209    pub struct GetDashboardQuery(RequestBuilder<crate::model::GetDashboardQueryRequest>);
1210
1211    impl GetDashboardQuery {
1212        pub(crate) fn new(
1213            stub: std::sync::Arc<dyn super::super::stub::dynamic::DashboardQueryService>,
1214        ) -> Self {
1215            Self(RequestBuilder::new(stub))
1216        }
1217
1218        /// Sets the full request, replacing any prior values.
1219        pub fn with_request<V: Into<crate::model::GetDashboardQueryRequest>>(
1220            mut self,
1221            v: V,
1222        ) -> Self {
1223            self.0.request = v.into();
1224            self
1225        }
1226
1227        /// Sets all the options, replacing any prior values.
1228        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1229            self.0.options = v.into();
1230            self
1231        }
1232
1233        /// Sends the request.
1234        pub async fn send(self) -> Result<crate::model::DashboardQuery> {
1235            (*self.0.stub)
1236                .get_dashboard_query(self.0.request, self.0.options)
1237                .await
1238                .map(crate::Response::into_body)
1239        }
1240
1241        /// Sets the value of [name][crate::model::GetDashboardQueryRequest::name].
1242        ///
1243        /// This is a **required** field for requests.
1244        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1245            self.0.request.name = v.into();
1246            self
1247        }
1248    }
1249
1250    #[doc(hidden)]
1251    impl crate::RequestBuilder for GetDashboardQuery {
1252        fn request_options(&mut self) -> &mut crate::RequestOptions {
1253            &mut self.0.options
1254        }
1255    }
1256
1257    /// The request builder for [DashboardQueryService::execute_dashboard_query][crate::client::DashboardQueryService::execute_dashboard_query] calls.
1258    ///
1259    /// # Example
1260    /// ```
1261    /// # use google_cloud_chronicle_v1::builder::dashboard_query_service::ExecuteDashboardQuery;
1262    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
1263    ///
1264    /// let builder = prepare_request_builder();
1265    /// let response = builder.send().await?;
1266    /// # Ok(()) }
1267    ///
1268    /// fn prepare_request_builder() -> ExecuteDashboardQuery {
1269    ///   # panic!();
1270    ///   // ... details omitted ...
1271    /// }
1272    /// ```
1273    #[derive(Clone, Debug)]
1274    pub struct ExecuteDashboardQuery(RequestBuilder<crate::model::ExecuteDashboardQueryRequest>);
1275
1276    impl ExecuteDashboardQuery {
1277        pub(crate) fn new(
1278            stub: std::sync::Arc<dyn super::super::stub::dynamic::DashboardQueryService>,
1279        ) -> Self {
1280            Self(RequestBuilder::new(stub))
1281        }
1282
1283        /// Sets the full request, replacing any prior values.
1284        pub fn with_request<V: Into<crate::model::ExecuteDashboardQueryRequest>>(
1285            mut self,
1286            v: V,
1287        ) -> Self {
1288            self.0.request = v.into();
1289            self
1290        }
1291
1292        /// Sets all the options, replacing any prior values.
1293        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1294            self.0.options = v.into();
1295            self
1296        }
1297
1298        /// Sends the request.
1299        pub async fn send(self) -> Result<crate::model::ExecuteDashboardQueryResponse> {
1300            (*self.0.stub)
1301                .execute_dashboard_query(self.0.request, self.0.options)
1302                .await
1303                .map(crate::Response::into_body)
1304        }
1305
1306        /// Sets the value of [parent][crate::model::ExecuteDashboardQueryRequest::parent].
1307        ///
1308        /// This is a **required** field for requests.
1309        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1310            self.0.request.parent = v.into();
1311            self
1312        }
1313
1314        /// Sets the value of [query][crate::model::ExecuteDashboardQueryRequest::query].
1315        ///
1316        /// This is a **required** field for requests.
1317        pub fn set_query<T>(mut self, v: T) -> Self
1318        where
1319            T: std::convert::Into<crate::model::DashboardQuery>,
1320        {
1321            self.0.request.query = std::option::Option::Some(v.into());
1322            self
1323        }
1324
1325        /// Sets or clears the value of [query][crate::model::ExecuteDashboardQueryRequest::query].
1326        ///
1327        /// This is a **required** field for requests.
1328        pub fn set_or_clear_query<T>(mut self, v: std::option::Option<T>) -> Self
1329        where
1330            T: std::convert::Into<crate::model::DashboardQuery>,
1331        {
1332            self.0.request.query = v.map(|x| x.into());
1333            self
1334        }
1335
1336        /// Sets the value of [filters][crate::model::ExecuteDashboardQueryRequest::filters].
1337        pub fn set_filters<T, V>(mut self, v: T) -> Self
1338        where
1339            T: std::iter::IntoIterator<Item = V>,
1340            V: std::convert::Into<crate::model::DashboardFilter>,
1341        {
1342            use std::iter::Iterator;
1343            self.0.request.filters = v.into_iter().map(|i| i.into()).collect();
1344            self
1345        }
1346
1347        /// Sets the value of [clear_cache][crate::model::ExecuteDashboardQueryRequest::clear_cache].
1348        pub fn set_clear_cache<T: Into<bool>>(mut self, v: T) -> Self {
1349            self.0.request.clear_cache = v.into();
1350            self
1351        }
1352
1353        /// Sets the value of [use_previous_time_range][crate::model::ExecuteDashboardQueryRequest::use_previous_time_range].
1354        pub fn set_use_previous_time_range<T: Into<bool>>(mut self, v: T) -> Self {
1355            self.0.request.use_previous_time_range = v.into();
1356            self
1357        }
1358    }
1359
1360    #[doc(hidden)]
1361    impl crate::RequestBuilder for ExecuteDashboardQuery {
1362        fn request_options(&mut self) -> &mut crate::RequestOptions {
1363            &mut self.0.options
1364        }
1365    }
1366
1367    /// The request builder for [DashboardQueryService::list_operations][crate::client::DashboardQueryService::list_operations] calls.
1368    ///
1369    /// # Example
1370    /// ```
1371    /// # use google_cloud_chronicle_v1::builder::dashboard_query_service::ListOperations;
1372    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
1373    /// use google_cloud_gax::paginator::ItemPaginator;
1374    ///
1375    /// let builder = prepare_request_builder();
1376    /// let mut items = builder.by_item();
1377    /// while let Some(result) = items.next().await {
1378    ///   let item = result?;
1379    /// }
1380    /// # Ok(()) }
1381    ///
1382    /// fn prepare_request_builder() -> ListOperations {
1383    ///   # panic!();
1384    ///   // ... details omitted ...
1385    /// }
1386    /// ```
1387    #[derive(Clone, Debug)]
1388    pub struct ListOperations(
1389        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
1390    );
1391
1392    impl ListOperations {
1393        pub(crate) fn new(
1394            stub: std::sync::Arc<dyn super::super::stub::dynamic::DashboardQueryService>,
1395        ) -> Self {
1396            Self(RequestBuilder::new(stub))
1397        }
1398
1399        /// Sets the full request, replacing any prior values.
1400        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
1401            mut self,
1402            v: V,
1403        ) -> Self {
1404            self.0.request = v.into();
1405            self
1406        }
1407
1408        /// Sets all the options, replacing any prior values.
1409        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1410            self.0.options = v.into();
1411            self
1412        }
1413
1414        /// Sends the request.
1415        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
1416            (*self.0.stub)
1417                .list_operations(self.0.request, self.0.options)
1418                .await
1419                .map(crate::Response::into_body)
1420        }
1421
1422        /// Streams each page in the collection.
1423        pub fn by_page(
1424            self,
1425        ) -> impl google_cloud_gax::paginator::Paginator<
1426            google_cloud_longrunning::model::ListOperationsResponse,
1427            crate::Error,
1428        > {
1429            use std::clone::Clone;
1430            let token = self.0.request.page_token.clone();
1431            let execute = move |token: String| {
1432                let mut builder = self.clone();
1433                builder.0.request = builder.0.request.set_page_token(token);
1434                builder.send()
1435            };
1436            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1437        }
1438
1439        /// Streams each item in the collection.
1440        pub fn by_item(
1441            self,
1442        ) -> impl google_cloud_gax::paginator::ItemPaginator<
1443            google_cloud_longrunning::model::ListOperationsResponse,
1444            crate::Error,
1445        > {
1446            use google_cloud_gax::paginator::Paginator;
1447            self.by_page().items()
1448        }
1449
1450        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
1451        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1452            self.0.request.name = v.into();
1453            self
1454        }
1455
1456        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
1457        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1458            self.0.request.filter = v.into();
1459            self
1460        }
1461
1462        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
1463        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1464            self.0.request.page_size = v.into();
1465            self
1466        }
1467
1468        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
1469        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1470            self.0.request.page_token = v.into();
1471            self
1472        }
1473
1474        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
1475        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
1476            self.0.request.return_partial_success = v.into();
1477            self
1478        }
1479    }
1480
1481    #[doc(hidden)]
1482    impl crate::RequestBuilder for ListOperations {
1483        fn request_options(&mut self) -> &mut crate::RequestOptions {
1484            &mut self.0.options
1485        }
1486    }
1487
1488    /// The request builder for [DashboardQueryService::get_operation][crate::client::DashboardQueryService::get_operation] calls.
1489    ///
1490    /// # Example
1491    /// ```
1492    /// # use google_cloud_chronicle_v1::builder::dashboard_query_service::GetOperation;
1493    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
1494    ///
1495    /// let builder = prepare_request_builder();
1496    /// let response = builder.send().await?;
1497    /// # Ok(()) }
1498    ///
1499    /// fn prepare_request_builder() -> GetOperation {
1500    ///   # panic!();
1501    ///   // ... details omitted ...
1502    /// }
1503    /// ```
1504    #[derive(Clone, Debug)]
1505    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
1506
1507    impl GetOperation {
1508        pub(crate) fn new(
1509            stub: std::sync::Arc<dyn super::super::stub::dynamic::DashboardQueryService>,
1510        ) -> Self {
1511            Self(RequestBuilder::new(stub))
1512        }
1513
1514        /// Sets the full request, replacing any prior values.
1515        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
1516            mut self,
1517            v: V,
1518        ) -> Self {
1519            self.0.request = v.into();
1520            self
1521        }
1522
1523        /// Sets all the options, replacing any prior values.
1524        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1525            self.0.options = v.into();
1526            self
1527        }
1528
1529        /// Sends the request.
1530        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1531            (*self.0.stub)
1532                .get_operation(self.0.request, self.0.options)
1533                .await
1534                .map(crate::Response::into_body)
1535        }
1536
1537        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
1538        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1539            self.0.request.name = v.into();
1540            self
1541        }
1542    }
1543
1544    #[doc(hidden)]
1545    impl crate::RequestBuilder for GetOperation {
1546        fn request_options(&mut self) -> &mut crate::RequestOptions {
1547            &mut self.0.options
1548        }
1549    }
1550
1551    /// The request builder for [DashboardQueryService::delete_operation][crate::client::DashboardQueryService::delete_operation] calls.
1552    ///
1553    /// # Example
1554    /// ```
1555    /// # use google_cloud_chronicle_v1::builder::dashboard_query_service::DeleteOperation;
1556    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
1557    ///
1558    /// let builder = prepare_request_builder();
1559    /// let response = builder.send().await?;
1560    /// # Ok(()) }
1561    ///
1562    /// fn prepare_request_builder() -> DeleteOperation {
1563    ///   # panic!();
1564    ///   // ... details omitted ...
1565    /// }
1566    /// ```
1567    #[derive(Clone, Debug)]
1568    pub struct DeleteOperation(
1569        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
1570    );
1571
1572    impl DeleteOperation {
1573        pub(crate) fn new(
1574            stub: std::sync::Arc<dyn super::super::stub::dynamic::DashboardQueryService>,
1575        ) -> Self {
1576            Self(RequestBuilder::new(stub))
1577        }
1578
1579        /// Sets the full request, replacing any prior values.
1580        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
1581            mut self,
1582            v: V,
1583        ) -> Self {
1584            self.0.request = v.into();
1585            self
1586        }
1587
1588        /// Sets all the options, replacing any prior values.
1589        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1590            self.0.options = v.into();
1591            self
1592        }
1593
1594        /// Sends the request.
1595        pub async fn send(self) -> Result<()> {
1596            (*self.0.stub)
1597                .delete_operation(self.0.request, self.0.options)
1598                .await
1599                .map(crate::Response::into_body)
1600        }
1601
1602        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
1603        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1604            self.0.request.name = v.into();
1605            self
1606        }
1607    }
1608
1609    #[doc(hidden)]
1610    impl crate::RequestBuilder for DeleteOperation {
1611        fn request_options(&mut self) -> &mut crate::RequestOptions {
1612            &mut self.0.options
1613        }
1614    }
1615
1616    /// The request builder for [DashboardQueryService::cancel_operation][crate::client::DashboardQueryService::cancel_operation] calls.
1617    ///
1618    /// # Example
1619    /// ```
1620    /// # use google_cloud_chronicle_v1::builder::dashboard_query_service::CancelOperation;
1621    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
1622    ///
1623    /// let builder = prepare_request_builder();
1624    /// let response = builder.send().await?;
1625    /// # Ok(()) }
1626    ///
1627    /// fn prepare_request_builder() -> CancelOperation {
1628    ///   # panic!();
1629    ///   // ... details omitted ...
1630    /// }
1631    /// ```
1632    #[derive(Clone, Debug)]
1633    pub struct CancelOperation(
1634        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
1635    );
1636
1637    impl CancelOperation {
1638        pub(crate) fn new(
1639            stub: std::sync::Arc<dyn super::super::stub::dynamic::DashboardQueryService>,
1640        ) -> Self {
1641            Self(RequestBuilder::new(stub))
1642        }
1643
1644        /// Sets the full request, replacing any prior values.
1645        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
1646            mut self,
1647            v: V,
1648        ) -> Self {
1649            self.0.request = v.into();
1650            self
1651        }
1652
1653        /// Sets all the options, replacing any prior values.
1654        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1655            self.0.options = v.into();
1656            self
1657        }
1658
1659        /// Sends the request.
1660        pub async fn send(self) -> Result<()> {
1661            (*self.0.stub)
1662                .cancel_operation(self.0.request, self.0.options)
1663                .await
1664                .map(crate::Response::into_body)
1665        }
1666
1667        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
1668        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1669            self.0.request.name = v.into();
1670            self
1671        }
1672    }
1673
1674    #[doc(hidden)]
1675    impl crate::RequestBuilder for CancelOperation {
1676        fn request_options(&mut self) -> &mut crate::RequestOptions {
1677            &mut self.0.options
1678        }
1679    }
1680}
1681
1682/// Request and client builders for [DataAccessControlService][crate::client::DataAccessControlService].
1683pub mod data_access_control_service {
1684    use crate::Result;
1685
1686    /// A builder for [DataAccessControlService][crate::client::DataAccessControlService].
1687    ///
1688    /// ```
1689    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
1690    /// # use google_cloud_chronicle_v1::*;
1691    /// # use builder::data_access_control_service::ClientBuilder;
1692    /// # use client::DataAccessControlService;
1693    /// let builder : ClientBuilder = DataAccessControlService::builder();
1694    /// let client = builder
1695    ///     .with_endpoint("https://chronicle.googleapis.com")
1696    ///     .build().await?;
1697    /// # Ok(()) }
1698    /// ```
1699    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
1700
1701    pub(crate) mod client {
1702        use super::super::super::client::DataAccessControlService;
1703        pub struct Factory;
1704        impl crate::ClientFactory for Factory {
1705            type Client = DataAccessControlService;
1706            type Credentials = gaxi::options::Credentials;
1707            async fn build(
1708                self,
1709                config: gaxi::options::ClientConfig,
1710            ) -> crate::ClientBuilderResult<Self::Client> {
1711                Self::Client::new(config).await
1712            }
1713        }
1714    }
1715
1716    /// Common implementation for [crate::client::DataAccessControlService] request builders.
1717    #[derive(Clone, Debug)]
1718    pub(crate) struct RequestBuilder<R: std::default::Default> {
1719        stub: std::sync::Arc<dyn super::super::stub::dynamic::DataAccessControlService>,
1720        request: R,
1721        options: crate::RequestOptions,
1722    }
1723
1724    impl<R> RequestBuilder<R>
1725    where
1726        R: std::default::Default,
1727    {
1728        pub(crate) fn new(
1729            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataAccessControlService>,
1730        ) -> Self {
1731            Self {
1732                stub,
1733                request: R::default(),
1734                options: crate::RequestOptions::default(),
1735            }
1736        }
1737    }
1738
1739    /// The request builder for [DataAccessControlService::create_data_access_label][crate::client::DataAccessControlService::create_data_access_label] calls.
1740    ///
1741    /// # Example
1742    /// ```
1743    /// # use google_cloud_chronicle_v1::builder::data_access_control_service::CreateDataAccessLabel;
1744    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
1745    ///
1746    /// let builder = prepare_request_builder();
1747    /// let response = builder.send().await?;
1748    /// # Ok(()) }
1749    ///
1750    /// fn prepare_request_builder() -> CreateDataAccessLabel {
1751    ///   # panic!();
1752    ///   // ... details omitted ...
1753    /// }
1754    /// ```
1755    #[derive(Clone, Debug)]
1756    pub struct CreateDataAccessLabel(RequestBuilder<crate::model::CreateDataAccessLabelRequest>);
1757
1758    impl CreateDataAccessLabel {
1759        pub(crate) fn new(
1760            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataAccessControlService>,
1761        ) -> Self {
1762            Self(RequestBuilder::new(stub))
1763        }
1764
1765        /// Sets the full request, replacing any prior values.
1766        pub fn with_request<V: Into<crate::model::CreateDataAccessLabelRequest>>(
1767            mut self,
1768            v: V,
1769        ) -> Self {
1770            self.0.request = v.into();
1771            self
1772        }
1773
1774        /// Sets all the options, replacing any prior values.
1775        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1776            self.0.options = v.into();
1777            self
1778        }
1779
1780        /// Sends the request.
1781        pub async fn send(self) -> Result<crate::model::DataAccessLabel> {
1782            (*self.0.stub)
1783                .create_data_access_label(self.0.request, self.0.options)
1784                .await
1785                .map(crate::Response::into_body)
1786        }
1787
1788        /// Sets the value of [parent][crate::model::CreateDataAccessLabelRequest::parent].
1789        ///
1790        /// This is a **required** field for requests.
1791        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1792            self.0.request.parent = v.into();
1793            self
1794        }
1795
1796        /// Sets the value of [data_access_label][crate::model::CreateDataAccessLabelRequest::data_access_label].
1797        ///
1798        /// This is a **required** field for requests.
1799        pub fn set_data_access_label<T>(mut self, v: T) -> Self
1800        where
1801            T: std::convert::Into<crate::model::DataAccessLabel>,
1802        {
1803            self.0.request.data_access_label = std::option::Option::Some(v.into());
1804            self
1805        }
1806
1807        /// Sets or clears the value of [data_access_label][crate::model::CreateDataAccessLabelRequest::data_access_label].
1808        ///
1809        /// This is a **required** field for requests.
1810        pub fn set_or_clear_data_access_label<T>(mut self, v: std::option::Option<T>) -> Self
1811        where
1812            T: std::convert::Into<crate::model::DataAccessLabel>,
1813        {
1814            self.0.request.data_access_label = v.map(|x| x.into());
1815            self
1816        }
1817
1818        /// Sets the value of [data_access_label_id][crate::model::CreateDataAccessLabelRequest::data_access_label_id].
1819        ///
1820        /// This is a **required** field for requests.
1821        pub fn set_data_access_label_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1822            self.0.request.data_access_label_id = v.into();
1823            self
1824        }
1825    }
1826
1827    #[doc(hidden)]
1828    impl crate::RequestBuilder for CreateDataAccessLabel {
1829        fn request_options(&mut self) -> &mut crate::RequestOptions {
1830            &mut self.0.options
1831        }
1832    }
1833
1834    /// The request builder for [DataAccessControlService::get_data_access_label][crate::client::DataAccessControlService::get_data_access_label] calls.
1835    ///
1836    /// # Example
1837    /// ```
1838    /// # use google_cloud_chronicle_v1::builder::data_access_control_service::GetDataAccessLabel;
1839    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
1840    ///
1841    /// let builder = prepare_request_builder();
1842    /// let response = builder.send().await?;
1843    /// # Ok(()) }
1844    ///
1845    /// fn prepare_request_builder() -> GetDataAccessLabel {
1846    ///   # panic!();
1847    ///   // ... details omitted ...
1848    /// }
1849    /// ```
1850    #[derive(Clone, Debug)]
1851    pub struct GetDataAccessLabel(RequestBuilder<crate::model::GetDataAccessLabelRequest>);
1852
1853    impl GetDataAccessLabel {
1854        pub(crate) fn new(
1855            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataAccessControlService>,
1856        ) -> Self {
1857            Self(RequestBuilder::new(stub))
1858        }
1859
1860        /// Sets the full request, replacing any prior values.
1861        pub fn with_request<V: Into<crate::model::GetDataAccessLabelRequest>>(
1862            mut self,
1863            v: V,
1864        ) -> Self {
1865            self.0.request = v.into();
1866            self
1867        }
1868
1869        /// Sets all the options, replacing any prior values.
1870        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1871            self.0.options = v.into();
1872            self
1873        }
1874
1875        /// Sends the request.
1876        pub async fn send(self) -> Result<crate::model::DataAccessLabel> {
1877            (*self.0.stub)
1878                .get_data_access_label(self.0.request, self.0.options)
1879                .await
1880                .map(crate::Response::into_body)
1881        }
1882
1883        /// Sets the value of [name][crate::model::GetDataAccessLabelRequest::name].
1884        ///
1885        /// This is a **required** field for requests.
1886        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1887            self.0.request.name = v.into();
1888            self
1889        }
1890    }
1891
1892    #[doc(hidden)]
1893    impl crate::RequestBuilder for GetDataAccessLabel {
1894        fn request_options(&mut self) -> &mut crate::RequestOptions {
1895            &mut self.0.options
1896        }
1897    }
1898
1899    /// The request builder for [DataAccessControlService::list_data_access_labels][crate::client::DataAccessControlService::list_data_access_labels] calls.
1900    ///
1901    /// # Example
1902    /// ```
1903    /// # use google_cloud_chronicle_v1::builder::data_access_control_service::ListDataAccessLabels;
1904    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
1905    /// use google_cloud_gax::paginator::ItemPaginator;
1906    ///
1907    /// let builder = prepare_request_builder();
1908    /// let mut items = builder.by_item();
1909    /// while let Some(result) = items.next().await {
1910    ///   let item = result?;
1911    /// }
1912    /// # Ok(()) }
1913    ///
1914    /// fn prepare_request_builder() -> ListDataAccessLabels {
1915    ///   # panic!();
1916    ///   // ... details omitted ...
1917    /// }
1918    /// ```
1919    #[derive(Clone, Debug)]
1920    pub struct ListDataAccessLabels(RequestBuilder<crate::model::ListDataAccessLabelsRequest>);
1921
1922    impl ListDataAccessLabels {
1923        pub(crate) fn new(
1924            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataAccessControlService>,
1925        ) -> Self {
1926            Self(RequestBuilder::new(stub))
1927        }
1928
1929        /// Sets the full request, replacing any prior values.
1930        pub fn with_request<V: Into<crate::model::ListDataAccessLabelsRequest>>(
1931            mut self,
1932            v: V,
1933        ) -> Self {
1934            self.0.request = v.into();
1935            self
1936        }
1937
1938        /// Sets all the options, replacing any prior values.
1939        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1940            self.0.options = v.into();
1941            self
1942        }
1943
1944        /// Sends the request.
1945        pub async fn send(self) -> Result<crate::model::ListDataAccessLabelsResponse> {
1946            (*self.0.stub)
1947                .list_data_access_labels(self.0.request, self.0.options)
1948                .await
1949                .map(crate::Response::into_body)
1950        }
1951
1952        /// Streams each page in the collection.
1953        pub fn by_page(
1954            self,
1955        ) -> impl google_cloud_gax::paginator::Paginator<
1956            crate::model::ListDataAccessLabelsResponse,
1957            crate::Error,
1958        > {
1959            use std::clone::Clone;
1960            let token = self.0.request.page_token.clone();
1961            let execute = move |token: String| {
1962                let mut builder = self.clone();
1963                builder.0.request = builder.0.request.set_page_token(token);
1964                builder.send()
1965            };
1966            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1967        }
1968
1969        /// Streams each item in the collection.
1970        pub fn by_item(
1971            self,
1972        ) -> impl google_cloud_gax::paginator::ItemPaginator<
1973            crate::model::ListDataAccessLabelsResponse,
1974            crate::Error,
1975        > {
1976            use google_cloud_gax::paginator::Paginator;
1977            self.by_page().items()
1978        }
1979
1980        /// Sets the value of [parent][crate::model::ListDataAccessLabelsRequest::parent].
1981        ///
1982        /// This is a **required** field for requests.
1983        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1984            self.0.request.parent = v.into();
1985            self
1986        }
1987
1988        /// Sets the value of [page_size][crate::model::ListDataAccessLabelsRequest::page_size].
1989        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1990            self.0.request.page_size = v.into();
1991            self
1992        }
1993
1994        /// Sets the value of [page_token][crate::model::ListDataAccessLabelsRequest::page_token].
1995        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1996            self.0.request.page_token = v.into();
1997            self
1998        }
1999
2000        /// Sets the value of [filter][crate::model::ListDataAccessLabelsRequest::filter].
2001        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2002            self.0.request.filter = v.into();
2003            self
2004        }
2005    }
2006
2007    #[doc(hidden)]
2008    impl crate::RequestBuilder for ListDataAccessLabels {
2009        fn request_options(&mut self) -> &mut crate::RequestOptions {
2010            &mut self.0.options
2011        }
2012    }
2013
2014    /// The request builder for [DataAccessControlService::update_data_access_label][crate::client::DataAccessControlService::update_data_access_label] calls.
2015    ///
2016    /// # Example
2017    /// ```
2018    /// # use google_cloud_chronicle_v1::builder::data_access_control_service::UpdateDataAccessLabel;
2019    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
2020    ///
2021    /// let builder = prepare_request_builder();
2022    /// let response = builder.send().await?;
2023    /// # Ok(()) }
2024    ///
2025    /// fn prepare_request_builder() -> UpdateDataAccessLabel {
2026    ///   # panic!();
2027    ///   // ... details omitted ...
2028    /// }
2029    /// ```
2030    #[derive(Clone, Debug)]
2031    pub struct UpdateDataAccessLabel(RequestBuilder<crate::model::UpdateDataAccessLabelRequest>);
2032
2033    impl UpdateDataAccessLabel {
2034        pub(crate) fn new(
2035            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataAccessControlService>,
2036        ) -> Self {
2037            Self(RequestBuilder::new(stub))
2038        }
2039
2040        /// Sets the full request, replacing any prior values.
2041        pub fn with_request<V: Into<crate::model::UpdateDataAccessLabelRequest>>(
2042            mut self,
2043            v: V,
2044        ) -> Self {
2045            self.0.request = v.into();
2046            self
2047        }
2048
2049        /// Sets all the options, replacing any prior values.
2050        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2051            self.0.options = v.into();
2052            self
2053        }
2054
2055        /// Sends the request.
2056        pub async fn send(self) -> Result<crate::model::DataAccessLabel> {
2057            (*self.0.stub)
2058                .update_data_access_label(self.0.request, self.0.options)
2059                .await
2060                .map(crate::Response::into_body)
2061        }
2062
2063        /// Sets the value of [data_access_label][crate::model::UpdateDataAccessLabelRequest::data_access_label].
2064        ///
2065        /// This is a **required** field for requests.
2066        pub fn set_data_access_label<T>(mut self, v: T) -> Self
2067        where
2068            T: std::convert::Into<crate::model::DataAccessLabel>,
2069        {
2070            self.0.request.data_access_label = std::option::Option::Some(v.into());
2071            self
2072        }
2073
2074        /// Sets or clears the value of [data_access_label][crate::model::UpdateDataAccessLabelRequest::data_access_label].
2075        ///
2076        /// This is a **required** field for requests.
2077        pub fn set_or_clear_data_access_label<T>(mut self, v: std::option::Option<T>) -> Self
2078        where
2079            T: std::convert::Into<crate::model::DataAccessLabel>,
2080        {
2081            self.0.request.data_access_label = v.map(|x| x.into());
2082            self
2083        }
2084
2085        /// Sets the value of [update_mask][crate::model::UpdateDataAccessLabelRequest::update_mask].
2086        pub fn set_update_mask<T>(mut self, v: T) -> Self
2087        where
2088            T: std::convert::Into<wkt::FieldMask>,
2089        {
2090            self.0.request.update_mask = std::option::Option::Some(v.into());
2091            self
2092        }
2093
2094        /// Sets or clears the value of [update_mask][crate::model::UpdateDataAccessLabelRequest::update_mask].
2095        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2096        where
2097            T: std::convert::Into<wkt::FieldMask>,
2098        {
2099            self.0.request.update_mask = v.map(|x| x.into());
2100            self
2101        }
2102    }
2103
2104    #[doc(hidden)]
2105    impl crate::RequestBuilder for UpdateDataAccessLabel {
2106        fn request_options(&mut self) -> &mut crate::RequestOptions {
2107            &mut self.0.options
2108        }
2109    }
2110
2111    /// The request builder for [DataAccessControlService::delete_data_access_label][crate::client::DataAccessControlService::delete_data_access_label] calls.
2112    ///
2113    /// # Example
2114    /// ```
2115    /// # use google_cloud_chronicle_v1::builder::data_access_control_service::DeleteDataAccessLabel;
2116    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
2117    ///
2118    /// let builder = prepare_request_builder();
2119    /// let response = builder.send().await?;
2120    /// # Ok(()) }
2121    ///
2122    /// fn prepare_request_builder() -> DeleteDataAccessLabel {
2123    ///   # panic!();
2124    ///   // ... details omitted ...
2125    /// }
2126    /// ```
2127    #[derive(Clone, Debug)]
2128    pub struct DeleteDataAccessLabel(RequestBuilder<crate::model::DeleteDataAccessLabelRequest>);
2129
2130    impl DeleteDataAccessLabel {
2131        pub(crate) fn new(
2132            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataAccessControlService>,
2133        ) -> Self {
2134            Self(RequestBuilder::new(stub))
2135        }
2136
2137        /// Sets the full request, replacing any prior values.
2138        pub fn with_request<V: Into<crate::model::DeleteDataAccessLabelRequest>>(
2139            mut self,
2140            v: V,
2141        ) -> Self {
2142            self.0.request = v.into();
2143            self
2144        }
2145
2146        /// Sets all the options, replacing any prior values.
2147        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2148            self.0.options = v.into();
2149            self
2150        }
2151
2152        /// Sends the request.
2153        pub async fn send(self) -> Result<()> {
2154            (*self.0.stub)
2155                .delete_data_access_label(self.0.request, self.0.options)
2156                .await
2157                .map(crate::Response::into_body)
2158        }
2159
2160        /// Sets the value of [name][crate::model::DeleteDataAccessLabelRequest::name].
2161        ///
2162        /// This is a **required** field for requests.
2163        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2164            self.0.request.name = v.into();
2165            self
2166        }
2167    }
2168
2169    #[doc(hidden)]
2170    impl crate::RequestBuilder for DeleteDataAccessLabel {
2171        fn request_options(&mut self) -> &mut crate::RequestOptions {
2172            &mut self.0.options
2173        }
2174    }
2175
2176    /// The request builder for [DataAccessControlService::create_data_access_scope][crate::client::DataAccessControlService::create_data_access_scope] calls.
2177    ///
2178    /// # Example
2179    /// ```
2180    /// # use google_cloud_chronicle_v1::builder::data_access_control_service::CreateDataAccessScope;
2181    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
2182    ///
2183    /// let builder = prepare_request_builder();
2184    /// let response = builder.send().await?;
2185    /// # Ok(()) }
2186    ///
2187    /// fn prepare_request_builder() -> CreateDataAccessScope {
2188    ///   # panic!();
2189    ///   // ... details omitted ...
2190    /// }
2191    /// ```
2192    #[derive(Clone, Debug)]
2193    pub struct CreateDataAccessScope(RequestBuilder<crate::model::CreateDataAccessScopeRequest>);
2194
2195    impl CreateDataAccessScope {
2196        pub(crate) fn new(
2197            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataAccessControlService>,
2198        ) -> Self {
2199            Self(RequestBuilder::new(stub))
2200        }
2201
2202        /// Sets the full request, replacing any prior values.
2203        pub fn with_request<V: Into<crate::model::CreateDataAccessScopeRequest>>(
2204            mut self,
2205            v: V,
2206        ) -> Self {
2207            self.0.request = v.into();
2208            self
2209        }
2210
2211        /// Sets all the options, replacing any prior values.
2212        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2213            self.0.options = v.into();
2214            self
2215        }
2216
2217        /// Sends the request.
2218        pub async fn send(self) -> Result<crate::model::DataAccessScope> {
2219            (*self.0.stub)
2220                .create_data_access_scope(self.0.request, self.0.options)
2221                .await
2222                .map(crate::Response::into_body)
2223        }
2224
2225        /// Sets the value of [parent][crate::model::CreateDataAccessScopeRequest::parent].
2226        ///
2227        /// This is a **required** field for requests.
2228        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2229            self.0.request.parent = v.into();
2230            self
2231        }
2232
2233        /// Sets the value of [data_access_scope][crate::model::CreateDataAccessScopeRequest::data_access_scope].
2234        ///
2235        /// This is a **required** field for requests.
2236        pub fn set_data_access_scope<T>(mut self, v: T) -> Self
2237        where
2238            T: std::convert::Into<crate::model::DataAccessScope>,
2239        {
2240            self.0.request.data_access_scope = std::option::Option::Some(v.into());
2241            self
2242        }
2243
2244        /// Sets or clears the value of [data_access_scope][crate::model::CreateDataAccessScopeRequest::data_access_scope].
2245        ///
2246        /// This is a **required** field for requests.
2247        pub fn set_or_clear_data_access_scope<T>(mut self, v: std::option::Option<T>) -> Self
2248        where
2249            T: std::convert::Into<crate::model::DataAccessScope>,
2250        {
2251            self.0.request.data_access_scope = v.map(|x| x.into());
2252            self
2253        }
2254
2255        /// Sets the value of [data_access_scope_id][crate::model::CreateDataAccessScopeRequest::data_access_scope_id].
2256        ///
2257        /// This is a **required** field for requests.
2258        pub fn set_data_access_scope_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2259            self.0.request.data_access_scope_id = v.into();
2260            self
2261        }
2262    }
2263
2264    #[doc(hidden)]
2265    impl crate::RequestBuilder for CreateDataAccessScope {
2266        fn request_options(&mut self) -> &mut crate::RequestOptions {
2267            &mut self.0.options
2268        }
2269    }
2270
2271    /// The request builder for [DataAccessControlService::get_data_access_scope][crate::client::DataAccessControlService::get_data_access_scope] calls.
2272    ///
2273    /// # Example
2274    /// ```
2275    /// # use google_cloud_chronicle_v1::builder::data_access_control_service::GetDataAccessScope;
2276    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
2277    ///
2278    /// let builder = prepare_request_builder();
2279    /// let response = builder.send().await?;
2280    /// # Ok(()) }
2281    ///
2282    /// fn prepare_request_builder() -> GetDataAccessScope {
2283    ///   # panic!();
2284    ///   // ... details omitted ...
2285    /// }
2286    /// ```
2287    #[derive(Clone, Debug)]
2288    pub struct GetDataAccessScope(RequestBuilder<crate::model::GetDataAccessScopeRequest>);
2289
2290    impl GetDataAccessScope {
2291        pub(crate) fn new(
2292            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataAccessControlService>,
2293        ) -> Self {
2294            Self(RequestBuilder::new(stub))
2295        }
2296
2297        /// Sets the full request, replacing any prior values.
2298        pub fn with_request<V: Into<crate::model::GetDataAccessScopeRequest>>(
2299            mut self,
2300            v: V,
2301        ) -> Self {
2302            self.0.request = v.into();
2303            self
2304        }
2305
2306        /// Sets all the options, replacing any prior values.
2307        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2308            self.0.options = v.into();
2309            self
2310        }
2311
2312        /// Sends the request.
2313        pub async fn send(self) -> Result<crate::model::DataAccessScope> {
2314            (*self.0.stub)
2315                .get_data_access_scope(self.0.request, self.0.options)
2316                .await
2317                .map(crate::Response::into_body)
2318        }
2319
2320        /// Sets the value of [name][crate::model::GetDataAccessScopeRequest::name].
2321        ///
2322        /// This is a **required** field for requests.
2323        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2324            self.0.request.name = v.into();
2325            self
2326        }
2327    }
2328
2329    #[doc(hidden)]
2330    impl crate::RequestBuilder for GetDataAccessScope {
2331        fn request_options(&mut self) -> &mut crate::RequestOptions {
2332            &mut self.0.options
2333        }
2334    }
2335
2336    /// The request builder for [DataAccessControlService::list_data_access_scopes][crate::client::DataAccessControlService::list_data_access_scopes] calls.
2337    ///
2338    /// # Example
2339    /// ```
2340    /// # use google_cloud_chronicle_v1::builder::data_access_control_service::ListDataAccessScopes;
2341    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
2342    /// use google_cloud_gax::paginator::ItemPaginator;
2343    ///
2344    /// let builder = prepare_request_builder();
2345    /// let mut items = builder.by_item();
2346    /// while let Some(result) = items.next().await {
2347    ///   let item = result?;
2348    /// }
2349    /// # Ok(()) }
2350    ///
2351    /// fn prepare_request_builder() -> ListDataAccessScopes {
2352    ///   # panic!();
2353    ///   // ... details omitted ...
2354    /// }
2355    /// ```
2356    #[derive(Clone, Debug)]
2357    pub struct ListDataAccessScopes(RequestBuilder<crate::model::ListDataAccessScopesRequest>);
2358
2359    impl ListDataAccessScopes {
2360        pub(crate) fn new(
2361            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataAccessControlService>,
2362        ) -> Self {
2363            Self(RequestBuilder::new(stub))
2364        }
2365
2366        /// Sets the full request, replacing any prior values.
2367        pub fn with_request<V: Into<crate::model::ListDataAccessScopesRequest>>(
2368            mut self,
2369            v: V,
2370        ) -> Self {
2371            self.0.request = v.into();
2372            self
2373        }
2374
2375        /// Sets all the options, replacing any prior values.
2376        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2377            self.0.options = v.into();
2378            self
2379        }
2380
2381        /// Sends the request.
2382        pub async fn send(self) -> Result<crate::model::ListDataAccessScopesResponse> {
2383            (*self.0.stub)
2384                .list_data_access_scopes(self.0.request, self.0.options)
2385                .await
2386                .map(crate::Response::into_body)
2387        }
2388
2389        /// Streams each page in the collection.
2390        pub fn by_page(
2391            self,
2392        ) -> impl google_cloud_gax::paginator::Paginator<
2393            crate::model::ListDataAccessScopesResponse,
2394            crate::Error,
2395        > {
2396            use std::clone::Clone;
2397            let token = self.0.request.page_token.clone();
2398            let execute = move |token: String| {
2399                let mut builder = self.clone();
2400                builder.0.request = builder.0.request.set_page_token(token);
2401                builder.send()
2402            };
2403            google_cloud_gax::paginator::internal::new_paginator(token, execute)
2404        }
2405
2406        /// Streams each item in the collection.
2407        pub fn by_item(
2408            self,
2409        ) -> impl google_cloud_gax::paginator::ItemPaginator<
2410            crate::model::ListDataAccessScopesResponse,
2411            crate::Error,
2412        > {
2413            use google_cloud_gax::paginator::Paginator;
2414            self.by_page().items()
2415        }
2416
2417        /// Sets the value of [parent][crate::model::ListDataAccessScopesRequest::parent].
2418        ///
2419        /// This is a **required** field for requests.
2420        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2421            self.0.request.parent = v.into();
2422            self
2423        }
2424
2425        /// Sets the value of [page_size][crate::model::ListDataAccessScopesRequest::page_size].
2426        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2427            self.0.request.page_size = v.into();
2428            self
2429        }
2430
2431        /// Sets the value of [page_token][crate::model::ListDataAccessScopesRequest::page_token].
2432        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2433            self.0.request.page_token = v.into();
2434            self
2435        }
2436
2437        /// Sets the value of [filter][crate::model::ListDataAccessScopesRequest::filter].
2438        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2439            self.0.request.filter = v.into();
2440            self
2441        }
2442    }
2443
2444    #[doc(hidden)]
2445    impl crate::RequestBuilder for ListDataAccessScopes {
2446        fn request_options(&mut self) -> &mut crate::RequestOptions {
2447            &mut self.0.options
2448        }
2449    }
2450
2451    /// The request builder for [DataAccessControlService::update_data_access_scope][crate::client::DataAccessControlService::update_data_access_scope] calls.
2452    ///
2453    /// # Example
2454    /// ```
2455    /// # use google_cloud_chronicle_v1::builder::data_access_control_service::UpdateDataAccessScope;
2456    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
2457    ///
2458    /// let builder = prepare_request_builder();
2459    /// let response = builder.send().await?;
2460    /// # Ok(()) }
2461    ///
2462    /// fn prepare_request_builder() -> UpdateDataAccessScope {
2463    ///   # panic!();
2464    ///   // ... details omitted ...
2465    /// }
2466    /// ```
2467    #[derive(Clone, Debug)]
2468    pub struct UpdateDataAccessScope(RequestBuilder<crate::model::UpdateDataAccessScopeRequest>);
2469
2470    impl UpdateDataAccessScope {
2471        pub(crate) fn new(
2472            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataAccessControlService>,
2473        ) -> Self {
2474            Self(RequestBuilder::new(stub))
2475        }
2476
2477        /// Sets the full request, replacing any prior values.
2478        pub fn with_request<V: Into<crate::model::UpdateDataAccessScopeRequest>>(
2479            mut self,
2480            v: V,
2481        ) -> Self {
2482            self.0.request = v.into();
2483            self
2484        }
2485
2486        /// Sets all the options, replacing any prior values.
2487        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2488            self.0.options = v.into();
2489            self
2490        }
2491
2492        /// Sends the request.
2493        pub async fn send(self) -> Result<crate::model::DataAccessScope> {
2494            (*self.0.stub)
2495                .update_data_access_scope(self.0.request, self.0.options)
2496                .await
2497                .map(crate::Response::into_body)
2498        }
2499
2500        /// Sets the value of [data_access_scope][crate::model::UpdateDataAccessScopeRequest::data_access_scope].
2501        ///
2502        /// This is a **required** field for requests.
2503        pub fn set_data_access_scope<T>(mut self, v: T) -> Self
2504        where
2505            T: std::convert::Into<crate::model::DataAccessScope>,
2506        {
2507            self.0.request.data_access_scope = std::option::Option::Some(v.into());
2508            self
2509        }
2510
2511        /// Sets or clears the value of [data_access_scope][crate::model::UpdateDataAccessScopeRequest::data_access_scope].
2512        ///
2513        /// This is a **required** field for requests.
2514        pub fn set_or_clear_data_access_scope<T>(mut self, v: std::option::Option<T>) -> Self
2515        where
2516            T: std::convert::Into<crate::model::DataAccessScope>,
2517        {
2518            self.0.request.data_access_scope = v.map(|x| x.into());
2519            self
2520        }
2521
2522        /// Sets the value of [update_mask][crate::model::UpdateDataAccessScopeRequest::update_mask].
2523        pub fn set_update_mask<T>(mut self, v: T) -> Self
2524        where
2525            T: std::convert::Into<wkt::FieldMask>,
2526        {
2527            self.0.request.update_mask = std::option::Option::Some(v.into());
2528            self
2529        }
2530
2531        /// Sets or clears the value of [update_mask][crate::model::UpdateDataAccessScopeRequest::update_mask].
2532        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2533        where
2534            T: std::convert::Into<wkt::FieldMask>,
2535        {
2536            self.0.request.update_mask = v.map(|x| x.into());
2537            self
2538        }
2539    }
2540
2541    #[doc(hidden)]
2542    impl crate::RequestBuilder for UpdateDataAccessScope {
2543        fn request_options(&mut self) -> &mut crate::RequestOptions {
2544            &mut self.0.options
2545        }
2546    }
2547
2548    /// The request builder for [DataAccessControlService::delete_data_access_scope][crate::client::DataAccessControlService::delete_data_access_scope] calls.
2549    ///
2550    /// # Example
2551    /// ```
2552    /// # use google_cloud_chronicle_v1::builder::data_access_control_service::DeleteDataAccessScope;
2553    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
2554    ///
2555    /// let builder = prepare_request_builder();
2556    /// let response = builder.send().await?;
2557    /// # Ok(()) }
2558    ///
2559    /// fn prepare_request_builder() -> DeleteDataAccessScope {
2560    ///   # panic!();
2561    ///   // ... details omitted ...
2562    /// }
2563    /// ```
2564    #[derive(Clone, Debug)]
2565    pub struct DeleteDataAccessScope(RequestBuilder<crate::model::DeleteDataAccessScopeRequest>);
2566
2567    impl DeleteDataAccessScope {
2568        pub(crate) fn new(
2569            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataAccessControlService>,
2570        ) -> Self {
2571            Self(RequestBuilder::new(stub))
2572        }
2573
2574        /// Sets the full request, replacing any prior values.
2575        pub fn with_request<V: Into<crate::model::DeleteDataAccessScopeRequest>>(
2576            mut self,
2577            v: V,
2578        ) -> Self {
2579            self.0.request = v.into();
2580            self
2581        }
2582
2583        /// Sets all the options, replacing any prior values.
2584        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2585            self.0.options = v.into();
2586            self
2587        }
2588
2589        /// Sends the request.
2590        pub async fn send(self) -> Result<()> {
2591            (*self.0.stub)
2592                .delete_data_access_scope(self.0.request, self.0.options)
2593                .await
2594                .map(crate::Response::into_body)
2595        }
2596
2597        /// Sets the value of [name][crate::model::DeleteDataAccessScopeRequest::name].
2598        ///
2599        /// This is a **required** field for requests.
2600        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2601            self.0.request.name = v.into();
2602            self
2603        }
2604    }
2605
2606    #[doc(hidden)]
2607    impl crate::RequestBuilder for DeleteDataAccessScope {
2608        fn request_options(&mut self) -> &mut crate::RequestOptions {
2609            &mut self.0.options
2610        }
2611    }
2612
2613    /// The request builder for [DataAccessControlService::list_operations][crate::client::DataAccessControlService::list_operations] calls.
2614    ///
2615    /// # Example
2616    /// ```
2617    /// # use google_cloud_chronicle_v1::builder::data_access_control_service::ListOperations;
2618    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
2619    /// use google_cloud_gax::paginator::ItemPaginator;
2620    ///
2621    /// let builder = prepare_request_builder();
2622    /// let mut items = builder.by_item();
2623    /// while let Some(result) = items.next().await {
2624    ///   let item = result?;
2625    /// }
2626    /// # Ok(()) }
2627    ///
2628    /// fn prepare_request_builder() -> ListOperations {
2629    ///   # panic!();
2630    ///   // ... details omitted ...
2631    /// }
2632    /// ```
2633    #[derive(Clone, Debug)]
2634    pub struct ListOperations(
2635        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
2636    );
2637
2638    impl ListOperations {
2639        pub(crate) fn new(
2640            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataAccessControlService>,
2641        ) -> Self {
2642            Self(RequestBuilder::new(stub))
2643        }
2644
2645        /// Sets the full request, replacing any prior values.
2646        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
2647            mut self,
2648            v: V,
2649        ) -> Self {
2650            self.0.request = v.into();
2651            self
2652        }
2653
2654        /// Sets all the options, replacing any prior values.
2655        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2656            self.0.options = v.into();
2657            self
2658        }
2659
2660        /// Sends the request.
2661        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
2662            (*self.0.stub)
2663                .list_operations(self.0.request, self.0.options)
2664                .await
2665                .map(crate::Response::into_body)
2666        }
2667
2668        /// Streams each page in the collection.
2669        pub fn by_page(
2670            self,
2671        ) -> impl google_cloud_gax::paginator::Paginator<
2672            google_cloud_longrunning::model::ListOperationsResponse,
2673            crate::Error,
2674        > {
2675            use std::clone::Clone;
2676            let token = self.0.request.page_token.clone();
2677            let execute = move |token: String| {
2678                let mut builder = self.clone();
2679                builder.0.request = builder.0.request.set_page_token(token);
2680                builder.send()
2681            };
2682            google_cloud_gax::paginator::internal::new_paginator(token, execute)
2683        }
2684
2685        /// Streams each item in the collection.
2686        pub fn by_item(
2687            self,
2688        ) -> impl google_cloud_gax::paginator::ItemPaginator<
2689            google_cloud_longrunning::model::ListOperationsResponse,
2690            crate::Error,
2691        > {
2692            use google_cloud_gax::paginator::Paginator;
2693            self.by_page().items()
2694        }
2695
2696        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
2697        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2698            self.0.request.name = v.into();
2699            self
2700        }
2701
2702        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
2703        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2704            self.0.request.filter = v.into();
2705            self
2706        }
2707
2708        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
2709        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2710            self.0.request.page_size = v.into();
2711            self
2712        }
2713
2714        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
2715        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2716            self.0.request.page_token = v.into();
2717            self
2718        }
2719
2720        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
2721        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
2722            self.0.request.return_partial_success = v.into();
2723            self
2724        }
2725    }
2726
2727    #[doc(hidden)]
2728    impl crate::RequestBuilder for ListOperations {
2729        fn request_options(&mut self) -> &mut crate::RequestOptions {
2730            &mut self.0.options
2731        }
2732    }
2733
2734    /// The request builder for [DataAccessControlService::get_operation][crate::client::DataAccessControlService::get_operation] calls.
2735    ///
2736    /// # Example
2737    /// ```
2738    /// # use google_cloud_chronicle_v1::builder::data_access_control_service::GetOperation;
2739    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
2740    ///
2741    /// let builder = prepare_request_builder();
2742    /// let response = builder.send().await?;
2743    /// # Ok(()) }
2744    ///
2745    /// fn prepare_request_builder() -> GetOperation {
2746    ///   # panic!();
2747    ///   // ... details omitted ...
2748    /// }
2749    /// ```
2750    #[derive(Clone, Debug)]
2751    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
2752
2753    impl GetOperation {
2754        pub(crate) fn new(
2755            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataAccessControlService>,
2756        ) -> Self {
2757            Self(RequestBuilder::new(stub))
2758        }
2759
2760        /// Sets the full request, replacing any prior values.
2761        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
2762            mut self,
2763            v: V,
2764        ) -> Self {
2765            self.0.request = v.into();
2766            self
2767        }
2768
2769        /// Sets all the options, replacing any prior values.
2770        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2771            self.0.options = v.into();
2772            self
2773        }
2774
2775        /// Sends the request.
2776        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2777            (*self.0.stub)
2778                .get_operation(self.0.request, self.0.options)
2779                .await
2780                .map(crate::Response::into_body)
2781        }
2782
2783        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
2784        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2785            self.0.request.name = v.into();
2786            self
2787        }
2788    }
2789
2790    #[doc(hidden)]
2791    impl crate::RequestBuilder for GetOperation {
2792        fn request_options(&mut self) -> &mut crate::RequestOptions {
2793            &mut self.0.options
2794        }
2795    }
2796
2797    /// The request builder for [DataAccessControlService::delete_operation][crate::client::DataAccessControlService::delete_operation] calls.
2798    ///
2799    /// # Example
2800    /// ```
2801    /// # use google_cloud_chronicle_v1::builder::data_access_control_service::DeleteOperation;
2802    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
2803    ///
2804    /// let builder = prepare_request_builder();
2805    /// let response = builder.send().await?;
2806    /// # Ok(()) }
2807    ///
2808    /// fn prepare_request_builder() -> DeleteOperation {
2809    ///   # panic!();
2810    ///   // ... details omitted ...
2811    /// }
2812    /// ```
2813    #[derive(Clone, Debug)]
2814    pub struct DeleteOperation(
2815        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
2816    );
2817
2818    impl DeleteOperation {
2819        pub(crate) fn new(
2820            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataAccessControlService>,
2821        ) -> Self {
2822            Self(RequestBuilder::new(stub))
2823        }
2824
2825        /// Sets the full request, replacing any prior values.
2826        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
2827            mut self,
2828            v: V,
2829        ) -> Self {
2830            self.0.request = v.into();
2831            self
2832        }
2833
2834        /// Sets all the options, replacing any prior values.
2835        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2836            self.0.options = v.into();
2837            self
2838        }
2839
2840        /// Sends the request.
2841        pub async fn send(self) -> Result<()> {
2842            (*self.0.stub)
2843                .delete_operation(self.0.request, self.0.options)
2844                .await
2845                .map(crate::Response::into_body)
2846        }
2847
2848        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
2849        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2850            self.0.request.name = v.into();
2851            self
2852        }
2853    }
2854
2855    #[doc(hidden)]
2856    impl crate::RequestBuilder for DeleteOperation {
2857        fn request_options(&mut self) -> &mut crate::RequestOptions {
2858            &mut self.0.options
2859        }
2860    }
2861
2862    /// The request builder for [DataAccessControlService::cancel_operation][crate::client::DataAccessControlService::cancel_operation] calls.
2863    ///
2864    /// # Example
2865    /// ```
2866    /// # use google_cloud_chronicle_v1::builder::data_access_control_service::CancelOperation;
2867    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
2868    ///
2869    /// let builder = prepare_request_builder();
2870    /// let response = builder.send().await?;
2871    /// # Ok(()) }
2872    ///
2873    /// fn prepare_request_builder() -> CancelOperation {
2874    ///   # panic!();
2875    ///   // ... details omitted ...
2876    /// }
2877    /// ```
2878    #[derive(Clone, Debug)]
2879    pub struct CancelOperation(
2880        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
2881    );
2882
2883    impl CancelOperation {
2884        pub(crate) fn new(
2885            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataAccessControlService>,
2886        ) -> Self {
2887            Self(RequestBuilder::new(stub))
2888        }
2889
2890        /// Sets the full request, replacing any prior values.
2891        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
2892            mut self,
2893            v: V,
2894        ) -> Self {
2895            self.0.request = v.into();
2896            self
2897        }
2898
2899        /// Sets all the options, replacing any prior values.
2900        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2901            self.0.options = v.into();
2902            self
2903        }
2904
2905        /// Sends the request.
2906        pub async fn send(self) -> Result<()> {
2907            (*self.0.stub)
2908                .cancel_operation(self.0.request, self.0.options)
2909                .await
2910                .map(crate::Response::into_body)
2911        }
2912
2913        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
2914        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2915            self.0.request.name = v.into();
2916            self
2917        }
2918    }
2919
2920    #[doc(hidden)]
2921    impl crate::RequestBuilder for CancelOperation {
2922        fn request_options(&mut self) -> &mut crate::RequestOptions {
2923            &mut self.0.options
2924        }
2925    }
2926}
2927
2928/// Request and client builders for [DataTableService][crate::client::DataTableService].
2929pub mod data_table_service {
2930    use crate::Result;
2931
2932    /// A builder for [DataTableService][crate::client::DataTableService].
2933    ///
2934    /// ```
2935    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
2936    /// # use google_cloud_chronicle_v1::*;
2937    /// # use builder::data_table_service::ClientBuilder;
2938    /// # use client::DataTableService;
2939    /// let builder : ClientBuilder = DataTableService::builder();
2940    /// let client = builder
2941    ///     .with_endpoint("https://chronicle.googleapis.com")
2942    ///     .build().await?;
2943    /// # Ok(()) }
2944    /// ```
2945    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
2946
2947    pub(crate) mod client {
2948        use super::super::super::client::DataTableService;
2949        pub struct Factory;
2950        impl crate::ClientFactory for Factory {
2951            type Client = DataTableService;
2952            type Credentials = gaxi::options::Credentials;
2953            async fn build(
2954                self,
2955                config: gaxi::options::ClientConfig,
2956            ) -> crate::ClientBuilderResult<Self::Client> {
2957                Self::Client::new(config).await
2958            }
2959        }
2960    }
2961
2962    /// Common implementation for [crate::client::DataTableService] request builders.
2963    #[derive(Clone, Debug)]
2964    pub(crate) struct RequestBuilder<R: std::default::Default> {
2965        stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTableService>,
2966        request: R,
2967        options: crate::RequestOptions,
2968    }
2969
2970    impl<R> RequestBuilder<R>
2971    where
2972        R: std::default::Default,
2973    {
2974        pub(crate) fn new(
2975            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTableService>,
2976        ) -> Self {
2977            Self {
2978                stub,
2979                request: R::default(),
2980                options: crate::RequestOptions::default(),
2981            }
2982        }
2983    }
2984
2985    /// The request builder for [DataTableService::create_data_table][crate::client::DataTableService::create_data_table] calls.
2986    ///
2987    /// # Example
2988    /// ```
2989    /// # use google_cloud_chronicle_v1::builder::data_table_service::CreateDataTable;
2990    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
2991    ///
2992    /// let builder = prepare_request_builder();
2993    /// let response = builder.send().await?;
2994    /// # Ok(()) }
2995    ///
2996    /// fn prepare_request_builder() -> CreateDataTable {
2997    ///   # panic!();
2998    ///   // ... details omitted ...
2999    /// }
3000    /// ```
3001    #[derive(Clone, Debug)]
3002    pub struct CreateDataTable(RequestBuilder<crate::model::CreateDataTableRequest>);
3003
3004    impl CreateDataTable {
3005        pub(crate) fn new(
3006            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTableService>,
3007        ) -> Self {
3008            Self(RequestBuilder::new(stub))
3009        }
3010
3011        /// Sets the full request, replacing any prior values.
3012        pub fn with_request<V: Into<crate::model::CreateDataTableRequest>>(mut self, v: V) -> Self {
3013            self.0.request = v.into();
3014            self
3015        }
3016
3017        /// Sets all the options, replacing any prior values.
3018        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3019            self.0.options = v.into();
3020            self
3021        }
3022
3023        /// Sends the request.
3024        pub async fn send(self) -> Result<crate::model::DataTable> {
3025            (*self.0.stub)
3026                .create_data_table(self.0.request, self.0.options)
3027                .await
3028                .map(crate::Response::into_body)
3029        }
3030
3031        /// Sets the value of [parent][crate::model::CreateDataTableRequest::parent].
3032        ///
3033        /// This is a **required** field for requests.
3034        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3035            self.0.request.parent = v.into();
3036            self
3037        }
3038
3039        /// Sets the value of [data_table][crate::model::CreateDataTableRequest::data_table].
3040        ///
3041        /// This is a **required** field for requests.
3042        pub fn set_data_table<T>(mut self, v: T) -> Self
3043        where
3044            T: std::convert::Into<crate::model::DataTable>,
3045        {
3046            self.0.request.data_table = std::option::Option::Some(v.into());
3047            self
3048        }
3049
3050        /// Sets or clears the value of [data_table][crate::model::CreateDataTableRequest::data_table].
3051        ///
3052        /// This is a **required** field for requests.
3053        pub fn set_or_clear_data_table<T>(mut self, v: std::option::Option<T>) -> Self
3054        where
3055            T: std::convert::Into<crate::model::DataTable>,
3056        {
3057            self.0.request.data_table = v.map(|x| x.into());
3058            self
3059        }
3060
3061        /// Sets the value of [data_table_id][crate::model::CreateDataTableRequest::data_table_id].
3062        ///
3063        /// This is a **required** field for requests.
3064        pub fn set_data_table_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3065            self.0.request.data_table_id = v.into();
3066            self
3067        }
3068    }
3069
3070    #[doc(hidden)]
3071    impl crate::RequestBuilder for CreateDataTable {
3072        fn request_options(&mut self) -> &mut crate::RequestOptions {
3073            &mut self.0.options
3074        }
3075    }
3076
3077    /// The request builder for [DataTableService::list_data_tables][crate::client::DataTableService::list_data_tables] calls.
3078    ///
3079    /// # Example
3080    /// ```
3081    /// # use google_cloud_chronicle_v1::builder::data_table_service::ListDataTables;
3082    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
3083    /// use google_cloud_gax::paginator::ItemPaginator;
3084    ///
3085    /// let builder = prepare_request_builder();
3086    /// let mut items = builder.by_item();
3087    /// while let Some(result) = items.next().await {
3088    ///   let item = result?;
3089    /// }
3090    /// # Ok(()) }
3091    ///
3092    /// fn prepare_request_builder() -> ListDataTables {
3093    ///   # panic!();
3094    ///   // ... details omitted ...
3095    /// }
3096    /// ```
3097    #[derive(Clone, Debug)]
3098    pub struct ListDataTables(RequestBuilder<crate::model::ListDataTablesRequest>);
3099
3100    impl ListDataTables {
3101        pub(crate) fn new(
3102            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTableService>,
3103        ) -> Self {
3104            Self(RequestBuilder::new(stub))
3105        }
3106
3107        /// Sets the full request, replacing any prior values.
3108        pub fn with_request<V: Into<crate::model::ListDataTablesRequest>>(mut self, v: V) -> Self {
3109            self.0.request = v.into();
3110            self
3111        }
3112
3113        /// Sets all the options, replacing any prior values.
3114        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3115            self.0.options = v.into();
3116            self
3117        }
3118
3119        /// Sends the request.
3120        pub async fn send(self) -> Result<crate::model::ListDataTablesResponse> {
3121            (*self.0.stub)
3122                .list_data_tables(self.0.request, self.0.options)
3123                .await
3124                .map(crate::Response::into_body)
3125        }
3126
3127        /// Streams each page in the collection.
3128        pub fn by_page(
3129            self,
3130        ) -> impl google_cloud_gax::paginator::Paginator<
3131            crate::model::ListDataTablesResponse,
3132            crate::Error,
3133        > {
3134            use std::clone::Clone;
3135            let token = self.0.request.page_token.clone();
3136            let execute = move |token: String| {
3137                let mut builder = self.clone();
3138                builder.0.request = builder.0.request.set_page_token(token);
3139                builder.send()
3140            };
3141            google_cloud_gax::paginator::internal::new_paginator(token, execute)
3142        }
3143
3144        /// Streams each item in the collection.
3145        pub fn by_item(
3146            self,
3147        ) -> impl google_cloud_gax::paginator::ItemPaginator<
3148            crate::model::ListDataTablesResponse,
3149            crate::Error,
3150        > {
3151            use google_cloud_gax::paginator::Paginator;
3152            self.by_page().items()
3153        }
3154
3155        /// Sets the value of [parent][crate::model::ListDataTablesRequest::parent].
3156        ///
3157        /// This is a **required** field for requests.
3158        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3159            self.0.request.parent = v.into();
3160            self
3161        }
3162
3163        /// Sets the value of [page_size][crate::model::ListDataTablesRequest::page_size].
3164        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3165            self.0.request.page_size = v.into();
3166            self
3167        }
3168
3169        /// Sets the value of [page_token][crate::model::ListDataTablesRequest::page_token].
3170        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3171            self.0.request.page_token = v.into();
3172            self
3173        }
3174
3175        /// Sets the value of [order_by][crate::model::ListDataTablesRequest::order_by].
3176        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3177            self.0.request.order_by = v.into();
3178            self
3179        }
3180    }
3181
3182    #[doc(hidden)]
3183    impl crate::RequestBuilder for ListDataTables {
3184        fn request_options(&mut self) -> &mut crate::RequestOptions {
3185            &mut self.0.options
3186        }
3187    }
3188
3189    /// The request builder for [DataTableService::get_data_table][crate::client::DataTableService::get_data_table] calls.
3190    ///
3191    /// # Example
3192    /// ```
3193    /// # use google_cloud_chronicle_v1::builder::data_table_service::GetDataTable;
3194    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
3195    ///
3196    /// let builder = prepare_request_builder();
3197    /// let response = builder.send().await?;
3198    /// # Ok(()) }
3199    ///
3200    /// fn prepare_request_builder() -> GetDataTable {
3201    ///   # panic!();
3202    ///   // ... details omitted ...
3203    /// }
3204    /// ```
3205    #[derive(Clone, Debug)]
3206    pub struct GetDataTable(RequestBuilder<crate::model::GetDataTableRequest>);
3207
3208    impl GetDataTable {
3209        pub(crate) fn new(
3210            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTableService>,
3211        ) -> Self {
3212            Self(RequestBuilder::new(stub))
3213        }
3214
3215        /// Sets the full request, replacing any prior values.
3216        pub fn with_request<V: Into<crate::model::GetDataTableRequest>>(mut self, v: V) -> Self {
3217            self.0.request = v.into();
3218            self
3219        }
3220
3221        /// Sets all the options, replacing any prior values.
3222        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3223            self.0.options = v.into();
3224            self
3225        }
3226
3227        /// Sends the request.
3228        pub async fn send(self) -> Result<crate::model::DataTable> {
3229            (*self.0.stub)
3230                .get_data_table(self.0.request, self.0.options)
3231                .await
3232                .map(crate::Response::into_body)
3233        }
3234
3235        /// Sets the value of [name][crate::model::GetDataTableRequest::name].
3236        ///
3237        /// This is a **required** field for requests.
3238        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3239            self.0.request.name = v.into();
3240            self
3241        }
3242    }
3243
3244    #[doc(hidden)]
3245    impl crate::RequestBuilder for GetDataTable {
3246        fn request_options(&mut self) -> &mut crate::RequestOptions {
3247            &mut self.0.options
3248        }
3249    }
3250
3251    /// The request builder for [DataTableService::update_data_table][crate::client::DataTableService::update_data_table] calls.
3252    ///
3253    /// # Example
3254    /// ```
3255    /// # use google_cloud_chronicle_v1::builder::data_table_service::UpdateDataTable;
3256    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
3257    ///
3258    /// let builder = prepare_request_builder();
3259    /// let response = builder.send().await?;
3260    /// # Ok(()) }
3261    ///
3262    /// fn prepare_request_builder() -> UpdateDataTable {
3263    ///   # panic!();
3264    ///   // ... details omitted ...
3265    /// }
3266    /// ```
3267    #[derive(Clone, Debug)]
3268    pub struct UpdateDataTable(RequestBuilder<crate::model::UpdateDataTableRequest>);
3269
3270    impl UpdateDataTable {
3271        pub(crate) fn new(
3272            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTableService>,
3273        ) -> Self {
3274            Self(RequestBuilder::new(stub))
3275        }
3276
3277        /// Sets the full request, replacing any prior values.
3278        pub fn with_request<V: Into<crate::model::UpdateDataTableRequest>>(mut self, v: V) -> Self {
3279            self.0.request = v.into();
3280            self
3281        }
3282
3283        /// Sets all the options, replacing any prior values.
3284        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3285            self.0.options = v.into();
3286            self
3287        }
3288
3289        /// Sends the request.
3290        pub async fn send(self) -> Result<crate::model::DataTable> {
3291            (*self.0.stub)
3292                .update_data_table(self.0.request, self.0.options)
3293                .await
3294                .map(crate::Response::into_body)
3295        }
3296
3297        /// Sets the value of [data_table][crate::model::UpdateDataTableRequest::data_table].
3298        ///
3299        /// This is a **required** field for requests.
3300        pub fn set_data_table<T>(mut self, v: T) -> Self
3301        where
3302            T: std::convert::Into<crate::model::DataTable>,
3303        {
3304            self.0.request.data_table = std::option::Option::Some(v.into());
3305            self
3306        }
3307
3308        /// Sets or clears the value of [data_table][crate::model::UpdateDataTableRequest::data_table].
3309        ///
3310        /// This is a **required** field for requests.
3311        pub fn set_or_clear_data_table<T>(mut self, v: std::option::Option<T>) -> Self
3312        where
3313            T: std::convert::Into<crate::model::DataTable>,
3314        {
3315            self.0.request.data_table = v.map(|x| x.into());
3316            self
3317        }
3318
3319        /// Sets the value of [update_mask][crate::model::UpdateDataTableRequest::update_mask].
3320        pub fn set_update_mask<T>(mut self, v: T) -> Self
3321        where
3322            T: std::convert::Into<wkt::FieldMask>,
3323        {
3324            self.0.request.update_mask = std::option::Option::Some(v.into());
3325            self
3326        }
3327
3328        /// Sets or clears the value of [update_mask][crate::model::UpdateDataTableRequest::update_mask].
3329        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3330        where
3331            T: std::convert::Into<wkt::FieldMask>,
3332        {
3333            self.0.request.update_mask = v.map(|x| x.into());
3334            self
3335        }
3336    }
3337
3338    #[doc(hidden)]
3339    impl crate::RequestBuilder for UpdateDataTable {
3340        fn request_options(&mut self) -> &mut crate::RequestOptions {
3341            &mut self.0.options
3342        }
3343    }
3344
3345    /// The request builder for [DataTableService::delete_data_table][crate::client::DataTableService::delete_data_table] calls.
3346    ///
3347    /// # Example
3348    /// ```
3349    /// # use google_cloud_chronicle_v1::builder::data_table_service::DeleteDataTable;
3350    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
3351    ///
3352    /// let builder = prepare_request_builder();
3353    /// let response = builder.send().await?;
3354    /// # Ok(()) }
3355    ///
3356    /// fn prepare_request_builder() -> DeleteDataTable {
3357    ///   # panic!();
3358    ///   // ... details omitted ...
3359    /// }
3360    /// ```
3361    #[derive(Clone, Debug)]
3362    pub struct DeleteDataTable(RequestBuilder<crate::model::DeleteDataTableRequest>);
3363
3364    impl DeleteDataTable {
3365        pub(crate) fn new(
3366            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTableService>,
3367        ) -> Self {
3368            Self(RequestBuilder::new(stub))
3369        }
3370
3371        /// Sets the full request, replacing any prior values.
3372        pub fn with_request<V: Into<crate::model::DeleteDataTableRequest>>(mut self, v: V) -> Self {
3373            self.0.request = v.into();
3374            self
3375        }
3376
3377        /// Sets all the options, replacing any prior values.
3378        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3379            self.0.options = v.into();
3380            self
3381        }
3382
3383        /// Sends the request.
3384        pub async fn send(self) -> Result<()> {
3385            (*self.0.stub)
3386                .delete_data_table(self.0.request, self.0.options)
3387                .await
3388                .map(crate::Response::into_body)
3389        }
3390
3391        /// Sets the value of [name][crate::model::DeleteDataTableRequest::name].
3392        ///
3393        /// This is a **required** field for requests.
3394        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3395            self.0.request.name = v.into();
3396            self
3397        }
3398
3399        /// Sets the value of [force][crate::model::DeleteDataTableRequest::force].
3400        pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
3401            self.0.request.force = v.into();
3402            self
3403        }
3404    }
3405
3406    #[doc(hidden)]
3407    impl crate::RequestBuilder for DeleteDataTable {
3408        fn request_options(&mut self) -> &mut crate::RequestOptions {
3409            &mut self.0.options
3410        }
3411    }
3412
3413    /// The request builder for [DataTableService::create_data_table_row][crate::client::DataTableService::create_data_table_row] calls.
3414    ///
3415    /// # Example
3416    /// ```
3417    /// # use google_cloud_chronicle_v1::builder::data_table_service::CreateDataTableRow;
3418    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
3419    ///
3420    /// let builder = prepare_request_builder();
3421    /// let response = builder.send().await?;
3422    /// # Ok(()) }
3423    ///
3424    /// fn prepare_request_builder() -> CreateDataTableRow {
3425    ///   # panic!();
3426    ///   // ... details omitted ...
3427    /// }
3428    /// ```
3429    #[derive(Clone, Debug)]
3430    pub struct CreateDataTableRow(RequestBuilder<crate::model::CreateDataTableRowRequest>);
3431
3432    impl CreateDataTableRow {
3433        pub(crate) fn new(
3434            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTableService>,
3435        ) -> Self {
3436            Self(RequestBuilder::new(stub))
3437        }
3438
3439        /// Sets the full request, replacing any prior values.
3440        pub fn with_request<V: Into<crate::model::CreateDataTableRowRequest>>(
3441            mut self,
3442            v: V,
3443        ) -> Self {
3444            self.0.request = v.into();
3445            self
3446        }
3447
3448        /// Sets all the options, replacing any prior values.
3449        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3450            self.0.options = v.into();
3451            self
3452        }
3453
3454        /// Sends the request.
3455        pub async fn send(self) -> Result<crate::model::DataTableRow> {
3456            (*self.0.stub)
3457                .create_data_table_row(self.0.request, self.0.options)
3458                .await
3459                .map(crate::Response::into_body)
3460        }
3461
3462        /// Sets the value of [parent][crate::model::CreateDataTableRowRequest::parent].
3463        ///
3464        /// This is a **required** field for requests.
3465        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3466            self.0.request.parent = v.into();
3467            self
3468        }
3469
3470        /// Sets the value of [data_table_row][crate::model::CreateDataTableRowRequest::data_table_row].
3471        ///
3472        /// This is a **required** field for requests.
3473        pub fn set_data_table_row<T>(mut self, v: T) -> Self
3474        where
3475            T: std::convert::Into<crate::model::DataTableRow>,
3476        {
3477            self.0.request.data_table_row = std::option::Option::Some(v.into());
3478            self
3479        }
3480
3481        /// Sets or clears the value of [data_table_row][crate::model::CreateDataTableRowRequest::data_table_row].
3482        ///
3483        /// This is a **required** field for requests.
3484        pub fn set_or_clear_data_table_row<T>(mut self, v: std::option::Option<T>) -> Self
3485        where
3486            T: std::convert::Into<crate::model::DataTableRow>,
3487        {
3488            self.0.request.data_table_row = v.map(|x| x.into());
3489            self
3490        }
3491    }
3492
3493    #[doc(hidden)]
3494    impl crate::RequestBuilder for CreateDataTableRow {
3495        fn request_options(&mut self) -> &mut crate::RequestOptions {
3496            &mut self.0.options
3497        }
3498    }
3499
3500    /// The request builder for [DataTableService::update_data_table_row][crate::client::DataTableService::update_data_table_row] calls.
3501    ///
3502    /// # Example
3503    /// ```
3504    /// # use google_cloud_chronicle_v1::builder::data_table_service::UpdateDataTableRow;
3505    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
3506    ///
3507    /// let builder = prepare_request_builder();
3508    /// let response = builder.send().await?;
3509    /// # Ok(()) }
3510    ///
3511    /// fn prepare_request_builder() -> UpdateDataTableRow {
3512    ///   # panic!();
3513    ///   // ... details omitted ...
3514    /// }
3515    /// ```
3516    #[derive(Clone, Debug)]
3517    pub struct UpdateDataTableRow(RequestBuilder<crate::model::UpdateDataTableRowRequest>);
3518
3519    impl UpdateDataTableRow {
3520        pub(crate) fn new(
3521            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTableService>,
3522        ) -> Self {
3523            Self(RequestBuilder::new(stub))
3524        }
3525
3526        /// Sets the full request, replacing any prior values.
3527        pub fn with_request<V: Into<crate::model::UpdateDataTableRowRequest>>(
3528            mut self,
3529            v: V,
3530        ) -> Self {
3531            self.0.request = v.into();
3532            self
3533        }
3534
3535        /// Sets all the options, replacing any prior values.
3536        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3537            self.0.options = v.into();
3538            self
3539        }
3540
3541        /// Sends the request.
3542        pub async fn send(self) -> Result<crate::model::DataTableRow> {
3543            (*self.0.stub)
3544                .update_data_table_row(self.0.request, self.0.options)
3545                .await
3546                .map(crate::Response::into_body)
3547        }
3548
3549        /// Sets the value of [data_table_row][crate::model::UpdateDataTableRowRequest::data_table_row].
3550        ///
3551        /// This is a **required** field for requests.
3552        pub fn set_data_table_row<T>(mut self, v: T) -> Self
3553        where
3554            T: std::convert::Into<crate::model::DataTableRow>,
3555        {
3556            self.0.request.data_table_row = std::option::Option::Some(v.into());
3557            self
3558        }
3559
3560        /// Sets or clears the value of [data_table_row][crate::model::UpdateDataTableRowRequest::data_table_row].
3561        ///
3562        /// This is a **required** field for requests.
3563        pub fn set_or_clear_data_table_row<T>(mut self, v: std::option::Option<T>) -> Self
3564        where
3565            T: std::convert::Into<crate::model::DataTableRow>,
3566        {
3567            self.0.request.data_table_row = v.map(|x| x.into());
3568            self
3569        }
3570
3571        /// Sets the value of [update_mask][crate::model::UpdateDataTableRowRequest::update_mask].
3572        pub fn set_update_mask<T>(mut self, v: T) -> Self
3573        where
3574            T: std::convert::Into<wkt::FieldMask>,
3575        {
3576            self.0.request.update_mask = std::option::Option::Some(v.into());
3577            self
3578        }
3579
3580        /// Sets or clears the value of [update_mask][crate::model::UpdateDataTableRowRequest::update_mask].
3581        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3582        where
3583            T: std::convert::Into<wkt::FieldMask>,
3584        {
3585            self.0.request.update_mask = v.map(|x| x.into());
3586            self
3587        }
3588    }
3589
3590    #[doc(hidden)]
3591    impl crate::RequestBuilder for UpdateDataTableRow {
3592        fn request_options(&mut self) -> &mut crate::RequestOptions {
3593            &mut self.0.options
3594        }
3595    }
3596
3597    /// The request builder for [DataTableService::list_data_table_rows][crate::client::DataTableService::list_data_table_rows] calls.
3598    ///
3599    /// # Example
3600    /// ```
3601    /// # use google_cloud_chronicle_v1::builder::data_table_service::ListDataTableRows;
3602    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
3603    /// use google_cloud_gax::paginator::ItemPaginator;
3604    ///
3605    /// let builder = prepare_request_builder();
3606    /// let mut items = builder.by_item();
3607    /// while let Some(result) = items.next().await {
3608    ///   let item = result?;
3609    /// }
3610    /// # Ok(()) }
3611    ///
3612    /// fn prepare_request_builder() -> ListDataTableRows {
3613    ///   # panic!();
3614    ///   // ... details omitted ...
3615    /// }
3616    /// ```
3617    #[derive(Clone, Debug)]
3618    pub struct ListDataTableRows(RequestBuilder<crate::model::ListDataTableRowsRequest>);
3619
3620    impl ListDataTableRows {
3621        pub(crate) fn new(
3622            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTableService>,
3623        ) -> Self {
3624            Self(RequestBuilder::new(stub))
3625        }
3626
3627        /// Sets the full request, replacing any prior values.
3628        pub fn with_request<V: Into<crate::model::ListDataTableRowsRequest>>(
3629            mut self,
3630            v: V,
3631        ) -> Self {
3632            self.0.request = v.into();
3633            self
3634        }
3635
3636        /// Sets all the options, replacing any prior values.
3637        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3638            self.0.options = v.into();
3639            self
3640        }
3641
3642        /// Sends the request.
3643        pub async fn send(self) -> Result<crate::model::ListDataTableRowsResponse> {
3644            (*self.0.stub)
3645                .list_data_table_rows(self.0.request, self.0.options)
3646                .await
3647                .map(crate::Response::into_body)
3648        }
3649
3650        /// Streams each page in the collection.
3651        pub fn by_page(
3652            self,
3653        ) -> impl google_cloud_gax::paginator::Paginator<
3654            crate::model::ListDataTableRowsResponse,
3655            crate::Error,
3656        > {
3657            use std::clone::Clone;
3658            let token = self.0.request.page_token.clone();
3659            let execute = move |token: String| {
3660                let mut builder = self.clone();
3661                builder.0.request = builder.0.request.set_page_token(token);
3662                builder.send()
3663            };
3664            google_cloud_gax::paginator::internal::new_paginator(token, execute)
3665        }
3666
3667        /// Streams each item in the collection.
3668        pub fn by_item(
3669            self,
3670        ) -> impl google_cloud_gax::paginator::ItemPaginator<
3671            crate::model::ListDataTableRowsResponse,
3672            crate::Error,
3673        > {
3674            use google_cloud_gax::paginator::Paginator;
3675            self.by_page().items()
3676        }
3677
3678        /// Sets the value of [parent][crate::model::ListDataTableRowsRequest::parent].
3679        ///
3680        /// This is a **required** field for requests.
3681        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3682            self.0.request.parent = v.into();
3683            self
3684        }
3685
3686        /// Sets the value of [page_size][crate::model::ListDataTableRowsRequest::page_size].
3687        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3688            self.0.request.page_size = v.into();
3689            self
3690        }
3691
3692        /// Sets the value of [page_token][crate::model::ListDataTableRowsRequest::page_token].
3693        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3694            self.0.request.page_token = v.into();
3695            self
3696        }
3697
3698        /// Sets the value of [order_by][crate::model::ListDataTableRowsRequest::order_by].
3699        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3700            self.0.request.order_by = v.into();
3701            self
3702        }
3703
3704        /// Sets the value of [filter][crate::model::ListDataTableRowsRequest::filter].
3705        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3706            self.0.request.filter = v.into();
3707            self
3708        }
3709    }
3710
3711    #[doc(hidden)]
3712    impl crate::RequestBuilder for ListDataTableRows {
3713        fn request_options(&mut self) -> &mut crate::RequestOptions {
3714            &mut self.0.options
3715        }
3716    }
3717
3718    /// The request builder for [DataTableService::get_data_table_row][crate::client::DataTableService::get_data_table_row] calls.
3719    ///
3720    /// # Example
3721    /// ```
3722    /// # use google_cloud_chronicle_v1::builder::data_table_service::GetDataTableRow;
3723    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
3724    ///
3725    /// let builder = prepare_request_builder();
3726    /// let response = builder.send().await?;
3727    /// # Ok(()) }
3728    ///
3729    /// fn prepare_request_builder() -> GetDataTableRow {
3730    ///   # panic!();
3731    ///   // ... details omitted ...
3732    /// }
3733    /// ```
3734    #[derive(Clone, Debug)]
3735    pub struct GetDataTableRow(RequestBuilder<crate::model::GetDataTableRowRequest>);
3736
3737    impl GetDataTableRow {
3738        pub(crate) fn new(
3739            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTableService>,
3740        ) -> Self {
3741            Self(RequestBuilder::new(stub))
3742        }
3743
3744        /// Sets the full request, replacing any prior values.
3745        pub fn with_request<V: Into<crate::model::GetDataTableRowRequest>>(mut self, v: V) -> Self {
3746            self.0.request = v.into();
3747            self
3748        }
3749
3750        /// Sets all the options, replacing any prior values.
3751        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3752            self.0.options = v.into();
3753            self
3754        }
3755
3756        /// Sends the request.
3757        pub async fn send(self) -> Result<crate::model::DataTableRow> {
3758            (*self.0.stub)
3759                .get_data_table_row(self.0.request, self.0.options)
3760                .await
3761                .map(crate::Response::into_body)
3762        }
3763
3764        /// Sets the value of [name][crate::model::GetDataTableRowRequest::name].
3765        ///
3766        /// This is a **required** field for requests.
3767        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3768            self.0.request.name = v.into();
3769            self
3770        }
3771    }
3772
3773    #[doc(hidden)]
3774    impl crate::RequestBuilder for GetDataTableRow {
3775        fn request_options(&mut self) -> &mut crate::RequestOptions {
3776            &mut self.0.options
3777        }
3778    }
3779
3780    /// The request builder for [DataTableService::delete_data_table_row][crate::client::DataTableService::delete_data_table_row] calls.
3781    ///
3782    /// # Example
3783    /// ```
3784    /// # use google_cloud_chronicle_v1::builder::data_table_service::DeleteDataTableRow;
3785    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
3786    ///
3787    /// let builder = prepare_request_builder();
3788    /// let response = builder.send().await?;
3789    /// # Ok(()) }
3790    ///
3791    /// fn prepare_request_builder() -> DeleteDataTableRow {
3792    ///   # panic!();
3793    ///   // ... details omitted ...
3794    /// }
3795    /// ```
3796    #[derive(Clone, Debug)]
3797    pub struct DeleteDataTableRow(RequestBuilder<crate::model::DeleteDataTableRowRequest>);
3798
3799    impl DeleteDataTableRow {
3800        pub(crate) fn new(
3801            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTableService>,
3802        ) -> Self {
3803            Self(RequestBuilder::new(stub))
3804        }
3805
3806        /// Sets the full request, replacing any prior values.
3807        pub fn with_request<V: Into<crate::model::DeleteDataTableRowRequest>>(
3808            mut self,
3809            v: V,
3810        ) -> Self {
3811            self.0.request = v.into();
3812            self
3813        }
3814
3815        /// Sets all the options, replacing any prior values.
3816        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3817            self.0.options = v.into();
3818            self
3819        }
3820
3821        /// Sends the request.
3822        pub async fn send(self) -> Result<()> {
3823            (*self.0.stub)
3824                .delete_data_table_row(self.0.request, self.0.options)
3825                .await
3826                .map(crate::Response::into_body)
3827        }
3828
3829        /// Sets the value of [name][crate::model::DeleteDataTableRowRequest::name].
3830        ///
3831        /// This is a **required** field for requests.
3832        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3833            self.0.request.name = v.into();
3834            self
3835        }
3836    }
3837
3838    #[doc(hidden)]
3839    impl crate::RequestBuilder for DeleteDataTableRow {
3840        fn request_options(&mut self) -> &mut crate::RequestOptions {
3841            &mut self.0.options
3842        }
3843    }
3844
3845    /// The request builder for [DataTableService::bulk_create_data_table_rows][crate::client::DataTableService::bulk_create_data_table_rows] calls.
3846    ///
3847    /// # Example
3848    /// ```
3849    /// # use google_cloud_chronicle_v1::builder::data_table_service::BulkCreateDataTableRows;
3850    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
3851    ///
3852    /// let builder = prepare_request_builder();
3853    /// let response = builder.send().await?;
3854    /// # Ok(()) }
3855    ///
3856    /// fn prepare_request_builder() -> BulkCreateDataTableRows {
3857    ///   # panic!();
3858    ///   // ... details omitted ...
3859    /// }
3860    /// ```
3861    #[derive(Clone, Debug)]
3862    pub struct BulkCreateDataTableRows(
3863        RequestBuilder<crate::model::BulkCreateDataTableRowsRequest>,
3864    );
3865
3866    impl BulkCreateDataTableRows {
3867        pub(crate) fn new(
3868            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTableService>,
3869        ) -> Self {
3870            Self(RequestBuilder::new(stub))
3871        }
3872
3873        /// Sets the full request, replacing any prior values.
3874        pub fn with_request<V: Into<crate::model::BulkCreateDataTableRowsRequest>>(
3875            mut self,
3876            v: V,
3877        ) -> Self {
3878            self.0.request = v.into();
3879            self
3880        }
3881
3882        /// Sets all the options, replacing any prior values.
3883        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3884            self.0.options = v.into();
3885            self
3886        }
3887
3888        /// Sends the request.
3889        pub async fn send(self) -> Result<crate::model::BulkCreateDataTableRowsResponse> {
3890            (*self.0.stub)
3891                .bulk_create_data_table_rows(self.0.request, self.0.options)
3892                .await
3893                .map(crate::Response::into_body)
3894        }
3895
3896        /// Sets the value of [parent][crate::model::BulkCreateDataTableRowsRequest::parent].
3897        ///
3898        /// This is a **required** field for requests.
3899        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3900            self.0.request.parent = v.into();
3901            self
3902        }
3903
3904        /// Sets the value of [requests][crate::model::BulkCreateDataTableRowsRequest::requests].
3905        ///
3906        /// This is a **required** field for requests.
3907        pub fn set_requests<T, V>(mut self, v: T) -> Self
3908        where
3909            T: std::iter::IntoIterator<Item = V>,
3910            V: std::convert::Into<crate::model::CreateDataTableRowRequest>,
3911        {
3912            use std::iter::Iterator;
3913            self.0.request.requests = v.into_iter().map(|i| i.into()).collect();
3914            self
3915        }
3916    }
3917
3918    #[doc(hidden)]
3919    impl crate::RequestBuilder for BulkCreateDataTableRows {
3920        fn request_options(&mut self) -> &mut crate::RequestOptions {
3921            &mut self.0.options
3922        }
3923    }
3924
3925    /// The request builder for [DataTableService::bulk_get_data_table_rows][crate::client::DataTableService::bulk_get_data_table_rows] calls.
3926    ///
3927    /// # Example
3928    /// ```
3929    /// # use google_cloud_chronicle_v1::builder::data_table_service::BulkGetDataTableRows;
3930    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
3931    ///
3932    /// let builder = prepare_request_builder();
3933    /// let response = builder.send().await?;
3934    /// # Ok(()) }
3935    ///
3936    /// fn prepare_request_builder() -> BulkGetDataTableRows {
3937    ///   # panic!();
3938    ///   // ... details omitted ...
3939    /// }
3940    /// ```
3941    #[derive(Clone, Debug)]
3942    pub struct BulkGetDataTableRows(RequestBuilder<crate::model::BulkGetDataTableRowsRequest>);
3943
3944    impl BulkGetDataTableRows {
3945        pub(crate) fn new(
3946            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTableService>,
3947        ) -> Self {
3948            Self(RequestBuilder::new(stub))
3949        }
3950
3951        /// Sets the full request, replacing any prior values.
3952        pub fn with_request<V: Into<crate::model::BulkGetDataTableRowsRequest>>(
3953            mut self,
3954            v: V,
3955        ) -> Self {
3956            self.0.request = v.into();
3957            self
3958        }
3959
3960        /// Sets all the options, replacing any prior values.
3961        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3962            self.0.options = v.into();
3963            self
3964        }
3965
3966        /// Sends the request.
3967        pub async fn send(self) -> Result<crate::model::BulkGetDataTableRowsResponse> {
3968            (*self.0.stub)
3969                .bulk_get_data_table_rows(self.0.request, self.0.options)
3970                .await
3971                .map(crate::Response::into_body)
3972        }
3973
3974        /// Sets the value of [parent][crate::model::BulkGetDataTableRowsRequest::parent].
3975        ///
3976        /// This is a **required** field for requests.
3977        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3978            self.0.request.parent = v.into();
3979            self
3980        }
3981
3982        /// Sets the value of [requests][crate::model::BulkGetDataTableRowsRequest::requests].
3983        ///
3984        /// This is a **required** field for requests.
3985        pub fn set_requests<T, V>(mut self, v: T) -> Self
3986        where
3987            T: std::iter::IntoIterator<Item = V>,
3988            V: std::convert::Into<crate::model::GetDataTableRowRequest>,
3989        {
3990            use std::iter::Iterator;
3991            self.0.request.requests = v.into_iter().map(|i| i.into()).collect();
3992            self
3993        }
3994    }
3995
3996    #[doc(hidden)]
3997    impl crate::RequestBuilder for BulkGetDataTableRows {
3998        fn request_options(&mut self) -> &mut crate::RequestOptions {
3999            &mut self.0.options
4000        }
4001    }
4002
4003    /// The request builder for [DataTableService::bulk_replace_data_table_rows][crate::client::DataTableService::bulk_replace_data_table_rows] calls.
4004    ///
4005    /// # Example
4006    /// ```
4007    /// # use google_cloud_chronicle_v1::builder::data_table_service::BulkReplaceDataTableRows;
4008    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
4009    ///
4010    /// let builder = prepare_request_builder();
4011    /// let response = builder.send().await?;
4012    /// # Ok(()) }
4013    ///
4014    /// fn prepare_request_builder() -> BulkReplaceDataTableRows {
4015    ///   # panic!();
4016    ///   // ... details omitted ...
4017    /// }
4018    /// ```
4019    #[derive(Clone, Debug)]
4020    pub struct BulkReplaceDataTableRows(
4021        RequestBuilder<crate::model::BulkReplaceDataTableRowsRequest>,
4022    );
4023
4024    impl BulkReplaceDataTableRows {
4025        pub(crate) fn new(
4026            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTableService>,
4027        ) -> Self {
4028            Self(RequestBuilder::new(stub))
4029        }
4030
4031        /// Sets the full request, replacing any prior values.
4032        pub fn with_request<V: Into<crate::model::BulkReplaceDataTableRowsRequest>>(
4033            mut self,
4034            v: V,
4035        ) -> Self {
4036            self.0.request = v.into();
4037            self
4038        }
4039
4040        /// Sets all the options, replacing any prior values.
4041        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4042            self.0.options = v.into();
4043            self
4044        }
4045
4046        /// Sends the request.
4047        pub async fn send(self) -> Result<crate::model::BulkReplaceDataTableRowsResponse> {
4048            (*self.0.stub)
4049                .bulk_replace_data_table_rows(self.0.request, self.0.options)
4050                .await
4051                .map(crate::Response::into_body)
4052        }
4053
4054        /// Sets the value of [parent][crate::model::BulkReplaceDataTableRowsRequest::parent].
4055        ///
4056        /// This is a **required** field for requests.
4057        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4058            self.0.request.parent = v.into();
4059            self
4060        }
4061
4062        /// Sets the value of [requests][crate::model::BulkReplaceDataTableRowsRequest::requests].
4063        ///
4064        /// This is a **required** field for requests.
4065        pub fn set_requests<T, V>(mut self, v: T) -> Self
4066        where
4067            T: std::iter::IntoIterator<Item = V>,
4068            V: std::convert::Into<crate::model::CreateDataTableRowRequest>,
4069        {
4070            use std::iter::Iterator;
4071            self.0.request.requests = v.into_iter().map(|i| i.into()).collect();
4072            self
4073        }
4074    }
4075
4076    #[doc(hidden)]
4077    impl crate::RequestBuilder for BulkReplaceDataTableRows {
4078        fn request_options(&mut self) -> &mut crate::RequestOptions {
4079            &mut self.0.options
4080        }
4081    }
4082
4083    /// The request builder for [DataTableService::bulk_update_data_table_rows][crate::client::DataTableService::bulk_update_data_table_rows] calls.
4084    ///
4085    /// # Example
4086    /// ```
4087    /// # use google_cloud_chronicle_v1::builder::data_table_service::BulkUpdateDataTableRows;
4088    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
4089    ///
4090    /// let builder = prepare_request_builder();
4091    /// let response = builder.send().await?;
4092    /// # Ok(()) }
4093    ///
4094    /// fn prepare_request_builder() -> BulkUpdateDataTableRows {
4095    ///   # panic!();
4096    ///   // ... details omitted ...
4097    /// }
4098    /// ```
4099    #[derive(Clone, Debug)]
4100    pub struct BulkUpdateDataTableRows(
4101        RequestBuilder<crate::model::BulkUpdateDataTableRowsRequest>,
4102    );
4103
4104    impl BulkUpdateDataTableRows {
4105        pub(crate) fn new(
4106            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTableService>,
4107        ) -> Self {
4108            Self(RequestBuilder::new(stub))
4109        }
4110
4111        /// Sets the full request, replacing any prior values.
4112        pub fn with_request<V: Into<crate::model::BulkUpdateDataTableRowsRequest>>(
4113            mut self,
4114            v: V,
4115        ) -> Self {
4116            self.0.request = v.into();
4117            self
4118        }
4119
4120        /// Sets all the options, replacing any prior values.
4121        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4122            self.0.options = v.into();
4123            self
4124        }
4125
4126        /// Sends the request.
4127        pub async fn send(self) -> Result<crate::model::BulkUpdateDataTableRowsResponse> {
4128            (*self.0.stub)
4129                .bulk_update_data_table_rows(self.0.request, self.0.options)
4130                .await
4131                .map(crate::Response::into_body)
4132        }
4133
4134        /// Sets the value of [parent][crate::model::BulkUpdateDataTableRowsRequest::parent].
4135        ///
4136        /// This is a **required** field for requests.
4137        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4138            self.0.request.parent = v.into();
4139            self
4140        }
4141
4142        /// Sets the value of [requests][crate::model::BulkUpdateDataTableRowsRequest::requests].
4143        ///
4144        /// This is a **required** field for requests.
4145        pub fn set_requests<T, V>(mut self, v: T) -> Self
4146        where
4147            T: std::iter::IntoIterator<Item = V>,
4148            V: std::convert::Into<crate::model::UpdateDataTableRowRequest>,
4149        {
4150            use std::iter::Iterator;
4151            self.0.request.requests = v.into_iter().map(|i| i.into()).collect();
4152            self
4153        }
4154    }
4155
4156    #[doc(hidden)]
4157    impl crate::RequestBuilder for BulkUpdateDataTableRows {
4158        fn request_options(&mut self) -> &mut crate::RequestOptions {
4159            &mut self.0.options
4160        }
4161    }
4162
4163    /// The request builder for [DataTableService::get_data_table_operation_errors][crate::client::DataTableService::get_data_table_operation_errors] calls.
4164    ///
4165    /// # Example
4166    /// ```
4167    /// # use google_cloud_chronicle_v1::builder::data_table_service::GetDataTableOperationErrors;
4168    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
4169    ///
4170    /// let builder = prepare_request_builder();
4171    /// let response = builder.send().await?;
4172    /// # Ok(()) }
4173    ///
4174    /// fn prepare_request_builder() -> GetDataTableOperationErrors {
4175    ///   # panic!();
4176    ///   // ... details omitted ...
4177    /// }
4178    /// ```
4179    #[derive(Clone, Debug)]
4180    pub struct GetDataTableOperationErrors(
4181        RequestBuilder<crate::model::GetDataTableOperationErrorsRequest>,
4182    );
4183
4184    impl GetDataTableOperationErrors {
4185        pub(crate) fn new(
4186            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTableService>,
4187        ) -> Self {
4188            Self(RequestBuilder::new(stub))
4189        }
4190
4191        /// Sets the full request, replacing any prior values.
4192        pub fn with_request<V: Into<crate::model::GetDataTableOperationErrorsRequest>>(
4193            mut self,
4194            v: V,
4195        ) -> Self {
4196            self.0.request = v.into();
4197            self
4198        }
4199
4200        /// Sets all the options, replacing any prior values.
4201        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4202            self.0.options = v.into();
4203            self
4204        }
4205
4206        /// Sends the request.
4207        pub async fn send(self) -> Result<crate::model::DataTableOperationErrors> {
4208            (*self.0.stub)
4209                .get_data_table_operation_errors(self.0.request, self.0.options)
4210                .await
4211                .map(crate::Response::into_body)
4212        }
4213
4214        /// Sets the value of [name][crate::model::GetDataTableOperationErrorsRequest::name].
4215        ///
4216        /// This is a **required** field for requests.
4217        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4218            self.0.request.name = v.into();
4219            self
4220        }
4221    }
4222
4223    #[doc(hidden)]
4224    impl crate::RequestBuilder for GetDataTableOperationErrors {
4225        fn request_options(&mut self) -> &mut crate::RequestOptions {
4226            &mut self.0.options
4227        }
4228    }
4229
4230    /// The request builder for [DataTableService::list_operations][crate::client::DataTableService::list_operations] calls.
4231    ///
4232    /// # Example
4233    /// ```
4234    /// # use google_cloud_chronicle_v1::builder::data_table_service::ListOperations;
4235    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
4236    /// use google_cloud_gax::paginator::ItemPaginator;
4237    ///
4238    /// let builder = prepare_request_builder();
4239    /// let mut items = builder.by_item();
4240    /// while let Some(result) = items.next().await {
4241    ///   let item = result?;
4242    /// }
4243    /// # Ok(()) }
4244    ///
4245    /// fn prepare_request_builder() -> ListOperations {
4246    ///   # panic!();
4247    ///   // ... details omitted ...
4248    /// }
4249    /// ```
4250    #[derive(Clone, Debug)]
4251    pub struct ListOperations(
4252        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
4253    );
4254
4255    impl ListOperations {
4256        pub(crate) fn new(
4257            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTableService>,
4258        ) -> Self {
4259            Self(RequestBuilder::new(stub))
4260        }
4261
4262        /// Sets the full request, replacing any prior values.
4263        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
4264            mut self,
4265            v: V,
4266        ) -> Self {
4267            self.0.request = v.into();
4268            self
4269        }
4270
4271        /// Sets all the options, replacing any prior values.
4272        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4273            self.0.options = v.into();
4274            self
4275        }
4276
4277        /// Sends the request.
4278        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
4279            (*self.0.stub)
4280                .list_operations(self.0.request, self.0.options)
4281                .await
4282                .map(crate::Response::into_body)
4283        }
4284
4285        /// Streams each page in the collection.
4286        pub fn by_page(
4287            self,
4288        ) -> impl google_cloud_gax::paginator::Paginator<
4289            google_cloud_longrunning::model::ListOperationsResponse,
4290            crate::Error,
4291        > {
4292            use std::clone::Clone;
4293            let token = self.0.request.page_token.clone();
4294            let execute = move |token: String| {
4295                let mut builder = self.clone();
4296                builder.0.request = builder.0.request.set_page_token(token);
4297                builder.send()
4298            };
4299            google_cloud_gax::paginator::internal::new_paginator(token, execute)
4300        }
4301
4302        /// Streams each item in the collection.
4303        pub fn by_item(
4304            self,
4305        ) -> impl google_cloud_gax::paginator::ItemPaginator<
4306            google_cloud_longrunning::model::ListOperationsResponse,
4307            crate::Error,
4308        > {
4309            use google_cloud_gax::paginator::Paginator;
4310            self.by_page().items()
4311        }
4312
4313        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
4314        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4315            self.0.request.name = v.into();
4316            self
4317        }
4318
4319        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
4320        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4321            self.0.request.filter = v.into();
4322            self
4323        }
4324
4325        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
4326        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4327            self.0.request.page_size = v.into();
4328            self
4329        }
4330
4331        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
4332        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4333            self.0.request.page_token = v.into();
4334            self
4335        }
4336
4337        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
4338        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
4339            self.0.request.return_partial_success = v.into();
4340            self
4341        }
4342    }
4343
4344    #[doc(hidden)]
4345    impl crate::RequestBuilder for ListOperations {
4346        fn request_options(&mut self) -> &mut crate::RequestOptions {
4347            &mut self.0.options
4348        }
4349    }
4350
4351    /// The request builder for [DataTableService::get_operation][crate::client::DataTableService::get_operation] calls.
4352    ///
4353    /// # Example
4354    /// ```
4355    /// # use google_cloud_chronicle_v1::builder::data_table_service::GetOperation;
4356    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
4357    ///
4358    /// let builder = prepare_request_builder();
4359    /// let response = builder.send().await?;
4360    /// # Ok(()) }
4361    ///
4362    /// fn prepare_request_builder() -> GetOperation {
4363    ///   # panic!();
4364    ///   // ... details omitted ...
4365    /// }
4366    /// ```
4367    #[derive(Clone, Debug)]
4368    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
4369
4370    impl GetOperation {
4371        pub(crate) fn new(
4372            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTableService>,
4373        ) -> Self {
4374            Self(RequestBuilder::new(stub))
4375        }
4376
4377        /// Sets the full request, replacing any prior values.
4378        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
4379            mut self,
4380            v: V,
4381        ) -> Self {
4382            self.0.request = v.into();
4383            self
4384        }
4385
4386        /// Sets all the options, replacing any prior values.
4387        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4388            self.0.options = v.into();
4389            self
4390        }
4391
4392        /// Sends the request.
4393        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4394            (*self.0.stub)
4395                .get_operation(self.0.request, self.0.options)
4396                .await
4397                .map(crate::Response::into_body)
4398        }
4399
4400        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
4401        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4402            self.0.request.name = v.into();
4403            self
4404        }
4405    }
4406
4407    #[doc(hidden)]
4408    impl crate::RequestBuilder for GetOperation {
4409        fn request_options(&mut self) -> &mut crate::RequestOptions {
4410            &mut self.0.options
4411        }
4412    }
4413
4414    /// The request builder for [DataTableService::delete_operation][crate::client::DataTableService::delete_operation] calls.
4415    ///
4416    /// # Example
4417    /// ```
4418    /// # use google_cloud_chronicle_v1::builder::data_table_service::DeleteOperation;
4419    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
4420    ///
4421    /// let builder = prepare_request_builder();
4422    /// let response = builder.send().await?;
4423    /// # Ok(()) }
4424    ///
4425    /// fn prepare_request_builder() -> DeleteOperation {
4426    ///   # panic!();
4427    ///   // ... details omitted ...
4428    /// }
4429    /// ```
4430    #[derive(Clone, Debug)]
4431    pub struct DeleteOperation(
4432        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
4433    );
4434
4435    impl DeleteOperation {
4436        pub(crate) fn new(
4437            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTableService>,
4438        ) -> Self {
4439            Self(RequestBuilder::new(stub))
4440        }
4441
4442        /// Sets the full request, replacing any prior values.
4443        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
4444            mut self,
4445            v: V,
4446        ) -> Self {
4447            self.0.request = v.into();
4448            self
4449        }
4450
4451        /// Sets all the options, replacing any prior values.
4452        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4453            self.0.options = v.into();
4454            self
4455        }
4456
4457        /// Sends the request.
4458        pub async fn send(self) -> Result<()> {
4459            (*self.0.stub)
4460                .delete_operation(self.0.request, self.0.options)
4461                .await
4462                .map(crate::Response::into_body)
4463        }
4464
4465        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
4466        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4467            self.0.request.name = v.into();
4468            self
4469        }
4470    }
4471
4472    #[doc(hidden)]
4473    impl crate::RequestBuilder for DeleteOperation {
4474        fn request_options(&mut self) -> &mut crate::RequestOptions {
4475            &mut self.0.options
4476        }
4477    }
4478
4479    /// The request builder for [DataTableService::cancel_operation][crate::client::DataTableService::cancel_operation] calls.
4480    ///
4481    /// # Example
4482    /// ```
4483    /// # use google_cloud_chronicle_v1::builder::data_table_service::CancelOperation;
4484    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
4485    ///
4486    /// let builder = prepare_request_builder();
4487    /// let response = builder.send().await?;
4488    /// # Ok(()) }
4489    ///
4490    /// fn prepare_request_builder() -> CancelOperation {
4491    ///   # panic!();
4492    ///   // ... details omitted ...
4493    /// }
4494    /// ```
4495    #[derive(Clone, Debug)]
4496    pub struct CancelOperation(
4497        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
4498    );
4499
4500    impl CancelOperation {
4501        pub(crate) fn new(
4502            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTableService>,
4503        ) -> Self {
4504            Self(RequestBuilder::new(stub))
4505        }
4506
4507        /// Sets the full request, replacing any prior values.
4508        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
4509            mut self,
4510            v: V,
4511        ) -> Self {
4512            self.0.request = v.into();
4513            self
4514        }
4515
4516        /// Sets all the options, replacing any prior values.
4517        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4518            self.0.options = v.into();
4519            self
4520        }
4521
4522        /// Sends the request.
4523        pub async fn send(self) -> Result<()> {
4524            (*self.0.stub)
4525                .cancel_operation(self.0.request, self.0.options)
4526                .await
4527                .map(crate::Response::into_body)
4528        }
4529
4530        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
4531        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4532            self.0.request.name = v.into();
4533            self
4534        }
4535    }
4536
4537    #[doc(hidden)]
4538    impl crate::RequestBuilder for CancelOperation {
4539        fn request_options(&mut self) -> &mut crate::RequestOptions {
4540            &mut self.0.options
4541        }
4542    }
4543}
4544
4545/// Request and client builders for [EntityService][crate::client::EntityService].
4546pub mod entity_service {
4547    use crate::Result;
4548
4549    /// A builder for [EntityService][crate::client::EntityService].
4550    ///
4551    /// ```
4552    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
4553    /// # use google_cloud_chronicle_v1::*;
4554    /// # use builder::entity_service::ClientBuilder;
4555    /// # use client::EntityService;
4556    /// let builder : ClientBuilder = EntityService::builder();
4557    /// let client = builder
4558    ///     .with_endpoint("https://chronicle.googleapis.com")
4559    ///     .build().await?;
4560    /// # Ok(()) }
4561    /// ```
4562    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
4563
4564    pub(crate) mod client {
4565        use super::super::super::client::EntityService;
4566        pub struct Factory;
4567        impl crate::ClientFactory for Factory {
4568            type Client = EntityService;
4569            type Credentials = gaxi::options::Credentials;
4570            async fn build(
4571                self,
4572                config: gaxi::options::ClientConfig,
4573            ) -> crate::ClientBuilderResult<Self::Client> {
4574                Self::Client::new(config).await
4575            }
4576        }
4577    }
4578
4579    /// Common implementation for [crate::client::EntityService] request builders.
4580    #[derive(Clone, Debug)]
4581    pub(crate) struct RequestBuilder<R: std::default::Default> {
4582        stub: std::sync::Arc<dyn super::super::stub::dynamic::EntityService>,
4583        request: R,
4584        options: crate::RequestOptions,
4585    }
4586
4587    impl<R> RequestBuilder<R>
4588    where
4589        R: std::default::Default,
4590    {
4591        pub(crate) fn new(
4592            stub: std::sync::Arc<dyn super::super::stub::dynamic::EntityService>,
4593        ) -> Self {
4594            Self {
4595                stub,
4596                request: R::default(),
4597                options: crate::RequestOptions::default(),
4598            }
4599        }
4600    }
4601
4602    /// The request builder for [EntityService::get_watchlist][crate::client::EntityService::get_watchlist] calls.
4603    ///
4604    /// # Example
4605    /// ```
4606    /// # use google_cloud_chronicle_v1::builder::entity_service::GetWatchlist;
4607    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
4608    ///
4609    /// let builder = prepare_request_builder();
4610    /// let response = builder.send().await?;
4611    /// # Ok(()) }
4612    ///
4613    /// fn prepare_request_builder() -> GetWatchlist {
4614    ///   # panic!();
4615    ///   // ... details omitted ...
4616    /// }
4617    /// ```
4618    #[derive(Clone, Debug)]
4619    pub struct GetWatchlist(RequestBuilder<crate::model::GetWatchlistRequest>);
4620
4621    impl GetWatchlist {
4622        pub(crate) fn new(
4623            stub: std::sync::Arc<dyn super::super::stub::dynamic::EntityService>,
4624        ) -> Self {
4625            Self(RequestBuilder::new(stub))
4626        }
4627
4628        /// Sets the full request, replacing any prior values.
4629        pub fn with_request<V: Into<crate::model::GetWatchlistRequest>>(mut self, v: V) -> Self {
4630            self.0.request = v.into();
4631            self
4632        }
4633
4634        /// Sets all the options, replacing any prior values.
4635        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4636            self.0.options = v.into();
4637            self
4638        }
4639
4640        /// Sends the request.
4641        pub async fn send(self) -> Result<crate::model::Watchlist> {
4642            (*self.0.stub)
4643                .get_watchlist(self.0.request, self.0.options)
4644                .await
4645                .map(crate::Response::into_body)
4646        }
4647
4648        /// Sets the value of [name][crate::model::GetWatchlistRequest::name].
4649        ///
4650        /// This is a **required** field for requests.
4651        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4652            self.0.request.name = v.into();
4653            self
4654        }
4655    }
4656
4657    #[doc(hidden)]
4658    impl crate::RequestBuilder for GetWatchlist {
4659        fn request_options(&mut self) -> &mut crate::RequestOptions {
4660            &mut self.0.options
4661        }
4662    }
4663
4664    /// The request builder for [EntityService::list_watchlists][crate::client::EntityService::list_watchlists] calls.
4665    ///
4666    /// # Example
4667    /// ```
4668    /// # use google_cloud_chronicle_v1::builder::entity_service::ListWatchlists;
4669    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
4670    /// use google_cloud_gax::paginator::ItemPaginator;
4671    ///
4672    /// let builder = prepare_request_builder();
4673    /// let mut items = builder.by_item();
4674    /// while let Some(result) = items.next().await {
4675    ///   let item = result?;
4676    /// }
4677    /// # Ok(()) }
4678    ///
4679    /// fn prepare_request_builder() -> ListWatchlists {
4680    ///   # panic!();
4681    ///   // ... details omitted ...
4682    /// }
4683    /// ```
4684    #[derive(Clone, Debug)]
4685    pub struct ListWatchlists(RequestBuilder<crate::model::ListWatchlistsRequest>);
4686
4687    impl ListWatchlists {
4688        pub(crate) fn new(
4689            stub: std::sync::Arc<dyn super::super::stub::dynamic::EntityService>,
4690        ) -> Self {
4691            Self(RequestBuilder::new(stub))
4692        }
4693
4694        /// Sets the full request, replacing any prior values.
4695        pub fn with_request<V: Into<crate::model::ListWatchlistsRequest>>(mut self, v: V) -> Self {
4696            self.0.request = v.into();
4697            self
4698        }
4699
4700        /// Sets all the options, replacing any prior values.
4701        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4702            self.0.options = v.into();
4703            self
4704        }
4705
4706        /// Sends the request.
4707        pub async fn send(self) -> Result<crate::model::ListWatchlistsResponse> {
4708            (*self.0.stub)
4709                .list_watchlists(self.0.request, self.0.options)
4710                .await
4711                .map(crate::Response::into_body)
4712        }
4713
4714        /// Streams each page in the collection.
4715        pub fn by_page(
4716            self,
4717        ) -> impl google_cloud_gax::paginator::Paginator<
4718            crate::model::ListWatchlistsResponse,
4719            crate::Error,
4720        > {
4721            use std::clone::Clone;
4722            let token = self.0.request.page_token.clone();
4723            let execute = move |token: String| {
4724                let mut builder = self.clone();
4725                builder.0.request = builder.0.request.set_page_token(token);
4726                builder.send()
4727            };
4728            google_cloud_gax::paginator::internal::new_paginator(token, execute)
4729        }
4730
4731        /// Streams each item in the collection.
4732        pub fn by_item(
4733            self,
4734        ) -> impl google_cloud_gax::paginator::ItemPaginator<
4735            crate::model::ListWatchlistsResponse,
4736            crate::Error,
4737        > {
4738            use google_cloud_gax::paginator::Paginator;
4739            self.by_page().items()
4740        }
4741
4742        /// Sets the value of [parent][crate::model::ListWatchlistsRequest::parent].
4743        ///
4744        /// This is a **required** field for requests.
4745        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4746            self.0.request.parent = v.into();
4747            self
4748        }
4749
4750        /// Sets the value of [page_size][crate::model::ListWatchlistsRequest::page_size].
4751        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4752            self.0.request.page_size = v.into();
4753            self
4754        }
4755
4756        /// Sets the value of [page_token][crate::model::ListWatchlistsRequest::page_token].
4757        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4758            self.0.request.page_token = v.into();
4759            self
4760        }
4761
4762        /// Sets the value of [filter][crate::model::ListWatchlistsRequest::filter].
4763        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4764            self.0.request.filter = v.into();
4765            self
4766        }
4767    }
4768
4769    #[doc(hidden)]
4770    impl crate::RequestBuilder for ListWatchlists {
4771        fn request_options(&mut self) -> &mut crate::RequestOptions {
4772            &mut self.0.options
4773        }
4774    }
4775
4776    /// The request builder for [EntityService::create_watchlist][crate::client::EntityService::create_watchlist] calls.
4777    ///
4778    /// # Example
4779    /// ```
4780    /// # use google_cloud_chronicle_v1::builder::entity_service::CreateWatchlist;
4781    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
4782    ///
4783    /// let builder = prepare_request_builder();
4784    /// let response = builder.send().await?;
4785    /// # Ok(()) }
4786    ///
4787    /// fn prepare_request_builder() -> CreateWatchlist {
4788    ///   # panic!();
4789    ///   // ... details omitted ...
4790    /// }
4791    /// ```
4792    #[derive(Clone, Debug)]
4793    pub struct CreateWatchlist(RequestBuilder<crate::model::CreateWatchlistRequest>);
4794
4795    impl CreateWatchlist {
4796        pub(crate) fn new(
4797            stub: std::sync::Arc<dyn super::super::stub::dynamic::EntityService>,
4798        ) -> Self {
4799            Self(RequestBuilder::new(stub))
4800        }
4801
4802        /// Sets the full request, replacing any prior values.
4803        pub fn with_request<V: Into<crate::model::CreateWatchlistRequest>>(mut self, v: V) -> Self {
4804            self.0.request = v.into();
4805            self
4806        }
4807
4808        /// Sets all the options, replacing any prior values.
4809        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4810            self.0.options = v.into();
4811            self
4812        }
4813
4814        /// Sends the request.
4815        pub async fn send(self) -> Result<crate::model::Watchlist> {
4816            (*self.0.stub)
4817                .create_watchlist(self.0.request, self.0.options)
4818                .await
4819                .map(crate::Response::into_body)
4820        }
4821
4822        /// Sets the value of [parent][crate::model::CreateWatchlistRequest::parent].
4823        ///
4824        /// This is a **required** field for requests.
4825        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4826            self.0.request.parent = v.into();
4827            self
4828        }
4829
4830        /// Sets the value of [watchlist_id][crate::model::CreateWatchlistRequest::watchlist_id].
4831        pub fn set_watchlist_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4832            self.0.request.watchlist_id = v.into();
4833            self
4834        }
4835
4836        /// Sets the value of [watchlist][crate::model::CreateWatchlistRequest::watchlist].
4837        ///
4838        /// This is a **required** field for requests.
4839        pub fn set_watchlist<T>(mut self, v: T) -> Self
4840        where
4841            T: std::convert::Into<crate::model::Watchlist>,
4842        {
4843            self.0.request.watchlist = std::option::Option::Some(v.into());
4844            self
4845        }
4846
4847        /// Sets or clears the value of [watchlist][crate::model::CreateWatchlistRequest::watchlist].
4848        ///
4849        /// This is a **required** field for requests.
4850        pub fn set_or_clear_watchlist<T>(mut self, v: std::option::Option<T>) -> Self
4851        where
4852            T: std::convert::Into<crate::model::Watchlist>,
4853        {
4854            self.0.request.watchlist = v.map(|x| x.into());
4855            self
4856        }
4857    }
4858
4859    #[doc(hidden)]
4860    impl crate::RequestBuilder for CreateWatchlist {
4861        fn request_options(&mut self) -> &mut crate::RequestOptions {
4862            &mut self.0.options
4863        }
4864    }
4865
4866    /// The request builder for [EntityService::update_watchlist][crate::client::EntityService::update_watchlist] calls.
4867    ///
4868    /// # Example
4869    /// ```
4870    /// # use google_cloud_chronicle_v1::builder::entity_service::UpdateWatchlist;
4871    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
4872    ///
4873    /// let builder = prepare_request_builder();
4874    /// let response = builder.send().await?;
4875    /// # Ok(()) }
4876    ///
4877    /// fn prepare_request_builder() -> UpdateWatchlist {
4878    ///   # panic!();
4879    ///   // ... details omitted ...
4880    /// }
4881    /// ```
4882    #[derive(Clone, Debug)]
4883    pub struct UpdateWatchlist(RequestBuilder<crate::model::UpdateWatchlistRequest>);
4884
4885    impl UpdateWatchlist {
4886        pub(crate) fn new(
4887            stub: std::sync::Arc<dyn super::super::stub::dynamic::EntityService>,
4888        ) -> Self {
4889            Self(RequestBuilder::new(stub))
4890        }
4891
4892        /// Sets the full request, replacing any prior values.
4893        pub fn with_request<V: Into<crate::model::UpdateWatchlistRequest>>(mut self, v: V) -> Self {
4894            self.0.request = v.into();
4895            self
4896        }
4897
4898        /// Sets all the options, replacing any prior values.
4899        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4900            self.0.options = v.into();
4901            self
4902        }
4903
4904        /// Sends the request.
4905        pub async fn send(self) -> Result<crate::model::Watchlist> {
4906            (*self.0.stub)
4907                .update_watchlist(self.0.request, self.0.options)
4908                .await
4909                .map(crate::Response::into_body)
4910        }
4911
4912        /// Sets the value of [watchlist][crate::model::UpdateWatchlistRequest::watchlist].
4913        ///
4914        /// This is a **required** field for requests.
4915        pub fn set_watchlist<T>(mut self, v: T) -> Self
4916        where
4917            T: std::convert::Into<crate::model::Watchlist>,
4918        {
4919            self.0.request.watchlist = std::option::Option::Some(v.into());
4920            self
4921        }
4922
4923        /// Sets or clears the value of [watchlist][crate::model::UpdateWatchlistRequest::watchlist].
4924        ///
4925        /// This is a **required** field for requests.
4926        pub fn set_or_clear_watchlist<T>(mut self, v: std::option::Option<T>) -> Self
4927        where
4928            T: std::convert::Into<crate::model::Watchlist>,
4929        {
4930            self.0.request.watchlist = v.map(|x| x.into());
4931            self
4932        }
4933
4934        /// Sets the value of [update_mask][crate::model::UpdateWatchlistRequest::update_mask].
4935        pub fn set_update_mask<T>(mut self, v: T) -> Self
4936        where
4937            T: std::convert::Into<wkt::FieldMask>,
4938        {
4939            self.0.request.update_mask = std::option::Option::Some(v.into());
4940            self
4941        }
4942
4943        /// Sets or clears the value of [update_mask][crate::model::UpdateWatchlistRequest::update_mask].
4944        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4945        where
4946            T: std::convert::Into<wkt::FieldMask>,
4947        {
4948            self.0.request.update_mask = v.map(|x| x.into());
4949            self
4950        }
4951    }
4952
4953    #[doc(hidden)]
4954    impl crate::RequestBuilder for UpdateWatchlist {
4955        fn request_options(&mut self) -> &mut crate::RequestOptions {
4956            &mut self.0.options
4957        }
4958    }
4959
4960    /// The request builder for [EntityService::delete_watchlist][crate::client::EntityService::delete_watchlist] calls.
4961    ///
4962    /// # Example
4963    /// ```
4964    /// # use google_cloud_chronicle_v1::builder::entity_service::DeleteWatchlist;
4965    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
4966    ///
4967    /// let builder = prepare_request_builder();
4968    /// let response = builder.send().await?;
4969    /// # Ok(()) }
4970    ///
4971    /// fn prepare_request_builder() -> DeleteWatchlist {
4972    ///   # panic!();
4973    ///   // ... details omitted ...
4974    /// }
4975    /// ```
4976    #[derive(Clone, Debug)]
4977    pub struct DeleteWatchlist(RequestBuilder<crate::model::DeleteWatchlistRequest>);
4978
4979    impl DeleteWatchlist {
4980        pub(crate) fn new(
4981            stub: std::sync::Arc<dyn super::super::stub::dynamic::EntityService>,
4982        ) -> Self {
4983            Self(RequestBuilder::new(stub))
4984        }
4985
4986        /// Sets the full request, replacing any prior values.
4987        pub fn with_request<V: Into<crate::model::DeleteWatchlistRequest>>(mut self, v: V) -> Self {
4988            self.0.request = v.into();
4989            self
4990        }
4991
4992        /// Sets all the options, replacing any prior values.
4993        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4994            self.0.options = v.into();
4995            self
4996        }
4997
4998        /// Sends the request.
4999        pub async fn send(self) -> Result<()> {
5000            (*self.0.stub)
5001                .delete_watchlist(self.0.request, self.0.options)
5002                .await
5003                .map(crate::Response::into_body)
5004        }
5005
5006        /// Sets the value of [name][crate::model::DeleteWatchlistRequest::name].
5007        ///
5008        /// This is a **required** field for requests.
5009        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5010            self.0.request.name = v.into();
5011            self
5012        }
5013
5014        /// Sets the value of [force][crate::model::DeleteWatchlistRequest::force].
5015        pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
5016            self.0.request.force = v.into();
5017            self
5018        }
5019    }
5020
5021    #[doc(hidden)]
5022    impl crate::RequestBuilder for DeleteWatchlist {
5023        fn request_options(&mut self) -> &mut crate::RequestOptions {
5024            &mut self.0.options
5025        }
5026    }
5027
5028    /// The request builder for [EntityService::list_operations][crate::client::EntityService::list_operations] calls.
5029    ///
5030    /// # Example
5031    /// ```
5032    /// # use google_cloud_chronicle_v1::builder::entity_service::ListOperations;
5033    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
5034    /// use google_cloud_gax::paginator::ItemPaginator;
5035    ///
5036    /// let builder = prepare_request_builder();
5037    /// let mut items = builder.by_item();
5038    /// while let Some(result) = items.next().await {
5039    ///   let item = result?;
5040    /// }
5041    /// # Ok(()) }
5042    ///
5043    /// fn prepare_request_builder() -> ListOperations {
5044    ///   # panic!();
5045    ///   // ... details omitted ...
5046    /// }
5047    /// ```
5048    #[derive(Clone, Debug)]
5049    pub struct ListOperations(
5050        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
5051    );
5052
5053    impl ListOperations {
5054        pub(crate) fn new(
5055            stub: std::sync::Arc<dyn super::super::stub::dynamic::EntityService>,
5056        ) -> Self {
5057            Self(RequestBuilder::new(stub))
5058        }
5059
5060        /// Sets the full request, replacing any prior values.
5061        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
5062            mut self,
5063            v: V,
5064        ) -> Self {
5065            self.0.request = v.into();
5066            self
5067        }
5068
5069        /// Sets all the options, replacing any prior values.
5070        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5071            self.0.options = v.into();
5072            self
5073        }
5074
5075        /// Sends the request.
5076        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
5077            (*self.0.stub)
5078                .list_operations(self.0.request, self.0.options)
5079                .await
5080                .map(crate::Response::into_body)
5081        }
5082
5083        /// Streams each page in the collection.
5084        pub fn by_page(
5085            self,
5086        ) -> impl google_cloud_gax::paginator::Paginator<
5087            google_cloud_longrunning::model::ListOperationsResponse,
5088            crate::Error,
5089        > {
5090            use std::clone::Clone;
5091            let token = self.0.request.page_token.clone();
5092            let execute = move |token: String| {
5093                let mut builder = self.clone();
5094                builder.0.request = builder.0.request.set_page_token(token);
5095                builder.send()
5096            };
5097            google_cloud_gax::paginator::internal::new_paginator(token, execute)
5098        }
5099
5100        /// Streams each item in the collection.
5101        pub fn by_item(
5102            self,
5103        ) -> impl google_cloud_gax::paginator::ItemPaginator<
5104            google_cloud_longrunning::model::ListOperationsResponse,
5105            crate::Error,
5106        > {
5107            use google_cloud_gax::paginator::Paginator;
5108            self.by_page().items()
5109        }
5110
5111        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
5112        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5113            self.0.request.name = v.into();
5114            self
5115        }
5116
5117        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
5118        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5119            self.0.request.filter = v.into();
5120            self
5121        }
5122
5123        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
5124        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5125            self.0.request.page_size = v.into();
5126            self
5127        }
5128
5129        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
5130        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5131            self.0.request.page_token = v.into();
5132            self
5133        }
5134
5135        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
5136        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
5137            self.0.request.return_partial_success = v.into();
5138            self
5139        }
5140    }
5141
5142    #[doc(hidden)]
5143    impl crate::RequestBuilder for ListOperations {
5144        fn request_options(&mut self) -> &mut crate::RequestOptions {
5145            &mut self.0.options
5146        }
5147    }
5148
5149    /// The request builder for [EntityService::get_operation][crate::client::EntityService::get_operation] calls.
5150    ///
5151    /// # Example
5152    /// ```
5153    /// # use google_cloud_chronicle_v1::builder::entity_service::GetOperation;
5154    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
5155    ///
5156    /// let builder = prepare_request_builder();
5157    /// let response = builder.send().await?;
5158    /// # Ok(()) }
5159    ///
5160    /// fn prepare_request_builder() -> GetOperation {
5161    ///   # panic!();
5162    ///   // ... details omitted ...
5163    /// }
5164    /// ```
5165    #[derive(Clone, Debug)]
5166    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
5167
5168    impl GetOperation {
5169        pub(crate) fn new(
5170            stub: std::sync::Arc<dyn super::super::stub::dynamic::EntityService>,
5171        ) -> Self {
5172            Self(RequestBuilder::new(stub))
5173        }
5174
5175        /// Sets the full request, replacing any prior values.
5176        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
5177            mut self,
5178            v: V,
5179        ) -> Self {
5180            self.0.request = v.into();
5181            self
5182        }
5183
5184        /// Sets all the options, replacing any prior values.
5185        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5186            self.0.options = v.into();
5187            self
5188        }
5189
5190        /// Sends the request.
5191        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5192            (*self.0.stub)
5193                .get_operation(self.0.request, self.0.options)
5194                .await
5195                .map(crate::Response::into_body)
5196        }
5197
5198        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
5199        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5200            self.0.request.name = v.into();
5201            self
5202        }
5203    }
5204
5205    #[doc(hidden)]
5206    impl crate::RequestBuilder for GetOperation {
5207        fn request_options(&mut self) -> &mut crate::RequestOptions {
5208            &mut self.0.options
5209        }
5210    }
5211
5212    /// The request builder for [EntityService::delete_operation][crate::client::EntityService::delete_operation] calls.
5213    ///
5214    /// # Example
5215    /// ```
5216    /// # use google_cloud_chronicle_v1::builder::entity_service::DeleteOperation;
5217    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
5218    ///
5219    /// let builder = prepare_request_builder();
5220    /// let response = builder.send().await?;
5221    /// # Ok(()) }
5222    ///
5223    /// fn prepare_request_builder() -> DeleteOperation {
5224    ///   # panic!();
5225    ///   // ... details omitted ...
5226    /// }
5227    /// ```
5228    #[derive(Clone, Debug)]
5229    pub struct DeleteOperation(
5230        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
5231    );
5232
5233    impl DeleteOperation {
5234        pub(crate) fn new(
5235            stub: std::sync::Arc<dyn super::super::stub::dynamic::EntityService>,
5236        ) -> Self {
5237            Self(RequestBuilder::new(stub))
5238        }
5239
5240        /// Sets the full request, replacing any prior values.
5241        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
5242            mut self,
5243            v: V,
5244        ) -> Self {
5245            self.0.request = v.into();
5246            self
5247        }
5248
5249        /// Sets all the options, replacing any prior values.
5250        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5251            self.0.options = v.into();
5252            self
5253        }
5254
5255        /// Sends the request.
5256        pub async fn send(self) -> Result<()> {
5257            (*self.0.stub)
5258                .delete_operation(self.0.request, self.0.options)
5259                .await
5260                .map(crate::Response::into_body)
5261        }
5262
5263        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
5264        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5265            self.0.request.name = v.into();
5266            self
5267        }
5268    }
5269
5270    #[doc(hidden)]
5271    impl crate::RequestBuilder for DeleteOperation {
5272        fn request_options(&mut self) -> &mut crate::RequestOptions {
5273            &mut self.0.options
5274        }
5275    }
5276
5277    /// The request builder for [EntityService::cancel_operation][crate::client::EntityService::cancel_operation] calls.
5278    ///
5279    /// # Example
5280    /// ```
5281    /// # use google_cloud_chronicle_v1::builder::entity_service::CancelOperation;
5282    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
5283    ///
5284    /// let builder = prepare_request_builder();
5285    /// let response = builder.send().await?;
5286    /// # Ok(()) }
5287    ///
5288    /// fn prepare_request_builder() -> CancelOperation {
5289    ///   # panic!();
5290    ///   // ... details omitted ...
5291    /// }
5292    /// ```
5293    #[derive(Clone, Debug)]
5294    pub struct CancelOperation(
5295        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
5296    );
5297
5298    impl CancelOperation {
5299        pub(crate) fn new(
5300            stub: std::sync::Arc<dyn super::super::stub::dynamic::EntityService>,
5301        ) -> Self {
5302            Self(RequestBuilder::new(stub))
5303        }
5304
5305        /// Sets the full request, replacing any prior values.
5306        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
5307            mut self,
5308            v: V,
5309        ) -> Self {
5310            self.0.request = v.into();
5311            self
5312        }
5313
5314        /// Sets all the options, replacing any prior values.
5315        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5316            self.0.options = v.into();
5317            self
5318        }
5319
5320        /// Sends the request.
5321        pub async fn send(self) -> Result<()> {
5322            (*self.0.stub)
5323                .cancel_operation(self.0.request, self.0.options)
5324                .await
5325                .map(crate::Response::into_body)
5326        }
5327
5328        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
5329        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5330            self.0.request.name = v.into();
5331            self
5332        }
5333    }
5334
5335    #[doc(hidden)]
5336    impl crate::RequestBuilder for CancelOperation {
5337        fn request_options(&mut self) -> &mut crate::RequestOptions {
5338            &mut self.0.options
5339        }
5340    }
5341}
5342
5343/// Request and client builders for [FeaturedContentNativeDashboardService][crate::client::FeaturedContentNativeDashboardService].
5344pub mod featured_content_native_dashboard_service {
5345    use crate::Result;
5346
5347    /// A builder for [FeaturedContentNativeDashboardService][crate::client::FeaturedContentNativeDashboardService].
5348    ///
5349    /// ```
5350    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
5351    /// # use google_cloud_chronicle_v1::*;
5352    /// # use builder::featured_content_native_dashboard_service::ClientBuilder;
5353    /// # use client::FeaturedContentNativeDashboardService;
5354    /// let builder : ClientBuilder = FeaturedContentNativeDashboardService::builder();
5355    /// let client = builder
5356    ///     .with_endpoint("https://chronicle.googleapis.com")
5357    ///     .build().await?;
5358    /// # Ok(()) }
5359    /// ```
5360    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
5361
5362    pub(crate) mod client {
5363        use super::super::super::client::FeaturedContentNativeDashboardService;
5364        pub struct Factory;
5365        impl crate::ClientFactory for Factory {
5366            type Client = FeaturedContentNativeDashboardService;
5367            type Credentials = gaxi::options::Credentials;
5368            async fn build(
5369                self,
5370                config: gaxi::options::ClientConfig,
5371            ) -> crate::ClientBuilderResult<Self::Client> {
5372                Self::Client::new(config).await
5373            }
5374        }
5375    }
5376
5377    /// Common implementation for [crate::client::FeaturedContentNativeDashboardService] request builders.
5378    #[derive(Clone, Debug)]
5379    pub(crate) struct RequestBuilder<R: std::default::Default> {
5380        stub:
5381            std::sync::Arc<dyn super::super::stub::dynamic::FeaturedContentNativeDashboardService>,
5382        request: R,
5383        options: crate::RequestOptions,
5384    }
5385
5386    impl<R> RequestBuilder<R>
5387    where
5388        R: std::default::Default,
5389    {
5390        pub(crate) fn new(
5391            stub: std::sync::Arc<
5392                dyn super::super::stub::dynamic::FeaturedContentNativeDashboardService,
5393            >,
5394        ) -> Self {
5395            Self {
5396                stub,
5397                request: R::default(),
5398                options: crate::RequestOptions::default(),
5399            }
5400        }
5401    }
5402
5403    /// The request builder for [FeaturedContentNativeDashboardService::get_featured_content_native_dashboard][crate::client::FeaturedContentNativeDashboardService::get_featured_content_native_dashboard] calls.
5404    ///
5405    /// # Example
5406    /// ```
5407    /// # use google_cloud_chronicle_v1::builder::featured_content_native_dashboard_service::GetFeaturedContentNativeDashboard;
5408    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
5409    ///
5410    /// let builder = prepare_request_builder();
5411    /// let response = builder.send().await?;
5412    /// # Ok(()) }
5413    ///
5414    /// fn prepare_request_builder() -> GetFeaturedContentNativeDashboard {
5415    ///   # panic!();
5416    ///   // ... details omitted ...
5417    /// }
5418    /// ```
5419    #[derive(Clone, Debug)]
5420    pub struct GetFeaturedContentNativeDashboard(
5421        RequestBuilder<crate::model::GetFeaturedContentNativeDashboardRequest>,
5422    );
5423
5424    impl GetFeaturedContentNativeDashboard {
5425        pub(crate) fn new(
5426            stub: std::sync::Arc<
5427                dyn super::super::stub::dynamic::FeaturedContentNativeDashboardService,
5428            >,
5429        ) -> Self {
5430            Self(RequestBuilder::new(stub))
5431        }
5432
5433        /// Sets the full request, replacing any prior values.
5434        pub fn with_request<V: Into<crate::model::GetFeaturedContentNativeDashboardRequest>>(
5435            mut self,
5436            v: V,
5437        ) -> Self {
5438            self.0.request = v.into();
5439            self
5440        }
5441
5442        /// Sets all the options, replacing any prior values.
5443        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5444            self.0.options = v.into();
5445            self
5446        }
5447
5448        /// Sends the request.
5449        pub async fn send(self) -> Result<crate::model::FeaturedContentNativeDashboard> {
5450            (*self.0.stub)
5451                .get_featured_content_native_dashboard(self.0.request, self.0.options)
5452                .await
5453                .map(crate::Response::into_body)
5454        }
5455
5456        /// Sets the value of [name][crate::model::GetFeaturedContentNativeDashboardRequest::name].
5457        ///
5458        /// This is a **required** field for requests.
5459        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5460            self.0.request.name = v.into();
5461            self
5462        }
5463    }
5464
5465    #[doc(hidden)]
5466    impl crate::RequestBuilder for GetFeaturedContentNativeDashboard {
5467        fn request_options(&mut self) -> &mut crate::RequestOptions {
5468            &mut self.0.options
5469        }
5470    }
5471
5472    /// The request builder for [FeaturedContentNativeDashboardService::list_featured_content_native_dashboards][crate::client::FeaturedContentNativeDashboardService::list_featured_content_native_dashboards] calls.
5473    ///
5474    /// # Example
5475    /// ```
5476    /// # use google_cloud_chronicle_v1::builder::featured_content_native_dashboard_service::ListFeaturedContentNativeDashboards;
5477    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
5478    /// use google_cloud_gax::paginator::ItemPaginator;
5479    ///
5480    /// let builder = prepare_request_builder();
5481    /// let mut items = builder.by_item();
5482    /// while let Some(result) = items.next().await {
5483    ///   let item = result?;
5484    /// }
5485    /// # Ok(()) }
5486    ///
5487    /// fn prepare_request_builder() -> ListFeaturedContentNativeDashboards {
5488    ///   # panic!();
5489    ///   // ... details omitted ...
5490    /// }
5491    /// ```
5492    #[derive(Clone, Debug)]
5493    pub struct ListFeaturedContentNativeDashboards(
5494        RequestBuilder<crate::model::ListFeaturedContentNativeDashboardsRequest>,
5495    );
5496
5497    impl ListFeaturedContentNativeDashboards {
5498        pub(crate) fn new(
5499            stub: std::sync::Arc<
5500                dyn super::super::stub::dynamic::FeaturedContentNativeDashboardService,
5501            >,
5502        ) -> Self {
5503            Self(RequestBuilder::new(stub))
5504        }
5505
5506        /// Sets the full request, replacing any prior values.
5507        pub fn with_request<V: Into<crate::model::ListFeaturedContentNativeDashboardsRequest>>(
5508            mut self,
5509            v: V,
5510        ) -> Self {
5511            self.0.request = v.into();
5512            self
5513        }
5514
5515        /// Sets all the options, replacing any prior values.
5516        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5517            self.0.options = v.into();
5518            self
5519        }
5520
5521        /// Sends the request.
5522        pub async fn send(
5523            self,
5524        ) -> Result<crate::model::ListFeaturedContentNativeDashboardsResponse> {
5525            (*self.0.stub)
5526                .list_featured_content_native_dashboards(self.0.request, self.0.options)
5527                .await
5528                .map(crate::Response::into_body)
5529        }
5530
5531        /// Streams each page in the collection.
5532        pub fn by_page(
5533            self,
5534        ) -> impl google_cloud_gax::paginator::Paginator<
5535            crate::model::ListFeaturedContentNativeDashboardsResponse,
5536            crate::Error,
5537        > {
5538            use std::clone::Clone;
5539            let token = self.0.request.page_token.clone();
5540            let execute = move |token: String| {
5541                let mut builder = self.clone();
5542                builder.0.request = builder.0.request.set_page_token(token);
5543                builder.send()
5544            };
5545            google_cloud_gax::paginator::internal::new_paginator(token, execute)
5546        }
5547
5548        /// Streams each item in the collection.
5549        pub fn by_item(
5550            self,
5551        ) -> impl google_cloud_gax::paginator::ItemPaginator<
5552            crate::model::ListFeaturedContentNativeDashboardsResponse,
5553            crate::Error,
5554        > {
5555            use google_cloud_gax::paginator::Paginator;
5556            self.by_page().items()
5557        }
5558
5559        /// Sets the value of [parent][crate::model::ListFeaturedContentNativeDashboardsRequest::parent].
5560        ///
5561        /// This is a **required** field for requests.
5562        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5563            self.0.request.parent = v.into();
5564            self
5565        }
5566
5567        /// Sets the value of [page_size][crate::model::ListFeaturedContentNativeDashboardsRequest::page_size].
5568        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5569            self.0.request.page_size = v.into();
5570            self
5571        }
5572
5573        /// Sets the value of [page_token][crate::model::ListFeaturedContentNativeDashboardsRequest::page_token].
5574        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5575            self.0.request.page_token = v.into();
5576            self
5577        }
5578
5579        /// Sets the value of [filter][crate::model::ListFeaturedContentNativeDashboardsRequest::filter].
5580        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5581            self.0.request.filter = v.into();
5582            self
5583        }
5584    }
5585
5586    #[doc(hidden)]
5587    impl crate::RequestBuilder for ListFeaturedContentNativeDashboards {
5588        fn request_options(&mut self) -> &mut crate::RequestOptions {
5589            &mut self.0.options
5590        }
5591    }
5592
5593    /// The request builder for [FeaturedContentNativeDashboardService::install_featured_content_native_dashboard][crate::client::FeaturedContentNativeDashboardService::install_featured_content_native_dashboard] calls.
5594    ///
5595    /// # Example
5596    /// ```
5597    /// # use google_cloud_chronicle_v1::builder::featured_content_native_dashboard_service::InstallFeaturedContentNativeDashboard;
5598    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
5599    ///
5600    /// let builder = prepare_request_builder();
5601    /// let response = builder.send().await?;
5602    /// # Ok(()) }
5603    ///
5604    /// fn prepare_request_builder() -> InstallFeaturedContentNativeDashboard {
5605    ///   # panic!();
5606    ///   // ... details omitted ...
5607    /// }
5608    /// ```
5609    #[derive(Clone, Debug)]
5610    pub struct InstallFeaturedContentNativeDashboard(
5611        RequestBuilder<crate::model::InstallFeaturedContentNativeDashboardRequest>,
5612    );
5613
5614    impl InstallFeaturedContentNativeDashboard {
5615        pub(crate) fn new(
5616            stub: std::sync::Arc<
5617                dyn super::super::stub::dynamic::FeaturedContentNativeDashboardService,
5618            >,
5619        ) -> Self {
5620            Self(RequestBuilder::new(stub))
5621        }
5622
5623        /// Sets the full request, replacing any prior values.
5624        pub fn with_request<V: Into<crate::model::InstallFeaturedContentNativeDashboardRequest>>(
5625            mut self,
5626            v: V,
5627        ) -> Self {
5628            self.0.request = v.into();
5629            self
5630        }
5631
5632        /// Sets all the options, replacing any prior values.
5633        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5634            self.0.options = v.into();
5635            self
5636        }
5637
5638        /// Sends the request.
5639        pub async fn send(
5640            self,
5641        ) -> Result<crate::model::InstallFeaturedContentNativeDashboardResponse> {
5642            (*self.0.stub)
5643                .install_featured_content_native_dashboard(self.0.request, self.0.options)
5644                .await
5645                .map(crate::Response::into_body)
5646        }
5647
5648        /// Sets the value of [name][crate::model::InstallFeaturedContentNativeDashboardRequest::name].
5649        ///
5650        /// This is a **required** field for requests.
5651        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5652            self.0.request.name = v.into();
5653            self
5654        }
5655
5656        /// Sets the value of [featured_content_native_dashboard][crate::model::InstallFeaturedContentNativeDashboardRequest::featured_content_native_dashboard].
5657        pub fn set_featured_content_native_dashboard<T>(mut self, v: T) -> Self
5658        where
5659            T: std::convert::Into<crate::model::FeaturedContentNativeDashboard>,
5660        {
5661            self.0.request.featured_content_native_dashboard = std::option::Option::Some(v.into());
5662            self
5663        }
5664
5665        /// Sets or clears the value of [featured_content_native_dashboard][crate::model::InstallFeaturedContentNativeDashboardRequest::featured_content_native_dashboard].
5666        pub fn set_or_clear_featured_content_native_dashboard<T>(
5667            mut self,
5668            v: std::option::Option<T>,
5669        ) -> Self
5670        where
5671            T: std::convert::Into<crate::model::FeaturedContentNativeDashboard>,
5672        {
5673            self.0.request.featured_content_native_dashboard = v.map(|x| x.into());
5674            self
5675        }
5676    }
5677
5678    #[doc(hidden)]
5679    impl crate::RequestBuilder for InstallFeaturedContentNativeDashboard {
5680        fn request_options(&mut self) -> &mut crate::RequestOptions {
5681            &mut self.0.options
5682        }
5683    }
5684
5685    /// The request builder for [FeaturedContentNativeDashboardService::list_operations][crate::client::FeaturedContentNativeDashboardService::list_operations] calls.
5686    ///
5687    /// # Example
5688    /// ```
5689    /// # use google_cloud_chronicle_v1::builder::featured_content_native_dashboard_service::ListOperations;
5690    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
5691    /// use google_cloud_gax::paginator::ItemPaginator;
5692    ///
5693    /// let builder = prepare_request_builder();
5694    /// let mut items = builder.by_item();
5695    /// while let Some(result) = items.next().await {
5696    ///   let item = result?;
5697    /// }
5698    /// # Ok(()) }
5699    ///
5700    /// fn prepare_request_builder() -> ListOperations {
5701    ///   # panic!();
5702    ///   // ... details omitted ...
5703    /// }
5704    /// ```
5705    #[derive(Clone, Debug)]
5706    pub struct ListOperations(
5707        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
5708    );
5709
5710    impl ListOperations {
5711        pub(crate) fn new(
5712            stub: std::sync::Arc<
5713                dyn super::super::stub::dynamic::FeaturedContentNativeDashboardService,
5714            >,
5715        ) -> Self {
5716            Self(RequestBuilder::new(stub))
5717        }
5718
5719        /// Sets the full request, replacing any prior values.
5720        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
5721            mut self,
5722            v: V,
5723        ) -> Self {
5724            self.0.request = v.into();
5725            self
5726        }
5727
5728        /// Sets all the options, replacing any prior values.
5729        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5730            self.0.options = v.into();
5731            self
5732        }
5733
5734        /// Sends the request.
5735        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
5736            (*self.0.stub)
5737                .list_operations(self.0.request, self.0.options)
5738                .await
5739                .map(crate::Response::into_body)
5740        }
5741
5742        /// Streams each page in the collection.
5743        pub fn by_page(
5744            self,
5745        ) -> impl google_cloud_gax::paginator::Paginator<
5746            google_cloud_longrunning::model::ListOperationsResponse,
5747            crate::Error,
5748        > {
5749            use std::clone::Clone;
5750            let token = self.0.request.page_token.clone();
5751            let execute = move |token: String| {
5752                let mut builder = self.clone();
5753                builder.0.request = builder.0.request.set_page_token(token);
5754                builder.send()
5755            };
5756            google_cloud_gax::paginator::internal::new_paginator(token, execute)
5757        }
5758
5759        /// Streams each item in the collection.
5760        pub fn by_item(
5761            self,
5762        ) -> impl google_cloud_gax::paginator::ItemPaginator<
5763            google_cloud_longrunning::model::ListOperationsResponse,
5764            crate::Error,
5765        > {
5766            use google_cloud_gax::paginator::Paginator;
5767            self.by_page().items()
5768        }
5769
5770        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
5771        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5772            self.0.request.name = v.into();
5773            self
5774        }
5775
5776        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
5777        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5778            self.0.request.filter = v.into();
5779            self
5780        }
5781
5782        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
5783        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5784            self.0.request.page_size = v.into();
5785            self
5786        }
5787
5788        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
5789        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5790            self.0.request.page_token = v.into();
5791            self
5792        }
5793
5794        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
5795        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
5796            self.0.request.return_partial_success = v.into();
5797            self
5798        }
5799    }
5800
5801    #[doc(hidden)]
5802    impl crate::RequestBuilder for ListOperations {
5803        fn request_options(&mut self) -> &mut crate::RequestOptions {
5804            &mut self.0.options
5805        }
5806    }
5807
5808    /// The request builder for [FeaturedContentNativeDashboardService::get_operation][crate::client::FeaturedContentNativeDashboardService::get_operation] calls.
5809    ///
5810    /// # Example
5811    /// ```
5812    /// # use google_cloud_chronicle_v1::builder::featured_content_native_dashboard_service::GetOperation;
5813    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
5814    ///
5815    /// let builder = prepare_request_builder();
5816    /// let response = builder.send().await?;
5817    /// # Ok(()) }
5818    ///
5819    /// fn prepare_request_builder() -> GetOperation {
5820    ///   # panic!();
5821    ///   // ... details omitted ...
5822    /// }
5823    /// ```
5824    #[derive(Clone, Debug)]
5825    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
5826
5827    impl GetOperation {
5828        pub(crate) fn new(
5829            stub: std::sync::Arc<
5830                dyn super::super::stub::dynamic::FeaturedContentNativeDashboardService,
5831            >,
5832        ) -> Self {
5833            Self(RequestBuilder::new(stub))
5834        }
5835
5836        /// Sets the full request, replacing any prior values.
5837        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
5838            mut self,
5839            v: V,
5840        ) -> Self {
5841            self.0.request = v.into();
5842            self
5843        }
5844
5845        /// Sets all the options, replacing any prior values.
5846        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5847            self.0.options = v.into();
5848            self
5849        }
5850
5851        /// Sends the request.
5852        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5853            (*self.0.stub)
5854                .get_operation(self.0.request, self.0.options)
5855                .await
5856                .map(crate::Response::into_body)
5857        }
5858
5859        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
5860        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5861            self.0.request.name = v.into();
5862            self
5863        }
5864    }
5865
5866    #[doc(hidden)]
5867    impl crate::RequestBuilder for GetOperation {
5868        fn request_options(&mut self) -> &mut crate::RequestOptions {
5869            &mut self.0.options
5870        }
5871    }
5872
5873    /// The request builder for [FeaturedContentNativeDashboardService::delete_operation][crate::client::FeaturedContentNativeDashboardService::delete_operation] calls.
5874    ///
5875    /// # Example
5876    /// ```
5877    /// # use google_cloud_chronicle_v1::builder::featured_content_native_dashboard_service::DeleteOperation;
5878    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
5879    ///
5880    /// let builder = prepare_request_builder();
5881    /// let response = builder.send().await?;
5882    /// # Ok(()) }
5883    ///
5884    /// fn prepare_request_builder() -> DeleteOperation {
5885    ///   # panic!();
5886    ///   // ... details omitted ...
5887    /// }
5888    /// ```
5889    #[derive(Clone, Debug)]
5890    pub struct DeleteOperation(
5891        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
5892    );
5893
5894    impl DeleteOperation {
5895        pub(crate) fn new(
5896            stub: std::sync::Arc<
5897                dyn super::super::stub::dynamic::FeaturedContentNativeDashboardService,
5898            >,
5899        ) -> Self {
5900            Self(RequestBuilder::new(stub))
5901        }
5902
5903        /// Sets the full request, replacing any prior values.
5904        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
5905            mut self,
5906            v: V,
5907        ) -> Self {
5908            self.0.request = v.into();
5909            self
5910        }
5911
5912        /// Sets all the options, replacing any prior values.
5913        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5914            self.0.options = v.into();
5915            self
5916        }
5917
5918        /// Sends the request.
5919        pub async fn send(self) -> Result<()> {
5920            (*self.0.stub)
5921                .delete_operation(self.0.request, self.0.options)
5922                .await
5923                .map(crate::Response::into_body)
5924        }
5925
5926        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
5927        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5928            self.0.request.name = v.into();
5929            self
5930        }
5931    }
5932
5933    #[doc(hidden)]
5934    impl crate::RequestBuilder for DeleteOperation {
5935        fn request_options(&mut self) -> &mut crate::RequestOptions {
5936            &mut self.0.options
5937        }
5938    }
5939
5940    /// The request builder for [FeaturedContentNativeDashboardService::cancel_operation][crate::client::FeaturedContentNativeDashboardService::cancel_operation] calls.
5941    ///
5942    /// # Example
5943    /// ```
5944    /// # use google_cloud_chronicle_v1::builder::featured_content_native_dashboard_service::CancelOperation;
5945    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
5946    ///
5947    /// let builder = prepare_request_builder();
5948    /// let response = builder.send().await?;
5949    /// # Ok(()) }
5950    ///
5951    /// fn prepare_request_builder() -> CancelOperation {
5952    ///   # panic!();
5953    ///   // ... details omitted ...
5954    /// }
5955    /// ```
5956    #[derive(Clone, Debug)]
5957    pub struct CancelOperation(
5958        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
5959    );
5960
5961    impl CancelOperation {
5962        pub(crate) fn new(
5963            stub: std::sync::Arc<
5964                dyn super::super::stub::dynamic::FeaturedContentNativeDashboardService,
5965            >,
5966        ) -> Self {
5967            Self(RequestBuilder::new(stub))
5968        }
5969
5970        /// Sets the full request, replacing any prior values.
5971        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
5972            mut self,
5973            v: V,
5974        ) -> Self {
5975            self.0.request = v.into();
5976            self
5977        }
5978
5979        /// Sets all the options, replacing any prior values.
5980        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5981            self.0.options = v.into();
5982            self
5983        }
5984
5985        /// Sends the request.
5986        pub async fn send(self) -> Result<()> {
5987            (*self.0.stub)
5988                .cancel_operation(self.0.request, self.0.options)
5989                .await
5990                .map(crate::Response::into_body)
5991        }
5992
5993        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
5994        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5995            self.0.request.name = v.into();
5996            self
5997        }
5998    }
5999
6000    #[doc(hidden)]
6001    impl crate::RequestBuilder for CancelOperation {
6002        fn request_options(&mut self) -> &mut crate::RequestOptions {
6003            &mut self.0.options
6004        }
6005    }
6006}
6007
6008/// Request and client builders for [InstanceService][crate::client::InstanceService].
6009pub mod instance_service {
6010    use crate::Result;
6011
6012    /// A builder for [InstanceService][crate::client::InstanceService].
6013    ///
6014    /// ```
6015    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
6016    /// # use google_cloud_chronicle_v1::*;
6017    /// # use builder::instance_service::ClientBuilder;
6018    /// # use client::InstanceService;
6019    /// let builder : ClientBuilder = InstanceService::builder();
6020    /// let client = builder
6021    ///     .with_endpoint("https://chronicle.googleapis.com")
6022    ///     .build().await?;
6023    /// # Ok(()) }
6024    /// ```
6025    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
6026
6027    pub(crate) mod client {
6028        use super::super::super::client::InstanceService;
6029        pub struct Factory;
6030        impl crate::ClientFactory for Factory {
6031            type Client = InstanceService;
6032            type Credentials = gaxi::options::Credentials;
6033            async fn build(
6034                self,
6035                config: gaxi::options::ClientConfig,
6036            ) -> crate::ClientBuilderResult<Self::Client> {
6037                Self::Client::new(config).await
6038            }
6039        }
6040    }
6041
6042    /// Common implementation for [crate::client::InstanceService] request builders.
6043    #[derive(Clone, Debug)]
6044    pub(crate) struct RequestBuilder<R: std::default::Default> {
6045        stub: std::sync::Arc<dyn super::super::stub::dynamic::InstanceService>,
6046        request: R,
6047        options: crate::RequestOptions,
6048    }
6049
6050    impl<R> RequestBuilder<R>
6051    where
6052        R: std::default::Default,
6053    {
6054        pub(crate) fn new(
6055            stub: std::sync::Arc<dyn super::super::stub::dynamic::InstanceService>,
6056        ) -> Self {
6057            Self {
6058                stub,
6059                request: R::default(),
6060                options: crate::RequestOptions::default(),
6061            }
6062        }
6063    }
6064
6065    /// The request builder for [InstanceService::get_instance][crate::client::InstanceService::get_instance] calls.
6066    ///
6067    /// # Example
6068    /// ```
6069    /// # use google_cloud_chronicle_v1::builder::instance_service::GetInstance;
6070    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
6071    ///
6072    /// let builder = prepare_request_builder();
6073    /// let response = builder.send().await?;
6074    /// # Ok(()) }
6075    ///
6076    /// fn prepare_request_builder() -> GetInstance {
6077    ///   # panic!();
6078    ///   // ... details omitted ...
6079    /// }
6080    /// ```
6081    #[derive(Clone, Debug)]
6082    pub struct GetInstance(RequestBuilder<crate::model::GetInstanceRequest>);
6083
6084    impl GetInstance {
6085        pub(crate) fn new(
6086            stub: std::sync::Arc<dyn super::super::stub::dynamic::InstanceService>,
6087        ) -> Self {
6088            Self(RequestBuilder::new(stub))
6089        }
6090
6091        /// Sets the full request, replacing any prior values.
6092        pub fn with_request<V: Into<crate::model::GetInstanceRequest>>(mut self, v: V) -> Self {
6093            self.0.request = v.into();
6094            self
6095        }
6096
6097        /// Sets all the options, replacing any prior values.
6098        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6099            self.0.options = v.into();
6100            self
6101        }
6102
6103        /// Sends the request.
6104        pub async fn send(self) -> Result<crate::model::Instance> {
6105            (*self.0.stub)
6106                .get_instance(self.0.request, self.0.options)
6107                .await
6108                .map(crate::Response::into_body)
6109        }
6110
6111        /// Sets the value of [name][crate::model::GetInstanceRequest::name].
6112        ///
6113        /// This is a **required** field for requests.
6114        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6115            self.0.request.name = v.into();
6116            self
6117        }
6118    }
6119
6120    #[doc(hidden)]
6121    impl crate::RequestBuilder for GetInstance {
6122        fn request_options(&mut self) -> &mut crate::RequestOptions {
6123            &mut self.0.options
6124        }
6125    }
6126
6127    /// The request builder for [InstanceService::list_operations][crate::client::InstanceService::list_operations] calls.
6128    ///
6129    /// # Example
6130    /// ```
6131    /// # use google_cloud_chronicle_v1::builder::instance_service::ListOperations;
6132    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
6133    /// use google_cloud_gax::paginator::ItemPaginator;
6134    ///
6135    /// let builder = prepare_request_builder();
6136    /// let mut items = builder.by_item();
6137    /// while let Some(result) = items.next().await {
6138    ///   let item = result?;
6139    /// }
6140    /// # Ok(()) }
6141    ///
6142    /// fn prepare_request_builder() -> ListOperations {
6143    ///   # panic!();
6144    ///   // ... details omitted ...
6145    /// }
6146    /// ```
6147    #[derive(Clone, Debug)]
6148    pub struct ListOperations(
6149        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
6150    );
6151
6152    impl ListOperations {
6153        pub(crate) fn new(
6154            stub: std::sync::Arc<dyn super::super::stub::dynamic::InstanceService>,
6155        ) -> Self {
6156            Self(RequestBuilder::new(stub))
6157        }
6158
6159        /// Sets the full request, replacing any prior values.
6160        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
6161            mut self,
6162            v: V,
6163        ) -> Self {
6164            self.0.request = v.into();
6165            self
6166        }
6167
6168        /// Sets all the options, replacing any prior values.
6169        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6170            self.0.options = v.into();
6171            self
6172        }
6173
6174        /// Sends the request.
6175        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
6176            (*self.0.stub)
6177                .list_operations(self.0.request, self.0.options)
6178                .await
6179                .map(crate::Response::into_body)
6180        }
6181
6182        /// Streams each page in the collection.
6183        pub fn by_page(
6184            self,
6185        ) -> impl google_cloud_gax::paginator::Paginator<
6186            google_cloud_longrunning::model::ListOperationsResponse,
6187            crate::Error,
6188        > {
6189            use std::clone::Clone;
6190            let token = self.0.request.page_token.clone();
6191            let execute = move |token: String| {
6192                let mut builder = self.clone();
6193                builder.0.request = builder.0.request.set_page_token(token);
6194                builder.send()
6195            };
6196            google_cloud_gax::paginator::internal::new_paginator(token, execute)
6197        }
6198
6199        /// Streams each item in the collection.
6200        pub fn by_item(
6201            self,
6202        ) -> impl google_cloud_gax::paginator::ItemPaginator<
6203            google_cloud_longrunning::model::ListOperationsResponse,
6204            crate::Error,
6205        > {
6206            use google_cloud_gax::paginator::Paginator;
6207            self.by_page().items()
6208        }
6209
6210        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
6211        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6212            self.0.request.name = v.into();
6213            self
6214        }
6215
6216        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
6217        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6218            self.0.request.filter = v.into();
6219            self
6220        }
6221
6222        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
6223        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6224            self.0.request.page_size = v.into();
6225            self
6226        }
6227
6228        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
6229        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6230            self.0.request.page_token = v.into();
6231            self
6232        }
6233
6234        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
6235        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
6236            self.0.request.return_partial_success = v.into();
6237            self
6238        }
6239    }
6240
6241    #[doc(hidden)]
6242    impl crate::RequestBuilder for ListOperations {
6243        fn request_options(&mut self) -> &mut crate::RequestOptions {
6244            &mut self.0.options
6245        }
6246    }
6247
6248    /// The request builder for [InstanceService::get_operation][crate::client::InstanceService::get_operation] calls.
6249    ///
6250    /// # Example
6251    /// ```
6252    /// # use google_cloud_chronicle_v1::builder::instance_service::GetOperation;
6253    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
6254    ///
6255    /// let builder = prepare_request_builder();
6256    /// let response = builder.send().await?;
6257    /// # Ok(()) }
6258    ///
6259    /// fn prepare_request_builder() -> GetOperation {
6260    ///   # panic!();
6261    ///   // ... details omitted ...
6262    /// }
6263    /// ```
6264    #[derive(Clone, Debug)]
6265    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
6266
6267    impl GetOperation {
6268        pub(crate) fn new(
6269            stub: std::sync::Arc<dyn super::super::stub::dynamic::InstanceService>,
6270        ) -> Self {
6271            Self(RequestBuilder::new(stub))
6272        }
6273
6274        /// Sets the full request, replacing any prior values.
6275        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
6276            mut self,
6277            v: V,
6278        ) -> Self {
6279            self.0.request = v.into();
6280            self
6281        }
6282
6283        /// Sets all the options, replacing any prior values.
6284        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6285            self.0.options = v.into();
6286            self
6287        }
6288
6289        /// Sends the request.
6290        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6291            (*self.0.stub)
6292                .get_operation(self.0.request, self.0.options)
6293                .await
6294                .map(crate::Response::into_body)
6295        }
6296
6297        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
6298        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6299            self.0.request.name = v.into();
6300            self
6301        }
6302    }
6303
6304    #[doc(hidden)]
6305    impl crate::RequestBuilder for GetOperation {
6306        fn request_options(&mut self) -> &mut crate::RequestOptions {
6307            &mut self.0.options
6308        }
6309    }
6310
6311    /// The request builder for [InstanceService::delete_operation][crate::client::InstanceService::delete_operation] calls.
6312    ///
6313    /// # Example
6314    /// ```
6315    /// # use google_cloud_chronicle_v1::builder::instance_service::DeleteOperation;
6316    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
6317    ///
6318    /// let builder = prepare_request_builder();
6319    /// let response = builder.send().await?;
6320    /// # Ok(()) }
6321    ///
6322    /// fn prepare_request_builder() -> DeleteOperation {
6323    ///   # panic!();
6324    ///   // ... details omitted ...
6325    /// }
6326    /// ```
6327    #[derive(Clone, Debug)]
6328    pub struct DeleteOperation(
6329        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
6330    );
6331
6332    impl DeleteOperation {
6333        pub(crate) fn new(
6334            stub: std::sync::Arc<dyn super::super::stub::dynamic::InstanceService>,
6335        ) -> Self {
6336            Self(RequestBuilder::new(stub))
6337        }
6338
6339        /// Sets the full request, replacing any prior values.
6340        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
6341            mut self,
6342            v: V,
6343        ) -> Self {
6344            self.0.request = v.into();
6345            self
6346        }
6347
6348        /// Sets all the options, replacing any prior values.
6349        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6350            self.0.options = v.into();
6351            self
6352        }
6353
6354        /// Sends the request.
6355        pub async fn send(self) -> Result<()> {
6356            (*self.0.stub)
6357                .delete_operation(self.0.request, self.0.options)
6358                .await
6359                .map(crate::Response::into_body)
6360        }
6361
6362        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
6363        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6364            self.0.request.name = v.into();
6365            self
6366        }
6367    }
6368
6369    #[doc(hidden)]
6370    impl crate::RequestBuilder for DeleteOperation {
6371        fn request_options(&mut self) -> &mut crate::RequestOptions {
6372            &mut self.0.options
6373        }
6374    }
6375
6376    /// The request builder for [InstanceService::cancel_operation][crate::client::InstanceService::cancel_operation] calls.
6377    ///
6378    /// # Example
6379    /// ```
6380    /// # use google_cloud_chronicle_v1::builder::instance_service::CancelOperation;
6381    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
6382    ///
6383    /// let builder = prepare_request_builder();
6384    /// let response = builder.send().await?;
6385    /// # Ok(()) }
6386    ///
6387    /// fn prepare_request_builder() -> CancelOperation {
6388    ///   # panic!();
6389    ///   // ... details omitted ...
6390    /// }
6391    /// ```
6392    #[derive(Clone, Debug)]
6393    pub struct CancelOperation(
6394        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
6395    );
6396
6397    impl CancelOperation {
6398        pub(crate) fn new(
6399            stub: std::sync::Arc<dyn super::super::stub::dynamic::InstanceService>,
6400        ) -> Self {
6401            Self(RequestBuilder::new(stub))
6402        }
6403
6404        /// Sets the full request, replacing any prior values.
6405        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
6406            mut self,
6407            v: V,
6408        ) -> Self {
6409            self.0.request = v.into();
6410            self
6411        }
6412
6413        /// Sets all the options, replacing any prior values.
6414        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6415            self.0.options = v.into();
6416            self
6417        }
6418
6419        /// Sends the request.
6420        pub async fn send(self) -> Result<()> {
6421            (*self.0.stub)
6422                .cancel_operation(self.0.request, self.0.options)
6423                .await
6424                .map(crate::Response::into_body)
6425        }
6426
6427        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
6428        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6429            self.0.request.name = v.into();
6430            self
6431        }
6432    }
6433
6434    #[doc(hidden)]
6435    impl crate::RequestBuilder for CancelOperation {
6436        fn request_options(&mut self) -> &mut crate::RequestOptions {
6437            &mut self.0.options
6438        }
6439    }
6440}
6441
6442/// Request and client builders for [NativeDashboardService][crate::client::NativeDashboardService].
6443pub mod native_dashboard_service {
6444    use crate::Result;
6445
6446    /// A builder for [NativeDashboardService][crate::client::NativeDashboardService].
6447    ///
6448    /// ```
6449    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
6450    /// # use google_cloud_chronicle_v1::*;
6451    /// # use builder::native_dashboard_service::ClientBuilder;
6452    /// # use client::NativeDashboardService;
6453    /// let builder : ClientBuilder = NativeDashboardService::builder();
6454    /// let client = builder
6455    ///     .with_endpoint("https://chronicle.googleapis.com")
6456    ///     .build().await?;
6457    /// # Ok(()) }
6458    /// ```
6459    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
6460
6461    pub(crate) mod client {
6462        use super::super::super::client::NativeDashboardService;
6463        pub struct Factory;
6464        impl crate::ClientFactory for Factory {
6465            type Client = NativeDashboardService;
6466            type Credentials = gaxi::options::Credentials;
6467            async fn build(
6468                self,
6469                config: gaxi::options::ClientConfig,
6470            ) -> crate::ClientBuilderResult<Self::Client> {
6471                Self::Client::new(config).await
6472            }
6473        }
6474    }
6475
6476    /// Common implementation for [crate::client::NativeDashboardService] request builders.
6477    #[derive(Clone, Debug)]
6478    pub(crate) struct RequestBuilder<R: std::default::Default> {
6479        stub: std::sync::Arc<dyn super::super::stub::dynamic::NativeDashboardService>,
6480        request: R,
6481        options: crate::RequestOptions,
6482    }
6483
6484    impl<R> RequestBuilder<R>
6485    where
6486        R: std::default::Default,
6487    {
6488        pub(crate) fn new(
6489            stub: std::sync::Arc<dyn super::super::stub::dynamic::NativeDashboardService>,
6490        ) -> Self {
6491            Self {
6492                stub,
6493                request: R::default(),
6494                options: crate::RequestOptions::default(),
6495            }
6496        }
6497    }
6498
6499    /// The request builder for [NativeDashboardService::create_native_dashboard][crate::client::NativeDashboardService::create_native_dashboard] calls.
6500    ///
6501    /// # Example
6502    /// ```
6503    /// # use google_cloud_chronicle_v1::builder::native_dashboard_service::CreateNativeDashboard;
6504    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
6505    ///
6506    /// let builder = prepare_request_builder();
6507    /// let response = builder.send().await?;
6508    /// # Ok(()) }
6509    ///
6510    /// fn prepare_request_builder() -> CreateNativeDashboard {
6511    ///   # panic!();
6512    ///   // ... details omitted ...
6513    /// }
6514    /// ```
6515    #[derive(Clone, Debug)]
6516    pub struct CreateNativeDashboard(RequestBuilder<crate::model::CreateNativeDashboardRequest>);
6517
6518    impl CreateNativeDashboard {
6519        pub(crate) fn new(
6520            stub: std::sync::Arc<dyn super::super::stub::dynamic::NativeDashboardService>,
6521        ) -> Self {
6522            Self(RequestBuilder::new(stub))
6523        }
6524
6525        /// Sets the full request, replacing any prior values.
6526        pub fn with_request<V: Into<crate::model::CreateNativeDashboardRequest>>(
6527            mut self,
6528            v: V,
6529        ) -> Self {
6530            self.0.request = v.into();
6531            self
6532        }
6533
6534        /// Sets all the options, replacing any prior values.
6535        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6536            self.0.options = v.into();
6537            self
6538        }
6539
6540        /// Sends the request.
6541        pub async fn send(self) -> Result<crate::model::NativeDashboard> {
6542            (*self.0.stub)
6543                .create_native_dashboard(self.0.request, self.0.options)
6544                .await
6545                .map(crate::Response::into_body)
6546        }
6547
6548        /// Sets the value of [parent][crate::model::CreateNativeDashboardRequest::parent].
6549        ///
6550        /// This is a **required** field for requests.
6551        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6552            self.0.request.parent = v.into();
6553            self
6554        }
6555
6556        /// Sets the value of [native_dashboard][crate::model::CreateNativeDashboardRequest::native_dashboard].
6557        ///
6558        /// This is a **required** field for requests.
6559        pub fn set_native_dashboard<T>(mut self, v: T) -> Self
6560        where
6561            T: std::convert::Into<crate::model::NativeDashboard>,
6562        {
6563            self.0.request.native_dashboard = std::option::Option::Some(v.into());
6564            self
6565        }
6566
6567        /// Sets or clears the value of [native_dashboard][crate::model::CreateNativeDashboardRequest::native_dashboard].
6568        ///
6569        /// This is a **required** field for requests.
6570        pub fn set_or_clear_native_dashboard<T>(mut self, v: std::option::Option<T>) -> Self
6571        where
6572            T: std::convert::Into<crate::model::NativeDashboard>,
6573        {
6574            self.0.request.native_dashboard = v.map(|x| x.into());
6575            self
6576        }
6577    }
6578
6579    #[doc(hidden)]
6580    impl crate::RequestBuilder for CreateNativeDashboard {
6581        fn request_options(&mut self) -> &mut crate::RequestOptions {
6582            &mut self.0.options
6583        }
6584    }
6585
6586    /// The request builder for [NativeDashboardService::get_native_dashboard][crate::client::NativeDashboardService::get_native_dashboard] calls.
6587    ///
6588    /// # Example
6589    /// ```
6590    /// # use google_cloud_chronicle_v1::builder::native_dashboard_service::GetNativeDashboard;
6591    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
6592    ///
6593    /// let builder = prepare_request_builder();
6594    /// let response = builder.send().await?;
6595    /// # Ok(()) }
6596    ///
6597    /// fn prepare_request_builder() -> GetNativeDashboard {
6598    ///   # panic!();
6599    ///   // ... details omitted ...
6600    /// }
6601    /// ```
6602    #[derive(Clone, Debug)]
6603    pub struct GetNativeDashboard(RequestBuilder<crate::model::GetNativeDashboardRequest>);
6604
6605    impl GetNativeDashboard {
6606        pub(crate) fn new(
6607            stub: std::sync::Arc<dyn super::super::stub::dynamic::NativeDashboardService>,
6608        ) -> Self {
6609            Self(RequestBuilder::new(stub))
6610        }
6611
6612        /// Sets the full request, replacing any prior values.
6613        pub fn with_request<V: Into<crate::model::GetNativeDashboardRequest>>(
6614            mut self,
6615            v: V,
6616        ) -> Self {
6617            self.0.request = v.into();
6618            self
6619        }
6620
6621        /// Sets all the options, replacing any prior values.
6622        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6623            self.0.options = v.into();
6624            self
6625        }
6626
6627        /// Sends the request.
6628        pub async fn send(self) -> Result<crate::model::NativeDashboard> {
6629            (*self.0.stub)
6630                .get_native_dashboard(self.0.request, self.0.options)
6631                .await
6632                .map(crate::Response::into_body)
6633        }
6634
6635        /// Sets the value of [name][crate::model::GetNativeDashboardRequest::name].
6636        ///
6637        /// This is a **required** field for requests.
6638        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6639            self.0.request.name = v.into();
6640            self
6641        }
6642
6643        /// Sets the value of [view][crate::model::GetNativeDashboardRequest::view].
6644        pub fn set_view<T: Into<crate::model::NativeDashboardView>>(mut self, v: T) -> Self {
6645            self.0.request.view = v.into();
6646            self
6647        }
6648    }
6649
6650    #[doc(hidden)]
6651    impl crate::RequestBuilder for GetNativeDashboard {
6652        fn request_options(&mut self) -> &mut crate::RequestOptions {
6653            &mut self.0.options
6654        }
6655    }
6656
6657    /// The request builder for [NativeDashboardService::list_native_dashboards][crate::client::NativeDashboardService::list_native_dashboards] calls.
6658    ///
6659    /// # Example
6660    /// ```
6661    /// # use google_cloud_chronicle_v1::builder::native_dashboard_service::ListNativeDashboards;
6662    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
6663    /// use google_cloud_gax::paginator::ItemPaginator;
6664    ///
6665    /// let builder = prepare_request_builder();
6666    /// let mut items = builder.by_item();
6667    /// while let Some(result) = items.next().await {
6668    ///   let item = result?;
6669    /// }
6670    /// # Ok(()) }
6671    ///
6672    /// fn prepare_request_builder() -> ListNativeDashboards {
6673    ///   # panic!();
6674    ///   // ... details omitted ...
6675    /// }
6676    /// ```
6677    #[derive(Clone, Debug)]
6678    pub struct ListNativeDashboards(RequestBuilder<crate::model::ListNativeDashboardsRequest>);
6679
6680    impl ListNativeDashboards {
6681        pub(crate) fn new(
6682            stub: std::sync::Arc<dyn super::super::stub::dynamic::NativeDashboardService>,
6683        ) -> Self {
6684            Self(RequestBuilder::new(stub))
6685        }
6686
6687        /// Sets the full request, replacing any prior values.
6688        pub fn with_request<V: Into<crate::model::ListNativeDashboardsRequest>>(
6689            mut self,
6690            v: V,
6691        ) -> Self {
6692            self.0.request = v.into();
6693            self
6694        }
6695
6696        /// Sets all the options, replacing any prior values.
6697        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6698            self.0.options = v.into();
6699            self
6700        }
6701
6702        /// Sends the request.
6703        pub async fn send(self) -> Result<crate::model::ListNativeDashboardsResponse> {
6704            (*self.0.stub)
6705                .list_native_dashboards(self.0.request, self.0.options)
6706                .await
6707                .map(crate::Response::into_body)
6708        }
6709
6710        /// Streams each page in the collection.
6711        pub fn by_page(
6712            self,
6713        ) -> impl google_cloud_gax::paginator::Paginator<
6714            crate::model::ListNativeDashboardsResponse,
6715            crate::Error,
6716        > {
6717            use std::clone::Clone;
6718            let token = self.0.request.page_token.clone();
6719            let execute = move |token: String| {
6720                let mut builder = self.clone();
6721                builder.0.request = builder.0.request.set_page_token(token);
6722                builder.send()
6723            };
6724            google_cloud_gax::paginator::internal::new_paginator(token, execute)
6725        }
6726
6727        /// Streams each item in the collection.
6728        pub fn by_item(
6729            self,
6730        ) -> impl google_cloud_gax::paginator::ItemPaginator<
6731            crate::model::ListNativeDashboardsResponse,
6732            crate::Error,
6733        > {
6734            use google_cloud_gax::paginator::Paginator;
6735            self.by_page().items()
6736        }
6737
6738        /// Sets the value of [parent][crate::model::ListNativeDashboardsRequest::parent].
6739        ///
6740        /// This is a **required** field for requests.
6741        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6742            self.0.request.parent = v.into();
6743            self
6744        }
6745
6746        /// Sets the value of [page_size][crate::model::ListNativeDashboardsRequest::page_size].
6747        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6748            self.0.request.page_size = v.into();
6749            self
6750        }
6751
6752        /// Sets the value of [page_token][crate::model::ListNativeDashboardsRequest::page_token].
6753        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6754            self.0.request.page_token = v.into();
6755            self
6756        }
6757
6758        /// Sets the value of [view][crate::model::ListNativeDashboardsRequest::view].
6759        pub fn set_view<T: Into<crate::model::NativeDashboardView>>(mut self, v: T) -> Self {
6760            self.0.request.view = v.into();
6761            self
6762        }
6763    }
6764
6765    #[doc(hidden)]
6766    impl crate::RequestBuilder for ListNativeDashboards {
6767        fn request_options(&mut self) -> &mut crate::RequestOptions {
6768            &mut self.0.options
6769        }
6770    }
6771
6772    /// The request builder for [NativeDashboardService::update_native_dashboard][crate::client::NativeDashboardService::update_native_dashboard] calls.
6773    ///
6774    /// # Example
6775    /// ```
6776    /// # use google_cloud_chronicle_v1::builder::native_dashboard_service::UpdateNativeDashboard;
6777    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
6778    ///
6779    /// let builder = prepare_request_builder();
6780    /// let response = builder.send().await?;
6781    /// # Ok(()) }
6782    ///
6783    /// fn prepare_request_builder() -> UpdateNativeDashboard {
6784    ///   # panic!();
6785    ///   // ... details omitted ...
6786    /// }
6787    /// ```
6788    #[derive(Clone, Debug)]
6789    pub struct UpdateNativeDashboard(RequestBuilder<crate::model::UpdateNativeDashboardRequest>);
6790
6791    impl UpdateNativeDashboard {
6792        pub(crate) fn new(
6793            stub: std::sync::Arc<dyn super::super::stub::dynamic::NativeDashboardService>,
6794        ) -> Self {
6795            Self(RequestBuilder::new(stub))
6796        }
6797
6798        /// Sets the full request, replacing any prior values.
6799        pub fn with_request<V: Into<crate::model::UpdateNativeDashboardRequest>>(
6800            mut self,
6801            v: V,
6802        ) -> Self {
6803            self.0.request = v.into();
6804            self
6805        }
6806
6807        /// Sets all the options, replacing any prior values.
6808        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6809            self.0.options = v.into();
6810            self
6811        }
6812
6813        /// Sends the request.
6814        pub async fn send(self) -> Result<crate::model::NativeDashboard> {
6815            (*self.0.stub)
6816                .update_native_dashboard(self.0.request, self.0.options)
6817                .await
6818                .map(crate::Response::into_body)
6819        }
6820
6821        /// Sets the value of [native_dashboard][crate::model::UpdateNativeDashboardRequest::native_dashboard].
6822        ///
6823        /// This is a **required** field for requests.
6824        pub fn set_native_dashboard<T>(mut self, v: T) -> Self
6825        where
6826            T: std::convert::Into<crate::model::NativeDashboard>,
6827        {
6828            self.0.request.native_dashboard = std::option::Option::Some(v.into());
6829            self
6830        }
6831
6832        /// Sets or clears the value of [native_dashboard][crate::model::UpdateNativeDashboardRequest::native_dashboard].
6833        ///
6834        /// This is a **required** field for requests.
6835        pub fn set_or_clear_native_dashboard<T>(mut self, v: std::option::Option<T>) -> Self
6836        where
6837            T: std::convert::Into<crate::model::NativeDashboard>,
6838        {
6839            self.0.request.native_dashboard = v.map(|x| x.into());
6840            self
6841        }
6842
6843        /// Sets the value of [update_mask][crate::model::UpdateNativeDashboardRequest::update_mask].
6844        ///
6845        /// This is a **required** field for requests.
6846        pub fn set_update_mask<T>(mut self, v: T) -> Self
6847        where
6848            T: std::convert::Into<wkt::FieldMask>,
6849        {
6850            self.0.request.update_mask = std::option::Option::Some(v.into());
6851            self
6852        }
6853
6854        /// Sets or clears the value of [update_mask][crate::model::UpdateNativeDashboardRequest::update_mask].
6855        ///
6856        /// This is a **required** field for requests.
6857        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6858        where
6859            T: std::convert::Into<wkt::FieldMask>,
6860        {
6861            self.0.request.update_mask = v.map(|x| x.into());
6862            self
6863        }
6864    }
6865
6866    #[doc(hidden)]
6867    impl crate::RequestBuilder for UpdateNativeDashboard {
6868        fn request_options(&mut self) -> &mut crate::RequestOptions {
6869            &mut self.0.options
6870        }
6871    }
6872
6873    /// The request builder for [NativeDashboardService::duplicate_native_dashboard][crate::client::NativeDashboardService::duplicate_native_dashboard] calls.
6874    ///
6875    /// # Example
6876    /// ```
6877    /// # use google_cloud_chronicle_v1::builder::native_dashboard_service::DuplicateNativeDashboard;
6878    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
6879    ///
6880    /// let builder = prepare_request_builder();
6881    /// let response = builder.send().await?;
6882    /// # Ok(()) }
6883    ///
6884    /// fn prepare_request_builder() -> DuplicateNativeDashboard {
6885    ///   # panic!();
6886    ///   // ... details omitted ...
6887    /// }
6888    /// ```
6889    #[derive(Clone, Debug)]
6890    pub struct DuplicateNativeDashboard(
6891        RequestBuilder<crate::model::DuplicateNativeDashboardRequest>,
6892    );
6893
6894    impl DuplicateNativeDashboard {
6895        pub(crate) fn new(
6896            stub: std::sync::Arc<dyn super::super::stub::dynamic::NativeDashboardService>,
6897        ) -> Self {
6898            Self(RequestBuilder::new(stub))
6899        }
6900
6901        /// Sets the full request, replacing any prior values.
6902        pub fn with_request<V: Into<crate::model::DuplicateNativeDashboardRequest>>(
6903            mut self,
6904            v: V,
6905        ) -> Self {
6906            self.0.request = v.into();
6907            self
6908        }
6909
6910        /// Sets all the options, replacing any prior values.
6911        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6912            self.0.options = v.into();
6913            self
6914        }
6915
6916        /// Sends the request.
6917        pub async fn send(self) -> Result<crate::model::NativeDashboard> {
6918            (*self.0.stub)
6919                .duplicate_native_dashboard(self.0.request, self.0.options)
6920                .await
6921                .map(crate::Response::into_body)
6922        }
6923
6924        /// Sets the value of [name][crate::model::DuplicateNativeDashboardRequest::name].
6925        ///
6926        /// This is a **required** field for requests.
6927        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6928            self.0.request.name = v.into();
6929            self
6930        }
6931
6932        /// Sets the value of [native_dashboard][crate::model::DuplicateNativeDashboardRequest::native_dashboard].
6933        ///
6934        /// This is a **required** field for requests.
6935        pub fn set_native_dashboard<T>(mut self, v: T) -> Self
6936        where
6937            T: std::convert::Into<crate::model::NativeDashboard>,
6938        {
6939            self.0.request.native_dashboard = std::option::Option::Some(v.into());
6940            self
6941        }
6942
6943        /// Sets or clears the value of [native_dashboard][crate::model::DuplicateNativeDashboardRequest::native_dashboard].
6944        ///
6945        /// This is a **required** field for requests.
6946        pub fn set_or_clear_native_dashboard<T>(mut self, v: std::option::Option<T>) -> Self
6947        where
6948            T: std::convert::Into<crate::model::NativeDashboard>,
6949        {
6950            self.0.request.native_dashboard = v.map(|x| x.into());
6951            self
6952        }
6953    }
6954
6955    #[doc(hidden)]
6956    impl crate::RequestBuilder for DuplicateNativeDashboard {
6957        fn request_options(&mut self) -> &mut crate::RequestOptions {
6958            &mut self.0.options
6959        }
6960    }
6961
6962    /// The request builder for [NativeDashboardService::delete_native_dashboard][crate::client::NativeDashboardService::delete_native_dashboard] calls.
6963    ///
6964    /// # Example
6965    /// ```
6966    /// # use google_cloud_chronicle_v1::builder::native_dashboard_service::DeleteNativeDashboard;
6967    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
6968    ///
6969    /// let builder = prepare_request_builder();
6970    /// let response = builder.send().await?;
6971    /// # Ok(()) }
6972    ///
6973    /// fn prepare_request_builder() -> DeleteNativeDashboard {
6974    ///   # panic!();
6975    ///   // ... details omitted ...
6976    /// }
6977    /// ```
6978    #[derive(Clone, Debug)]
6979    pub struct DeleteNativeDashboard(RequestBuilder<crate::model::DeleteNativeDashboardRequest>);
6980
6981    impl DeleteNativeDashboard {
6982        pub(crate) fn new(
6983            stub: std::sync::Arc<dyn super::super::stub::dynamic::NativeDashboardService>,
6984        ) -> Self {
6985            Self(RequestBuilder::new(stub))
6986        }
6987
6988        /// Sets the full request, replacing any prior values.
6989        pub fn with_request<V: Into<crate::model::DeleteNativeDashboardRequest>>(
6990            mut self,
6991            v: V,
6992        ) -> Self {
6993            self.0.request = v.into();
6994            self
6995        }
6996
6997        /// Sets all the options, replacing any prior values.
6998        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6999            self.0.options = v.into();
7000            self
7001        }
7002
7003        /// Sends the request.
7004        pub async fn send(self) -> Result<()> {
7005            (*self.0.stub)
7006                .delete_native_dashboard(self.0.request, self.0.options)
7007                .await
7008                .map(crate::Response::into_body)
7009        }
7010
7011        /// Sets the value of [name][crate::model::DeleteNativeDashboardRequest::name].
7012        ///
7013        /// This is a **required** field for requests.
7014        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7015            self.0.request.name = v.into();
7016            self
7017        }
7018    }
7019
7020    #[doc(hidden)]
7021    impl crate::RequestBuilder for DeleteNativeDashboard {
7022        fn request_options(&mut self) -> &mut crate::RequestOptions {
7023            &mut self.0.options
7024        }
7025    }
7026
7027    /// The request builder for [NativeDashboardService::add_chart][crate::client::NativeDashboardService::add_chart] calls.
7028    ///
7029    /// # Example
7030    /// ```
7031    /// # use google_cloud_chronicle_v1::builder::native_dashboard_service::AddChart;
7032    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
7033    ///
7034    /// let builder = prepare_request_builder();
7035    /// let response = builder.send().await?;
7036    /// # Ok(()) }
7037    ///
7038    /// fn prepare_request_builder() -> AddChart {
7039    ///   # panic!();
7040    ///   // ... details omitted ...
7041    /// }
7042    /// ```
7043    #[derive(Clone, Debug)]
7044    pub struct AddChart(RequestBuilder<crate::model::AddChartRequest>);
7045
7046    impl AddChart {
7047        pub(crate) fn new(
7048            stub: std::sync::Arc<dyn super::super::stub::dynamic::NativeDashboardService>,
7049        ) -> Self {
7050            Self(RequestBuilder::new(stub))
7051        }
7052
7053        /// Sets the full request, replacing any prior values.
7054        pub fn with_request<V: Into<crate::model::AddChartRequest>>(mut self, v: V) -> Self {
7055            self.0.request = v.into();
7056            self
7057        }
7058
7059        /// Sets all the options, replacing any prior values.
7060        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7061            self.0.options = v.into();
7062            self
7063        }
7064
7065        /// Sends the request.
7066        pub async fn send(self) -> Result<crate::model::AddChartResponse> {
7067            (*self.0.stub)
7068                .add_chart(self.0.request, self.0.options)
7069                .await
7070                .map(crate::Response::into_body)
7071        }
7072
7073        /// Sets the value of [name][crate::model::AddChartRequest::name].
7074        ///
7075        /// This is a **required** field for requests.
7076        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7077            self.0.request.name = v.into();
7078            self
7079        }
7080
7081        /// Sets the value of [dashboard_query][crate::model::AddChartRequest::dashboard_query].
7082        pub fn set_dashboard_query<T>(mut self, v: T) -> Self
7083        where
7084            T: std::convert::Into<crate::model::DashboardQuery>,
7085        {
7086            self.0.request.dashboard_query = std::option::Option::Some(v.into());
7087            self
7088        }
7089
7090        /// Sets or clears the value of [dashboard_query][crate::model::AddChartRequest::dashboard_query].
7091        pub fn set_or_clear_dashboard_query<T>(mut self, v: std::option::Option<T>) -> Self
7092        where
7093            T: std::convert::Into<crate::model::DashboardQuery>,
7094        {
7095            self.0.request.dashboard_query = v.map(|x| x.into());
7096            self
7097        }
7098
7099        /// Sets the value of [dashboard_chart][crate::model::AddChartRequest::dashboard_chart].
7100        ///
7101        /// This is a **required** field for requests.
7102        pub fn set_dashboard_chart<T>(mut self, v: T) -> Self
7103        where
7104            T: std::convert::Into<crate::model::DashboardChart>,
7105        {
7106            self.0.request.dashboard_chart = std::option::Option::Some(v.into());
7107            self
7108        }
7109
7110        /// Sets or clears the value of [dashboard_chart][crate::model::AddChartRequest::dashboard_chart].
7111        ///
7112        /// This is a **required** field for requests.
7113        pub fn set_or_clear_dashboard_chart<T>(mut self, v: std::option::Option<T>) -> Self
7114        where
7115            T: std::convert::Into<crate::model::DashboardChart>,
7116        {
7117            self.0.request.dashboard_chart = v.map(|x| x.into());
7118            self
7119        }
7120
7121        /// Sets the value of [chart_layout][crate::model::AddChartRequest::chart_layout].
7122        ///
7123        /// This is a **required** field for requests.
7124        pub fn set_chart_layout<T>(mut self, v: T) -> Self
7125        where
7126            T: std::convert::Into<crate::model::dashboard_definition::chart_config::ChartLayout>,
7127        {
7128            self.0.request.chart_layout = std::option::Option::Some(v.into());
7129            self
7130        }
7131
7132        /// Sets or clears the value of [chart_layout][crate::model::AddChartRequest::chart_layout].
7133        ///
7134        /// This is a **required** field for requests.
7135        pub fn set_or_clear_chart_layout<T>(mut self, v: std::option::Option<T>) -> Self
7136        where
7137            T: std::convert::Into<crate::model::dashboard_definition::chart_config::ChartLayout>,
7138        {
7139            self.0.request.chart_layout = v.map(|x| x.into());
7140            self
7141        }
7142    }
7143
7144    #[doc(hidden)]
7145    impl crate::RequestBuilder for AddChart {
7146        fn request_options(&mut self) -> &mut crate::RequestOptions {
7147            &mut self.0.options
7148        }
7149    }
7150
7151    /// The request builder for [NativeDashboardService::remove_chart][crate::client::NativeDashboardService::remove_chart] calls.
7152    ///
7153    /// # Example
7154    /// ```
7155    /// # use google_cloud_chronicle_v1::builder::native_dashboard_service::RemoveChart;
7156    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
7157    ///
7158    /// let builder = prepare_request_builder();
7159    /// let response = builder.send().await?;
7160    /// # Ok(()) }
7161    ///
7162    /// fn prepare_request_builder() -> RemoveChart {
7163    ///   # panic!();
7164    ///   // ... details omitted ...
7165    /// }
7166    /// ```
7167    #[derive(Clone, Debug)]
7168    pub struct RemoveChart(RequestBuilder<crate::model::RemoveChartRequest>);
7169
7170    impl RemoveChart {
7171        pub(crate) fn new(
7172            stub: std::sync::Arc<dyn super::super::stub::dynamic::NativeDashboardService>,
7173        ) -> Self {
7174            Self(RequestBuilder::new(stub))
7175        }
7176
7177        /// Sets the full request, replacing any prior values.
7178        pub fn with_request<V: Into<crate::model::RemoveChartRequest>>(mut self, v: V) -> Self {
7179            self.0.request = v.into();
7180            self
7181        }
7182
7183        /// Sets all the options, replacing any prior values.
7184        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7185            self.0.options = v.into();
7186            self
7187        }
7188
7189        /// Sends the request.
7190        pub async fn send(self) -> Result<crate::model::NativeDashboard> {
7191            (*self.0.stub)
7192                .remove_chart(self.0.request, self.0.options)
7193                .await
7194                .map(crate::Response::into_body)
7195        }
7196
7197        /// Sets the value of [name][crate::model::RemoveChartRequest::name].
7198        ///
7199        /// This is a **required** field for requests.
7200        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7201            self.0.request.name = v.into();
7202            self
7203        }
7204
7205        /// Sets the value of [dashboard_chart][crate::model::RemoveChartRequest::dashboard_chart].
7206        ///
7207        /// This is a **required** field for requests.
7208        pub fn set_dashboard_chart<T: Into<std::string::String>>(mut self, v: T) -> Self {
7209            self.0.request.dashboard_chart = v.into();
7210            self
7211        }
7212    }
7213
7214    #[doc(hidden)]
7215    impl crate::RequestBuilder for RemoveChart {
7216        fn request_options(&mut self) -> &mut crate::RequestOptions {
7217            &mut self.0.options
7218        }
7219    }
7220
7221    /// The request builder for [NativeDashboardService::edit_chart][crate::client::NativeDashboardService::edit_chart] calls.
7222    ///
7223    /// # Example
7224    /// ```
7225    /// # use google_cloud_chronicle_v1::builder::native_dashboard_service::EditChart;
7226    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
7227    ///
7228    /// let builder = prepare_request_builder();
7229    /// let response = builder.send().await?;
7230    /// # Ok(()) }
7231    ///
7232    /// fn prepare_request_builder() -> EditChart {
7233    ///   # panic!();
7234    ///   // ... details omitted ...
7235    /// }
7236    /// ```
7237    #[derive(Clone, Debug)]
7238    pub struct EditChart(RequestBuilder<crate::model::EditChartRequest>);
7239
7240    impl EditChart {
7241        pub(crate) fn new(
7242            stub: std::sync::Arc<dyn super::super::stub::dynamic::NativeDashboardService>,
7243        ) -> Self {
7244            Self(RequestBuilder::new(stub))
7245        }
7246
7247        /// Sets the full request, replacing any prior values.
7248        pub fn with_request<V: Into<crate::model::EditChartRequest>>(mut self, v: V) -> Self {
7249            self.0.request = v.into();
7250            self
7251        }
7252
7253        /// Sets all the options, replacing any prior values.
7254        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7255            self.0.options = v.into();
7256            self
7257        }
7258
7259        /// Sends the request.
7260        pub async fn send(self) -> Result<crate::model::EditChartResponse> {
7261            (*self.0.stub)
7262                .edit_chart(self.0.request, self.0.options)
7263                .await
7264                .map(crate::Response::into_body)
7265        }
7266
7267        /// Sets the value of [name][crate::model::EditChartRequest::name].
7268        ///
7269        /// This is a **required** field for requests.
7270        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7271            self.0.request.name = v.into();
7272            self
7273        }
7274
7275        /// Sets the value of [dashboard_query][crate::model::EditChartRequest::dashboard_query].
7276        pub fn set_dashboard_query<T>(mut self, v: T) -> Self
7277        where
7278            T: std::convert::Into<crate::model::DashboardQuery>,
7279        {
7280            self.0.request.dashboard_query = std::option::Option::Some(v.into());
7281            self
7282        }
7283
7284        /// Sets or clears the value of [dashboard_query][crate::model::EditChartRequest::dashboard_query].
7285        pub fn set_or_clear_dashboard_query<T>(mut self, v: std::option::Option<T>) -> Self
7286        where
7287            T: std::convert::Into<crate::model::DashboardQuery>,
7288        {
7289            self.0.request.dashboard_query = v.map(|x| x.into());
7290            self
7291        }
7292
7293        /// Sets the value of [dashboard_chart][crate::model::EditChartRequest::dashboard_chart].
7294        pub fn set_dashboard_chart<T>(mut self, v: T) -> Self
7295        where
7296            T: std::convert::Into<crate::model::DashboardChart>,
7297        {
7298            self.0.request.dashboard_chart = std::option::Option::Some(v.into());
7299            self
7300        }
7301
7302        /// Sets or clears the value of [dashboard_chart][crate::model::EditChartRequest::dashboard_chart].
7303        pub fn set_or_clear_dashboard_chart<T>(mut self, v: std::option::Option<T>) -> Self
7304        where
7305            T: std::convert::Into<crate::model::DashboardChart>,
7306        {
7307            self.0.request.dashboard_chart = v.map(|x| x.into());
7308            self
7309        }
7310
7311        /// Sets the value of [edit_mask][crate::model::EditChartRequest::edit_mask].
7312        ///
7313        /// This is a **required** field for requests.
7314        pub fn set_edit_mask<T>(mut self, v: T) -> Self
7315        where
7316            T: std::convert::Into<wkt::FieldMask>,
7317        {
7318            self.0.request.edit_mask = std::option::Option::Some(v.into());
7319            self
7320        }
7321
7322        /// Sets or clears the value of [edit_mask][crate::model::EditChartRequest::edit_mask].
7323        ///
7324        /// This is a **required** field for requests.
7325        pub fn set_or_clear_edit_mask<T>(mut self, v: std::option::Option<T>) -> Self
7326        where
7327            T: std::convert::Into<wkt::FieldMask>,
7328        {
7329            self.0.request.edit_mask = v.map(|x| x.into());
7330            self
7331        }
7332
7333        /// Sets the value of [language_features][crate::model::EditChartRequest::language_features].
7334        pub fn set_language_features<T, V>(mut self, v: T) -> Self
7335        where
7336            T: std::iter::IntoIterator<Item = V>,
7337            V: std::convert::Into<crate::model::LanguageFeature>,
7338        {
7339            use std::iter::Iterator;
7340            self.0.request.language_features = v.into_iter().map(|i| i.into()).collect();
7341            self
7342        }
7343    }
7344
7345    #[doc(hidden)]
7346    impl crate::RequestBuilder for EditChart {
7347        fn request_options(&mut self) -> &mut crate::RequestOptions {
7348            &mut self.0.options
7349        }
7350    }
7351
7352    /// The request builder for [NativeDashboardService::duplicate_chart][crate::client::NativeDashboardService::duplicate_chart] calls.
7353    ///
7354    /// # Example
7355    /// ```
7356    /// # use google_cloud_chronicle_v1::builder::native_dashboard_service::DuplicateChart;
7357    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
7358    ///
7359    /// let builder = prepare_request_builder();
7360    /// let response = builder.send().await?;
7361    /// # Ok(()) }
7362    ///
7363    /// fn prepare_request_builder() -> DuplicateChart {
7364    ///   # panic!();
7365    ///   // ... details omitted ...
7366    /// }
7367    /// ```
7368    #[derive(Clone, Debug)]
7369    pub struct DuplicateChart(RequestBuilder<crate::model::DuplicateChartRequest>);
7370
7371    impl DuplicateChart {
7372        pub(crate) fn new(
7373            stub: std::sync::Arc<dyn super::super::stub::dynamic::NativeDashboardService>,
7374        ) -> Self {
7375            Self(RequestBuilder::new(stub))
7376        }
7377
7378        /// Sets the full request, replacing any prior values.
7379        pub fn with_request<V: Into<crate::model::DuplicateChartRequest>>(mut self, v: V) -> Self {
7380            self.0.request = v.into();
7381            self
7382        }
7383
7384        /// Sets all the options, replacing any prior values.
7385        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7386            self.0.options = v.into();
7387            self
7388        }
7389
7390        /// Sends the request.
7391        pub async fn send(self) -> Result<crate::model::DuplicateChartResponse> {
7392            (*self.0.stub)
7393                .duplicate_chart(self.0.request, self.0.options)
7394                .await
7395                .map(crate::Response::into_body)
7396        }
7397
7398        /// Sets the value of [name][crate::model::DuplicateChartRequest::name].
7399        ///
7400        /// This is a **required** field for requests.
7401        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7402            self.0.request.name = v.into();
7403            self
7404        }
7405
7406        /// Sets the value of [dashboard_chart][crate::model::DuplicateChartRequest::dashboard_chart].
7407        ///
7408        /// This is a **required** field for requests.
7409        pub fn set_dashboard_chart<T: Into<std::string::String>>(mut self, v: T) -> Self {
7410            self.0.request.dashboard_chart = v.into();
7411            self
7412        }
7413    }
7414
7415    #[doc(hidden)]
7416    impl crate::RequestBuilder for DuplicateChart {
7417        fn request_options(&mut self) -> &mut crate::RequestOptions {
7418            &mut self.0.options
7419        }
7420    }
7421
7422    /// The request builder for [NativeDashboardService::export_native_dashboards][crate::client::NativeDashboardService::export_native_dashboards] calls.
7423    ///
7424    /// # Example
7425    /// ```
7426    /// # use google_cloud_chronicle_v1::builder::native_dashboard_service::ExportNativeDashboards;
7427    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
7428    ///
7429    /// let builder = prepare_request_builder();
7430    /// let response = builder.send().await?;
7431    /// # Ok(()) }
7432    ///
7433    /// fn prepare_request_builder() -> ExportNativeDashboards {
7434    ///   # panic!();
7435    ///   // ... details omitted ...
7436    /// }
7437    /// ```
7438    #[derive(Clone, Debug)]
7439    pub struct ExportNativeDashboards(RequestBuilder<crate::model::ExportNativeDashboardsRequest>);
7440
7441    impl ExportNativeDashboards {
7442        pub(crate) fn new(
7443            stub: std::sync::Arc<dyn super::super::stub::dynamic::NativeDashboardService>,
7444        ) -> Self {
7445            Self(RequestBuilder::new(stub))
7446        }
7447
7448        /// Sets the full request, replacing any prior values.
7449        pub fn with_request<V: Into<crate::model::ExportNativeDashboardsRequest>>(
7450            mut self,
7451            v: V,
7452        ) -> Self {
7453            self.0.request = v.into();
7454            self
7455        }
7456
7457        /// Sets all the options, replacing any prior values.
7458        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7459            self.0.options = v.into();
7460            self
7461        }
7462
7463        /// Sends the request.
7464        pub async fn send(self) -> Result<crate::model::ExportNativeDashboardsResponse> {
7465            (*self.0.stub)
7466                .export_native_dashboards(self.0.request, self.0.options)
7467                .await
7468                .map(crate::Response::into_body)
7469        }
7470
7471        /// Sets the value of [parent][crate::model::ExportNativeDashboardsRequest::parent].
7472        ///
7473        /// This is a **required** field for requests.
7474        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7475            self.0.request.parent = v.into();
7476            self
7477        }
7478
7479        /// Sets the value of [names][crate::model::ExportNativeDashboardsRequest::names].
7480        ///
7481        /// This is a **required** field for requests.
7482        pub fn set_names<T, V>(mut self, v: T) -> Self
7483        where
7484            T: std::iter::IntoIterator<Item = V>,
7485            V: std::convert::Into<std::string::String>,
7486        {
7487            use std::iter::Iterator;
7488            self.0.request.names = v.into_iter().map(|i| i.into()).collect();
7489            self
7490        }
7491    }
7492
7493    #[doc(hidden)]
7494    impl crate::RequestBuilder for ExportNativeDashboards {
7495        fn request_options(&mut self) -> &mut crate::RequestOptions {
7496            &mut self.0.options
7497        }
7498    }
7499
7500    /// The request builder for [NativeDashboardService::import_native_dashboards][crate::client::NativeDashboardService::import_native_dashboards] calls.
7501    ///
7502    /// # Example
7503    /// ```
7504    /// # use google_cloud_chronicle_v1::builder::native_dashboard_service::ImportNativeDashboards;
7505    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
7506    ///
7507    /// let builder = prepare_request_builder();
7508    /// let response = builder.send().await?;
7509    /// # Ok(()) }
7510    ///
7511    /// fn prepare_request_builder() -> ImportNativeDashboards {
7512    ///   # panic!();
7513    ///   // ... details omitted ...
7514    /// }
7515    /// ```
7516    #[derive(Clone, Debug)]
7517    pub struct ImportNativeDashboards(RequestBuilder<crate::model::ImportNativeDashboardsRequest>);
7518
7519    impl ImportNativeDashboards {
7520        pub(crate) fn new(
7521            stub: std::sync::Arc<dyn super::super::stub::dynamic::NativeDashboardService>,
7522        ) -> Self {
7523            Self(RequestBuilder::new(stub))
7524        }
7525
7526        /// Sets the full request, replacing any prior values.
7527        pub fn with_request<V: Into<crate::model::ImportNativeDashboardsRequest>>(
7528            mut self,
7529            v: V,
7530        ) -> Self {
7531            self.0.request = v.into();
7532            self
7533        }
7534
7535        /// Sets all the options, replacing any prior values.
7536        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7537            self.0.options = v.into();
7538            self
7539        }
7540
7541        /// Sends the request.
7542        pub async fn send(self) -> Result<crate::model::ImportNativeDashboardsResponse> {
7543            (*self.0.stub)
7544                .import_native_dashboards(self.0.request, self.0.options)
7545                .await
7546                .map(crate::Response::into_body)
7547        }
7548
7549        /// Sets the value of [parent][crate::model::ImportNativeDashboardsRequest::parent].
7550        ///
7551        /// This is a **required** field for requests.
7552        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7553            self.0.request.parent = v.into();
7554            self
7555        }
7556
7557        /// Sets the value of [source][crate::model::ImportNativeDashboardsRequest::source].
7558        ///
7559        /// This is a **required** field for requests.
7560        pub fn set_source<T>(mut self, v: T) -> Self
7561        where
7562            T: std::convert::Into<crate::model::ImportNativeDashboardsInlineSource>,
7563        {
7564            self.0.request.source = std::option::Option::Some(v.into());
7565            self
7566        }
7567
7568        /// Sets or clears the value of [source][crate::model::ImportNativeDashboardsRequest::source].
7569        ///
7570        /// This is a **required** field for requests.
7571        pub fn set_or_clear_source<T>(mut self, v: std::option::Option<T>) -> Self
7572        where
7573            T: std::convert::Into<crate::model::ImportNativeDashboardsInlineSource>,
7574        {
7575            self.0.request.source = v.map(|x| x.into());
7576            self
7577        }
7578    }
7579
7580    #[doc(hidden)]
7581    impl crate::RequestBuilder for ImportNativeDashboards {
7582        fn request_options(&mut self) -> &mut crate::RequestOptions {
7583            &mut self.0.options
7584        }
7585    }
7586
7587    /// The request builder for [NativeDashboardService::list_operations][crate::client::NativeDashboardService::list_operations] calls.
7588    ///
7589    /// # Example
7590    /// ```
7591    /// # use google_cloud_chronicle_v1::builder::native_dashboard_service::ListOperations;
7592    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
7593    /// use google_cloud_gax::paginator::ItemPaginator;
7594    ///
7595    /// let builder = prepare_request_builder();
7596    /// let mut items = builder.by_item();
7597    /// while let Some(result) = items.next().await {
7598    ///   let item = result?;
7599    /// }
7600    /// # Ok(()) }
7601    ///
7602    /// fn prepare_request_builder() -> ListOperations {
7603    ///   # panic!();
7604    ///   // ... details omitted ...
7605    /// }
7606    /// ```
7607    #[derive(Clone, Debug)]
7608    pub struct ListOperations(
7609        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
7610    );
7611
7612    impl ListOperations {
7613        pub(crate) fn new(
7614            stub: std::sync::Arc<dyn super::super::stub::dynamic::NativeDashboardService>,
7615        ) -> Self {
7616            Self(RequestBuilder::new(stub))
7617        }
7618
7619        /// Sets the full request, replacing any prior values.
7620        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
7621            mut self,
7622            v: V,
7623        ) -> Self {
7624            self.0.request = v.into();
7625            self
7626        }
7627
7628        /// Sets all the options, replacing any prior values.
7629        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7630            self.0.options = v.into();
7631            self
7632        }
7633
7634        /// Sends the request.
7635        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
7636            (*self.0.stub)
7637                .list_operations(self.0.request, self.0.options)
7638                .await
7639                .map(crate::Response::into_body)
7640        }
7641
7642        /// Streams each page in the collection.
7643        pub fn by_page(
7644            self,
7645        ) -> impl google_cloud_gax::paginator::Paginator<
7646            google_cloud_longrunning::model::ListOperationsResponse,
7647            crate::Error,
7648        > {
7649            use std::clone::Clone;
7650            let token = self.0.request.page_token.clone();
7651            let execute = move |token: String| {
7652                let mut builder = self.clone();
7653                builder.0.request = builder.0.request.set_page_token(token);
7654                builder.send()
7655            };
7656            google_cloud_gax::paginator::internal::new_paginator(token, execute)
7657        }
7658
7659        /// Streams each item in the collection.
7660        pub fn by_item(
7661            self,
7662        ) -> impl google_cloud_gax::paginator::ItemPaginator<
7663            google_cloud_longrunning::model::ListOperationsResponse,
7664            crate::Error,
7665        > {
7666            use google_cloud_gax::paginator::Paginator;
7667            self.by_page().items()
7668        }
7669
7670        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
7671        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7672            self.0.request.name = v.into();
7673            self
7674        }
7675
7676        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
7677        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7678            self.0.request.filter = v.into();
7679            self
7680        }
7681
7682        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
7683        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7684            self.0.request.page_size = v.into();
7685            self
7686        }
7687
7688        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
7689        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7690            self.0.request.page_token = v.into();
7691            self
7692        }
7693
7694        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
7695        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
7696            self.0.request.return_partial_success = v.into();
7697            self
7698        }
7699    }
7700
7701    #[doc(hidden)]
7702    impl crate::RequestBuilder for ListOperations {
7703        fn request_options(&mut self) -> &mut crate::RequestOptions {
7704            &mut self.0.options
7705        }
7706    }
7707
7708    /// The request builder for [NativeDashboardService::get_operation][crate::client::NativeDashboardService::get_operation] calls.
7709    ///
7710    /// # Example
7711    /// ```
7712    /// # use google_cloud_chronicle_v1::builder::native_dashboard_service::GetOperation;
7713    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
7714    ///
7715    /// let builder = prepare_request_builder();
7716    /// let response = builder.send().await?;
7717    /// # Ok(()) }
7718    ///
7719    /// fn prepare_request_builder() -> GetOperation {
7720    ///   # panic!();
7721    ///   // ... details omitted ...
7722    /// }
7723    /// ```
7724    #[derive(Clone, Debug)]
7725    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
7726
7727    impl GetOperation {
7728        pub(crate) fn new(
7729            stub: std::sync::Arc<dyn super::super::stub::dynamic::NativeDashboardService>,
7730        ) -> Self {
7731            Self(RequestBuilder::new(stub))
7732        }
7733
7734        /// Sets the full request, replacing any prior values.
7735        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
7736            mut self,
7737            v: V,
7738        ) -> Self {
7739            self.0.request = v.into();
7740            self
7741        }
7742
7743        /// Sets all the options, replacing any prior values.
7744        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7745            self.0.options = v.into();
7746            self
7747        }
7748
7749        /// Sends the request.
7750        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7751            (*self.0.stub)
7752                .get_operation(self.0.request, self.0.options)
7753                .await
7754                .map(crate::Response::into_body)
7755        }
7756
7757        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
7758        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7759            self.0.request.name = v.into();
7760            self
7761        }
7762    }
7763
7764    #[doc(hidden)]
7765    impl crate::RequestBuilder for GetOperation {
7766        fn request_options(&mut self) -> &mut crate::RequestOptions {
7767            &mut self.0.options
7768        }
7769    }
7770
7771    /// The request builder for [NativeDashboardService::delete_operation][crate::client::NativeDashboardService::delete_operation] calls.
7772    ///
7773    /// # Example
7774    /// ```
7775    /// # use google_cloud_chronicle_v1::builder::native_dashboard_service::DeleteOperation;
7776    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
7777    ///
7778    /// let builder = prepare_request_builder();
7779    /// let response = builder.send().await?;
7780    /// # Ok(()) }
7781    ///
7782    /// fn prepare_request_builder() -> DeleteOperation {
7783    ///   # panic!();
7784    ///   // ... details omitted ...
7785    /// }
7786    /// ```
7787    #[derive(Clone, Debug)]
7788    pub struct DeleteOperation(
7789        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
7790    );
7791
7792    impl DeleteOperation {
7793        pub(crate) fn new(
7794            stub: std::sync::Arc<dyn super::super::stub::dynamic::NativeDashboardService>,
7795        ) -> Self {
7796            Self(RequestBuilder::new(stub))
7797        }
7798
7799        /// Sets the full request, replacing any prior values.
7800        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
7801            mut self,
7802            v: V,
7803        ) -> Self {
7804            self.0.request = v.into();
7805            self
7806        }
7807
7808        /// Sets all the options, replacing any prior values.
7809        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7810            self.0.options = v.into();
7811            self
7812        }
7813
7814        /// Sends the request.
7815        pub async fn send(self) -> Result<()> {
7816            (*self.0.stub)
7817                .delete_operation(self.0.request, self.0.options)
7818                .await
7819                .map(crate::Response::into_body)
7820        }
7821
7822        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
7823        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7824            self.0.request.name = v.into();
7825            self
7826        }
7827    }
7828
7829    #[doc(hidden)]
7830    impl crate::RequestBuilder for DeleteOperation {
7831        fn request_options(&mut self) -> &mut crate::RequestOptions {
7832            &mut self.0.options
7833        }
7834    }
7835
7836    /// The request builder for [NativeDashboardService::cancel_operation][crate::client::NativeDashboardService::cancel_operation] calls.
7837    ///
7838    /// # Example
7839    /// ```
7840    /// # use google_cloud_chronicle_v1::builder::native_dashboard_service::CancelOperation;
7841    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
7842    ///
7843    /// let builder = prepare_request_builder();
7844    /// let response = builder.send().await?;
7845    /// # Ok(()) }
7846    ///
7847    /// fn prepare_request_builder() -> CancelOperation {
7848    ///   # panic!();
7849    ///   // ... details omitted ...
7850    /// }
7851    /// ```
7852    #[derive(Clone, Debug)]
7853    pub struct CancelOperation(
7854        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
7855    );
7856
7857    impl CancelOperation {
7858        pub(crate) fn new(
7859            stub: std::sync::Arc<dyn super::super::stub::dynamic::NativeDashboardService>,
7860        ) -> Self {
7861            Self(RequestBuilder::new(stub))
7862        }
7863
7864        /// Sets the full request, replacing any prior values.
7865        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
7866            mut self,
7867            v: V,
7868        ) -> Self {
7869            self.0.request = v.into();
7870            self
7871        }
7872
7873        /// Sets all the options, replacing any prior values.
7874        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7875            self.0.options = v.into();
7876            self
7877        }
7878
7879        /// Sends the request.
7880        pub async fn send(self) -> Result<()> {
7881            (*self.0.stub)
7882                .cancel_operation(self.0.request, self.0.options)
7883                .await
7884                .map(crate::Response::into_body)
7885        }
7886
7887        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
7888        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7889            self.0.request.name = v.into();
7890            self
7891        }
7892    }
7893
7894    #[doc(hidden)]
7895    impl crate::RequestBuilder for CancelOperation {
7896        fn request_options(&mut self) -> &mut crate::RequestOptions {
7897            &mut self.0.options
7898        }
7899    }
7900}
7901
7902/// Request and client builders for [ReferenceListService][crate::client::ReferenceListService].
7903pub mod reference_list_service {
7904    use crate::Result;
7905
7906    /// A builder for [ReferenceListService][crate::client::ReferenceListService].
7907    ///
7908    /// ```
7909    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
7910    /// # use google_cloud_chronicle_v1::*;
7911    /// # use builder::reference_list_service::ClientBuilder;
7912    /// # use client::ReferenceListService;
7913    /// let builder : ClientBuilder = ReferenceListService::builder();
7914    /// let client = builder
7915    ///     .with_endpoint("https://chronicle.googleapis.com")
7916    ///     .build().await?;
7917    /// # Ok(()) }
7918    /// ```
7919    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
7920
7921    pub(crate) mod client {
7922        use super::super::super::client::ReferenceListService;
7923        pub struct Factory;
7924        impl crate::ClientFactory for Factory {
7925            type Client = ReferenceListService;
7926            type Credentials = gaxi::options::Credentials;
7927            async fn build(
7928                self,
7929                config: gaxi::options::ClientConfig,
7930            ) -> crate::ClientBuilderResult<Self::Client> {
7931                Self::Client::new(config).await
7932            }
7933        }
7934    }
7935
7936    /// Common implementation for [crate::client::ReferenceListService] request builders.
7937    #[derive(Clone, Debug)]
7938    pub(crate) struct RequestBuilder<R: std::default::Default> {
7939        stub: std::sync::Arc<dyn super::super::stub::dynamic::ReferenceListService>,
7940        request: R,
7941        options: crate::RequestOptions,
7942    }
7943
7944    impl<R> RequestBuilder<R>
7945    where
7946        R: std::default::Default,
7947    {
7948        pub(crate) fn new(
7949            stub: std::sync::Arc<dyn super::super::stub::dynamic::ReferenceListService>,
7950        ) -> Self {
7951            Self {
7952                stub,
7953                request: R::default(),
7954                options: crate::RequestOptions::default(),
7955            }
7956        }
7957    }
7958
7959    /// The request builder for [ReferenceListService::get_reference_list][crate::client::ReferenceListService::get_reference_list] calls.
7960    ///
7961    /// # Example
7962    /// ```
7963    /// # use google_cloud_chronicle_v1::builder::reference_list_service::GetReferenceList;
7964    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
7965    ///
7966    /// let builder = prepare_request_builder();
7967    /// let response = builder.send().await?;
7968    /// # Ok(()) }
7969    ///
7970    /// fn prepare_request_builder() -> GetReferenceList {
7971    ///   # panic!();
7972    ///   // ... details omitted ...
7973    /// }
7974    /// ```
7975    #[derive(Clone, Debug)]
7976    pub struct GetReferenceList(RequestBuilder<crate::model::GetReferenceListRequest>);
7977
7978    impl GetReferenceList {
7979        pub(crate) fn new(
7980            stub: std::sync::Arc<dyn super::super::stub::dynamic::ReferenceListService>,
7981        ) -> Self {
7982            Self(RequestBuilder::new(stub))
7983        }
7984
7985        /// Sets the full request, replacing any prior values.
7986        pub fn with_request<V: Into<crate::model::GetReferenceListRequest>>(
7987            mut self,
7988            v: V,
7989        ) -> Self {
7990            self.0.request = v.into();
7991            self
7992        }
7993
7994        /// Sets all the options, replacing any prior values.
7995        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7996            self.0.options = v.into();
7997            self
7998        }
7999
8000        /// Sends the request.
8001        pub async fn send(self) -> Result<crate::model::ReferenceList> {
8002            (*self.0.stub)
8003                .get_reference_list(self.0.request, self.0.options)
8004                .await
8005                .map(crate::Response::into_body)
8006        }
8007
8008        /// Sets the value of [name][crate::model::GetReferenceListRequest::name].
8009        ///
8010        /// This is a **required** field for requests.
8011        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8012            self.0.request.name = v.into();
8013            self
8014        }
8015
8016        /// Sets the value of [view][crate::model::GetReferenceListRequest::view].
8017        pub fn set_view<T: Into<crate::model::ReferenceListView>>(mut self, v: T) -> Self {
8018            self.0.request.view = v.into();
8019            self
8020        }
8021    }
8022
8023    #[doc(hidden)]
8024    impl crate::RequestBuilder for GetReferenceList {
8025        fn request_options(&mut self) -> &mut crate::RequestOptions {
8026            &mut self.0.options
8027        }
8028    }
8029
8030    /// The request builder for [ReferenceListService::list_reference_lists][crate::client::ReferenceListService::list_reference_lists] calls.
8031    ///
8032    /// # Example
8033    /// ```
8034    /// # use google_cloud_chronicle_v1::builder::reference_list_service::ListReferenceLists;
8035    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
8036    /// use google_cloud_gax::paginator::ItemPaginator;
8037    ///
8038    /// let builder = prepare_request_builder();
8039    /// let mut items = builder.by_item();
8040    /// while let Some(result) = items.next().await {
8041    ///   let item = result?;
8042    /// }
8043    /// # Ok(()) }
8044    ///
8045    /// fn prepare_request_builder() -> ListReferenceLists {
8046    ///   # panic!();
8047    ///   // ... details omitted ...
8048    /// }
8049    /// ```
8050    #[derive(Clone, Debug)]
8051    pub struct ListReferenceLists(RequestBuilder<crate::model::ListReferenceListsRequest>);
8052
8053    impl ListReferenceLists {
8054        pub(crate) fn new(
8055            stub: std::sync::Arc<dyn super::super::stub::dynamic::ReferenceListService>,
8056        ) -> Self {
8057            Self(RequestBuilder::new(stub))
8058        }
8059
8060        /// Sets the full request, replacing any prior values.
8061        pub fn with_request<V: Into<crate::model::ListReferenceListsRequest>>(
8062            mut self,
8063            v: V,
8064        ) -> Self {
8065            self.0.request = v.into();
8066            self
8067        }
8068
8069        /// Sets all the options, replacing any prior values.
8070        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8071            self.0.options = v.into();
8072            self
8073        }
8074
8075        /// Sends the request.
8076        pub async fn send(self) -> Result<crate::model::ListReferenceListsResponse> {
8077            (*self.0.stub)
8078                .list_reference_lists(self.0.request, self.0.options)
8079                .await
8080                .map(crate::Response::into_body)
8081        }
8082
8083        /// Streams each page in the collection.
8084        pub fn by_page(
8085            self,
8086        ) -> impl google_cloud_gax::paginator::Paginator<
8087            crate::model::ListReferenceListsResponse,
8088            crate::Error,
8089        > {
8090            use std::clone::Clone;
8091            let token = self.0.request.page_token.clone();
8092            let execute = move |token: String| {
8093                let mut builder = self.clone();
8094                builder.0.request = builder.0.request.set_page_token(token);
8095                builder.send()
8096            };
8097            google_cloud_gax::paginator::internal::new_paginator(token, execute)
8098        }
8099
8100        /// Streams each item in the collection.
8101        pub fn by_item(
8102            self,
8103        ) -> impl google_cloud_gax::paginator::ItemPaginator<
8104            crate::model::ListReferenceListsResponse,
8105            crate::Error,
8106        > {
8107            use google_cloud_gax::paginator::Paginator;
8108            self.by_page().items()
8109        }
8110
8111        /// Sets the value of [parent][crate::model::ListReferenceListsRequest::parent].
8112        ///
8113        /// This is a **required** field for requests.
8114        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
8115            self.0.request.parent = v.into();
8116            self
8117        }
8118
8119        /// Sets the value of [page_size][crate::model::ListReferenceListsRequest::page_size].
8120        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8121            self.0.request.page_size = v.into();
8122            self
8123        }
8124
8125        /// Sets the value of [page_token][crate::model::ListReferenceListsRequest::page_token].
8126        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8127            self.0.request.page_token = v.into();
8128            self
8129        }
8130
8131        /// Sets the value of [view][crate::model::ListReferenceListsRequest::view].
8132        pub fn set_view<T: Into<crate::model::ReferenceListView>>(mut self, v: T) -> Self {
8133            self.0.request.view = v.into();
8134            self
8135        }
8136    }
8137
8138    #[doc(hidden)]
8139    impl crate::RequestBuilder for ListReferenceLists {
8140        fn request_options(&mut self) -> &mut crate::RequestOptions {
8141            &mut self.0.options
8142        }
8143    }
8144
8145    /// The request builder for [ReferenceListService::create_reference_list][crate::client::ReferenceListService::create_reference_list] calls.
8146    ///
8147    /// # Example
8148    /// ```
8149    /// # use google_cloud_chronicle_v1::builder::reference_list_service::CreateReferenceList;
8150    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
8151    ///
8152    /// let builder = prepare_request_builder();
8153    /// let response = builder.send().await?;
8154    /// # Ok(()) }
8155    ///
8156    /// fn prepare_request_builder() -> CreateReferenceList {
8157    ///   # panic!();
8158    ///   // ... details omitted ...
8159    /// }
8160    /// ```
8161    #[derive(Clone, Debug)]
8162    pub struct CreateReferenceList(RequestBuilder<crate::model::CreateReferenceListRequest>);
8163
8164    impl CreateReferenceList {
8165        pub(crate) fn new(
8166            stub: std::sync::Arc<dyn super::super::stub::dynamic::ReferenceListService>,
8167        ) -> Self {
8168            Self(RequestBuilder::new(stub))
8169        }
8170
8171        /// Sets the full request, replacing any prior values.
8172        pub fn with_request<V: Into<crate::model::CreateReferenceListRequest>>(
8173            mut self,
8174            v: V,
8175        ) -> Self {
8176            self.0.request = v.into();
8177            self
8178        }
8179
8180        /// Sets all the options, replacing any prior values.
8181        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8182            self.0.options = v.into();
8183            self
8184        }
8185
8186        /// Sends the request.
8187        pub async fn send(self) -> Result<crate::model::ReferenceList> {
8188            (*self.0.stub)
8189                .create_reference_list(self.0.request, self.0.options)
8190                .await
8191                .map(crate::Response::into_body)
8192        }
8193
8194        /// Sets the value of [parent][crate::model::CreateReferenceListRequest::parent].
8195        ///
8196        /// This is a **required** field for requests.
8197        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
8198            self.0.request.parent = v.into();
8199            self
8200        }
8201
8202        /// Sets the value of [reference_list][crate::model::CreateReferenceListRequest::reference_list].
8203        ///
8204        /// This is a **required** field for requests.
8205        pub fn set_reference_list<T>(mut self, v: T) -> Self
8206        where
8207            T: std::convert::Into<crate::model::ReferenceList>,
8208        {
8209            self.0.request.reference_list = std::option::Option::Some(v.into());
8210            self
8211        }
8212
8213        /// Sets or clears the value of [reference_list][crate::model::CreateReferenceListRequest::reference_list].
8214        ///
8215        /// This is a **required** field for requests.
8216        pub fn set_or_clear_reference_list<T>(mut self, v: std::option::Option<T>) -> Self
8217        where
8218            T: std::convert::Into<crate::model::ReferenceList>,
8219        {
8220            self.0.request.reference_list = v.map(|x| x.into());
8221            self
8222        }
8223
8224        /// Sets the value of [reference_list_id][crate::model::CreateReferenceListRequest::reference_list_id].
8225        ///
8226        /// This is a **required** field for requests.
8227        pub fn set_reference_list_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
8228            self.0.request.reference_list_id = v.into();
8229            self
8230        }
8231    }
8232
8233    #[doc(hidden)]
8234    impl crate::RequestBuilder for CreateReferenceList {
8235        fn request_options(&mut self) -> &mut crate::RequestOptions {
8236            &mut self.0.options
8237        }
8238    }
8239
8240    /// The request builder for [ReferenceListService::update_reference_list][crate::client::ReferenceListService::update_reference_list] calls.
8241    ///
8242    /// # Example
8243    /// ```
8244    /// # use google_cloud_chronicle_v1::builder::reference_list_service::UpdateReferenceList;
8245    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
8246    ///
8247    /// let builder = prepare_request_builder();
8248    /// let response = builder.send().await?;
8249    /// # Ok(()) }
8250    ///
8251    /// fn prepare_request_builder() -> UpdateReferenceList {
8252    ///   # panic!();
8253    ///   // ... details omitted ...
8254    /// }
8255    /// ```
8256    #[derive(Clone, Debug)]
8257    pub struct UpdateReferenceList(RequestBuilder<crate::model::UpdateReferenceListRequest>);
8258
8259    impl UpdateReferenceList {
8260        pub(crate) fn new(
8261            stub: std::sync::Arc<dyn super::super::stub::dynamic::ReferenceListService>,
8262        ) -> Self {
8263            Self(RequestBuilder::new(stub))
8264        }
8265
8266        /// Sets the full request, replacing any prior values.
8267        pub fn with_request<V: Into<crate::model::UpdateReferenceListRequest>>(
8268            mut self,
8269            v: V,
8270        ) -> Self {
8271            self.0.request = v.into();
8272            self
8273        }
8274
8275        /// Sets all the options, replacing any prior values.
8276        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8277            self.0.options = v.into();
8278            self
8279        }
8280
8281        /// Sends the request.
8282        pub async fn send(self) -> Result<crate::model::ReferenceList> {
8283            (*self.0.stub)
8284                .update_reference_list(self.0.request, self.0.options)
8285                .await
8286                .map(crate::Response::into_body)
8287        }
8288
8289        /// Sets the value of [reference_list][crate::model::UpdateReferenceListRequest::reference_list].
8290        ///
8291        /// This is a **required** field for requests.
8292        pub fn set_reference_list<T>(mut self, v: T) -> Self
8293        where
8294            T: std::convert::Into<crate::model::ReferenceList>,
8295        {
8296            self.0.request.reference_list = std::option::Option::Some(v.into());
8297            self
8298        }
8299
8300        /// Sets or clears the value of [reference_list][crate::model::UpdateReferenceListRequest::reference_list].
8301        ///
8302        /// This is a **required** field for requests.
8303        pub fn set_or_clear_reference_list<T>(mut self, v: std::option::Option<T>) -> Self
8304        where
8305            T: std::convert::Into<crate::model::ReferenceList>,
8306        {
8307            self.0.request.reference_list = v.map(|x| x.into());
8308            self
8309        }
8310
8311        /// Sets the value of [update_mask][crate::model::UpdateReferenceListRequest::update_mask].
8312        pub fn set_update_mask<T>(mut self, v: T) -> Self
8313        where
8314            T: std::convert::Into<wkt::FieldMask>,
8315        {
8316            self.0.request.update_mask = std::option::Option::Some(v.into());
8317            self
8318        }
8319
8320        /// Sets or clears the value of [update_mask][crate::model::UpdateReferenceListRequest::update_mask].
8321        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8322        where
8323            T: std::convert::Into<wkt::FieldMask>,
8324        {
8325            self.0.request.update_mask = v.map(|x| x.into());
8326            self
8327        }
8328    }
8329
8330    #[doc(hidden)]
8331    impl crate::RequestBuilder for UpdateReferenceList {
8332        fn request_options(&mut self) -> &mut crate::RequestOptions {
8333            &mut self.0.options
8334        }
8335    }
8336
8337    /// The request builder for [ReferenceListService::list_operations][crate::client::ReferenceListService::list_operations] calls.
8338    ///
8339    /// # Example
8340    /// ```
8341    /// # use google_cloud_chronicle_v1::builder::reference_list_service::ListOperations;
8342    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
8343    /// use google_cloud_gax::paginator::ItemPaginator;
8344    ///
8345    /// let builder = prepare_request_builder();
8346    /// let mut items = builder.by_item();
8347    /// while let Some(result) = items.next().await {
8348    ///   let item = result?;
8349    /// }
8350    /// # Ok(()) }
8351    ///
8352    /// fn prepare_request_builder() -> ListOperations {
8353    ///   # panic!();
8354    ///   // ... details omitted ...
8355    /// }
8356    /// ```
8357    #[derive(Clone, Debug)]
8358    pub struct ListOperations(
8359        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
8360    );
8361
8362    impl ListOperations {
8363        pub(crate) fn new(
8364            stub: std::sync::Arc<dyn super::super::stub::dynamic::ReferenceListService>,
8365        ) -> Self {
8366            Self(RequestBuilder::new(stub))
8367        }
8368
8369        /// Sets the full request, replacing any prior values.
8370        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
8371            mut self,
8372            v: V,
8373        ) -> Self {
8374            self.0.request = v.into();
8375            self
8376        }
8377
8378        /// Sets all the options, replacing any prior values.
8379        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8380            self.0.options = v.into();
8381            self
8382        }
8383
8384        /// Sends the request.
8385        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
8386            (*self.0.stub)
8387                .list_operations(self.0.request, self.0.options)
8388                .await
8389                .map(crate::Response::into_body)
8390        }
8391
8392        /// Streams each page in the collection.
8393        pub fn by_page(
8394            self,
8395        ) -> impl google_cloud_gax::paginator::Paginator<
8396            google_cloud_longrunning::model::ListOperationsResponse,
8397            crate::Error,
8398        > {
8399            use std::clone::Clone;
8400            let token = self.0.request.page_token.clone();
8401            let execute = move |token: String| {
8402                let mut builder = self.clone();
8403                builder.0.request = builder.0.request.set_page_token(token);
8404                builder.send()
8405            };
8406            google_cloud_gax::paginator::internal::new_paginator(token, execute)
8407        }
8408
8409        /// Streams each item in the collection.
8410        pub fn by_item(
8411            self,
8412        ) -> impl google_cloud_gax::paginator::ItemPaginator<
8413            google_cloud_longrunning::model::ListOperationsResponse,
8414            crate::Error,
8415        > {
8416            use google_cloud_gax::paginator::Paginator;
8417            self.by_page().items()
8418        }
8419
8420        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
8421        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8422            self.0.request.name = v.into();
8423            self
8424        }
8425
8426        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
8427        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8428            self.0.request.filter = v.into();
8429            self
8430        }
8431
8432        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
8433        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8434            self.0.request.page_size = v.into();
8435            self
8436        }
8437
8438        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
8439        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8440            self.0.request.page_token = v.into();
8441            self
8442        }
8443
8444        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
8445        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
8446            self.0.request.return_partial_success = v.into();
8447            self
8448        }
8449    }
8450
8451    #[doc(hidden)]
8452    impl crate::RequestBuilder for ListOperations {
8453        fn request_options(&mut self) -> &mut crate::RequestOptions {
8454            &mut self.0.options
8455        }
8456    }
8457
8458    /// The request builder for [ReferenceListService::get_operation][crate::client::ReferenceListService::get_operation] calls.
8459    ///
8460    /// # Example
8461    /// ```
8462    /// # use google_cloud_chronicle_v1::builder::reference_list_service::GetOperation;
8463    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
8464    ///
8465    /// let builder = prepare_request_builder();
8466    /// let response = builder.send().await?;
8467    /// # Ok(()) }
8468    ///
8469    /// fn prepare_request_builder() -> GetOperation {
8470    ///   # panic!();
8471    ///   // ... details omitted ...
8472    /// }
8473    /// ```
8474    #[derive(Clone, Debug)]
8475    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
8476
8477    impl GetOperation {
8478        pub(crate) fn new(
8479            stub: std::sync::Arc<dyn super::super::stub::dynamic::ReferenceListService>,
8480        ) -> Self {
8481            Self(RequestBuilder::new(stub))
8482        }
8483
8484        /// Sets the full request, replacing any prior values.
8485        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
8486            mut self,
8487            v: V,
8488        ) -> Self {
8489            self.0.request = v.into();
8490            self
8491        }
8492
8493        /// Sets all the options, replacing any prior values.
8494        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8495            self.0.options = v.into();
8496            self
8497        }
8498
8499        /// Sends the request.
8500        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
8501            (*self.0.stub)
8502                .get_operation(self.0.request, self.0.options)
8503                .await
8504                .map(crate::Response::into_body)
8505        }
8506
8507        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
8508        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8509            self.0.request.name = v.into();
8510            self
8511        }
8512    }
8513
8514    #[doc(hidden)]
8515    impl crate::RequestBuilder for GetOperation {
8516        fn request_options(&mut self) -> &mut crate::RequestOptions {
8517            &mut self.0.options
8518        }
8519    }
8520
8521    /// The request builder for [ReferenceListService::delete_operation][crate::client::ReferenceListService::delete_operation] calls.
8522    ///
8523    /// # Example
8524    /// ```
8525    /// # use google_cloud_chronicle_v1::builder::reference_list_service::DeleteOperation;
8526    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
8527    ///
8528    /// let builder = prepare_request_builder();
8529    /// let response = builder.send().await?;
8530    /// # Ok(()) }
8531    ///
8532    /// fn prepare_request_builder() -> DeleteOperation {
8533    ///   # panic!();
8534    ///   // ... details omitted ...
8535    /// }
8536    /// ```
8537    #[derive(Clone, Debug)]
8538    pub struct DeleteOperation(
8539        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
8540    );
8541
8542    impl DeleteOperation {
8543        pub(crate) fn new(
8544            stub: std::sync::Arc<dyn super::super::stub::dynamic::ReferenceListService>,
8545        ) -> Self {
8546            Self(RequestBuilder::new(stub))
8547        }
8548
8549        /// Sets the full request, replacing any prior values.
8550        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
8551            mut self,
8552            v: V,
8553        ) -> Self {
8554            self.0.request = v.into();
8555            self
8556        }
8557
8558        /// Sets all the options, replacing any prior values.
8559        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8560            self.0.options = v.into();
8561            self
8562        }
8563
8564        /// Sends the request.
8565        pub async fn send(self) -> Result<()> {
8566            (*self.0.stub)
8567                .delete_operation(self.0.request, self.0.options)
8568                .await
8569                .map(crate::Response::into_body)
8570        }
8571
8572        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
8573        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8574            self.0.request.name = v.into();
8575            self
8576        }
8577    }
8578
8579    #[doc(hidden)]
8580    impl crate::RequestBuilder for DeleteOperation {
8581        fn request_options(&mut self) -> &mut crate::RequestOptions {
8582            &mut self.0.options
8583        }
8584    }
8585
8586    /// The request builder for [ReferenceListService::cancel_operation][crate::client::ReferenceListService::cancel_operation] calls.
8587    ///
8588    /// # Example
8589    /// ```
8590    /// # use google_cloud_chronicle_v1::builder::reference_list_service::CancelOperation;
8591    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
8592    ///
8593    /// let builder = prepare_request_builder();
8594    /// let response = builder.send().await?;
8595    /// # Ok(()) }
8596    ///
8597    /// fn prepare_request_builder() -> CancelOperation {
8598    ///   # panic!();
8599    ///   // ... details omitted ...
8600    /// }
8601    /// ```
8602    #[derive(Clone, Debug)]
8603    pub struct CancelOperation(
8604        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
8605    );
8606
8607    impl CancelOperation {
8608        pub(crate) fn new(
8609            stub: std::sync::Arc<dyn super::super::stub::dynamic::ReferenceListService>,
8610        ) -> Self {
8611            Self(RequestBuilder::new(stub))
8612        }
8613
8614        /// Sets the full request, replacing any prior values.
8615        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
8616            mut self,
8617            v: V,
8618        ) -> Self {
8619            self.0.request = v.into();
8620            self
8621        }
8622
8623        /// Sets all the options, replacing any prior values.
8624        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8625            self.0.options = v.into();
8626            self
8627        }
8628
8629        /// Sends the request.
8630        pub async fn send(self) -> Result<()> {
8631            (*self.0.stub)
8632                .cancel_operation(self.0.request, self.0.options)
8633                .await
8634                .map(crate::Response::into_body)
8635        }
8636
8637        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
8638        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8639            self.0.request.name = v.into();
8640            self
8641        }
8642    }
8643
8644    #[doc(hidden)]
8645    impl crate::RequestBuilder for CancelOperation {
8646        fn request_options(&mut self) -> &mut crate::RequestOptions {
8647            &mut self.0.options
8648        }
8649    }
8650}
8651
8652/// Request and client builders for [RuleService][crate::client::RuleService].
8653pub mod rule_service {
8654    use crate::Result;
8655
8656    /// A builder for [RuleService][crate::client::RuleService].
8657    ///
8658    /// ```
8659    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
8660    /// # use google_cloud_chronicle_v1::*;
8661    /// # use builder::rule_service::ClientBuilder;
8662    /// # use client::RuleService;
8663    /// let builder : ClientBuilder = RuleService::builder();
8664    /// let client = builder
8665    ///     .with_endpoint("https://chronicle.googleapis.com")
8666    ///     .build().await?;
8667    /// # Ok(()) }
8668    /// ```
8669    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
8670
8671    pub(crate) mod client {
8672        use super::super::super::client::RuleService;
8673        pub struct Factory;
8674        impl crate::ClientFactory for Factory {
8675            type Client = RuleService;
8676            type Credentials = gaxi::options::Credentials;
8677            async fn build(
8678                self,
8679                config: gaxi::options::ClientConfig,
8680            ) -> crate::ClientBuilderResult<Self::Client> {
8681                Self::Client::new(config).await
8682            }
8683        }
8684    }
8685
8686    /// Common implementation for [crate::client::RuleService] request builders.
8687    #[derive(Clone, Debug)]
8688    pub(crate) struct RequestBuilder<R: std::default::Default> {
8689        stub: std::sync::Arc<dyn super::super::stub::dynamic::RuleService>,
8690        request: R,
8691        options: crate::RequestOptions,
8692    }
8693
8694    impl<R> RequestBuilder<R>
8695    where
8696        R: std::default::Default,
8697    {
8698        pub(crate) fn new(
8699            stub: std::sync::Arc<dyn super::super::stub::dynamic::RuleService>,
8700        ) -> Self {
8701            Self {
8702                stub,
8703                request: R::default(),
8704                options: crate::RequestOptions::default(),
8705            }
8706        }
8707    }
8708
8709    /// The request builder for [RuleService::create_rule][crate::client::RuleService::create_rule] calls.
8710    ///
8711    /// # Example
8712    /// ```
8713    /// # use google_cloud_chronicle_v1::builder::rule_service::CreateRule;
8714    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
8715    ///
8716    /// let builder = prepare_request_builder();
8717    /// let response = builder.send().await?;
8718    /// # Ok(()) }
8719    ///
8720    /// fn prepare_request_builder() -> CreateRule {
8721    ///   # panic!();
8722    ///   // ... details omitted ...
8723    /// }
8724    /// ```
8725    #[derive(Clone, Debug)]
8726    pub struct CreateRule(RequestBuilder<crate::model::CreateRuleRequest>);
8727
8728    impl CreateRule {
8729        pub(crate) fn new(
8730            stub: std::sync::Arc<dyn super::super::stub::dynamic::RuleService>,
8731        ) -> Self {
8732            Self(RequestBuilder::new(stub))
8733        }
8734
8735        /// Sets the full request, replacing any prior values.
8736        pub fn with_request<V: Into<crate::model::CreateRuleRequest>>(mut self, v: V) -> Self {
8737            self.0.request = v.into();
8738            self
8739        }
8740
8741        /// Sets all the options, replacing any prior values.
8742        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8743            self.0.options = v.into();
8744            self
8745        }
8746
8747        /// Sends the request.
8748        pub async fn send(self) -> Result<crate::model::Rule> {
8749            (*self.0.stub)
8750                .create_rule(self.0.request, self.0.options)
8751                .await
8752                .map(crate::Response::into_body)
8753        }
8754
8755        /// Sets the value of [parent][crate::model::CreateRuleRequest::parent].
8756        ///
8757        /// This is a **required** field for requests.
8758        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
8759            self.0.request.parent = v.into();
8760            self
8761        }
8762
8763        /// Sets the value of [rule][crate::model::CreateRuleRequest::rule].
8764        ///
8765        /// This is a **required** field for requests.
8766        pub fn set_rule<T>(mut self, v: T) -> Self
8767        where
8768            T: std::convert::Into<crate::model::Rule>,
8769        {
8770            self.0.request.rule = std::option::Option::Some(v.into());
8771            self
8772        }
8773
8774        /// Sets or clears the value of [rule][crate::model::CreateRuleRequest::rule].
8775        ///
8776        /// This is a **required** field for requests.
8777        pub fn set_or_clear_rule<T>(mut self, v: std::option::Option<T>) -> Self
8778        where
8779            T: std::convert::Into<crate::model::Rule>,
8780        {
8781            self.0.request.rule = v.map(|x| x.into());
8782            self
8783        }
8784    }
8785
8786    #[doc(hidden)]
8787    impl crate::RequestBuilder for CreateRule {
8788        fn request_options(&mut self) -> &mut crate::RequestOptions {
8789            &mut self.0.options
8790        }
8791    }
8792
8793    /// The request builder for [RuleService::get_rule][crate::client::RuleService::get_rule] calls.
8794    ///
8795    /// # Example
8796    /// ```
8797    /// # use google_cloud_chronicle_v1::builder::rule_service::GetRule;
8798    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
8799    ///
8800    /// let builder = prepare_request_builder();
8801    /// let response = builder.send().await?;
8802    /// # Ok(()) }
8803    ///
8804    /// fn prepare_request_builder() -> GetRule {
8805    ///   # panic!();
8806    ///   // ... details omitted ...
8807    /// }
8808    /// ```
8809    #[derive(Clone, Debug)]
8810    pub struct GetRule(RequestBuilder<crate::model::GetRuleRequest>);
8811
8812    impl GetRule {
8813        pub(crate) fn new(
8814            stub: std::sync::Arc<dyn super::super::stub::dynamic::RuleService>,
8815        ) -> Self {
8816            Self(RequestBuilder::new(stub))
8817        }
8818
8819        /// Sets the full request, replacing any prior values.
8820        pub fn with_request<V: Into<crate::model::GetRuleRequest>>(mut self, v: V) -> Self {
8821            self.0.request = v.into();
8822            self
8823        }
8824
8825        /// Sets all the options, replacing any prior values.
8826        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8827            self.0.options = v.into();
8828            self
8829        }
8830
8831        /// Sends the request.
8832        pub async fn send(self) -> Result<crate::model::Rule> {
8833            (*self.0.stub)
8834                .get_rule(self.0.request, self.0.options)
8835                .await
8836                .map(crate::Response::into_body)
8837        }
8838
8839        /// Sets the value of [name][crate::model::GetRuleRequest::name].
8840        ///
8841        /// This is a **required** field for requests.
8842        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8843            self.0.request.name = v.into();
8844            self
8845        }
8846
8847        /// Sets the value of [view][crate::model::GetRuleRequest::view].
8848        pub fn set_view<T: Into<crate::model::RuleView>>(mut self, v: T) -> Self {
8849            self.0.request.view = v.into();
8850            self
8851        }
8852    }
8853
8854    #[doc(hidden)]
8855    impl crate::RequestBuilder for GetRule {
8856        fn request_options(&mut self) -> &mut crate::RequestOptions {
8857            &mut self.0.options
8858        }
8859    }
8860
8861    /// The request builder for [RuleService::list_rules][crate::client::RuleService::list_rules] calls.
8862    ///
8863    /// # Example
8864    /// ```
8865    /// # use google_cloud_chronicle_v1::builder::rule_service::ListRules;
8866    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
8867    /// use google_cloud_gax::paginator::ItemPaginator;
8868    ///
8869    /// let builder = prepare_request_builder();
8870    /// let mut items = builder.by_item();
8871    /// while let Some(result) = items.next().await {
8872    ///   let item = result?;
8873    /// }
8874    /// # Ok(()) }
8875    ///
8876    /// fn prepare_request_builder() -> ListRules {
8877    ///   # panic!();
8878    ///   // ... details omitted ...
8879    /// }
8880    /// ```
8881    #[derive(Clone, Debug)]
8882    pub struct ListRules(RequestBuilder<crate::model::ListRulesRequest>);
8883
8884    impl ListRules {
8885        pub(crate) fn new(
8886            stub: std::sync::Arc<dyn super::super::stub::dynamic::RuleService>,
8887        ) -> Self {
8888            Self(RequestBuilder::new(stub))
8889        }
8890
8891        /// Sets the full request, replacing any prior values.
8892        pub fn with_request<V: Into<crate::model::ListRulesRequest>>(mut self, v: V) -> Self {
8893            self.0.request = v.into();
8894            self
8895        }
8896
8897        /// Sets all the options, replacing any prior values.
8898        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8899            self.0.options = v.into();
8900            self
8901        }
8902
8903        /// Sends the request.
8904        pub async fn send(self) -> Result<crate::model::ListRulesResponse> {
8905            (*self.0.stub)
8906                .list_rules(self.0.request, self.0.options)
8907                .await
8908                .map(crate::Response::into_body)
8909        }
8910
8911        /// Streams each page in the collection.
8912        pub fn by_page(
8913            self,
8914        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListRulesResponse, crate::Error>
8915        {
8916            use std::clone::Clone;
8917            let token = self.0.request.page_token.clone();
8918            let execute = move |token: String| {
8919                let mut builder = self.clone();
8920                builder.0.request = builder.0.request.set_page_token(token);
8921                builder.send()
8922            };
8923            google_cloud_gax::paginator::internal::new_paginator(token, execute)
8924        }
8925
8926        /// Streams each item in the collection.
8927        pub fn by_item(
8928            self,
8929        ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::ListRulesResponse, crate::Error>
8930        {
8931            use google_cloud_gax::paginator::Paginator;
8932            self.by_page().items()
8933        }
8934
8935        /// Sets the value of [parent][crate::model::ListRulesRequest::parent].
8936        ///
8937        /// This is a **required** field for requests.
8938        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
8939            self.0.request.parent = v.into();
8940            self
8941        }
8942
8943        /// Sets the value of [page_size][crate::model::ListRulesRequest::page_size].
8944        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8945            self.0.request.page_size = v.into();
8946            self
8947        }
8948
8949        /// Sets the value of [page_token][crate::model::ListRulesRequest::page_token].
8950        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8951            self.0.request.page_token = v.into();
8952            self
8953        }
8954
8955        /// Sets the value of [view][crate::model::ListRulesRequest::view].
8956        pub fn set_view<T: Into<crate::model::RuleView>>(mut self, v: T) -> Self {
8957            self.0.request.view = v.into();
8958            self
8959        }
8960
8961        /// Sets the value of [filter][crate::model::ListRulesRequest::filter].
8962        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8963            self.0.request.filter = v.into();
8964            self
8965        }
8966    }
8967
8968    #[doc(hidden)]
8969    impl crate::RequestBuilder for ListRules {
8970        fn request_options(&mut self) -> &mut crate::RequestOptions {
8971            &mut self.0.options
8972        }
8973    }
8974
8975    /// The request builder for [RuleService::update_rule][crate::client::RuleService::update_rule] calls.
8976    ///
8977    /// # Example
8978    /// ```
8979    /// # use google_cloud_chronicle_v1::builder::rule_service::UpdateRule;
8980    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
8981    ///
8982    /// let builder = prepare_request_builder();
8983    /// let response = builder.send().await?;
8984    /// # Ok(()) }
8985    ///
8986    /// fn prepare_request_builder() -> UpdateRule {
8987    ///   # panic!();
8988    ///   // ... details omitted ...
8989    /// }
8990    /// ```
8991    #[derive(Clone, Debug)]
8992    pub struct UpdateRule(RequestBuilder<crate::model::UpdateRuleRequest>);
8993
8994    impl UpdateRule {
8995        pub(crate) fn new(
8996            stub: std::sync::Arc<dyn super::super::stub::dynamic::RuleService>,
8997        ) -> Self {
8998            Self(RequestBuilder::new(stub))
8999        }
9000
9001        /// Sets the full request, replacing any prior values.
9002        pub fn with_request<V: Into<crate::model::UpdateRuleRequest>>(mut self, v: V) -> Self {
9003            self.0.request = v.into();
9004            self
9005        }
9006
9007        /// Sets all the options, replacing any prior values.
9008        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9009            self.0.options = v.into();
9010            self
9011        }
9012
9013        /// Sends the request.
9014        pub async fn send(self) -> Result<crate::model::Rule> {
9015            (*self.0.stub)
9016                .update_rule(self.0.request, self.0.options)
9017                .await
9018                .map(crate::Response::into_body)
9019        }
9020
9021        /// Sets the value of [rule][crate::model::UpdateRuleRequest::rule].
9022        ///
9023        /// This is a **required** field for requests.
9024        pub fn set_rule<T>(mut self, v: T) -> Self
9025        where
9026            T: std::convert::Into<crate::model::Rule>,
9027        {
9028            self.0.request.rule = std::option::Option::Some(v.into());
9029            self
9030        }
9031
9032        /// Sets or clears the value of [rule][crate::model::UpdateRuleRequest::rule].
9033        ///
9034        /// This is a **required** field for requests.
9035        pub fn set_or_clear_rule<T>(mut self, v: std::option::Option<T>) -> Self
9036        where
9037            T: std::convert::Into<crate::model::Rule>,
9038        {
9039            self.0.request.rule = v.map(|x| x.into());
9040            self
9041        }
9042
9043        /// Sets the value of [update_mask][crate::model::UpdateRuleRequest::update_mask].
9044        pub fn set_update_mask<T>(mut self, v: T) -> Self
9045        where
9046            T: std::convert::Into<wkt::FieldMask>,
9047        {
9048            self.0.request.update_mask = std::option::Option::Some(v.into());
9049            self
9050        }
9051
9052        /// Sets or clears the value of [update_mask][crate::model::UpdateRuleRequest::update_mask].
9053        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
9054        where
9055            T: std::convert::Into<wkt::FieldMask>,
9056        {
9057            self.0.request.update_mask = v.map(|x| x.into());
9058            self
9059        }
9060    }
9061
9062    #[doc(hidden)]
9063    impl crate::RequestBuilder for UpdateRule {
9064        fn request_options(&mut self) -> &mut crate::RequestOptions {
9065            &mut self.0.options
9066        }
9067    }
9068
9069    /// The request builder for [RuleService::delete_rule][crate::client::RuleService::delete_rule] calls.
9070    ///
9071    /// # Example
9072    /// ```
9073    /// # use google_cloud_chronicle_v1::builder::rule_service::DeleteRule;
9074    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
9075    ///
9076    /// let builder = prepare_request_builder();
9077    /// let response = builder.send().await?;
9078    /// # Ok(()) }
9079    ///
9080    /// fn prepare_request_builder() -> DeleteRule {
9081    ///   # panic!();
9082    ///   // ... details omitted ...
9083    /// }
9084    /// ```
9085    #[derive(Clone, Debug)]
9086    pub struct DeleteRule(RequestBuilder<crate::model::DeleteRuleRequest>);
9087
9088    impl DeleteRule {
9089        pub(crate) fn new(
9090            stub: std::sync::Arc<dyn super::super::stub::dynamic::RuleService>,
9091        ) -> Self {
9092            Self(RequestBuilder::new(stub))
9093        }
9094
9095        /// Sets the full request, replacing any prior values.
9096        pub fn with_request<V: Into<crate::model::DeleteRuleRequest>>(mut self, v: V) -> Self {
9097            self.0.request = v.into();
9098            self
9099        }
9100
9101        /// Sets all the options, replacing any prior values.
9102        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9103            self.0.options = v.into();
9104            self
9105        }
9106
9107        /// Sends the request.
9108        pub async fn send(self) -> Result<()> {
9109            (*self.0.stub)
9110                .delete_rule(self.0.request, self.0.options)
9111                .await
9112                .map(crate::Response::into_body)
9113        }
9114
9115        /// Sets the value of [name][crate::model::DeleteRuleRequest::name].
9116        ///
9117        /// This is a **required** field for requests.
9118        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9119            self.0.request.name = v.into();
9120            self
9121        }
9122
9123        /// Sets the value of [force][crate::model::DeleteRuleRequest::force].
9124        pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
9125            self.0.request.force = v.into();
9126            self
9127        }
9128    }
9129
9130    #[doc(hidden)]
9131    impl crate::RequestBuilder for DeleteRule {
9132        fn request_options(&mut self) -> &mut crate::RequestOptions {
9133            &mut self.0.options
9134        }
9135    }
9136
9137    /// The request builder for [RuleService::list_rule_revisions][crate::client::RuleService::list_rule_revisions] calls.
9138    ///
9139    /// # Example
9140    /// ```
9141    /// # use google_cloud_chronicle_v1::builder::rule_service::ListRuleRevisions;
9142    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
9143    /// use google_cloud_gax::paginator::ItemPaginator;
9144    ///
9145    /// let builder = prepare_request_builder();
9146    /// let mut items = builder.by_item();
9147    /// while let Some(result) = items.next().await {
9148    ///   let item = result?;
9149    /// }
9150    /// # Ok(()) }
9151    ///
9152    /// fn prepare_request_builder() -> ListRuleRevisions {
9153    ///   # panic!();
9154    ///   // ... details omitted ...
9155    /// }
9156    /// ```
9157    #[derive(Clone, Debug)]
9158    pub struct ListRuleRevisions(RequestBuilder<crate::model::ListRuleRevisionsRequest>);
9159
9160    impl ListRuleRevisions {
9161        pub(crate) fn new(
9162            stub: std::sync::Arc<dyn super::super::stub::dynamic::RuleService>,
9163        ) -> Self {
9164            Self(RequestBuilder::new(stub))
9165        }
9166
9167        /// Sets the full request, replacing any prior values.
9168        pub fn with_request<V: Into<crate::model::ListRuleRevisionsRequest>>(
9169            mut self,
9170            v: V,
9171        ) -> Self {
9172            self.0.request = v.into();
9173            self
9174        }
9175
9176        /// Sets all the options, replacing any prior values.
9177        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9178            self.0.options = v.into();
9179            self
9180        }
9181
9182        /// Sends the request.
9183        pub async fn send(self) -> Result<crate::model::ListRuleRevisionsResponse> {
9184            (*self.0.stub)
9185                .list_rule_revisions(self.0.request, self.0.options)
9186                .await
9187                .map(crate::Response::into_body)
9188        }
9189
9190        /// Streams each page in the collection.
9191        pub fn by_page(
9192            self,
9193        ) -> impl google_cloud_gax::paginator::Paginator<
9194            crate::model::ListRuleRevisionsResponse,
9195            crate::Error,
9196        > {
9197            use std::clone::Clone;
9198            let token = self.0.request.page_token.clone();
9199            let execute = move |token: String| {
9200                let mut builder = self.clone();
9201                builder.0.request = builder.0.request.set_page_token(token);
9202                builder.send()
9203            };
9204            google_cloud_gax::paginator::internal::new_paginator(token, execute)
9205        }
9206
9207        /// Streams each item in the collection.
9208        pub fn by_item(
9209            self,
9210        ) -> impl google_cloud_gax::paginator::ItemPaginator<
9211            crate::model::ListRuleRevisionsResponse,
9212            crate::Error,
9213        > {
9214            use google_cloud_gax::paginator::Paginator;
9215            self.by_page().items()
9216        }
9217
9218        /// Sets the value of [name][crate::model::ListRuleRevisionsRequest::name].
9219        ///
9220        /// This is a **required** field for requests.
9221        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9222            self.0.request.name = v.into();
9223            self
9224        }
9225
9226        /// Sets the value of [page_size][crate::model::ListRuleRevisionsRequest::page_size].
9227        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
9228            self.0.request.page_size = v.into();
9229            self
9230        }
9231
9232        /// Sets the value of [page_token][crate::model::ListRuleRevisionsRequest::page_token].
9233        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
9234            self.0.request.page_token = v.into();
9235            self
9236        }
9237
9238        /// Sets the value of [view][crate::model::ListRuleRevisionsRequest::view].
9239        pub fn set_view<T: Into<crate::model::RuleView>>(mut self, v: T) -> Self {
9240            self.0.request.view = v.into();
9241            self
9242        }
9243    }
9244
9245    #[doc(hidden)]
9246    impl crate::RequestBuilder for ListRuleRevisions {
9247        fn request_options(&mut self) -> &mut crate::RequestOptions {
9248            &mut self.0.options
9249        }
9250    }
9251
9252    /// The request builder for [RuleService::create_retrohunt][crate::client::RuleService::create_retrohunt] calls.
9253    ///
9254    /// # Example
9255    /// ```
9256    /// # use google_cloud_chronicle_v1::builder::rule_service::CreateRetrohunt;
9257    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
9258    /// use google_cloud_lro::Poller;
9259    ///
9260    /// let builder = prepare_request_builder();
9261    /// let response = builder.poller().until_done().await?;
9262    /// # Ok(()) }
9263    ///
9264    /// fn prepare_request_builder() -> CreateRetrohunt {
9265    ///   # panic!();
9266    ///   // ... details omitted ...
9267    /// }
9268    /// ```
9269    #[derive(Clone, Debug)]
9270    pub struct CreateRetrohunt(RequestBuilder<crate::model::CreateRetrohuntRequest>);
9271
9272    impl CreateRetrohunt {
9273        pub(crate) fn new(
9274            stub: std::sync::Arc<dyn super::super::stub::dynamic::RuleService>,
9275        ) -> Self {
9276            Self(RequestBuilder::new(stub))
9277        }
9278
9279        /// Sets the full request, replacing any prior values.
9280        pub fn with_request<V: Into<crate::model::CreateRetrohuntRequest>>(mut self, v: V) -> Self {
9281            self.0.request = v.into();
9282            self
9283        }
9284
9285        /// Sets all the options, replacing any prior values.
9286        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9287            self.0.options = v.into();
9288            self
9289        }
9290
9291        /// Sends the request.
9292        ///
9293        /// # Long running operations
9294        ///
9295        /// This starts, but does not poll, a longrunning operation. More information
9296        /// on [create_retrohunt][crate::client::RuleService::create_retrohunt].
9297        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
9298            (*self.0.stub)
9299                .create_retrohunt(self.0.request, self.0.options)
9300                .await
9301                .map(crate::Response::into_body)
9302        }
9303
9304        /// Creates a [Poller][google_cloud_lro::Poller] to work with `create_retrohunt`.
9305        pub fn poller(
9306            self,
9307        ) -> impl google_cloud_lro::Poller<crate::model::Retrohunt, crate::model::RetrohuntMetadata>
9308        {
9309            type Operation = google_cloud_lro::internal::Operation<
9310                crate::model::Retrohunt,
9311                crate::model::RetrohuntMetadata,
9312            >;
9313            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
9314            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
9315
9316            let stub = self.0.stub.clone();
9317            let mut options = self.0.options.clone();
9318            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
9319            let query = move |name| {
9320                let stub = stub.clone();
9321                let options = options.clone();
9322                async {
9323                    let op = GetOperation::new(stub)
9324                        .set_name(name)
9325                        .with_options(options)
9326                        .send()
9327                        .await?;
9328                    Ok(Operation::new(op))
9329                }
9330            };
9331
9332            let start = move || async {
9333                let op = self.send().await?;
9334                Ok(Operation::new(op))
9335            };
9336
9337            google_cloud_lro::internal::new_poller(
9338                polling_error_policy,
9339                polling_backoff_policy,
9340                start,
9341                query,
9342            )
9343        }
9344
9345        /// Sets the value of [parent][crate::model::CreateRetrohuntRequest::parent].
9346        ///
9347        /// This is a **required** field for requests.
9348        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
9349            self.0.request.parent = v.into();
9350            self
9351        }
9352
9353        /// Sets the value of [retrohunt][crate::model::CreateRetrohuntRequest::retrohunt].
9354        ///
9355        /// This is a **required** field for requests.
9356        pub fn set_retrohunt<T>(mut self, v: T) -> Self
9357        where
9358            T: std::convert::Into<crate::model::Retrohunt>,
9359        {
9360            self.0.request.retrohunt = std::option::Option::Some(v.into());
9361            self
9362        }
9363
9364        /// Sets or clears the value of [retrohunt][crate::model::CreateRetrohuntRequest::retrohunt].
9365        ///
9366        /// This is a **required** field for requests.
9367        pub fn set_or_clear_retrohunt<T>(mut self, v: std::option::Option<T>) -> Self
9368        where
9369            T: std::convert::Into<crate::model::Retrohunt>,
9370        {
9371            self.0.request.retrohunt = v.map(|x| x.into());
9372            self
9373        }
9374    }
9375
9376    #[doc(hidden)]
9377    impl crate::RequestBuilder for CreateRetrohunt {
9378        fn request_options(&mut self) -> &mut crate::RequestOptions {
9379            &mut self.0.options
9380        }
9381    }
9382
9383    /// The request builder for [RuleService::get_retrohunt][crate::client::RuleService::get_retrohunt] calls.
9384    ///
9385    /// # Example
9386    /// ```
9387    /// # use google_cloud_chronicle_v1::builder::rule_service::GetRetrohunt;
9388    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
9389    ///
9390    /// let builder = prepare_request_builder();
9391    /// let response = builder.send().await?;
9392    /// # Ok(()) }
9393    ///
9394    /// fn prepare_request_builder() -> GetRetrohunt {
9395    ///   # panic!();
9396    ///   // ... details omitted ...
9397    /// }
9398    /// ```
9399    #[derive(Clone, Debug)]
9400    pub struct GetRetrohunt(RequestBuilder<crate::model::GetRetrohuntRequest>);
9401
9402    impl GetRetrohunt {
9403        pub(crate) fn new(
9404            stub: std::sync::Arc<dyn super::super::stub::dynamic::RuleService>,
9405        ) -> Self {
9406            Self(RequestBuilder::new(stub))
9407        }
9408
9409        /// Sets the full request, replacing any prior values.
9410        pub fn with_request<V: Into<crate::model::GetRetrohuntRequest>>(mut self, v: V) -> Self {
9411            self.0.request = v.into();
9412            self
9413        }
9414
9415        /// Sets all the options, replacing any prior values.
9416        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9417            self.0.options = v.into();
9418            self
9419        }
9420
9421        /// Sends the request.
9422        pub async fn send(self) -> Result<crate::model::Retrohunt> {
9423            (*self.0.stub)
9424                .get_retrohunt(self.0.request, self.0.options)
9425                .await
9426                .map(crate::Response::into_body)
9427        }
9428
9429        /// Sets the value of [name][crate::model::GetRetrohuntRequest::name].
9430        ///
9431        /// This is a **required** field for requests.
9432        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9433            self.0.request.name = v.into();
9434            self
9435        }
9436    }
9437
9438    #[doc(hidden)]
9439    impl crate::RequestBuilder for GetRetrohunt {
9440        fn request_options(&mut self) -> &mut crate::RequestOptions {
9441            &mut self.0.options
9442        }
9443    }
9444
9445    /// The request builder for [RuleService::list_retrohunts][crate::client::RuleService::list_retrohunts] calls.
9446    ///
9447    /// # Example
9448    /// ```
9449    /// # use google_cloud_chronicle_v1::builder::rule_service::ListRetrohunts;
9450    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
9451    /// use google_cloud_gax::paginator::ItemPaginator;
9452    ///
9453    /// let builder = prepare_request_builder();
9454    /// let mut items = builder.by_item();
9455    /// while let Some(result) = items.next().await {
9456    ///   let item = result?;
9457    /// }
9458    /// # Ok(()) }
9459    ///
9460    /// fn prepare_request_builder() -> ListRetrohunts {
9461    ///   # panic!();
9462    ///   // ... details omitted ...
9463    /// }
9464    /// ```
9465    #[derive(Clone, Debug)]
9466    pub struct ListRetrohunts(RequestBuilder<crate::model::ListRetrohuntsRequest>);
9467
9468    impl ListRetrohunts {
9469        pub(crate) fn new(
9470            stub: std::sync::Arc<dyn super::super::stub::dynamic::RuleService>,
9471        ) -> Self {
9472            Self(RequestBuilder::new(stub))
9473        }
9474
9475        /// Sets the full request, replacing any prior values.
9476        pub fn with_request<V: Into<crate::model::ListRetrohuntsRequest>>(mut self, v: V) -> Self {
9477            self.0.request = v.into();
9478            self
9479        }
9480
9481        /// Sets all the options, replacing any prior values.
9482        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9483            self.0.options = v.into();
9484            self
9485        }
9486
9487        /// Sends the request.
9488        pub async fn send(self) -> Result<crate::model::ListRetrohuntsResponse> {
9489            (*self.0.stub)
9490                .list_retrohunts(self.0.request, self.0.options)
9491                .await
9492                .map(crate::Response::into_body)
9493        }
9494
9495        /// Streams each page in the collection.
9496        pub fn by_page(
9497            self,
9498        ) -> impl google_cloud_gax::paginator::Paginator<
9499            crate::model::ListRetrohuntsResponse,
9500            crate::Error,
9501        > {
9502            use std::clone::Clone;
9503            let token = self.0.request.page_token.clone();
9504            let execute = move |token: String| {
9505                let mut builder = self.clone();
9506                builder.0.request = builder.0.request.set_page_token(token);
9507                builder.send()
9508            };
9509            google_cloud_gax::paginator::internal::new_paginator(token, execute)
9510        }
9511
9512        /// Streams each item in the collection.
9513        pub fn by_item(
9514            self,
9515        ) -> impl google_cloud_gax::paginator::ItemPaginator<
9516            crate::model::ListRetrohuntsResponse,
9517            crate::Error,
9518        > {
9519            use google_cloud_gax::paginator::Paginator;
9520            self.by_page().items()
9521        }
9522
9523        /// Sets the value of [parent][crate::model::ListRetrohuntsRequest::parent].
9524        ///
9525        /// This is a **required** field for requests.
9526        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
9527            self.0.request.parent = v.into();
9528            self
9529        }
9530
9531        /// Sets the value of [page_size][crate::model::ListRetrohuntsRequest::page_size].
9532        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
9533            self.0.request.page_size = v.into();
9534            self
9535        }
9536
9537        /// Sets the value of [page_token][crate::model::ListRetrohuntsRequest::page_token].
9538        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
9539            self.0.request.page_token = v.into();
9540            self
9541        }
9542
9543        /// Sets the value of [filter][crate::model::ListRetrohuntsRequest::filter].
9544        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
9545            self.0.request.filter = v.into();
9546            self
9547        }
9548    }
9549
9550    #[doc(hidden)]
9551    impl crate::RequestBuilder for ListRetrohunts {
9552        fn request_options(&mut self) -> &mut crate::RequestOptions {
9553            &mut self.0.options
9554        }
9555    }
9556
9557    /// The request builder for [RuleService::get_rule_deployment][crate::client::RuleService::get_rule_deployment] calls.
9558    ///
9559    /// # Example
9560    /// ```
9561    /// # use google_cloud_chronicle_v1::builder::rule_service::GetRuleDeployment;
9562    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
9563    ///
9564    /// let builder = prepare_request_builder();
9565    /// let response = builder.send().await?;
9566    /// # Ok(()) }
9567    ///
9568    /// fn prepare_request_builder() -> GetRuleDeployment {
9569    ///   # panic!();
9570    ///   // ... details omitted ...
9571    /// }
9572    /// ```
9573    #[derive(Clone, Debug)]
9574    pub struct GetRuleDeployment(RequestBuilder<crate::model::GetRuleDeploymentRequest>);
9575
9576    impl GetRuleDeployment {
9577        pub(crate) fn new(
9578            stub: std::sync::Arc<dyn super::super::stub::dynamic::RuleService>,
9579        ) -> Self {
9580            Self(RequestBuilder::new(stub))
9581        }
9582
9583        /// Sets the full request, replacing any prior values.
9584        pub fn with_request<V: Into<crate::model::GetRuleDeploymentRequest>>(
9585            mut self,
9586            v: V,
9587        ) -> Self {
9588            self.0.request = v.into();
9589            self
9590        }
9591
9592        /// Sets all the options, replacing any prior values.
9593        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9594            self.0.options = v.into();
9595            self
9596        }
9597
9598        /// Sends the request.
9599        pub async fn send(self) -> Result<crate::model::RuleDeployment> {
9600            (*self.0.stub)
9601                .get_rule_deployment(self.0.request, self.0.options)
9602                .await
9603                .map(crate::Response::into_body)
9604        }
9605
9606        /// Sets the value of [name][crate::model::GetRuleDeploymentRequest::name].
9607        ///
9608        /// This is a **required** field for requests.
9609        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9610            self.0.request.name = v.into();
9611            self
9612        }
9613    }
9614
9615    #[doc(hidden)]
9616    impl crate::RequestBuilder for GetRuleDeployment {
9617        fn request_options(&mut self) -> &mut crate::RequestOptions {
9618            &mut self.0.options
9619        }
9620    }
9621
9622    /// The request builder for [RuleService::list_rule_deployments][crate::client::RuleService::list_rule_deployments] calls.
9623    ///
9624    /// # Example
9625    /// ```
9626    /// # use google_cloud_chronicle_v1::builder::rule_service::ListRuleDeployments;
9627    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
9628    /// use google_cloud_gax::paginator::ItemPaginator;
9629    ///
9630    /// let builder = prepare_request_builder();
9631    /// let mut items = builder.by_item();
9632    /// while let Some(result) = items.next().await {
9633    ///   let item = result?;
9634    /// }
9635    /// # Ok(()) }
9636    ///
9637    /// fn prepare_request_builder() -> ListRuleDeployments {
9638    ///   # panic!();
9639    ///   // ... details omitted ...
9640    /// }
9641    /// ```
9642    #[derive(Clone, Debug)]
9643    pub struct ListRuleDeployments(RequestBuilder<crate::model::ListRuleDeploymentsRequest>);
9644
9645    impl ListRuleDeployments {
9646        pub(crate) fn new(
9647            stub: std::sync::Arc<dyn super::super::stub::dynamic::RuleService>,
9648        ) -> Self {
9649            Self(RequestBuilder::new(stub))
9650        }
9651
9652        /// Sets the full request, replacing any prior values.
9653        pub fn with_request<V: Into<crate::model::ListRuleDeploymentsRequest>>(
9654            mut self,
9655            v: V,
9656        ) -> Self {
9657            self.0.request = v.into();
9658            self
9659        }
9660
9661        /// Sets all the options, replacing any prior values.
9662        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9663            self.0.options = v.into();
9664            self
9665        }
9666
9667        /// Sends the request.
9668        pub async fn send(self) -> Result<crate::model::ListRuleDeploymentsResponse> {
9669            (*self.0.stub)
9670                .list_rule_deployments(self.0.request, self.0.options)
9671                .await
9672                .map(crate::Response::into_body)
9673        }
9674
9675        /// Streams each page in the collection.
9676        pub fn by_page(
9677            self,
9678        ) -> impl google_cloud_gax::paginator::Paginator<
9679            crate::model::ListRuleDeploymentsResponse,
9680            crate::Error,
9681        > {
9682            use std::clone::Clone;
9683            let token = self.0.request.page_token.clone();
9684            let execute = move |token: String| {
9685                let mut builder = self.clone();
9686                builder.0.request = builder.0.request.set_page_token(token);
9687                builder.send()
9688            };
9689            google_cloud_gax::paginator::internal::new_paginator(token, execute)
9690        }
9691
9692        /// Streams each item in the collection.
9693        pub fn by_item(
9694            self,
9695        ) -> impl google_cloud_gax::paginator::ItemPaginator<
9696            crate::model::ListRuleDeploymentsResponse,
9697            crate::Error,
9698        > {
9699            use google_cloud_gax::paginator::Paginator;
9700            self.by_page().items()
9701        }
9702
9703        /// Sets the value of [parent][crate::model::ListRuleDeploymentsRequest::parent].
9704        ///
9705        /// This is a **required** field for requests.
9706        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
9707            self.0.request.parent = v.into();
9708            self
9709        }
9710
9711        /// Sets the value of [page_size][crate::model::ListRuleDeploymentsRequest::page_size].
9712        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
9713            self.0.request.page_size = v.into();
9714            self
9715        }
9716
9717        /// Sets the value of [page_token][crate::model::ListRuleDeploymentsRequest::page_token].
9718        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
9719            self.0.request.page_token = v.into();
9720            self
9721        }
9722
9723        /// Sets the value of [filter][crate::model::ListRuleDeploymentsRequest::filter].
9724        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
9725            self.0.request.filter = v.into();
9726            self
9727        }
9728    }
9729
9730    #[doc(hidden)]
9731    impl crate::RequestBuilder for ListRuleDeployments {
9732        fn request_options(&mut self) -> &mut crate::RequestOptions {
9733            &mut self.0.options
9734        }
9735    }
9736
9737    /// The request builder for [RuleService::update_rule_deployment][crate::client::RuleService::update_rule_deployment] calls.
9738    ///
9739    /// # Example
9740    /// ```
9741    /// # use google_cloud_chronicle_v1::builder::rule_service::UpdateRuleDeployment;
9742    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
9743    ///
9744    /// let builder = prepare_request_builder();
9745    /// let response = builder.send().await?;
9746    /// # Ok(()) }
9747    ///
9748    /// fn prepare_request_builder() -> UpdateRuleDeployment {
9749    ///   # panic!();
9750    ///   // ... details omitted ...
9751    /// }
9752    /// ```
9753    #[derive(Clone, Debug)]
9754    pub struct UpdateRuleDeployment(RequestBuilder<crate::model::UpdateRuleDeploymentRequest>);
9755
9756    impl UpdateRuleDeployment {
9757        pub(crate) fn new(
9758            stub: std::sync::Arc<dyn super::super::stub::dynamic::RuleService>,
9759        ) -> Self {
9760            Self(RequestBuilder::new(stub))
9761        }
9762
9763        /// Sets the full request, replacing any prior values.
9764        pub fn with_request<V: Into<crate::model::UpdateRuleDeploymentRequest>>(
9765            mut self,
9766            v: V,
9767        ) -> Self {
9768            self.0.request = v.into();
9769            self
9770        }
9771
9772        /// Sets all the options, replacing any prior values.
9773        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9774            self.0.options = v.into();
9775            self
9776        }
9777
9778        /// Sends the request.
9779        pub async fn send(self) -> Result<crate::model::RuleDeployment> {
9780            (*self.0.stub)
9781                .update_rule_deployment(self.0.request, self.0.options)
9782                .await
9783                .map(crate::Response::into_body)
9784        }
9785
9786        /// Sets the value of [rule_deployment][crate::model::UpdateRuleDeploymentRequest::rule_deployment].
9787        ///
9788        /// This is a **required** field for requests.
9789        pub fn set_rule_deployment<T>(mut self, v: T) -> Self
9790        where
9791            T: std::convert::Into<crate::model::RuleDeployment>,
9792        {
9793            self.0.request.rule_deployment = std::option::Option::Some(v.into());
9794            self
9795        }
9796
9797        /// Sets or clears the value of [rule_deployment][crate::model::UpdateRuleDeploymentRequest::rule_deployment].
9798        ///
9799        /// This is a **required** field for requests.
9800        pub fn set_or_clear_rule_deployment<T>(mut self, v: std::option::Option<T>) -> Self
9801        where
9802            T: std::convert::Into<crate::model::RuleDeployment>,
9803        {
9804            self.0.request.rule_deployment = v.map(|x| x.into());
9805            self
9806        }
9807
9808        /// Sets the value of [update_mask][crate::model::UpdateRuleDeploymentRequest::update_mask].
9809        ///
9810        /// This is a **required** field for requests.
9811        pub fn set_update_mask<T>(mut self, v: T) -> Self
9812        where
9813            T: std::convert::Into<wkt::FieldMask>,
9814        {
9815            self.0.request.update_mask = std::option::Option::Some(v.into());
9816            self
9817        }
9818
9819        /// Sets or clears the value of [update_mask][crate::model::UpdateRuleDeploymentRequest::update_mask].
9820        ///
9821        /// This is a **required** field for requests.
9822        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
9823        where
9824            T: std::convert::Into<wkt::FieldMask>,
9825        {
9826            self.0.request.update_mask = v.map(|x| x.into());
9827            self
9828        }
9829    }
9830
9831    #[doc(hidden)]
9832    impl crate::RequestBuilder for UpdateRuleDeployment {
9833        fn request_options(&mut self) -> &mut crate::RequestOptions {
9834            &mut self.0.options
9835        }
9836    }
9837
9838    /// The request builder for [RuleService::list_operations][crate::client::RuleService::list_operations] calls.
9839    ///
9840    /// # Example
9841    /// ```
9842    /// # use google_cloud_chronicle_v1::builder::rule_service::ListOperations;
9843    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
9844    /// use google_cloud_gax::paginator::ItemPaginator;
9845    ///
9846    /// let builder = prepare_request_builder();
9847    /// let mut items = builder.by_item();
9848    /// while let Some(result) = items.next().await {
9849    ///   let item = result?;
9850    /// }
9851    /// # Ok(()) }
9852    ///
9853    /// fn prepare_request_builder() -> ListOperations {
9854    ///   # panic!();
9855    ///   // ... details omitted ...
9856    /// }
9857    /// ```
9858    #[derive(Clone, Debug)]
9859    pub struct ListOperations(
9860        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
9861    );
9862
9863    impl ListOperations {
9864        pub(crate) fn new(
9865            stub: std::sync::Arc<dyn super::super::stub::dynamic::RuleService>,
9866        ) -> Self {
9867            Self(RequestBuilder::new(stub))
9868        }
9869
9870        /// Sets the full request, replacing any prior values.
9871        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
9872            mut self,
9873            v: V,
9874        ) -> Self {
9875            self.0.request = v.into();
9876            self
9877        }
9878
9879        /// Sets all the options, replacing any prior values.
9880        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9881            self.0.options = v.into();
9882            self
9883        }
9884
9885        /// Sends the request.
9886        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
9887            (*self.0.stub)
9888                .list_operations(self.0.request, self.0.options)
9889                .await
9890                .map(crate::Response::into_body)
9891        }
9892
9893        /// Streams each page in the collection.
9894        pub fn by_page(
9895            self,
9896        ) -> impl google_cloud_gax::paginator::Paginator<
9897            google_cloud_longrunning::model::ListOperationsResponse,
9898            crate::Error,
9899        > {
9900            use std::clone::Clone;
9901            let token = self.0.request.page_token.clone();
9902            let execute = move |token: String| {
9903                let mut builder = self.clone();
9904                builder.0.request = builder.0.request.set_page_token(token);
9905                builder.send()
9906            };
9907            google_cloud_gax::paginator::internal::new_paginator(token, execute)
9908        }
9909
9910        /// Streams each item in the collection.
9911        pub fn by_item(
9912            self,
9913        ) -> impl google_cloud_gax::paginator::ItemPaginator<
9914            google_cloud_longrunning::model::ListOperationsResponse,
9915            crate::Error,
9916        > {
9917            use google_cloud_gax::paginator::Paginator;
9918            self.by_page().items()
9919        }
9920
9921        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
9922        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9923            self.0.request.name = v.into();
9924            self
9925        }
9926
9927        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
9928        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
9929            self.0.request.filter = v.into();
9930            self
9931        }
9932
9933        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
9934        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
9935            self.0.request.page_size = v.into();
9936            self
9937        }
9938
9939        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
9940        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
9941            self.0.request.page_token = v.into();
9942            self
9943        }
9944
9945        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
9946        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
9947            self.0.request.return_partial_success = v.into();
9948            self
9949        }
9950    }
9951
9952    #[doc(hidden)]
9953    impl crate::RequestBuilder for ListOperations {
9954        fn request_options(&mut self) -> &mut crate::RequestOptions {
9955            &mut self.0.options
9956        }
9957    }
9958
9959    /// The request builder for [RuleService::get_operation][crate::client::RuleService::get_operation] calls.
9960    ///
9961    /// # Example
9962    /// ```
9963    /// # use google_cloud_chronicle_v1::builder::rule_service::GetOperation;
9964    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
9965    ///
9966    /// let builder = prepare_request_builder();
9967    /// let response = builder.send().await?;
9968    /// # Ok(()) }
9969    ///
9970    /// fn prepare_request_builder() -> GetOperation {
9971    ///   # panic!();
9972    ///   // ... details omitted ...
9973    /// }
9974    /// ```
9975    #[derive(Clone, Debug)]
9976    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
9977
9978    impl GetOperation {
9979        pub(crate) fn new(
9980            stub: std::sync::Arc<dyn super::super::stub::dynamic::RuleService>,
9981        ) -> Self {
9982            Self(RequestBuilder::new(stub))
9983        }
9984
9985        /// Sets the full request, replacing any prior values.
9986        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
9987            mut self,
9988            v: V,
9989        ) -> Self {
9990            self.0.request = v.into();
9991            self
9992        }
9993
9994        /// Sets all the options, replacing any prior values.
9995        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9996            self.0.options = v.into();
9997            self
9998        }
9999
10000        /// Sends the request.
10001        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
10002            (*self.0.stub)
10003                .get_operation(self.0.request, self.0.options)
10004                .await
10005                .map(crate::Response::into_body)
10006        }
10007
10008        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
10009        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10010            self.0.request.name = v.into();
10011            self
10012        }
10013    }
10014
10015    #[doc(hidden)]
10016    impl crate::RequestBuilder for GetOperation {
10017        fn request_options(&mut self) -> &mut crate::RequestOptions {
10018            &mut self.0.options
10019        }
10020    }
10021
10022    /// The request builder for [RuleService::delete_operation][crate::client::RuleService::delete_operation] calls.
10023    ///
10024    /// # Example
10025    /// ```
10026    /// # use google_cloud_chronicle_v1::builder::rule_service::DeleteOperation;
10027    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
10028    ///
10029    /// let builder = prepare_request_builder();
10030    /// let response = builder.send().await?;
10031    /// # Ok(()) }
10032    ///
10033    /// fn prepare_request_builder() -> DeleteOperation {
10034    ///   # panic!();
10035    ///   // ... details omitted ...
10036    /// }
10037    /// ```
10038    #[derive(Clone, Debug)]
10039    pub struct DeleteOperation(
10040        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
10041    );
10042
10043    impl DeleteOperation {
10044        pub(crate) fn new(
10045            stub: std::sync::Arc<dyn super::super::stub::dynamic::RuleService>,
10046        ) -> Self {
10047            Self(RequestBuilder::new(stub))
10048        }
10049
10050        /// Sets the full request, replacing any prior values.
10051        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
10052            mut self,
10053            v: V,
10054        ) -> Self {
10055            self.0.request = v.into();
10056            self
10057        }
10058
10059        /// Sets all the options, replacing any prior values.
10060        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10061            self.0.options = v.into();
10062            self
10063        }
10064
10065        /// Sends the request.
10066        pub async fn send(self) -> Result<()> {
10067            (*self.0.stub)
10068                .delete_operation(self.0.request, self.0.options)
10069                .await
10070                .map(crate::Response::into_body)
10071        }
10072
10073        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
10074        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10075            self.0.request.name = v.into();
10076            self
10077        }
10078    }
10079
10080    #[doc(hidden)]
10081    impl crate::RequestBuilder for DeleteOperation {
10082        fn request_options(&mut self) -> &mut crate::RequestOptions {
10083            &mut self.0.options
10084        }
10085    }
10086
10087    /// The request builder for [RuleService::cancel_operation][crate::client::RuleService::cancel_operation] calls.
10088    ///
10089    /// # Example
10090    /// ```
10091    /// # use google_cloud_chronicle_v1::builder::rule_service::CancelOperation;
10092    /// # async fn sample() -> google_cloud_chronicle_v1::Result<()> {
10093    ///
10094    /// let builder = prepare_request_builder();
10095    /// let response = builder.send().await?;
10096    /// # Ok(()) }
10097    ///
10098    /// fn prepare_request_builder() -> CancelOperation {
10099    ///   # panic!();
10100    ///   // ... details omitted ...
10101    /// }
10102    /// ```
10103    #[derive(Clone, Debug)]
10104    pub struct CancelOperation(
10105        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
10106    );
10107
10108    impl CancelOperation {
10109        pub(crate) fn new(
10110            stub: std::sync::Arc<dyn super::super::stub::dynamic::RuleService>,
10111        ) -> Self {
10112            Self(RequestBuilder::new(stub))
10113        }
10114
10115        /// Sets the full request, replacing any prior values.
10116        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
10117            mut self,
10118            v: V,
10119        ) -> Self {
10120            self.0.request = v.into();
10121            self
10122        }
10123
10124        /// Sets all the options, replacing any prior values.
10125        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10126            self.0.options = v.into();
10127            self
10128        }
10129
10130        /// Sends the request.
10131        pub async fn send(self) -> Result<()> {
10132            (*self.0.stub)
10133                .cancel_operation(self.0.request, self.0.options)
10134                .await
10135                .map(crate::Response::into_body)
10136        }
10137
10138        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
10139        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10140            self.0.request.name = v.into();
10141            self
10142        }
10143    }
10144
10145    #[doc(hidden)]
10146    impl crate::RequestBuilder for CancelOperation {
10147        fn request_options(&mut self) -> &mut crate::RequestOptions {
10148            &mut self.0.options
10149        }
10150    }
10151}