google_cloud_cloudsecuritycompliance_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
17pub mod audit {
18    use crate::Result;
19
20    /// A builder for [Audit][crate::client::Audit].
21    ///
22    /// ```
23    /// # tokio_test::block_on(async {
24    /// # use google_cloud_cloudsecuritycompliance_v1::*;
25    /// # use builder::audit::ClientBuilder;
26    /// # use client::Audit;
27    /// let builder : ClientBuilder = Audit::builder();
28    /// let client = builder
29    ///     .with_endpoint("https://cloudsecuritycompliance.googleapis.com")
30    ///     .build().await?;
31    /// # gax::client_builder::Result::<()>::Ok(()) });
32    /// ```
33    pub type ClientBuilder =
34        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
35
36    pub(crate) mod client {
37        use super::super::super::client::Audit;
38        pub struct Factory;
39        impl gax::client_builder::internal::ClientFactory for Factory {
40            type Client = Audit;
41            type Credentials = gaxi::options::Credentials;
42            async fn build(
43                self,
44                config: gaxi::options::ClientConfig,
45            ) -> gax::client_builder::Result<Self::Client> {
46                Self::Client::new(config).await
47            }
48        }
49    }
50
51    /// Common implementation for [crate::client::Audit] 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::Audit>,
55        request: R,
56        options: gax::options::RequestOptions,
57    }
58
59    impl<R> RequestBuilder<R>
60    where
61        R: std::default::Default,
62    {
63        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Audit>) -> Self {
64            Self {
65                stub,
66                request: R::default(),
67                options: gax::options::RequestOptions::default(),
68            }
69        }
70    }
71
72    /// The request builder for [Audit::generate_framework_audit_scope_report][crate::client::Audit::generate_framework_audit_scope_report] calls.
73    ///
74    /// # Example
75    /// ```no_run
76    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
77    /// use builder::audit::GenerateFrameworkAuditScopeReport;
78    /// # tokio_test::block_on(async {
79    ///
80    /// let builder = prepare_request_builder();
81    /// let response = builder.send().await?;
82    /// # gax::Result::<()>::Ok(()) });
83    ///
84    /// fn prepare_request_builder() -> GenerateFrameworkAuditScopeReport {
85    ///   # panic!();
86    ///   // ... details omitted ...
87    /// }
88    /// ```
89    #[derive(Clone, Debug)]
90    pub struct GenerateFrameworkAuditScopeReport(
91        RequestBuilder<crate::model::GenerateFrameworkAuditScopeReportRequest>,
92    );
93
94    impl GenerateFrameworkAuditScopeReport {
95        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Audit>) -> Self {
96            Self(RequestBuilder::new(stub))
97        }
98
99        /// Sets the full request, replacing any prior values.
100        pub fn with_request<V: Into<crate::model::GenerateFrameworkAuditScopeReportRequest>>(
101            mut self,
102            v: V,
103        ) -> Self {
104            self.0.request = v.into();
105            self
106        }
107
108        /// Sets all the options, replacing any prior values.
109        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
110            self.0.options = v.into();
111            self
112        }
113
114        /// Sends the request.
115        pub async fn send(self) -> Result<crate::model::GenerateFrameworkAuditScopeReportResponse> {
116            (*self.0.stub)
117                .generate_framework_audit_scope_report(self.0.request, self.0.options)
118                .await
119                .map(gax::response::Response::into_body)
120        }
121
122        /// Sets the value of [scope][crate::model::GenerateFrameworkAuditScopeReportRequest::scope].
123        ///
124        /// This is a **required** field for requests.
125        pub fn set_scope<T: Into<std::string::String>>(mut self, v: T) -> Self {
126            self.0.request.scope = v.into();
127            self
128        }
129
130        /// Sets the value of [report_format][crate::model::GenerateFrameworkAuditScopeReportRequest::report_format].
131        ///
132        /// This is a **required** field for requests.
133        pub fn set_report_format<
134            T: Into<crate::model::generate_framework_audit_scope_report_request::Format>,
135        >(
136            mut self,
137            v: T,
138        ) -> Self {
139            self.0.request.report_format = v.into();
140            self
141        }
142
143        /// Sets the value of [compliance_framework][crate::model::GenerateFrameworkAuditScopeReportRequest::compliance_framework].
144        ///
145        /// This is a **required** field for requests.
146        pub fn set_compliance_framework<T: Into<std::string::String>>(mut self, v: T) -> Self {
147            self.0.request.compliance_framework = v.into();
148            self
149        }
150    }
151
152    #[doc(hidden)]
153    impl gax::options::internal::RequestBuilder for GenerateFrameworkAuditScopeReport {
154        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
155            &mut self.0.options
156        }
157    }
158
159    /// The request builder for [Audit::create_framework_audit][crate::client::Audit::create_framework_audit] calls.
160    ///
161    /// # Example
162    /// ```no_run
163    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
164    /// use builder::audit::CreateFrameworkAudit;
165    /// # tokio_test::block_on(async {
166    /// use lro::Poller;
167    ///
168    /// let builder = prepare_request_builder();
169    /// let response = builder.poller().until_done().await?;
170    /// # gax::Result::<()>::Ok(()) });
171    ///
172    /// fn prepare_request_builder() -> CreateFrameworkAudit {
173    ///   # panic!();
174    ///   // ... details omitted ...
175    /// }
176    /// ```
177    #[derive(Clone, Debug)]
178    pub struct CreateFrameworkAudit(RequestBuilder<crate::model::CreateFrameworkAuditRequest>);
179
180    impl CreateFrameworkAudit {
181        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Audit>) -> Self {
182            Self(RequestBuilder::new(stub))
183        }
184
185        /// Sets the full request, replacing any prior values.
186        pub fn with_request<V: Into<crate::model::CreateFrameworkAuditRequest>>(
187            mut self,
188            v: V,
189        ) -> Self {
190            self.0.request = v.into();
191            self
192        }
193
194        /// Sets all the options, replacing any prior values.
195        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
196            self.0.options = v.into();
197            self
198        }
199
200        /// Sends the request.
201        ///
202        /// # Long running operations
203        ///
204        /// This starts, but does not poll, a longrunning operation. More information
205        /// on [create_framework_audit][crate::client::Audit::create_framework_audit].
206        pub async fn send(self) -> Result<longrunning::model::Operation> {
207            (*self.0.stub)
208                .create_framework_audit(self.0.request, self.0.options)
209                .await
210                .map(gax::response::Response::into_body)
211        }
212
213        /// Creates a [Poller][lro::Poller] to work with `create_framework_audit`.
214        pub fn poller(
215            self,
216        ) -> impl lro::Poller<crate::model::FrameworkAudit, crate::model::OperationMetadata>
217        {
218            type Operation = lro::internal::Operation<
219                crate::model::FrameworkAudit,
220                crate::model::OperationMetadata,
221            >;
222            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
223            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
224
225            let stub = self.0.stub.clone();
226            let mut options = self.0.options.clone();
227            options.set_retry_policy(gax::retry_policy::NeverRetry);
228            let query = move |name| {
229                let stub = stub.clone();
230                let options = options.clone();
231                async {
232                    let op = GetOperation::new(stub)
233                        .set_name(name)
234                        .with_options(options)
235                        .send()
236                        .await?;
237                    Ok(Operation::new(op))
238                }
239            };
240
241            let start = move || async {
242                let op = self.send().await?;
243                Ok(Operation::new(op))
244            };
245
246            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
247        }
248
249        /// Sets the value of [parent][crate::model::CreateFrameworkAuditRequest::parent].
250        ///
251        /// This is a **required** field for requests.
252        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
253            self.0.request.parent = v.into();
254            self
255        }
256
257        /// Sets the value of [framework_audit_id][crate::model::CreateFrameworkAuditRequest::framework_audit_id].
258        pub fn set_framework_audit_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
259            self.0.request.framework_audit_id = v.into();
260            self
261        }
262
263        /// Sets the value of [framework_audit][crate::model::CreateFrameworkAuditRequest::framework_audit].
264        ///
265        /// This is a **required** field for requests.
266        pub fn set_framework_audit<T>(mut self, v: T) -> Self
267        where
268            T: std::convert::Into<crate::model::FrameworkAudit>,
269        {
270            self.0.request.framework_audit = std::option::Option::Some(v.into());
271            self
272        }
273
274        /// Sets or clears the value of [framework_audit][crate::model::CreateFrameworkAuditRequest::framework_audit].
275        ///
276        /// This is a **required** field for requests.
277        pub fn set_or_clear_framework_audit<T>(mut self, v: std::option::Option<T>) -> Self
278        where
279            T: std::convert::Into<crate::model::FrameworkAudit>,
280        {
281            self.0.request.framework_audit = v.map(|x| x.into());
282            self
283        }
284    }
285
286    #[doc(hidden)]
287    impl gax::options::internal::RequestBuilder for CreateFrameworkAudit {
288        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
289            &mut self.0.options
290        }
291    }
292
293    /// The request builder for [Audit::list_framework_audits][crate::client::Audit::list_framework_audits] calls.
294    ///
295    /// # Example
296    /// ```no_run
297    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
298    /// use builder::audit::ListFrameworkAudits;
299    /// # tokio_test::block_on(async {
300    /// use gax::paginator::ItemPaginator;
301    ///
302    /// let builder = prepare_request_builder();
303    /// let mut items = builder.by_item();
304    /// while let Some(result) = items.next().await {
305    ///   let item = result?;
306    /// }
307    /// # gax::Result::<()>::Ok(()) });
308    ///
309    /// fn prepare_request_builder() -> ListFrameworkAudits {
310    ///   # panic!();
311    ///   // ... details omitted ...
312    /// }
313    /// ```
314    #[derive(Clone, Debug)]
315    pub struct ListFrameworkAudits(RequestBuilder<crate::model::ListFrameworkAuditsRequest>);
316
317    impl ListFrameworkAudits {
318        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Audit>) -> Self {
319            Self(RequestBuilder::new(stub))
320        }
321
322        /// Sets the full request, replacing any prior values.
323        pub fn with_request<V: Into<crate::model::ListFrameworkAuditsRequest>>(
324            mut self,
325            v: V,
326        ) -> Self {
327            self.0.request = v.into();
328            self
329        }
330
331        /// Sets all the options, replacing any prior values.
332        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
333            self.0.options = v.into();
334            self
335        }
336
337        /// Sends the request.
338        pub async fn send(self) -> Result<crate::model::ListFrameworkAuditsResponse> {
339            (*self.0.stub)
340                .list_framework_audits(self.0.request, self.0.options)
341                .await
342                .map(gax::response::Response::into_body)
343        }
344
345        /// Streams each page in the collection.
346        pub fn by_page(
347            self,
348        ) -> impl gax::paginator::Paginator<crate::model::ListFrameworkAuditsResponse, gax::error::Error>
349        {
350            use std::clone::Clone;
351            let token = self.0.request.page_token.clone();
352            let execute = move |token: String| {
353                let mut builder = self.clone();
354                builder.0.request = builder.0.request.set_page_token(token);
355                builder.send()
356            };
357            gax::paginator::internal::new_paginator(token, execute)
358        }
359
360        /// Streams each item in the collection.
361        pub fn by_item(
362            self,
363        ) -> impl gax::paginator::ItemPaginator<
364            crate::model::ListFrameworkAuditsResponse,
365            gax::error::Error,
366        > {
367            use gax::paginator::Paginator;
368            self.by_page().items()
369        }
370
371        /// Sets the value of [parent][crate::model::ListFrameworkAuditsRequest::parent].
372        ///
373        /// This is a **required** field for requests.
374        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
375            self.0.request.parent = v.into();
376            self
377        }
378
379        /// Sets the value of [page_size][crate::model::ListFrameworkAuditsRequest::page_size].
380        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
381            self.0.request.page_size = v.into();
382            self
383        }
384
385        /// Sets the value of [page_token][crate::model::ListFrameworkAuditsRequest::page_token].
386        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
387            self.0.request.page_token = v.into();
388            self
389        }
390
391        /// Sets the value of [filter][crate::model::ListFrameworkAuditsRequest::filter].
392        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
393            self.0.request.filter = v.into();
394            self
395        }
396    }
397
398    #[doc(hidden)]
399    impl gax::options::internal::RequestBuilder for ListFrameworkAudits {
400        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
401            &mut self.0.options
402        }
403    }
404
405    /// The request builder for [Audit::get_framework_audit][crate::client::Audit::get_framework_audit] calls.
406    ///
407    /// # Example
408    /// ```no_run
409    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
410    /// use builder::audit::GetFrameworkAudit;
411    /// # tokio_test::block_on(async {
412    ///
413    /// let builder = prepare_request_builder();
414    /// let response = builder.send().await?;
415    /// # gax::Result::<()>::Ok(()) });
416    ///
417    /// fn prepare_request_builder() -> GetFrameworkAudit {
418    ///   # panic!();
419    ///   // ... details omitted ...
420    /// }
421    /// ```
422    #[derive(Clone, Debug)]
423    pub struct GetFrameworkAudit(RequestBuilder<crate::model::GetFrameworkAuditRequest>);
424
425    impl GetFrameworkAudit {
426        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Audit>) -> Self {
427            Self(RequestBuilder::new(stub))
428        }
429
430        /// Sets the full request, replacing any prior values.
431        pub fn with_request<V: Into<crate::model::GetFrameworkAuditRequest>>(
432            mut self,
433            v: V,
434        ) -> Self {
435            self.0.request = v.into();
436            self
437        }
438
439        /// Sets all the options, replacing any prior values.
440        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
441            self.0.options = v.into();
442            self
443        }
444
445        /// Sends the request.
446        pub async fn send(self) -> Result<crate::model::FrameworkAudit> {
447            (*self.0.stub)
448                .get_framework_audit(self.0.request, self.0.options)
449                .await
450                .map(gax::response::Response::into_body)
451        }
452
453        /// Sets the value of [name][crate::model::GetFrameworkAuditRequest::name].
454        ///
455        /// This is a **required** field for requests.
456        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
457            self.0.request.name = v.into();
458            self
459        }
460    }
461
462    #[doc(hidden)]
463    impl gax::options::internal::RequestBuilder for GetFrameworkAudit {
464        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
465            &mut self.0.options
466        }
467    }
468
469    /// The request builder for [Audit::list_locations][crate::client::Audit::list_locations] calls.
470    ///
471    /// # Example
472    /// ```no_run
473    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
474    /// use builder::audit::ListLocations;
475    /// # tokio_test::block_on(async {
476    /// use gax::paginator::ItemPaginator;
477    ///
478    /// let builder = prepare_request_builder();
479    /// let mut items = builder.by_item();
480    /// while let Some(result) = items.next().await {
481    ///   let item = result?;
482    /// }
483    /// # gax::Result::<()>::Ok(()) });
484    ///
485    /// fn prepare_request_builder() -> ListLocations {
486    ///   # panic!();
487    ///   // ... details omitted ...
488    /// }
489    /// ```
490    #[derive(Clone, Debug)]
491    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
492
493    impl ListLocations {
494        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Audit>) -> Self {
495            Self(RequestBuilder::new(stub))
496        }
497
498        /// Sets the full request, replacing any prior values.
499        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
500            mut self,
501            v: V,
502        ) -> Self {
503            self.0.request = v.into();
504            self
505        }
506
507        /// Sets all the options, replacing any prior values.
508        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
509            self.0.options = v.into();
510            self
511        }
512
513        /// Sends the request.
514        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
515            (*self.0.stub)
516                .list_locations(self.0.request, self.0.options)
517                .await
518                .map(gax::response::Response::into_body)
519        }
520
521        /// Streams each page in the collection.
522        pub fn by_page(
523            self,
524        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
525        {
526            use std::clone::Clone;
527            let token = self.0.request.page_token.clone();
528            let execute = move |token: String| {
529                let mut builder = self.clone();
530                builder.0.request = builder.0.request.set_page_token(token);
531                builder.send()
532            };
533            gax::paginator::internal::new_paginator(token, execute)
534        }
535
536        /// Streams each item in the collection.
537        pub fn by_item(
538            self,
539        ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
540        {
541            use gax::paginator::Paginator;
542            self.by_page().items()
543        }
544
545        /// Sets the value of [name][location::model::ListLocationsRequest::name].
546        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
547            self.0.request.name = v.into();
548            self
549        }
550
551        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
552        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
553            self.0.request.filter = v.into();
554            self
555        }
556
557        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
558        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
559            self.0.request.page_size = v.into();
560            self
561        }
562
563        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
564        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
565            self.0.request.page_token = v.into();
566            self
567        }
568    }
569
570    #[doc(hidden)]
571    impl gax::options::internal::RequestBuilder for ListLocations {
572        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
573            &mut self.0.options
574        }
575    }
576
577    /// The request builder for [Audit::get_location][crate::client::Audit::get_location] calls.
578    ///
579    /// # Example
580    /// ```no_run
581    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
582    /// use builder::audit::GetLocation;
583    /// # tokio_test::block_on(async {
584    ///
585    /// let builder = prepare_request_builder();
586    /// let response = builder.send().await?;
587    /// # gax::Result::<()>::Ok(()) });
588    ///
589    /// fn prepare_request_builder() -> GetLocation {
590    ///   # panic!();
591    ///   // ... details omitted ...
592    /// }
593    /// ```
594    #[derive(Clone, Debug)]
595    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
596
597    impl GetLocation {
598        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Audit>) -> Self {
599            Self(RequestBuilder::new(stub))
600        }
601
602        /// Sets the full request, replacing any prior values.
603        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
604            self.0.request = v.into();
605            self
606        }
607
608        /// Sets all the options, replacing any prior values.
609        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
610            self.0.options = v.into();
611            self
612        }
613
614        /// Sends the request.
615        pub async fn send(self) -> Result<location::model::Location> {
616            (*self.0.stub)
617                .get_location(self.0.request, self.0.options)
618                .await
619                .map(gax::response::Response::into_body)
620        }
621
622        /// Sets the value of [name][location::model::GetLocationRequest::name].
623        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
624            self.0.request.name = v.into();
625            self
626        }
627    }
628
629    #[doc(hidden)]
630    impl gax::options::internal::RequestBuilder for GetLocation {
631        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
632            &mut self.0.options
633        }
634    }
635
636    /// The request builder for [Audit::list_operations][crate::client::Audit::list_operations] calls.
637    ///
638    /// # Example
639    /// ```no_run
640    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
641    /// use builder::audit::ListOperations;
642    /// # tokio_test::block_on(async {
643    /// use gax::paginator::ItemPaginator;
644    ///
645    /// let builder = prepare_request_builder();
646    /// let mut items = builder.by_item();
647    /// while let Some(result) = items.next().await {
648    ///   let item = result?;
649    /// }
650    /// # gax::Result::<()>::Ok(()) });
651    ///
652    /// fn prepare_request_builder() -> ListOperations {
653    ///   # panic!();
654    ///   // ... details omitted ...
655    /// }
656    /// ```
657    #[derive(Clone, Debug)]
658    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
659
660    impl ListOperations {
661        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Audit>) -> Self {
662            Self(RequestBuilder::new(stub))
663        }
664
665        /// Sets the full request, replacing any prior values.
666        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
667            mut self,
668            v: V,
669        ) -> Self {
670            self.0.request = v.into();
671            self
672        }
673
674        /// Sets all the options, replacing any prior values.
675        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
676            self.0.options = v.into();
677            self
678        }
679
680        /// Sends the request.
681        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
682            (*self.0.stub)
683                .list_operations(self.0.request, self.0.options)
684                .await
685                .map(gax::response::Response::into_body)
686        }
687
688        /// Streams each page in the collection.
689        pub fn by_page(
690            self,
691        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
692        {
693            use std::clone::Clone;
694            let token = self.0.request.page_token.clone();
695            let execute = move |token: String| {
696                let mut builder = self.clone();
697                builder.0.request = builder.0.request.set_page_token(token);
698                builder.send()
699            };
700            gax::paginator::internal::new_paginator(token, execute)
701        }
702
703        /// Streams each item in the collection.
704        pub fn by_item(
705            self,
706        ) -> impl gax::paginator::ItemPaginator<
707            longrunning::model::ListOperationsResponse,
708            gax::error::Error,
709        > {
710            use gax::paginator::Paginator;
711            self.by_page().items()
712        }
713
714        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
715        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
716            self.0.request.name = v.into();
717            self
718        }
719
720        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
721        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
722            self.0.request.filter = v.into();
723            self
724        }
725
726        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
727        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
728            self.0.request.page_size = v.into();
729            self
730        }
731
732        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
733        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
734            self.0.request.page_token = v.into();
735            self
736        }
737
738        /// Sets the value of [return_partial_success][longrunning::model::ListOperationsRequest::return_partial_success].
739        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
740            self.0.request.return_partial_success = v.into();
741            self
742        }
743    }
744
745    #[doc(hidden)]
746    impl gax::options::internal::RequestBuilder for ListOperations {
747        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
748            &mut self.0.options
749        }
750    }
751
752    /// The request builder for [Audit::get_operation][crate::client::Audit::get_operation] calls.
753    ///
754    /// # Example
755    /// ```no_run
756    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
757    /// use builder::audit::GetOperation;
758    /// # tokio_test::block_on(async {
759    ///
760    /// let builder = prepare_request_builder();
761    /// let response = builder.send().await?;
762    /// # gax::Result::<()>::Ok(()) });
763    ///
764    /// fn prepare_request_builder() -> GetOperation {
765    ///   # panic!();
766    ///   // ... details omitted ...
767    /// }
768    /// ```
769    #[derive(Clone, Debug)]
770    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
771
772    impl GetOperation {
773        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Audit>) -> Self {
774            Self(RequestBuilder::new(stub))
775        }
776
777        /// Sets the full request, replacing any prior values.
778        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
779            mut self,
780            v: V,
781        ) -> Self {
782            self.0.request = v.into();
783            self
784        }
785
786        /// Sets all the options, replacing any prior values.
787        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
788            self.0.options = v.into();
789            self
790        }
791
792        /// Sends the request.
793        pub async fn send(self) -> Result<longrunning::model::Operation> {
794            (*self.0.stub)
795                .get_operation(self.0.request, self.0.options)
796                .await
797                .map(gax::response::Response::into_body)
798        }
799
800        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
801        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
802            self.0.request.name = v.into();
803            self
804        }
805    }
806
807    #[doc(hidden)]
808    impl gax::options::internal::RequestBuilder for GetOperation {
809        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
810            &mut self.0.options
811        }
812    }
813
814    /// The request builder for [Audit::delete_operation][crate::client::Audit::delete_operation] calls.
815    ///
816    /// # Example
817    /// ```no_run
818    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
819    /// use builder::audit::DeleteOperation;
820    /// # tokio_test::block_on(async {
821    ///
822    /// let builder = prepare_request_builder();
823    /// let response = builder.send().await?;
824    /// # gax::Result::<()>::Ok(()) });
825    ///
826    /// fn prepare_request_builder() -> DeleteOperation {
827    ///   # panic!();
828    ///   // ... details omitted ...
829    /// }
830    /// ```
831    #[derive(Clone, Debug)]
832    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
833
834    impl DeleteOperation {
835        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Audit>) -> Self {
836            Self(RequestBuilder::new(stub))
837        }
838
839        /// Sets the full request, replacing any prior values.
840        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
841            mut self,
842            v: V,
843        ) -> Self {
844            self.0.request = v.into();
845            self
846        }
847
848        /// Sets all the options, replacing any prior values.
849        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
850            self.0.options = v.into();
851            self
852        }
853
854        /// Sends the request.
855        pub async fn send(self) -> Result<()> {
856            (*self.0.stub)
857                .delete_operation(self.0.request, self.0.options)
858                .await
859                .map(gax::response::Response::into_body)
860        }
861
862        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
863        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
864            self.0.request.name = v.into();
865            self
866        }
867    }
868
869    #[doc(hidden)]
870    impl gax::options::internal::RequestBuilder for DeleteOperation {
871        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
872            &mut self.0.options
873        }
874    }
875
876    /// The request builder for [Audit::cancel_operation][crate::client::Audit::cancel_operation] calls.
877    ///
878    /// # Example
879    /// ```no_run
880    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
881    /// use builder::audit::CancelOperation;
882    /// # tokio_test::block_on(async {
883    ///
884    /// let builder = prepare_request_builder();
885    /// let response = builder.send().await?;
886    /// # gax::Result::<()>::Ok(()) });
887    ///
888    /// fn prepare_request_builder() -> CancelOperation {
889    ///   # panic!();
890    ///   // ... details omitted ...
891    /// }
892    /// ```
893    #[derive(Clone, Debug)]
894    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
895
896    impl CancelOperation {
897        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Audit>) -> Self {
898            Self(RequestBuilder::new(stub))
899        }
900
901        /// Sets the full request, replacing any prior values.
902        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
903            mut self,
904            v: V,
905        ) -> Self {
906            self.0.request = v.into();
907            self
908        }
909
910        /// Sets all the options, replacing any prior values.
911        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
912            self.0.options = v.into();
913            self
914        }
915
916        /// Sends the request.
917        pub async fn send(self) -> Result<()> {
918            (*self.0.stub)
919                .cancel_operation(self.0.request, self.0.options)
920                .await
921                .map(gax::response::Response::into_body)
922        }
923
924        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
925        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
926            self.0.request.name = v.into();
927            self
928        }
929    }
930
931    #[doc(hidden)]
932    impl gax::options::internal::RequestBuilder for CancelOperation {
933        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
934            &mut self.0.options
935        }
936    }
937}
938
939pub mod cm_enrollment_service {
940    use crate::Result;
941
942    /// A builder for [CmEnrollmentService][crate::client::CmEnrollmentService].
943    ///
944    /// ```
945    /// # tokio_test::block_on(async {
946    /// # use google_cloud_cloudsecuritycompliance_v1::*;
947    /// # use builder::cm_enrollment_service::ClientBuilder;
948    /// # use client::CmEnrollmentService;
949    /// let builder : ClientBuilder = CmEnrollmentService::builder();
950    /// let client = builder
951    ///     .with_endpoint("https://cloudsecuritycompliance.googleapis.com")
952    ///     .build().await?;
953    /// # gax::client_builder::Result::<()>::Ok(()) });
954    /// ```
955    pub type ClientBuilder =
956        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
957
958    pub(crate) mod client {
959        use super::super::super::client::CmEnrollmentService;
960        pub struct Factory;
961        impl gax::client_builder::internal::ClientFactory for Factory {
962            type Client = CmEnrollmentService;
963            type Credentials = gaxi::options::Credentials;
964            async fn build(
965                self,
966                config: gaxi::options::ClientConfig,
967            ) -> gax::client_builder::Result<Self::Client> {
968                Self::Client::new(config).await
969            }
970        }
971    }
972
973    /// Common implementation for [crate::client::CmEnrollmentService] request builders.
974    #[derive(Clone, Debug)]
975    pub(crate) struct RequestBuilder<R: std::default::Default> {
976        stub: std::sync::Arc<dyn super::super::stub::dynamic::CmEnrollmentService>,
977        request: R,
978        options: gax::options::RequestOptions,
979    }
980
981    impl<R> RequestBuilder<R>
982    where
983        R: std::default::Default,
984    {
985        pub(crate) fn new(
986            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmEnrollmentService>,
987        ) -> Self {
988            Self {
989                stub,
990                request: R::default(),
991                options: gax::options::RequestOptions::default(),
992            }
993        }
994    }
995
996    /// The request builder for [CmEnrollmentService::update_cm_enrollment][crate::client::CmEnrollmentService::update_cm_enrollment] calls.
997    ///
998    /// # Example
999    /// ```no_run
1000    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
1001    /// use builder::cm_enrollment_service::UpdateCmEnrollment;
1002    /// # tokio_test::block_on(async {
1003    ///
1004    /// let builder = prepare_request_builder();
1005    /// let response = builder.send().await?;
1006    /// # gax::Result::<()>::Ok(()) });
1007    ///
1008    /// fn prepare_request_builder() -> UpdateCmEnrollment {
1009    ///   # panic!();
1010    ///   // ... details omitted ...
1011    /// }
1012    /// ```
1013    #[derive(Clone, Debug)]
1014    pub struct UpdateCmEnrollment(RequestBuilder<crate::model::UpdateCmEnrollmentRequest>);
1015
1016    impl UpdateCmEnrollment {
1017        pub(crate) fn new(
1018            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmEnrollmentService>,
1019        ) -> Self {
1020            Self(RequestBuilder::new(stub))
1021        }
1022
1023        /// Sets the full request, replacing any prior values.
1024        pub fn with_request<V: Into<crate::model::UpdateCmEnrollmentRequest>>(
1025            mut self,
1026            v: V,
1027        ) -> Self {
1028            self.0.request = v.into();
1029            self
1030        }
1031
1032        /// Sets all the options, replacing any prior values.
1033        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1034            self.0.options = v.into();
1035            self
1036        }
1037
1038        /// Sends the request.
1039        pub async fn send(self) -> Result<crate::model::CmEnrollment> {
1040            (*self.0.stub)
1041                .update_cm_enrollment(self.0.request, self.0.options)
1042                .await
1043                .map(gax::response::Response::into_body)
1044        }
1045
1046        /// Sets the value of [cm_enrollment][crate::model::UpdateCmEnrollmentRequest::cm_enrollment].
1047        ///
1048        /// This is a **required** field for requests.
1049        pub fn set_cm_enrollment<T>(mut self, v: T) -> Self
1050        where
1051            T: std::convert::Into<crate::model::CmEnrollment>,
1052        {
1053            self.0.request.cm_enrollment = std::option::Option::Some(v.into());
1054            self
1055        }
1056
1057        /// Sets or clears the value of [cm_enrollment][crate::model::UpdateCmEnrollmentRequest::cm_enrollment].
1058        ///
1059        /// This is a **required** field for requests.
1060        pub fn set_or_clear_cm_enrollment<T>(mut self, v: std::option::Option<T>) -> Self
1061        where
1062            T: std::convert::Into<crate::model::CmEnrollment>,
1063        {
1064            self.0.request.cm_enrollment = v.map(|x| x.into());
1065            self
1066        }
1067
1068        /// Sets the value of [update_mask][crate::model::UpdateCmEnrollmentRequest::update_mask].
1069        pub fn set_update_mask<T>(mut self, v: T) -> Self
1070        where
1071            T: std::convert::Into<wkt::FieldMask>,
1072        {
1073            self.0.request.update_mask = std::option::Option::Some(v.into());
1074            self
1075        }
1076
1077        /// Sets or clears the value of [update_mask][crate::model::UpdateCmEnrollmentRequest::update_mask].
1078        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1079        where
1080            T: std::convert::Into<wkt::FieldMask>,
1081        {
1082            self.0.request.update_mask = v.map(|x| x.into());
1083            self
1084        }
1085    }
1086
1087    #[doc(hidden)]
1088    impl gax::options::internal::RequestBuilder for UpdateCmEnrollment {
1089        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1090            &mut self.0.options
1091        }
1092    }
1093
1094    /// The request builder for [CmEnrollmentService::calculate_effective_cm_enrollment][crate::client::CmEnrollmentService::calculate_effective_cm_enrollment] calls.
1095    ///
1096    /// # Example
1097    /// ```no_run
1098    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
1099    /// use builder::cm_enrollment_service::CalculateEffectiveCmEnrollment;
1100    /// # tokio_test::block_on(async {
1101    ///
1102    /// let builder = prepare_request_builder();
1103    /// let response = builder.send().await?;
1104    /// # gax::Result::<()>::Ok(()) });
1105    ///
1106    /// fn prepare_request_builder() -> CalculateEffectiveCmEnrollment {
1107    ///   # panic!();
1108    ///   // ... details omitted ...
1109    /// }
1110    /// ```
1111    #[derive(Clone, Debug)]
1112    pub struct CalculateEffectiveCmEnrollment(
1113        RequestBuilder<crate::model::CalculateEffectiveCmEnrollmentRequest>,
1114    );
1115
1116    impl CalculateEffectiveCmEnrollment {
1117        pub(crate) fn new(
1118            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmEnrollmentService>,
1119        ) -> Self {
1120            Self(RequestBuilder::new(stub))
1121        }
1122
1123        /// Sets the full request, replacing any prior values.
1124        pub fn with_request<V: Into<crate::model::CalculateEffectiveCmEnrollmentRequest>>(
1125            mut self,
1126            v: V,
1127        ) -> Self {
1128            self.0.request = v.into();
1129            self
1130        }
1131
1132        /// Sets all the options, replacing any prior values.
1133        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1134            self.0.options = v.into();
1135            self
1136        }
1137
1138        /// Sends the request.
1139        pub async fn send(self) -> Result<crate::model::CalculateEffectiveCmEnrollmentResponse> {
1140            (*self.0.stub)
1141                .calculate_effective_cm_enrollment(self.0.request, self.0.options)
1142                .await
1143                .map(gax::response::Response::into_body)
1144        }
1145
1146        /// Sets the value of [name][crate::model::CalculateEffectiveCmEnrollmentRequest::name].
1147        ///
1148        /// This is a **required** field for requests.
1149        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1150            self.0.request.name = v.into();
1151            self
1152        }
1153    }
1154
1155    #[doc(hidden)]
1156    impl gax::options::internal::RequestBuilder for CalculateEffectiveCmEnrollment {
1157        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1158            &mut self.0.options
1159        }
1160    }
1161
1162    /// The request builder for [CmEnrollmentService::list_locations][crate::client::CmEnrollmentService::list_locations] calls.
1163    ///
1164    /// # Example
1165    /// ```no_run
1166    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
1167    /// use builder::cm_enrollment_service::ListLocations;
1168    /// # tokio_test::block_on(async {
1169    /// use gax::paginator::ItemPaginator;
1170    ///
1171    /// let builder = prepare_request_builder();
1172    /// let mut items = builder.by_item();
1173    /// while let Some(result) = items.next().await {
1174    ///   let item = result?;
1175    /// }
1176    /// # gax::Result::<()>::Ok(()) });
1177    ///
1178    /// fn prepare_request_builder() -> ListLocations {
1179    ///   # panic!();
1180    ///   // ... details omitted ...
1181    /// }
1182    /// ```
1183    #[derive(Clone, Debug)]
1184    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
1185
1186    impl ListLocations {
1187        pub(crate) fn new(
1188            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmEnrollmentService>,
1189        ) -> Self {
1190            Self(RequestBuilder::new(stub))
1191        }
1192
1193        /// Sets the full request, replacing any prior values.
1194        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
1195            mut self,
1196            v: V,
1197        ) -> Self {
1198            self.0.request = v.into();
1199            self
1200        }
1201
1202        /// Sets all the options, replacing any prior values.
1203        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1204            self.0.options = v.into();
1205            self
1206        }
1207
1208        /// Sends the request.
1209        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
1210            (*self.0.stub)
1211                .list_locations(self.0.request, self.0.options)
1212                .await
1213                .map(gax::response::Response::into_body)
1214        }
1215
1216        /// Streams each page in the collection.
1217        pub fn by_page(
1218            self,
1219        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
1220        {
1221            use std::clone::Clone;
1222            let token = self.0.request.page_token.clone();
1223            let execute = move |token: String| {
1224                let mut builder = self.clone();
1225                builder.0.request = builder.0.request.set_page_token(token);
1226                builder.send()
1227            };
1228            gax::paginator::internal::new_paginator(token, execute)
1229        }
1230
1231        /// Streams each item in the collection.
1232        pub fn by_item(
1233            self,
1234        ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
1235        {
1236            use gax::paginator::Paginator;
1237            self.by_page().items()
1238        }
1239
1240        /// Sets the value of [name][location::model::ListLocationsRequest::name].
1241        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1242            self.0.request.name = v.into();
1243            self
1244        }
1245
1246        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
1247        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1248            self.0.request.filter = v.into();
1249            self
1250        }
1251
1252        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
1253        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1254            self.0.request.page_size = v.into();
1255            self
1256        }
1257
1258        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
1259        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1260            self.0.request.page_token = v.into();
1261            self
1262        }
1263    }
1264
1265    #[doc(hidden)]
1266    impl gax::options::internal::RequestBuilder for ListLocations {
1267        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1268            &mut self.0.options
1269        }
1270    }
1271
1272    /// The request builder for [CmEnrollmentService::get_location][crate::client::CmEnrollmentService::get_location] calls.
1273    ///
1274    /// # Example
1275    /// ```no_run
1276    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
1277    /// use builder::cm_enrollment_service::GetLocation;
1278    /// # tokio_test::block_on(async {
1279    ///
1280    /// let builder = prepare_request_builder();
1281    /// let response = builder.send().await?;
1282    /// # gax::Result::<()>::Ok(()) });
1283    ///
1284    /// fn prepare_request_builder() -> GetLocation {
1285    ///   # panic!();
1286    ///   // ... details omitted ...
1287    /// }
1288    /// ```
1289    #[derive(Clone, Debug)]
1290    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
1291
1292    impl GetLocation {
1293        pub(crate) fn new(
1294            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmEnrollmentService>,
1295        ) -> Self {
1296            Self(RequestBuilder::new(stub))
1297        }
1298
1299        /// Sets the full request, replacing any prior values.
1300        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
1301            self.0.request = v.into();
1302            self
1303        }
1304
1305        /// Sets all the options, replacing any prior values.
1306        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1307            self.0.options = v.into();
1308            self
1309        }
1310
1311        /// Sends the request.
1312        pub async fn send(self) -> Result<location::model::Location> {
1313            (*self.0.stub)
1314                .get_location(self.0.request, self.0.options)
1315                .await
1316                .map(gax::response::Response::into_body)
1317        }
1318
1319        /// Sets the value of [name][location::model::GetLocationRequest::name].
1320        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1321            self.0.request.name = v.into();
1322            self
1323        }
1324    }
1325
1326    #[doc(hidden)]
1327    impl gax::options::internal::RequestBuilder for GetLocation {
1328        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1329            &mut self.0.options
1330        }
1331    }
1332
1333    /// The request builder for [CmEnrollmentService::list_operations][crate::client::CmEnrollmentService::list_operations] calls.
1334    ///
1335    /// # Example
1336    /// ```no_run
1337    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
1338    /// use builder::cm_enrollment_service::ListOperations;
1339    /// # tokio_test::block_on(async {
1340    /// use gax::paginator::ItemPaginator;
1341    ///
1342    /// let builder = prepare_request_builder();
1343    /// let mut items = builder.by_item();
1344    /// while let Some(result) = items.next().await {
1345    ///   let item = result?;
1346    /// }
1347    /// # gax::Result::<()>::Ok(()) });
1348    ///
1349    /// fn prepare_request_builder() -> ListOperations {
1350    ///   # panic!();
1351    ///   // ... details omitted ...
1352    /// }
1353    /// ```
1354    #[derive(Clone, Debug)]
1355    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
1356
1357    impl ListOperations {
1358        pub(crate) fn new(
1359            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmEnrollmentService>,
1360        ) -> Self {
1361            Self(RequestBuilder::new(stub))
1362        }
1363
1364        /// Sets the full request, replacing any prior values.
1365        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
1366            mut self,
1367            v: V,
1368        ) -> Self {
1369            self.0.request = v.into();
1370            self
1371        }
1372
1373        /// Sets all the options, replacing any prior values.
1374        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1375            self.0.options = v.into();
1376            self
1377        }
1378
1379        /// Sends the request.
1380        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
1381            (*self.0.stub)
1382                .list_operations(self.0.request, self.0.options)
1383                .await
1384                .map(gax::response::Response::into_body)
1385        }
1386
1387        /// Streams each page in the collection.
1388        pub fn by_page(
1389            self,
1390        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
1391        {
1392            use std::clone::Clone;
1393            let token = self.0.request.page_token.clone();
1394            let execute = move |token: String| {
1395                let mut builder = self.clone();
1396                builder.0.request = builder.0.request.set_page_token(token);
1397                builder.send()
1398            };
1399            gax::paginator::internal::new_paginator(token, execute)
1400        }
1401
1402        /// Streams each item in the collection.
1403        pub fn by_item(
1404            self,
1405        ) -> impl gax::paginator::ItemPaginator<
1406            longrunning::model::ListOperationsResponse,
1407            gax::error::Error,
1408        > {
1409            use gax::paginator::Paginator;
1410            self.by_page().items()
1411        }
1412
1413        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
1414        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1415            self.0.request.name = v.into();
1416            self
1417        }
1418
1419        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
1420        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1421            self.0.request.filter = v.into();
1422            self
1423        }
1424
1425        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
1426        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1427            self.0.request.page_size = v.into();
1428            self
1429        }
1430
1431        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
1432        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1433            self.0.request.page_token = v.into();
1434            self
1435        }
1436
1437        /// Sets the value of [return_partial_success][longrunning::model::ListOperationsRequest::return_partial_success].
1438        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
1439            self.0.request.return_partial_success = v.into();
1440            self
1441        }
1442    }
1443
1444    #[doc(hidden)]
1445    impl gax::options::internal::RequestBuilder for ListOperations {
1446        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1447            &mut self.0.options
1448        }
1449    }
1450
1451    /// The request builder for [CmEnrollmentService::get_operation][crate::client::CmEnrollmentService::get_operation] calls.
1452    ///
1453    /// # Example
1454    /// ```no_run
1455    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
1456    /// use builder::cm_enrollment_service::GetOperation;
1457    /// # tokio_test::block_on(async {
1458    ///
1459    /// let builder = prepare_request_builder();
1460    /// let response = builder.send().await?;
1461    /// # gax::Result::<()>::Ok(()) });
1462    ///
1463    /// fn prepare_request_builder() -> GetOperation {
1464    ///   # panic!();
1465    ///   // ... details omitted ...
1466    /// }
1467    /// ```
1468    #[derive(Clone, Debug)]
1469    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
1470
1471    impl GetOperation {
1472        pub(crate) fn new(
1473            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmEnrollmentService>,
1474        ) -> Self {
1475            Self(RequestBuilder::new(stub))
1476        }
1477
1478        /// Sets the full request, replacing any prior values.
1479        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
1480            mut self,
1481            v: V,
1482        ) -> Self {
1483            self.0.request = v.into();
1484            self
1485        }
1486
1487        /// Sets all the options, replacing any prior values.
1488        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1489            self.0.options = v.into();
1490            self
1491        }
1492
1493        /// Sends the request.
1494        pub async fn send(self) -> Result<longrunning::model::Operation> {
1495            (*self.0.stub)
1496                .get_operation(self.0.request, self.0.options)
1497                .await
1498                .map(gax::response::Response::into_body)
1499        }
1500
1501        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
1502        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1503            self.0.request.name = v.into();
1504            self
1505        }
1506    }
1507
1508    #[doc(hidden)]
1509    impl gax::options::internal::RequestBuilder for GetOperation {
1510        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1511            &mut self.0.options
1512        }
1513    }
1514
1515    /// The request builder for [CmEnrollmentService::delete_operation][crate::client::CmEnrollmentService::delete_operation] calls.
1516    ///
1517    /// # Example
1518    /// ```no_run
1519    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
1520    /// use builder::cm_enrollment_service::DeleteOperation;
1521    /// # tokio_test::block_on(async {
1522    ///
1523    /// let builder = prepare_request_builder();
1524    /// let response = builder.send().await?;
1525    /// # gax::Result::<()>::Ok(()) });
1526    ///
1527    /// fn prepare_request_builder() -> DeleteOperation {
1528    ///   # panic!();
1529    ///   // ... details omitted ...
1530    /// }
1531    /// ```
1532    #[derive(Clone, Debug)]
1533    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
1534
1535    impl DeleteOperation {
1536        pub(crate) fn new(
1537            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmEnrollmentService>,
1538        ) -> Self {
1539            Self(RequestBuilder::new(stub))
1540        }
1541
1542        /// Sets the full request, replacing any prior values.
1543        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
1544            mut self,
1545            v: V,
1546        ) -> Self {
1547            self.0.request = v.into();
1548            self
1549        }
1550
1551        /// Sets all the options, replacing any prior values.
1552        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1553            self.0.options = v.into();
1554            self
1555        }
1556
1557        /// Sends the request.
1558        pub async fn send(self) -> Result<()> {
1559            (*self.0.stub)
1560                .delete_operation(self.0.request, self.0.options)
1561                .await
1562                .map(gax::response::Response::into_body)
1563        }
1564
1565        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
1566        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1567            self.0.request.name = v.into();
1568            self
1569        }
1570    }
1571
1572    #[doc(hidden)]
1573    impl gax::options::internal::RequestBuilder for DeleteOperation {
1574        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1575            &mut self.0.options
1576        }
1577    }
1578
1579    /// The request builder for [CmEnrollmentService::cancel_operation][crate::client::CmEnrollmentService::cancel_operation] calls.
1580    ///
1581    /// # Example
1582    /// ```no_run
1583    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
1584    /// use builder::cm_enrollment_service::CancelOperation;
1585    /// # tokio_test::block_on(async {
1586    ///
1587    /// let builder = prepare_request_builder();
1588    /// let response = builder.send().await?;
1589    /// # gax::Result::<()>::Ok(()) });
1590    ///
1591    /// fn prepare_request_builder() -> CancelOperation {
1592    ///   # panic!();
1593    ///   // ... details omitted ...
1594    /// }
1595    /// ```
1596    #[derive(Clone, Debug)]
1597    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
1598
1599    impl CancelOperation {
1600        pub(crate) fn new(
1601            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmEnrollmentService>,
1602        ) -> Self {
1603            Self(RequestBuilder::new(stub))
1604        }
1605
1606        /// Sets the full request, replacing any prior values.
1607        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
1608            mut self,
1609            v: V,
1610        ) -> Self {
1611            self.0.request = v.into();
1612            self
1613        }
1614
1615        /// Sets all the options, replacing any prior values.
1616        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1617            self.0.options = v.into();
1618            self
1619        }
1620
1621        /// Sends the request.
1622        pub async fn send(self) -> Result<()> {
1623            (*self.0.stub)
1624                .cancel_operation(self.0.request, self.0.options)
1625                .await
1626                .map(gax::response::Response::into_body)
1627        }
1628
1629        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
1630        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1631            self.0.request.name = v.into();
1632            self
1633        }
1634    }
1635
1636    #[doc(hidden)]
1637    impl gax::options::internal::RequestBuilder for CancelOperation {
1638        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1639            &mut self.0.options
1640        }
1641    }
1642}
1643
1644pub mod config {
1645    use crate::Result;
1646
1647    /// A builder for [Config][crate::client::Config].
1648    ///
1649    /// ```
1650    /// # tokio_test::block_on(async {
1651    /// # use google_cloud_cloudsecuritycompliance_v1::*;
1652    /// # use builder::config::ClientBuilder;
1653    /// # use client::Config;
1654    /// let builder : ClientBuilder = Config::builder();
1655    /// let client = builder
1656    ///     .with_endpoint("https://cloudsecuritycompliance.googleapis.com")
1657    ///     .build().await?;
1658    /// # gax::client_builder::Result::<()>::Ok(()) });
1659    /// ```
1660    pub type ClientBuilder =
1661        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
1662
1663    pub(crate) mod client {
1664        use super::super::super::client::Config;
1665        pub struct Factory;
1666        impl gax::client_builder::internal::ClientFactory for Factory {
1667            type Client = Config;
1668            type Credentials = gaxi::options::Credentials;
1669            async fn build(
1670                self,
1671                config: gaxi::options::ClientConfig,
1672            ) -> gax::client_builder::Result<Self::Client> {
1673                Self::Client::new(config).await
1674            }
1675        }
1676    }
1677
1678    /// Common implementation for [crate::client::Config] request builders.
1679    #[derive(Clone, Debug)]
1680    pub(crate) struct RequestBuilder<R: std::default::Default> {
1681        stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>,
1682        request: R,
1683        options: gax::options::RequestOptions,
1684    }
1685
1686    impl<R> RequestBuilder<R>
1687    where
1688        R: std::default::Default,
1689    {
1690        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
1691            Self {
1692                stub,
1693                request: R::default(),
1694                options: gax::options::RequestOptions::default(),
1695            }
1696        }
1697    }
1698
1699    /// The request builder for [Config::list_frameworks][crate::client::Config::list_frameworks] calls.
1700    ///
1701    /// # Example
1702    /// ```no_run
1703    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
1704    /// use builder::config::ListFrameworks;
1705    /// # tokio_test::block_on(async {
1706    /// use gax::paginator::ItemPaginator;
1707    ///
1708    /// let builder = prepare_request_builder();
1709    /// let mut items = builder.by_item();
1710    /// while let Some(result) = items.next().await {
1711    ///   let item = result?;
1712    /// }
1713    /// # gax::Result::<()>::Ok(()) });
1714    ///
1715    /// fn prepare_request_builder() -> ListFrameworks {
1716    ///   # panic!();
1717    ///   // ... details omitted ...
1718    /// }
1719    /// ```
1720    #[derive(Clone, Debug)]
1721    pub struct ListFrameworks(RequestBuilder<crate::model::ListFrameworksRequest>);
1722
1723    impl ListFrameworks {
1724        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
1725            Self(RequestBuilder::new(stub))
1726        }
1727
1728        /// Sets the full request, replacing any prior values.
1729        pub fn with_request<V: Into<crate::model::ListFrameworksRequest>>(mut self, v: V) -> Self {
1730            self.0.request = v.into();
1731            self
1732        }
1733
1734        /// Sets all the options, replacing any prior values.
1735        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1736            self.0.options = v.into();
1737            self
1738        }
1739
1740        /// Sends the request.
1741        pub async fn send(self) -> Result<crate::model::ListFrameworksResponse> {
1742            (*self.0.stub)
1743                .list_frameworks(self.0.request, self.0.options)
1744                .await
1745                .map(gax::response::Response::into_body)
1746        }
1747
1748        /// Streams each page in the collection.
1749        pub fn by_page(
1750            self,
1751        ) -> impl gax::paginator::Paginator<crate::model::ListFrameworksResponse, gax::error::Error>
1752        {
1753            use std::clone::Clone;
1754            let token = self.0.request.page_token.clone();
1755            let execute = move |token: String| {
1756                let mut builder = self.clone();
1757                builder.0.request = builder.0.request.set_page_token(token);
1758                builder.send()
1759            };
1760            gax::paginator::internal::new_paginator(token, execute)
1761        }
1762
1763        /// Streams each item in the collection.
1764        pub fn by_item(
1765            self,
1766        ) -> impl gax::paginator::ItemPaginator<crate::model::ListFrameworksResponse, gax::error::Error>
1767        {
1768            use gax::paginator::Paginator;
1769            self.by_page().items()
1770        }
1771
1772        /// Sets the value of [parent][crate::model::ListFrameworksRequest::parent].
1773        ///
1774        /// This is a **required** field for requests.
1775        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1776            self.0.request.parent = v.into();
1777            self
1778        }
1779
1780        /// Sets the value of [page_size][crate::model::ListFrameworksRequest::page_size].
1781        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1782            self.0.request.page_size = v.into();
1783            self
1784        }
1785
1786        /// Sets the value of [page_token][crate::model::ListFrameworksRequest::page_token].
1787        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1788            self.0.request.page_token = v.into();
1789            self
1790        }
1791    }
1792
1793    #[doc(hidden)]
1794    impl gax::options::internal::RequestBuilder for ListFrameworks {
1795        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1796            &mut self.0.options
1797        }
1798    }
1799
1800    /// The request builder for [Config::get_framework][crate::client::Config::get_framework] calls.
1801    ///
1802    /// # Example
1803    /// ```no_run
1804    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
1805    /// use builder::config::GetFramework;
1806    /// # tokio_test::block_on(async {
1807    ///
1808    /// let builder = prepare_request_builder();
1809    /// let response = builder.send().await?;
1810    /// # gax::Result::<()>::Ok(()) });
1811    ///
1812    /// fn prepare_request_builder() -> GetFramework {
1813    ///   # panic!();
1814    ///   // ... details omitted ...
1815    /// }
1816    /// ```
1817    #[derive(Clone, Debug)]
1818    pub struct GetFramework(RequestBuilder<crate::model::GetFrameworkRequest>);
1819
1820    impl GetFramework {
1821        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
1822            Self(RequestBuilder::new(stub))
1823        }
1824
1825        /// Sets the full request, replacing any prior values.
1826        pub fn with_request<V: Into<crate::model::GetFrameworkRequest>>(mut self, v: V) -> Self {
1827            self.0.request = v.into();
1828            self
1829        }
1830
1831        /// Sets all the options, replacing any prior values.
1832        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1833            self.0.options = v.into();
1834            self
1835        }
1836
1837        /// Sends the request.
1838        pub async fn send(self) -> Result<crate::model::Framework> {
1839            (*self.0.stub)
1840                .get_framework(self.0.request, self.0.options)
1841                .await
1842                .map(gax::response::Response::into_body)
1843        }
1844
1845        /// Sets the value of [name][crate::model::GetFrameworkRequest::name].
1846        ///
1847        /// This is a **required** field for requests.
1848        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1849            self.0.request.name = v.into();
1850            self
1851        }
1852
1853        /// Sets the value of [major_revision_id][crate::model::GetFrameworkRequest::major_revision_id].
1854        pub fn set_major_revision_id<T: Into<i64>>(mut self, v: T) -> Self {
1855            self.0.request.major_revision_id = v.into();
1856            self
1857        }
1858    }
1859
1860    #[doc(hidden)]
1861    impl gax::options::internal::RequestBuilder for GetFramework {
1862        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1863            &mut self.0.options
1864        }
1865    }
1866
1867    /// The request builder for [Config::create_framework][crate::client::Config::create_framework] calls.
1868    ///
1869    /// # Example
1870    /// ```no_run
1871    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
1872    /// use builder::config::CreateFramework;
1873    /// # tokio_test::block_on(async {
1874    ///
1875    /// let builder = prepare_request_builder();
1876    /// let response = builder.send().await?;
1877    /// # gax::Result::<()>::Ok(()) });
1878    ///
1879    /// fn prepare_request_builder() -> CreateFramework {
1880    ///   # panic!();
1881    ///   // ... details omitted ...
1882    /// }
1883    /// ```
1884    #[derive(Clone, Debug)]
1885    pub struct CreateFramework(RequestBuilder<crate::model::CreateFrameworkRequest>);
1886
1887    impl CreateFramework {
1888        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
1889            Self(RequestBuilder::new(stub))
1890        }
1891
1892        /// Sets the full request, replacing any prior values.
1893        pub fn with_request<V: Into<crate::model::CreateFrameworkRequest>>(mut self, v: V) -> Self {
1894            self.0.request = v.into();
1895            self
1896        }
1897
1898        /// Sets all the options, replacing any prior values.
1899        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1900            self.0.options = v.into();
1901            self
1902        }
1903
1904        /// Sends the request.
1905        pub async fn send(self) -> Result<crate::model::Framework> {
1906            (*self.0.stub)
1907                .create_framework(self.0.request, self.0.options)
1908                .await
1909                .map(gax::response::Response::into_body)
1910        }
1911
1912        /// Sets the value of [parent][crate::model::CreateFrameworkRequest::parent].
1913        ///
1914        /// This is a **required** field for requests.
1915        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1916            self.0.request.parent = v.into();
1917            self
1918        }
1919
1920        /// Sets the value of [framework_id][crate::model::CreateFrameworkRequest::framework_id].
1921        ///
1922        /// This is a **required** field for requests.
1923        pub fn set_framework_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1924            self.0.request.framework_id = v.into();
1925            self
1926        }
1927
1928        /// Sets the value of [framework][crate::model::CreateFrameworkRequest::framework].
1929        ///
1930        /// This is a **required** field for requests.
1931        pub fn set_framework<T>(mut self, v: T) -> Self
1932        where
1933            T: std::convert::Into<crate::model::Framework>,
1934        {
1935            self.0.request.framework = std::option::Option::Some(v.into());
1936            self
1937        }
1938
1939        /// Sets or clears the value of [framework][crate::model::CreateFrameworkRequest::framework].
1940        ///
1941        /// This is a **required** field for requests.
1942        pub fn set_or_clear_framework<T>(mut self, v: std::option::Option<T>) -> Self
1943        where
1944            T: std::convert::Into<crate::model::Framework>,
1945        {
1946            self.0.request.framework = v.map(|x| x.into());
1947            self
1948        }
1949    }
1950
1951    #[doc(hidden)]
1952    impl gax::options::internal::RequestBuilder for CreateFramework {
1953        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1954            &mut self.0.options
1955        }
1956    }
1957
1958    /// The request builder for [Config::update_framework][crate::client::Config::update_framework] calls.
1959    ///
1960    /// # Example
1961    /// ```no_run
1962    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
1963    /// use builder::config::UpdateFramework;
1964    /// # tokio_test::block_on(async {
1965    ///
1966    /// let builder = prepare_request_builder();
1967    /// let response = builder.send().await?;
1968    /// # gax::Result::<()>::Ok(()) });
1969    ///
1970    /// fn prepare_request_builder() -> UpdateFramework {
1971    ///   # panic!();
1972    ///   // ... details omitted ...
1973    /// }
1974    /// ```
1975    #[derive(Clone, Debug)]
1976    pub struct UpdateFramework(RequestBuilder<crate::model::UpdateFrameworkRequest>);
1977
1978    impl UpdateFramework {
1979        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
1980            Self(RequestBuilder::new(stub))
1981        }
1982
1983        /// Sets the full request, replacing any prior values.
1984        pub fn with_request<V: Into<crate::model::UpdateFrameworkRequest>>(mut self, v: V) -> Self {
1985            self.0.request = v.into();
1986            self
1987        }
1988
1989        /// Sets all the options, replacing any prior values.
1990        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1991            self.0.options = v.into();
1992            self
1993        }
1994
1995        /// Sends the request.
1996        pub async fn send(self) -> Result<crate::model::Framework> {
1997            (*self.0.stub)
1998                .update_framework(self.0.request, self.0.options)
1999                .await
2000                .map(gax::response::Response::into_body)
2001        }
2002
2003        /// Sets the value of [update_mask][crate::model::UpdateFrameworkRequest::update_mask].
2004        pub fn set_update_mask<T>(mut self, v: T) -> Self
2005        where
2006            T: std::convert::Into<wkt::FieldMask>,
2007        {
2008            self.0.request.update_mask = std::option::Option::Some(v.into());
2009            self
2010        }
2011
2012        /// Sets or clears the value of [update_mask][crate::model::UpdateFrameworkRequest::update_mask].
2013        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2014        where
2015            T: std::convert::Into<wkt::FieldMask>,
2016        {
2017            self.0.request.update_mask = v.map(|x| x.into());
2018            self
2019        }
2020
2021        /// Sets the value of [framework][crate::model::UpdateFrameworkRequest::framework].
2022        ///
2023        /// This is a **required** field for requests.
2024        pub fn set_framework<T>(mut self, v: T) -> Self
2025        where
2026            T: std::convert::Into<crate::model::Framework>,
2027        {
2028            self.0.request.framework = std::option::Option::Some(v.into());
2029            self
2030        }
2031
2032        /// Sets or clears the value of [framework][crate::model::UpdateFrameworkRequest::framework].
2033        ///
2034        /// This is a **required** field for requests.
2035        pub fn set_or_clear_framework<T>(mut self, v: std::option::Option<T>) -> Self
2036        where
2037            T: std::convert::Into<crate::model::Framework>,
2038        {
2039            self.0.request.framework = v.map(|x| x.into());
2040            self
2041        }
2042
2043        /// Sets the value of [major_revision_id][crate::model::UpdateFrameworkRequest::major_revision_id].
2044        pub fn set_major_revision_id<T: Into<i64>>(mut self, v: T) -> Self {
2045            self.0.request.major_revision_id = v.into();
2046            self
2047        }
2048    }
2049
2050    #[doc(hidden)]
2051    impl gax::options::internal::RequestBuilder for UpdateFramework {
2052        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2053            &mut self.0.options
2054        }
2055    }
2056
2057    /// The request builder for [Config::delete_framework][crate::client::Config::delete_framework] calls.
2058    ///
2059    /// # Example
2060    /// ```no_run
2061    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
2062    /// use builder::config::DeleteFramework;
2063    /// # tokio_test::block_on(async {
2064    ///
2065    /// let builder = prepare_request_builder();
2066    /// let response = builder.send().await?;
2067    /// # gax::Result::<()>::Ok(()) });
2068    ///
2069    /// fn prepare_request_builder() -> DeleteFramework {
2070    ///   # panic!();
2071    ///   // ... details omitted ...
2072    /// }
2073    /// ```
2074    #[derive(Clone, Debug)]
2075    pub struct DeleteFramework(RequestBuilder<crate::model::DeleteFrameworkRequest>);
2076
2077    impl DeleteFramework {
2078        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
2079            Self(RequestBuilder::new(stub))
2080        }
2081
2082        /// Sets the full request, replacing any prior values.
2083        pub fn with_request<V: Into<crate::model::DeleteFrameworkRequest>>(mut self, v: V) -> Self {
2084            self.0.request = v.into();
2085            self
2086        }
2087
2088        /// Sets all the options, replacing any prior values.
2089        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2090            self.0.options = v.into();
2091            self
2092        }
2093
2094        /// Sends the request.
2095        pub async fn send(self) -> Result<()> {
2096            (*self.0.stub)
2097                .delete_framework(self.0.request, self.0.options)
2098                .await
2099                .map(gax::response::Response::into_body)
2100        }
2101
2102        /// Sets the value of [name][crate::model::DeleteFrameworkRequest::name].
2103        ///
2104        /// This is a **required** field for requests.
2105        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2106            self.0.request.name = v.into();
2107            self
2108        }
2109    }
2110
2111    #[doc(hidden)]
2112    impl gax::options::internal::RequestBuilder for DeleteFramework {
2113        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2114            &mut self.0.options
2115        }
2116    }
2117
2118    /// The request builder for [Config::list_cloud_controls][crate::client::Config::list_cloud_controls] calls.
2119    ///
2120    /// # Example
2121    /// ```no_run
2122    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
2123    /// use builder::config::ListCloudControls;
2124    /// # tokio_test::block_on(async {
2125    /// use gax::paginator::ItemPaginator;
2126    ///
2127    /// let builder = prepare_request_builder();
2128    /// let mut items = builder.by_item();
2129    /// while let Some(result) = items.next().await {
2130    ///   let item = result?;
2131    /// }
2132    /// # gax::Result::<()>::Ok(()) });
2133    ///
2134    /// fn prepare_request_builder() -> ListCloudControls {
2135    ///   # panic!();
2136    ///   // ... details omitted ...
2137    /// }
2138    /// ```
2139    #[derive(Clone, Debug)]
2140    pub struct ListCloudControls(RequestBuilder<crate::model::ListCloudControlsRequest>);
2141
2142    impl ListCloudControls {
2143        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
2144            Self(RequestBuilder::new(stub))
2145        }
2146
2147        /// Sets the full request, replacing any prior values.
2148        pub fn with_request<V: Into<crate::model::ListCloudControlsRequest>>(
2149            mut self,
2150            v: V,
2151        ) -> Self {
2152            self.0.request = v.into();
2153            self
2154        }
2155
2156        /// Sets all the options, replacing any prior values.
2157        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2158            self.0.options = v.into();
2159            self
2160        }
2161
2162        /// Sends the request.
2163        pub async fn send(self) -> Result<crate::model::ListCloudControlsResponse> {
2164            (*self.0.stub)
2165                .list_cloud_controls(self.0.request, self.0.options)
2166                .await
2167                .map(gax::response::Response::into_body)
2168        }
2169
2170        /// Streams each page in the collection.
2171        pub fn by_page(
2172            self,
2173        ) -> impl gax::paginator::Paginator<crate::model::ListCloudControlsResponse, gax::error::Error>
2174        {
2175            use std::clone::Clone;
2176            let token = self.0.request.page_token.clone();
2177            let execute = move |token: String| {
2178                let mut builder = self.clone();
2179                builder.0.request = builder.0.request.set_page_token(token);
2180                builder.send()
2181            };
2182            gax::paginator::internal::new_paginator(token, execute)
2183        }
2184
2185        /// Streams each item in the collection.
2186        pub fn by_item(
2187            self,
2188        ) -> impl gax::paginator::ItemPaginator<crate::model::ListCloudControlsResponse, gax::error::Error>
2189        {
2190            use gax::paginator::Paginator;
2191            self.by_page().items()
2192        }
2193
2194        /// Sets the value of [parent][crate::model::ListCloudControlsRequest::parent].
2195        ///
2196        /// This is a **required** field for requests.
2197        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2198            self.0.request.parent = v.into();
2199            self
2200        }
2201
2202        /// Sets the value of [page_size][crate::model::ListCloudControlsRequest::page_size].
2203        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2204            self.0.request.page_size = v.into();
2205            self
2206        }
2207
2208        /// Sets the value of [page_token][crate::model::ListCloudControlsRequest::page_token].
2209        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2210            self.0.request.page_token = v.into();
2211            self
2212        }
2213    }
2214
2215    #[doc(hidden)]
2216    impl gax::options::internal::RequestBuilder for ListCloudControls {
2217        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2218            &mut self.0.options
2219        }
2220    }
2221
2222    /// The request builder for [Config::get_cloud_control][crate::client::Config::get_cloud_control] calls.
2223    ///
2224    /// # Example
2225    /// ```no_run
2226    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
2227    /// use builder::config::GetCloudControl;
2228    /// # tokio_test::block_on(async {
2229    ///
2230    /// let builder = prepare_request_builder();
2231    /// let response = builder.send().await?;
2232    /// # gax::Result::<()>::Ok(()) });
2233    ///
2234    /// fn prepare_request_builder() -> GetCloudControl {
2235    ///   # panic!();
2236    ///   // ... details omitted ...
2237    /// }
2238    /// ```
2239    #[derive(Clone, Debug)]
2240    pub struct GetCloudControl(RequestBuilder<crate::model::GetCloudControlRequest>);
2241
2242    impl GetCloudControl {
2243        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
2244            Self(RequestBuilder::new(stub))
2245        }
2246
2247        /// Sets the full request, replacing any prior values.
2248        pub fn with_request<V: Into<crate::model::GetCloudControlRequest>>(mut self, v: V) -> Self {
2249            self.0.request = v.into();
2250            self
2251        }
2252
2253        /// Sets all the options, replacing any prior values.
2254        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2255            self.0.options = v.into();
2256            self
2257        }
2258
2259        /// Sends the request.
2260        pub async fn send(self) -> Result<crate::model::CloudControl> {
2261            (*self.0.stub)
2262                .get_cloud_control(self.0.request, self.0.options)
2263                .await
2264                .map(gax::response::Response::into_body)
2265        }
2266
2267        /// Sets the value of [name][crate::model::GetCloudControlRequest::name].
2268        ///
2269        /// This is a **required** field for requests.
2270        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2271            self.0.request.name = v.into();
2272            self
2273        }
2274
2275        /// Sets the value of [major_revision_id][crate::model::GetCloudControlRequest::major_revision_id].
2276        pub fn set_major_revision_id<T: Into<i64>>(mut self, v: T) -> Self {
2277            self.0.request.major_revision_id = v.into();
2278            self
2279        }
2280    }
2281
2282    #[doc(hidden)]
2283    impl gax::options::internal::RequestBuilder for GetCloudControl {
2284        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2285            &mut self.0.options
2286        }
2287    }
2288
2289    /// The request builder for [Config::create_cloud_control][crate::client::Config::create_cloud_control] calls.
2290    ///
2291    /// # Example
2292    /// ```no_run
2293    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
2294    /// use builder::config::CreateCloudControl;
2295    /// # tokio_test::block_on(async {
2296    ///
2297    /// let builder = prepare_request_builder();
2298    /// let response = builder.send().await?;
2299    /// # gax::Result::<()>::Ok(()) });
2300    ///
2301    /// fn prepare_request_builder() -> CreateCloudControl {
2302    ///   # panic!();
2303    ///   // ... details omitted ...
2304    /// }
2305    /// ```
2306    #[derive(Clone, Debug)]
2307    pub struct CreateCloudControl(RequestBuilder<crate::model::CreateCloudControlRequest>);
2308
2309    impl CreateCloudControl {
2310        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
2311            Self(RequestBuilder::new(stub))
2312        }
2313
2314        /// Sets the full request, replacing any prior values.
2315        pub fn with_request<V: Into<crate::model::CreateCloudControlRequest>>(
2316            mut self,
2317            v: V,
2318        ) -> Self {
2319            self.0.request = v.into();
2320            self
2321        }
2322
2323        /// Sets all the options, replacing any prior values.
2324        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2325            self.0.options = v.into();
2326            self
2327        }
2328
2329        /// Sends the request.
2330        pub async fn send(self) -> Result<crate::model::CloudControl> {
2331            (*self.0.stub)
2332                .create_cloud_control(self.0.request, self.0.options)
2333                .await
2334                .map(gax::response::Response::into_body)
2335        }
2336
2337        /// Sets the value of [parent][crate::model::CreateCloudControlRequest::parent].
2338        ///
2339        /// This is a **required** field for requests.
2340        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2341            self.0.request.parent = v.into();
2342            self
2343        }
2344
2345        /// Sets the value of [cloud_control_id][crate::model::CreateCloudControlRequest::cloud_control_id].
2346        ///
2347        /// This is a **required** field for requests.
2348        pub fn set_cloud_control_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2349            self.0.request.cloud_control_id = v.into();
2350            self
2351        }
2352
2353        /// Sets the value of [cloud_control][crate::model::CreateCloudControlRequest::cloud_control].
2354        ///
2355        /// This is a **required** field for requests.
2356        pub fn set_cloud_control<T>(mut self, v: T) -> Self
2357        where
2358            T: std::convert::Into<crate::model::CloudControl>,
2359        {
2360            self.0.request.cloud_control = std::option::Option::Some(v.into());
2361            self
2362        }
2363
2364        /// Sets or clears the value of [cloud_control][crate::model::CreateCloudControlRequest::cloud_control].
2365        ///
2366        /// This is a **required** field for requests.
2367        pub fn set_or_clear_cloud_control<T>(mut self, v: std::option::Option<T>) -> Self
2368        where
2369            T: std::convert::Into<crate::model::CloudControl>,
2370        {
2371            self.0.request.cloud_control = v.map(|x| x.into());
2372            self
2373        }
2374    }
2375
2376    #[doc(hidden)]
2377    impl gax::options::internal::RequestBuilder for CreateCloudControl {
2378        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2379            &mut self.0.options
2380        }
2381    }
2382
2383    /// The request builder for [Config::update_cloud_control][crate::client::Config::update_cloud_control] calls.
2384    ///
2385    /// # Example
2386    /// ```no_run
2387    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
2388    /// use builder::config::UpdateCloudControl;
2389    /// # tokio_test::block_on(async {
2390    ///
2391    /// let builder = prepare_request_builder();
2392    /// let response = builder.send().await?;
2393    /// # gax::Result::<()>::Ok(()) });
2394    ///
2395    /// fn prepare_request_builder() -> UpdateCloudControl {
2396    ///   # panic!();
2397    ///   // ... details omitted ...
2398    /// }
2399    /// ```
2400    #[derive(Clone, Debug)]
2401    pub struct UpdateCloudControl(RequestBuilder<crate::model::UpdateCloudControlRequest>);
2402
2403    impl UpdateCloudControl {
2404        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
2405            Self(RequestBuilder::new(stub))
2406        }
2407
2408        /// Sets the full request, replacing any prior values.
2409        pub fn with_request<V: Into<crate::model::UpdateCloudControlRequest>>(
2410            mut self,
2411            v: V,
2412        ) -> Self {
2413            self.0.request = v.into();
2414            self
2415        }
2416
2417        /// Sets all the options, replacing any prior values.
2418        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2419            self.0.options = v.into();
2420            self
2421        }
2422
2423        /// Sends the request.
2424        pub async fn send(self) -> Result<crate::model::CloudControl> {
2425            (*self.0.stub)
2426                .update_cloud_control(self.0.request, self.0.options)
2427                .await
2428                .map(gax::response::Response::into_body)
2429        }
2430
2431        /// Sets the value of [update_mask][crate::model::UpdateCloudControlRequest::update_mask].
2432        pub fn set_update_mask<T>(mut self, v: T) -> Self
2433        where
2434            T: std::convert::Into<wkt::FieldMask>,
2435        {
2436            self.0.request.update_mask = std::option::Option::Some(v.into());
2437            self
2438        }
2439
2440        /// Sets or clears the value of [update_mask][crate::model::UpdateCloudControlRequest::update_mask].
2441        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2442        where
2443            T: std::convert::Into<wkt::FieldMask>,
2444        {
2445            self.0.request.update_mask = v.map(|x| x.into());
2446            self
2447        }
2448
2449        /// Sets the value of [cloud_control][crate::model::UpdateCloudControlRequest::cloud_control].
2450        ///
2451        /// This is a **required** field for requests.
2452        pub fn set_cloud_control<T>(mut self, v: T) -> Self
2453        where
2454            T: std::convert::Into<crate::model::CloudControl>,
2455        {
2456            self.0.request.cloud_control = std::option::Option::Some(v.into());
2457            self
2458        }
2459
2460        /// Sets or clears the value of [cloud_control][crate::model::UpdateCloudControlRequest::cloud_control].
2461        ///
2462        /// This is a **required** field for requests.
2463        pub fn set_or_clear_cloud_control<T>(mut self, v: std::option::Option<T>) -> Self
2464        where
2465            T: std::convert::Into<crate::model::CloudControl>,
2466        {
2467            self.0.request.cloud_control = v.map(|x| x.into());
2468            self
2469        }
2470    }
2471
2472    #[doc(hidden)]
2473    impl gax::options::internal::RequestBuilder for UpdateCloudControl {
2474        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2475            &mut self.0.options
2476        }
2477    }
2478
2479    /// The request builder for [Config::delete_cloud_control][crate::client::Config::delete_cloud_control] calls.
2480    ///
2481    /// # Example
2482    /// ```no_run
2483    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
2484    /// use builder::config::DeleteCloudControl;
2485    /// # tokio_test::block_on(async {
2486    ///
2487    /// let builder = prepare_request_builder();
2488    /// let response = builder.send().await?;
2489    /// # gax::Result::<()>::Ok(()) });
2490    ///
2491    /// fn prepare_request_builder() -> DeleteCloudControl {
2492    ///   # panic!();
2493    ///   // ... details omitted ...
2494    /// }
2495    /// ```
2496    #[derive(Clone, Debug)]
2497    pub struct DeleteCloudControl(RequestBuilder<crate::model::DeleteCloudControlRequest>);
2498
2499    impl DeleteCloudControl {
2500        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
2501            Self(RequestBuilder::new(stub))
2502        }
2503
2504        /// Sets the full request, replacing any prior values.
2505        pub fn with_request<V: Into<crate::model::DeleteCloudControlRequest>>(
2506            mut self,
2507            v: V,
2508        ) -> Self {
2509            self.0.request = v.into();
2510            self
2511        }
2512
2513        /// Sets all the options, replacing any prior values.
2514        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2515            self.0.options = v.into();
2516            self
2517        }
2518
2519        /// Sends the request.
2520        pub async fn send(self) -> Result<()> {
2521            (*self.0.stub)
2522                .delete_cloud_control(self.0.request, self.0.options)
2523                .await
2524                .map(gax::response::Response::into_body)
2525        }
2526
2527        /// Sets the value of [name][crate::model::DeleteCloudControlRequest::name].
2528        ///
2529        /// This is a **required** field for requests.
2530        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2531            self.0.request.name = v.into();
2532            self
2533        }
2534    }
2535
2536    #[doc(hidden)]
2537    impl gax::options::internal::RequestBuilder for DeleteCloudControl {
2538        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2539            &mut self.0.options
2540        }
2541    }
2542
2543    /// The request builder for [Config::list_locations][crate::client::Config::list_locations] calls.
2544    ///
2545    /// # Example
2546    /// ```no_run
2547    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
2548    /// use builder::config::ListLocations;
2549    /// # tokio_test::block_on(async {
2550    /// use gax::paginator::ItemPaginator;
2551    ///
2552    /// let builder = prepare_request_builder();
2553    /// let mut items = builder.by_item();
2554    /// while let Some(result) = items.next().await {
2555    ///   let item = result?;
2556    /// }
2557    /// # gax::Result::<()>::Ok(()) });
2558    ///
2559    /// fn prepare_request_builder() -> ListLocations {
2560    ///   # panic!();
2561    ///   // ... details omitted ...
2562    /// }
2563    /// ```
2564    #[derive(Clone, Debug)]
2565    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
2566
2567    impl ListLocations {
2568        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
2569            Self(RequestBuilder::new(stub))
2570        }
2571
2572        /// Sets the full request, replacing any prior values.
2573        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
2574            mut self,
2575            v: V,
2576        ) -> Self {
2577            self.0.request = v.into();
2578            self
2579        }
2580
2581        /// Sets all the options, replacing any prior values.
2582        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2583            self.0.options = v.into();
2584            self
2585        }
2586
2587        /// Sends the request.
2588        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
2589            (*self.0.stub)
2590                .list_locations(self.0.request, self.0.options)
2591                .await
2592                .map(gax::response::Response::into_body)
2593        }
2594
2595        /// Streams each page in the collection.
2596        pub fn by_page(
2597            self,
2598        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
2599        {
2600            use std::clone::Clone;
2601            let token = self.0.request.page_token.clone();
2602            let execute = move |token: String| {
2603                let mut builder = self.clone();
2604                builder.0.request = builder.0.request.set_page_token(token);
2605                builder.send()
2606            };
2607            gax::paginator::internal::new_paginator(token, execute)
2608        }
2609
2610        /// Streams each item in the collection.
2611        pub fn by_item(
2612            self,
2613        ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
2614        {
2615            use gax::paginator::Paginator;
2616            self.by_page().items()
2617        }
2618
2619        /// Sets the value of [name][location::model::ListLocationsRequest::name].
2620        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2621            self.0.request.name = v.into();
2622            self
2623        }
2624
2625        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
2626        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2627            self.0.request.filter = v.into();
2628            self
2629        }
2630
2631        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
2632        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2633            self.0.request.page_size = v.into();
2634            self
2635        }
2636
2637        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
2638        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2639            self.0.request.page_token = v.into();
2640            self
2641        }
2642    }
2643
2644    #[doc(hidden)]
2645    impl gax::options::internal::RequestBuilder for ListLocations {
2646        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2647            &mut self.0.options
2648        }
2649    }
2650
2651    /// The request builder for [Config::get_location][crate::client::Config::get_location] calls.
2652    ///
2653    /// # Example
2654    /// ```no_run
2655    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
2656    /// use builder::config::GetLocation;
2657    /// # tokio_test::block_on(async {
2658    ///
2659    /// let builder = prepare_request_builder();
2660    /// let response = builder.send().await?;
2661    /// # gax::Result::<()>::Ok(()) });
2662    ///
2663    /// fn prepare_request_builder() -> GetLocation {
2664    ///   # panic!();
2665    ///   // ... details omitted ...
2666    /// }
2667    /// ```
2668    #[derive(Clone, Debug)]
2669    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
2670
2671    impl GetLocation {
2672        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
2673            Self(RequestBuilder::new(stub))
2674        }
2675
2676        /// Sets the full request, replacing any prior values.
2677        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
2678            self.0.request = v.into();
2679            self
2680        }
2681
2682        /// Sets all the options, replacing any prior values.
2683        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2684            self.0.options = v.into();
2685            self
2686        }
2687
2688        /// Sends the request.
2689        pub async fn send(self) -> Result<location::model::Location> {
2690            (*self.0.stub)
2691                .get_location(self.0.request, self.0.options)
2692                .await
2693                .map(gax::response::Response::into_body)
2694        }
2695
2696        /// Sets the value of [name][location::model::GetLocationRequest::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
2703    #[doc(hidden)]
2704    impl gax::options::internal::RequestBuilder for GetLocation {
2705        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2706            &mut self.0.options
2707        }
2708    }
2709
2710    /// The request builder for [Config::list_operations][crate::client::Config::list_operations] calls.
2711    ///
2712    /// # Example
2713    /// ```no_run
2714    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
2715    /// use builder::config::ListOperations;
2716    /// # tokio_test::block_on(async {
2717    /// use gax::paginator::ItemPaginator;
2718    ///
2719    /// let builder = prepare_request_builder();
2720    /// let mut items = builder.by_item();
2721    /// while let Some(result) = items.next().await {
2722    ///   let item = result?;
2723    /// }
2724    /// # gax::Result::<()>::Ok(()) });
2725    ///
2726    /// fn prepare_request_builder() -> ListOperations {
2727    ///   # panic!();
2728    ///   // ... details omitted ...
2729    /// }
2730    /// ```
2731    #[derive(Clone, Debug)]
2732    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
2733
2734    impl ListOperations {
2735        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
2736            Self(RequestBuilder::new(stub))
2737        }
2738
2739        /// Sets the full request, replacing any prior values.
2740        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
2741            mut self,
2742            v: V,
2743        ) -> Self {
2744            self.0.request = v.into();
2745            self
2746        }
2747
2748        /// Sets all the options, replacing any prior values.
2749        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2750            self.0.options = v.into();
2751            self
2752        }
2753
2754        /// Sends the request.
2755        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
2756            (*self.0.stub)
2757                .list_operations(self.0.request, self.0.options)
2758                .await
2759                .map(gax::response::Response::into_body)
2760        }
2761
2762        /// Streams each page in the collection.
2763        pub fn by_page(
2764            self,
2765        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
2766        {
2767            use std::clone::Clone;
2768            let token = self.0.request.page_token.clone();
2769            let execute = move |token: String| {
2770                let mut builder = self.clone();
2771                builder.0.request = builder.0.request.set_page_token(token);
2772                builder.send()
2773            };
2774            gax::paginator::internal::new_paginator(token, execute)
2775        }
2776
2777        /// Streams each item in the collection.
2778        pub fn by_item(
2779            self,
2780        ) -> impl gax::paginator::ItemPaginator<
2781            longrunning::model::ListOperationsResponse,
2782            gax::error::Error,
2783        > {
2784            use gax::paginator::Paginator;
2785            self.by_page().items()
2786        }
2787
2788        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
2789        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2790            self.0.request.name = v.into();
2791            self
2792        }
2793
2794        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
2795        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2796            self.0.request.filter = v.into();
2797            self
2798        }
2799
2800        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
2801        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2802            self.0.request.page_size = v.into();
2803            self
2804        }
2805
2806        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
2807        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2808            self.0.request.page_token = v.into();
2809            self
2810        }
2811
2812        /// Sets the value of [return_partial_success][longrunning::model::ListOperationsRequest::return_partial_success].
2813        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
2814            self.0.request.return_partial_success = v.into();
2815            self
2816        }
2817    }
2818
2819    #[doc(hidden)]
2820    impl gax::options::internal::RequestBuilder for ListOperations {
2821        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2822            &mut self.0.options
2823        }
2824    }
2825
2826    /// The request builder for [Config::get_operation][crate::client::Config::get_operation] calls.
2827    ///
2828    /// # Example
2829    /// ```no_run
2830    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
2831    /// use builder::config::GetOperation;
2832    /// # tokio_test::block_on(async {
2833    ///
2834    /// let builder = prepare_request_builder();
2835    /// let response = builder.send().await?;
2836    /// # gax::Result::<()>::Ok(()) });
2837    ///
2838    /// fn prepare_request_builder() -> GetOperation {
2839    ///   # panic!();
2840    ///   // ... details omitted ...
2841    /// }
2842    /// ```
2843    #[derive(Clone, Debug)]
2844    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
2845
2846    impl GetOperation {
2847        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
2848            Self(RequestBuilder::new(stub))
2849        }
2850
2851        /// Sets the full request, replacing any prior values.
2852        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
2853            mut self,
2854            v: V,
2855        ) -> Self {
2856            self.0.request = v.into();
2857            self
2858        }
2859
2860        /// Sets all the options, replacing any prior values.
2861        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2862            self.0.options = v.into();
2863            self
2864        }
2865
2866        /// Sends the request.
2867        pub async fn send(self) -> Result<longrunning::model::Operation> {
2868            (*self.0.stub)
2869                .get_operation(self.0.request, self.0.options)
2870                .await
2871                .map(gax::response::Response::into_body)
2872        }
2873
2874        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
2875        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2876            self.0.request.name = v.into();
2877            self
2878        }
2879    }
2880
2881    #[doc(hidden)]
2882    impl gax::options::internal::RequestBuilder for GetOperation {
2883        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2884            &mut self.0.options
2885        }
2886    }
2887
2888    /// The request builder for [Config::delete_operation][crate::client::Config::delete_operation] calls.
2889    ///
2890    /// # Example
2891    /// ```no_run
2892    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
2893    /// use builder::config::DeleteOperation;
2894    /// # tokio_test::block_on(async {
2895    ///
2896    /// let builder = prepare_request_builder();
2897    /// let response = builder.send().await?;
2898    /// # gax::Result::<()>::Ok(()) });
2899    ///
2900    /// fn prepare_request_builder() -> DeleteOperation {
2901    ///   # panic!();
2902    ///   // ... details omitted ...
2903    /// }
2904    /// ```
2905    #[derive(Clone, Debug)]
2906    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
2907
2908    impl DeleteOperation {
2909        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
2910            Self(RequestBuilder::new(stub))
2911        }
2912
2913        /// Sets the full request, replacing any prior values.
2914        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
2915            mut self,
2916            v: V,
2917        ) -> Self {
2918            self.0.request = v.into();
2919            self
2920        }
2921
2922        /// Sets all the options, replacing any prior values.
2923        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2924            self.0.options = v.into();
2925            self
2926        }
2927
2928        /// Sends the request.
2929        pub async fn send(self) -> Result<()> {
2930            (*self.0.stub)
2931                .delete_operation(self.0.request, self.0.options)
2932                .await
2933                .map(gax::response::Response::into_body)
2934        }
2935
2936        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
2937        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2938            self.0.request.name = v.into();
2939            self
2940        }
2941    }
2942
2943    #[doc(hidden)]
2944    impl gax::options::internal::RequestBuilder for DeleteOperation {
2945        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2946            &mut self.0.options
2947        }
2948    }
2949
2950    /// The request builder for [Config::cancel_operation][crate::client::Config::cancel_operation] calls.
2951    ///
2952    /// # Example
2953    /// ```no_run
2954    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
2955    /// use builder::config::CancelOperation;
2956    /// # tokio_test::block_on(async {
2957    ///
2958    /// let builder = prepare_request_builder();
2959    /// let response = builder.send().await?;
2960    /// # gax::Result::<()>::Ok(()) });
2961    ///
2962    /// fn prepare_request_builder() -> CancelOperation {
2963    ///   # panic!();
2964    ///   // ... details omitted ...
2965    /// }
2966    /// ```
2967    #[derive(Clone, Debug)]
2968    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
2969
2970    impl CancelOperation {
2971        pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Config>) -> Self {
2972            Self(RequestBuilder::new(stub))
2973        }
2974
2975        /// Sets the full request, replacing any prior values.
2976        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
2977            mut self,
2978            v: V,
2979        ) -> Self {
2980            self.0.request = v.into();
2981            self
2982        }
2983
2984        /// Sets all the options, replacing any prior values.
2985        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2986            self.0.options = v.into();
2987            self
2988        }
2989
2990        /// Sends the request.
2991        pub async fn send(self) -> Result<()> {
2992            (*self.0.stub)
2993                .cancel_operation(self.0.request, self.0.options)
2994                .await
2995                .map(gax::response::Response::into_body)
2996        }
2997
2998        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
2999        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3000            self.0.request.name = v.into();
3001            self
3002        }
3003    }
3004
3005    #[doc(hidden)]
3006    impl gax::options::internal::RequestBuilder for CancelOperation {
3007        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3008            &mut self.0.options
3009        }
3010    }
3011}
3012
3013pub mod deployment {
3014    use crate::Result;
3015
3016    /// A builder for [Deployment][crate::client::Deployment].
3017    ///
3018    /// ```
3019    /// # tokio_test::block_on(async {
3020    /// # use google_cloud_cloudsecuritycompliance_v1::*;
3021    /// # use builder::deployment::ClientBuilder;
3022    /// # use client::Deployment;
3023    /// let builder : ClientBuilder = Deployment::builder();
3024    /// let client = builder
3025    ///     .with_endpoint("https://cloudsecuritycompliance.googleapis.com")
3026    ///     .build().await?;
3027    /// # gax::client_builder::Result::<()>::Ok(()) });
3028    /// ```
3029    pub type ClientBuilder =
3030        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
3031
3032    pub(crate) mod client {
3033        use super::super::super::client::Deployment;
3034        pub struct Factory;
3035        impl gax::client_builder::internal::ClientFactory for Factory {
3036            type Client = Deployment;
3037            type Credentials = gaxi::options::Credentials;
3038            async fn build(
3039                self,
3040                config: gaxi::options::ClientConfig,
3041            ) -> gax::client_builder::Result<Self::Client> {
3042                Self::Client::new(config).await
3043            }
3044        }
3045    }
3046
3047    /// Common implementation for [crate::client::Deployment] request builders.
3048    #[derive(Clone, Debug)]
3049    pub(crate) struct RequestBuilder<R: std::default::Default> {
3050        stub: std::sync::Arc<dyn super::super::stub::dynamic::Deployment>,
3051        request: R,
3052        options: gax::options::RequestOptions,
3053    }
3054
3055    impl<R> RequestBuilder<R>
3056    where
3057        R: std::default::Default,
3058    {
3059        pub(crate) fn new(
3060            stub: std::sync::Arc<dyn super::super::stub::dynamic::Deployment>,
3061        ) -> Self {
3062            Self {
3063                stub,
3064                request: R::default(),
3065                options: gax::options::RequestOptions::default(),
3066            }
3067        }
3068    }
3069
3070    /// The request builder for [Deployment::create_framework_deployment][crate::client::Deployment::create_framework_deployment] calls.
3071    ///
3072    /// # Example
3073    /// ```no_run
3074    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
3075    /// use builder::deployment::CreateFrameworkDeployment;
3076    /// # tokio_test::block_on(async {
3077    /// use lro::Poller;
3078    ///
3079    /// let builder = prepare_request_builder();
3080    /// let response = builder.poller().until_done().await?;
3081    /// # gax::Result::<()>::Ok(()) });
3082    ///
3083    /// fn prepare_request_builder() -> CreateFrameworkDeployment {
3084    ///   # panic!();
3085    ///   // ... details omitted ...
3086    /// }
3087    /// ```
3088    #[derive(Clone, Debug)]
3089    pub struct CreateFrameworkDeployment(
3090        RequestBuilder<crate::model::CreateFrameworkDeploymentRequest>,
3091    );
3092
3093    impl CreateFrameworkDeployment {
3094        pub(crate) fn new(
3095            stub: std::sync::Arc<dyn super::super::stub::dynamic::Deployment>,
3096        ) -> Self {
3097            Self(RequestBuilder::new(stub))
3098        }
3099
3100        /// Sets the full request, replacing any prior values.
3101        pub fn with_request<V: Into<crate::model::CreateFrameworkDeploymentRequest>>(
3102            mut self,
3103            v: V,
3104        ) -> Self {
3105            self.0.request = v.into();
3106            self
3107        }
3108
3109        /// Sets all the options, replacing any prior values.
3110        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3111            self.0.options = v.into();
3112            self
3113        }
3114
3115        /// Sends the request.
3116        ///
3117        /// # Long running operations
3118        ///
3119        /// This starts, but does not poll, a longrunning operation. More information
3120        /// on [create_framework_deployment][crate::client::Deployment::create_framework_deployment].
3121        pub async fn send(self) -> Result<longrunning::model::Operation> {
3122            (*self.0.stub)
3123                .create_framework_deployment(self.0.request, self.0.options)
3124                .await
3125                .map(gax::response::Response::into_body)
3126        }
3127
3128        /// Creates a [Poller][lro::Poller] to work with `create_framework_deployment`.
3129        pub fn poller(
3130            self,
3131        ) -> impl lro::Poller<crate::model::FrameworkDeployment, crate::model::OperationMetadata>
3132        {
3133            type Operation = lro::internal::Operation<
3134                crate::model::FrameworkDeployment,
3135                crate::model::OperationMetadata,
3136            >;
3137            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3138            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3139
3140            let stub = self.0.stub.clone();
3141            let mut options = self.0.options.clone();
3142            options.set_retry_policy(gax::retry_policy::NeverRetry);
3143            let query = move |name| {
3144                let stub = stub.clone();
3145                let options = options.clone();
3146                async {
3147                    let op = GetOperation::new(stub)
3148                        .set_name(name)
3149                        .with_options(options)
3150                        .send()
3151                        .await?;
3152                    Ok(Operation::new(op))
3153                }
3154            };
3155
3156            let start = move || async {
3157                let op = self.send().await?;
3158                Ok(Operation::new(op))
3159            };
3160
3161            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3162        }
3163
3164        /// Sets the value of [parent][crate::model::CreateFrameworkDeploymentRequest::parent].
3165        ///
3166        /// This is a **required** field for requests.
3167        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3168            self.0.request.parent = v.into();
3169            self
3170        }
3171
3172        /// Sets the value of [framework_deployment_id][crate::model::CreateFrameworkDeploymentRequest::framework_deployment_id].
3173        pub fn set_framework_deployment_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3174            self.0.request.framework_deployment_id = v.into();
3175            self
3176        }
3177
3178        /// Sets the value of [framework_deployment][crate::model::CreateFrameworkDeploymentRequest::framework_deployment].
3179        ///
3180        /// This is a **required** field for requests.
3181        pub fn set_framework_deployment<T>(mut self, v: T) -> Self
3182        where
3183            T: std::convert::Into<crate::model::FrameworkDeployment>,
3184        {
3185            self.0.request.framework_deployment = std::option::Option::Some(v.into());
3186            self
3187        }
3188
3189        /// Sets or clears the value of [framework_deployment][crate::model::CreateFrameworkDeploymentRequest::framework_deployment].
3190        ///
3191        /// This is a **required** field for requests.
3192        pub fn set_or_clear_framework_deployment<T>(mut self, v: std::option::Option<T>) -> Self
3193        where
3194            T: std::convert::Into<crate::model::FrameworkDeployment>,
3195        {
3196            self.0.request.framework_deployment = v.map(|x| x.into());
3197            self
3198        }
3199    }
3200
3201    #[doc(hidden)]
3202    impl gax::options::internal::RequestBuilder for CreateFrameworkDeployment {
3203        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3204            &mut self.0.options
3205        }
3206    }
3207
3208    /// The request builder for [Deployment::delete_framework_deployment][crate::client::Deployment::delete_framework_deployment] calls.
3209    ///
3210    /// # Example
3211    /// ```no_run
3212    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
3213    /// use builder::deployment::DeleteFrameworkDeployment;
3214    /// # tokio_test::block_on(async {
3215    /// use lro::Poller;
3216    ///
3217    /// let builder = prepare_request_builder();
3218    /// let response = builder.poller().until_done().await?;
3219    /// # gax::Result::<()>::Ok(()) });
3220    ///
3221    /// fn prepare_request_builder() -> DeleteFrameworkDeployment {
3222    ///   # panic!();
3223    ///   // ... details omitted ...
3224    /// }
3225    /// ```
3226    #[derive(Clone, Debug)]
3227    pub struct DeleteFrameworkDeployment(
3228        RequestBuilder<crate::model::DeleteFrameworkDeploymentRequest>,
3229    );
3230
3231    impl DeleteFrameworkDeployment {
3232        pub(crate) fn new(
3233            stub: std::sync::Arc<dyn super::super::stub::dynamic::Deployment>,
3234        ) -> Self {
3235            Self(RequestBuilder::new(stub))
3236        }
3237
3238        /// Sets the full request, replacing any prior values.
3239        pub fn with_request<V: Into<crate::model::DeleteFrameworkDeploymentRequest>>(
3240            mut self,
3241            v: V,
3242        ) -> Self {
3243            self.0.request = v.into();
3244            self
3245        }
3246
3247        /// Sets all the options, replacing any prior values.
3248        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3249            self.0.options = v.into();
3250            self
3251        }
3252
3253        /// Sends the request.
3254        ///
3255        /// # Long running operations
3256        ///
3257        /// This starts, but does not poll, a longrunning operation. More information
3258        /// on [delete_framework_deployment][crate::client::Deployment::delete_framework_deployment].
3259        pub async fn send(self) -> Result<longrunning::model::Operation> {
3260            (*self.0.stub)
3261                .delete_framework_deployment(self.0.request, self.0.options)
3262                .await
3263                .map(gax::response::Response::into_body)
3264        }
3265
3266        /// Creates a [Poller][lro::Poller] to work with `delete_framework_deployment`.
3267        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
3268            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3269            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3270            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3271
3272            let stub = self.0.stub.clone();
3273            let mut options = self.0.options.clone();
3274            options.set_retry_policy(gax::retry_policy::NeverRetry);
3275            let query = move |name| {
3276                let stub = stub.clone();
3277                let options = options.clone();
3278                async {
3279                    let op = GetOperation::new(stub)
3280                        .set_name(name)
3281                        .with_options(options)
3282                        .send()
3283                        .await?;
3284                    Ok(Operation::new(op))
3285                }
3286            };
3287
3288            let start = move || async {
3289                let op = self.send().await?;
3290                Ok(Operation::new(op))
3291            };
3292
3293            lro::internal::new_unit_response_poller(
3294                polling_error_policy,
3295                polling_backoff_policy,
3296                start,
3297                query,
3298            )
3299        }
3300
3301        /// Sets the value of [name][crate::model::DeleteFrameworkDeploymentRequest::name].
3302        ///
3303        /// This is a **required** field for requests.
3304        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3305            self.0.request.name = v.into();
3306            self
3307        }
3308
3309        /// Sets the value of [etag][crate::model::DeleteFrameworkDeploymentRequest::etag].
3310        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
3311            self.0.request.etag = v.into();
3312            self
3313        }
3314    }
3315
3316    #[doc(hidden)]
3317    impl gax::options::internal::RequestBuilder for DeleteFrameworkDeployment {
3318        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3319            &mut self.0.options
3320        }
3321    }
3322
3323    /// The request builder for [Deployment::get_framework_deployment][crate::client::Deployment::get_framework_deployment] calls.
3324    ///
3325    /// # Example
3326    /// ```no_run
3327    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
3328    /// use builder::deployment::GetFrameworkDeployment;
3329    /// # tokio_test::block_on(async {
3330    ///
3331    /// let builder = prepare_request_builder();
3332    /// let response = builder.send().await?;
3333    /// # gax::Result::<()>::Ok(()) });
3334    ///
3335    /// fn prepare_request_builder() -> GetFrameworkDeployment {
3336    ///   # panic!();
3337    ///   // ... details omitted ...
3338    /// }
3339    /// ```
3340    #[derive(Clone, Debug)]
3341    pub struct GetFrameworkDeployment(RequestBuilder<crate::model::GetFrameworkDeploymentRequest>);
3342
3343    impl GetFrameworkDeployment {
3344        pub(crate) fn new(
3345            stub: std::sync::Arc<dyn super::super::stub::dynamic::Deployment>,
3346        ) -> Self {
3347            Self(RequestBuilder::new(stub))
3348        }
3349
3350        /// Sets the full request, replacing any prior values.
3351        pub fn with_request<V: Into<crate::model::GetFrameworkDeploymentRequest>>(
3352            mut self,
3353            v: V,
3354        ) -> Self {
3355            self.0.request = v.into();
3356            self
3357        }
3358
3359        /// Sets all the options, replacing any prior values.
3360        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3361            self.0.options = v.into();
3362            self
3363        }
3364
3365        /// Sends the request.
3366        pub async fn send(self) -> Result<crate::model::FrameworkDeployment> {
3367            (*self.0.stub)
3368                .get_framework_deployment(self.0.request, self.0.options)
3369                .await
3370                .map(gax::response::Response::into_body)
3371        }
3372
3373        /// Sets the value of [name][crate::model::GetFrameworkDeploymentRequest::name].
3374        ///
3375        /// This is a **required** field for requests.
3376        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3377            self.0.request.name = v.into();
3378            self
3379        }
3380    }
3381
3382    #[doc(hidden)]
3383    impl gax::options::internal::RequestBuilder for GetFrameworkDeployment {
3384        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3385            &mut self.0.options
3386        }
3387    }
3388
3389    /// The request builder for [Deployment::list_framework_deployments][crate::client::Deployment::list_framework_deployments] calls.
3390    ///
3391    /// # Example
3392    /// ```no_run
3393    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
3394    /// use builder::deployment::ListFrameworkDeployments;
3395    /// # tokio_test::block_on(async {
3396    /// use gax::paginator::ItemPaginator;
3397    ///
3398    /// let builder = prepare_request_builder();
3399    /// let mut items = builder.by_item();
3400    /// while let Some(result) = items.next().await {
3401    ///   let item = result?;
3402    /// }
3403    /// # gax::Result::<()>::Ok(()) });
3404    ///
3405    /// fn prepare_request_builder() -> ListFrameworkDeployments {
3406    ///   # panic!();
3407    ///   // ... details omitted ...
3408    /// }
3409    /// ```
3410    #[derive(Clone, Debug)]
3411    pub struct ListFrameworkDeployments(
3412        RequestBuilder<crate::model::ListFrameworkDeploymentsRequest>,
3413    );
3414
3415    impl ListFrameworkDeployments {
3416        pub(crate) fn new(
3417            stub: std::sync::Arc<dyn super::super::stub::dynamic::Deployment>,
3418        ) -> Self {
3419            Self(RequestBuilder::new(stub))
3420        }
3421
3422        /// Sets the full request, replacing any prior values.
3423        pub fn with_request<V: Into<crate::model::ListFrameworkDeploymentsRequest>>(
3424            mut self,
3425            v: V,
3426        ) -> Self {
3427            self.0.request = v.into();
3428            self
3429        }
3430
3431        /// Sets all the options, replacing any prior values.
3432        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3433            self.0.options = v.into();
3434            self
3435        }
3436
3437        /// Sends the request.
3438        pub async fn send(self) -> Result<crate::model::ListFrameworkDeploymentsResponse> {
3439            (*self.0.stub)
3440                .list_framework_deployments(self.0.request, self.0.options)
3441                .await
3442                .map(gax::response::Response::into_body)
3443        }
3444
3445        /// Streams each page in the collection.
3446        pub fn by_page(
3447            self,
3448        ) -> impl gax::paginator::Paginator<
3449            crate::model::ListFrameworkDeploymentsResponse,
3450            gax::error::Error,
3451        > {
3452            use std::clone::Clone;
3453            let token = self.0.request.page_token.clone();
3454            let execute = move |token: String| {
3455                let mut builder = self.clone();
3456                builder.0.request = builder.0.request.set_page_token(token);
3457                builder.send()
3458            };
3459            gax::paginator::internal::new_paginator(token, execute)
3460        }
3461
3462        /// Streams each item in the collection.
3463        pub fn by_item(
3464            self,
3465        ) -> impl gax::paginator::ItemPaginator<
3466            crate::model::ListFrameworkDeploymentsResponse,
3467            gax::error::Error,
3468        > {
3469            use gax::paginator::Paginator;
3470            self.by_page().items()
3471        }
3472
3473        /// Sets the value of [parent][crate::model::ListFrameworkDeploymentsRequest::parent].
3474        ///
3475        /// This is a **required** field for requests.
3476        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3477            self.0.request.parent = v.into();
3478            self
3479        }
3480
3481        /// Sets the value of [page_size][crate::model::ListFrameworkDeploymentsRequest::page_size].
3482        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3483            self.0.request.page_size = v.into();
3484            self
3485        }
3486
3487        /// Sets the value of [page_token][crate::model::ListFrameworkDeploymentsRequest::page_token].
3488        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3489            self.0.request.page_token = v.into();
3490            self
3491        }
3492
3493        /// Sets the value of [filter][crate::model::ListFrameworkDeploymentsRequest::filter].
3494        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3495            self.0.request.filter = v.into();
3496            self
3497        }
3498
3499        /// Sets the value of [order_by][crate::model::ListFrameworkDeploymentsRequest::order_by].
3500        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3501            self.0.request.order_by = v.into();
3502            self
3503        }
3504    }
3505
3506    #[doc(hidden)]
3507    impl gax::options::internal::RequestBuilder for ListFrameworkDeployments {
3508        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3509            &mut self.0.options
3510        }
3511    }
3512
3513    /// The request builder for [Deployment::get_cloud_control_deployment][crate::client::Deployment::get_cloud_control_deployment] calls.
3514    ///
3515    /// # Example
3516    /// ```no_run
3517    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
3518    /// use builder::deployment::GetCloudControlDeployment;
3519    /// # tokio_test::block_on(async {
3520    ///
3521    /// let builder = prepare_request_builder();
3522    /// let response = builder.send().await?;
3523    /// # gax::Result::<()>::Ok(()) });
3524    ///
3525    /// fn prepare_request_builder() -> GetCloudControlDeployment {
3526    ///   # panic!();
3527    ///   // ... details omitted ...
3528    /// }
3529    /// ```
3530    #[derive(Clone, Debug)]
3531    pub struct GetCloudControlDeployment(
3532        RequestBuilder<crate::model::GetCloudControlDeploymentRequest>,
3533    );
3534
3535    impl GetCloudControlDeployment {
3536        pub(crate) fn new(
3537            stub: std::sync::Arc<dyn super::super::stub::dynamic::Deployment>,
3538        ) -> Self {
3539            Self(RequestBuilder::new(stub))
3540        }
3541
3542        /// Sets the full request, replacing any prior values.
3543        pub fn with_request<V: Into<crate::model::GetCloudControlDeploymentRequest>>(
3544            mut self,
3545            v: V,
3546        ) -> Self {
3547            self.0.request = v.into();
3548            self
3549        }
3550
3551        /// Sets all the options, replacing any prior values.
3552        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3553            self.0.options = v.into();
3554            self
3555        }
3556
3557        /// Sends the request.
3558        pub async fn send(self) -> Result<crate::model::CloudControlDeployment> {
3559            (*self.0.stub)
3560                .get_cloud_control_deployment(self.0.request, self.0.options)
3561                .await
3562                .map(gax::response::Response::into_body)
3563        }
3564
3565        /// Sets the value of [name][crate::model::GetCloudControlDeploymentRequest::name].
3566        ///
3567        /// This is a **required** field for requests.
3568        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3569            self.0.request.name = v.into();
3570            self
3571        }
3572    }
3573
3574    #[doc(hidden)]
3575    impl gax::options::internal::RequestBuilder for GetCloudControlDeployment {
3576        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3577            &mut self.0.options
3578        }
3579    }
3580
3581    /// The request builder for [Deployment::list_cloud_control_deployments][crate::client::Deployment::list_cloud_control_deployments] calls.
3582    ///
3583    /// # Example
3584    /// ```no_run
3585    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
3586    /// use builder::deployment::ListCloudControlDeployments;
3587    /// # tokio_test::block_on(async {
3588    /// use gax::paginator::ItemPaginator;
3589    ///
3590    /// let builder = prepare_request_builder();
3591    /// let mut items = builder.by_item();
3592    /// while let Some(result) = items.next().await {
3593    ///   let item = result?;
3594    /// }
3595    /// # gax::Result::<()>::Ok(()) });
3596    ///
3597    /// fn prepare_request_builder() -> ListCloudControlDeployments {
3598    ///   # panic!();
3599    ///   // ... details omitted ...
3600    /// }
3601    /// ```
3602    #[derive(Clone, Debug)]
3603    pub struct ListCloudControlDeployments(
3604        RequestBuilder<crate::model::ListCloudControlDeploymentsRequest>,
3605    );
3606
3607    impl ListCloudControlDeployments {
3608        pub(crate) fn new(
3609            stub: std::sync::Arc<dyn super::super::stub::dynamic::Deployment>,
3610        ) -> Self {
3611            Self(RequestBuilder::new(stub))
3612        }
3613
3614        /// Sets the full request, replacing any prior values.
3615        pub fn with_request<V: Into<crate::model::ListCloudControlDeploymentsRequest>>(
3616            mut self,
3617            v: V,
3618        ) -> Self {
3619            self.0.request = v.into();
3620            self
3621        }
3622
3623        /// Sets all the options, replacing any prior values.
3624        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3625            self.0.options = v.into();
3626            self
3627        }
3628
3629        /// Sends the request.
3630        pub async fn send(self) -> Result<crate::model::ListCloudControlDeploymentsResponse> {
3631            (*self.0.stub)
3632                .list_cloud_control_deployments(self.0.request, self.0.options)
3633                .await
3634                .map(gax::response::Response::into_body)
3635        }
3636
3637        /// Streams each page in the collection.
3638        pub fn by_page(
3639            self,
3640        ) -> impl gax::paginator::Paginator<
3641            crate::model::ListCloudControlDeploymentsResponse,
3642            gax::error::Error,
3643        > {
3644            use std::clone::Clone;
3645            let token = self.0.request.page_token.clone();
3646            let execute = move |token: String| {
3647                let mut builder = self.clone();
3648                builder.0.request = builder.0.request.set_page_token(token);
3649                builder.send()
3650            };
3651            gax::paginator::internal::new_paginator(token, execute)
3652        }
3653
3654        /// Streams each item in the collection.
3655        pub fn by_item(
3656            self,
3657        ) -> impl gax::paginator::ItemPaginator<
3658            crate::model::ListCloudControlDeploymentsResponse,
3659            gax::error::Error,
3660        > {
3661            use gax::paginator::Paginator;
3662            self.by_page().items()
3663        }
3664
3665        /// Sets the value of [parent][crate::model::ListCloudControlDeploymentsRequest::parent].
3666        ///
3667        /// This is a **required** field for requests.
3668        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3669            self.0.request.parent = v.into();
3670            self
3671        }
3672
3673        /// Sets the value of [page_size][crate::model::ListCloudControlDeploymentsRequest::page_size].
3674        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3675            self.0.request.page_size = v.into();
3676            self
3677        }
3678
3679        /// Sets the value of [page_token][crate::model::ListCloudControlDeploymentsRequest::page_token].
3680        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3681            self.0.request.page_token = v.into();
3682            self
3683        }
3684
3685        /// Sets the value of [filter][crate::model::ListCloudControlDeploymentsRequest::filter].
3686        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3687            self.0.request.filter = v.into();
3688            self
3689        }
3690
3691        /// Sets the value of [order_by][crate::model::ListCloudControlDeploymentsRequest::order_by].
3692        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3693            self.0.request.order_by = v.into();
3694            self
3695        }
3696    }
3697
3698    #[doc(hidden)]
3699    impl gax::options::internal::RequestBuilder for ListCloudControlDeployments {
3700        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3701            &mut self.0.options
3702        }
3703    }
3704
3705    /// The request builder for [Deployment::list_locations][crate::client::Deployment::list_locations] calls.
3706    ///
3707    /// # Example
3708    /// ```no_run
3709    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
3710    /// use builder::deployment::ListLocations;
3711    /// # tokio_test::block_on(async {
3712    /// use gax::paginator::ItemPaginator;
3713    ///
3714    /// let builder = prepare_request_builder();
3715    /// let mut items = builder.by_item();
3716    /// while let Some(result) = items.next().await {
3717    ///   let item = result?;
3718    /// }
3719    /// # gax::Result::<()>::Ok(()) });
3720    ///
3721    /// fn prepare_request_builder() -> ListLocations {
3722    ///   # panic!();
3723    ///   // ... details omitted ...
3724    /// }
3725    /// ```
3726    #[derive(Clone, Debug)]
3727    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
3728
3729    impl ListLocations {
3730        pub(crate) fn new(
3731            stub: std::sync::Arc<dyn super::super::stub::dynamic::Deployment>,
3732        ) -> Self {
3733            Self(RequestBuilder::new(stub))
3734        }
3735
3736        /// Sets the full request, replacing any prior values.
3737        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
3738            mut self,
3739            v: V,
3740        ) -> Self {
3741            self.0.request = v.into();
3742            self
3743        }
3744
3745        /// Sets all the options, replacing any prior values.
3746        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3747            self.0.options = v.into();
3748            self
3749        }
3750
3751        /// Sends the request.
3752        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
3753            (*self.0.stub)
3754                .list_locations(self.0.request, self.0.options)
3755                .await
3756                .map(gax::response::Response::into_body)
3757        }
3758
3759        /// Streams each page in the collection.
3760        pub fn by_page(
3761            self,
3762        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
3763        {
3764            use std::clone::Clone;
3765            let token = self.0.request.page_token.clone();
3766            let execute = move |token: String| {
3767                let mut builder = self.clone();
3768                builder.0.request = builder.0.request.set_page_token(token);
3769                builder.send()
3770            };
3771            gax::paginator::internal::new_paginator(token, execute)
3772        }
3773
3774        /// Streams each item in the collection.
3775        pub fn by_item(
3776            self,
3777        ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
3778        {
3779            use gax::paginator::Paginator;
3780            self.by_page().items()
3781        }
3782
3783        /// Sets the value of [name][location::model::ListLocationsRequest::name].
3784        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3785            self.0.request.name = v.into();
3786            self
3787        }
3788
3789        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
3790        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3791            self.0.request.filter = v.into();
3792            self
3793        }
3794
3795        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
3796        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3797            self.0.request.page_size = v.into();
3798            self
3799        }
3800
3801        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
3802        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3803            self.0.request.page_token = v.into();
3804            self
3805        }
3806    }
3807
3808    #[doc(hidden)]
3809    impl gax::options::internal::RequestBuilder for ListLocations {
3810        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3811            &mut self.0.options
3812        }
3813    }
3814
3815    /// The request builder for [Deployment::get_location][crate::client::Deployment::get_location] calls.
3816    ///
3817    /// # Example
3818    /// ```no_run
3819    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
3820    /// use builder::deployment::GetLocation;
3821    /// # tokio_test::block_on(async {
3822    ///
3823    /// let builder = prepare_request_builder();
3824    /// let response = builder.send().await?;
3825    /// # gax::Result::<()>::Ok(()) });
3826    ///
3827    /// fn prepare_request_builder() -> GetLocation {
3828    ///   # panic!();
3829    ///   // ... details omitted ...
3830    /// }
3831    /// ```
3832    #[derive(Clone, Debug)]
3833    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
3834
3835    impl GetLocation {
3836        pub(crate) fn new(
3837            stub: std::sync::Arc<dyn super::super::stub::dynamic::Deployment>,
3838        ) -> Self {
3839            Self(RequestBuilder::new(stub))
3840        }
3841
3842        /// Sets the full request, replacing any prior values.
3843        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
3844            self.0.request = v.into();
3845            self
3846        }
3847
3848        /// Sets all the options, replacing any prior values.
3849        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3850            self.0.options = v.into();
3851            self
3852        }
3853
3854        /// Sends the request.
3855        pub async fn send(self) -> Result<location::model::Location> {
3856            (*self.0.stub)
3857                .get_location(self.0.request, self.0.options)
3858                .await
3859                .map(gax::response::Response::into_body)
3860        }
3861
3862        /// Sets the value of [name][location::model::GetLocationRequest::name].
3863        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3864            self.0.request.name = v.into();
3865            self
3866        }
3867    }
3868
3869    #[doc(hidden)]
3870    impl gax::options::internal::RequestBuilder for GetLocation {
3871        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3872            &mut self.0.options
3873        }
3874    }
3875
3876    /// The request builder for [Deployment::list_operations][crate::client::Deployment::list_operations] calls.
3877    ///
3878    /// # Example
3879    /// ```no_run
3880    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
3881    /// use builder::deployment::ListOperations;
3882    /// # tokio_test::block_on(async {
3883    /// use gax::paginator::ItemPaginator;
3884    ///
3885    /// let builder = prepare_request_builder();
3886    /// let mut items = builder.by_item();
3887    /// while let Some(result) = items.next().await {
3888    ///   let item = result?;
3889    /// }
3890    /// # gax::Result::<()>::Ok(()) });
3891    ///
3892    /// fn prepare_request_builder() -> ListOperations {
3893    ///   # panic!();
3894    ///   // ... details omitted ...
3895    /// }
3896    /// ```
3897    #[derive(Clone, Debug)]
3898    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
3899
3900    impl ListOperations {
3901        pub(crate) fn new(
3902            stub: std::sync::Arc<dyn super::super::stub::dynamic::Deployment>,
3903        ) -> Self {
3904            Self(RequestBuilder::new(stub))
3905        }
3906
3907        /// Sets the full request, replacing any prior values.
3908        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
3909            mut self,
3910            v: V,
3911        ) -> Self {
3912            self.0.request = v.into();
3913            self
3914        }
3915
3916        /// Sets all the options, replacing any prior values.
3917        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3918            self.0.options = v.into();
3919            self
3920        }
3921
3922        /// Sends the request.
3923        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
3924            (*self.0.stub)
3925                .list_operations(self.0.request, self.0.options)
3926                .await
3927                .map(gax::response::Response::into_body)
3928        }
3929
3930        /// Streams each page in the collection.
3931        pub fn by_page(
3932            self,
3933        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
3934        {
3935            use std::clone::Clone;
3936            let token = self.0.request.page_token.clone();
3937            let execute = move |token: String| {
3938                let mut builder = self.clone();
3939                builder.0.request = builder.0.request.set_page_token(token);
3940                builder.send()
3941            };
3942            gax::paginator::internal::new_paginator(token, execute)
3943        }
3944
3945        /// Streams each item in the collection.
3946        pub fn by_item(
3947            self,
3948        ) -> impl gax::paginator::ItemPaginator<
3949            longrunning::model::ListOperationsResponse,
3950            gax::error::Error,
3951        > {
3952            use gax::paginator::Paginator;
3953            self.by_page().items()
3954        }
3955
3956        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
3957        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3958            self.0.request.name = v.into();
3959            self
3960        }
3961
3962        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
3963        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3964            self.0.request.filter = v.into();
3965            self
3966        }
3967
3968        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
3969        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3970            self.0.request.page_size = v.into();
3971            self
3972        }
3973
3974        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
3975        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3976            self.0.request.page_token = v.into();
3977            self
3978        }
3979
3980        /// Sets the value of [return_partial_success][longrunning::model::ListOperationsRequest::return_partial_success].
3981        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
3982            self.0.request.return_partial_success = v.into();
3983            self
3984        }
3985    }
3986
3987    #[doc(hidden)]
3988    impl gax::options::internal::RequestBuilder for ListOperations {
3989        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3990            &mut self.0.options
3991        }
3992    }
3993
3994    /// The request builder for [Deployment::get_operation][crate::client::Deployment::get_operation] calls.
3995    ///
3996    /// # Example
3997    /// ```no_run
3998    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
3999    /// use builder::deployment::GetOperation;
4000    /// # tokio_test::block_on(async {
4001    ///
4002    /// let builder = prepare_request_builder();
4003    /// let response = builder.send().await?;
4004    /// # gax::Result::<()>::Ok(()) });
4005    ///
4006    /// fn prepare_request_builder() -> GetOperation {
4007    ///   # panic!();
4008    ///   // ... details omitted ...
4009    /// }
4010    /// ```
4011    #[derive(Clone, Debug)]
4012    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
4013
4014    impl GetOperation {
4015        pub(crate) fn new(
4016            stub: std::sync::Arc<dyn super::super::stub::dynamic::Deployment>,
4017        ) -> Self {
4018            Self(RequestBuilder::new(stub))
4019        }
4020
4021        /// Sets the full request, replacing any prior values.
4022        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
4023            mut self,
4024            v: V,
4025        ) -> Self {
4026            self.0.request = v.into();
4027            self
4028        }
4029
4030        /// Sets all the options, replacing any prior values.
4031        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4032            self.0.options = v.into();
4033            self
4034        }
4035
4036        /// Sends the request.
4037        pub async fn send(self) -> Result<longrunning::model::Operation> {
4038            (*self.0.stub)
4039                .get_operation(self.0.request, self.0.options)
4040                .await
4041                .map(gax::response::Response::into_body)
4042        }
4043
4044        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
4045        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4046            self.0.request.name = v.into();
4047            self
4048        }
4049    }
4050
4051    #[doc(hidden)]
4052    impl gax::options::internal::RequestBuilder for GetOperation {
4053        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4054            &mut self.0.options
4055        }
4056    }
4057
4058    /// The request builder for [Deployment::delete_operation][crate::client::Deployment::delete_operation] calls.
4059    ///
4060    /// # Example
4061    /// ```no_run
4062    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
4063    /// use builder::deployment::DeleteOperation;
4064    /// # tokio_test::block_on(async {
4065    ///
4066    /// let builder = prepare_request_builder();
4067    /// let response = builder.send().await?;
4068    /// # gax::Result::<()>::Ok(()) });
4069    ///
4070    /// fn prepare_request_builder() -> DeleteOperation {
4071    ///   # panic!();
4072    ///   // ... details omitted ...
4073    /// }
4074    /// ```
4075    #[derive(Clone, Debug)]
4076    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
4077
4078    impl DeleteOperation {
4079        pub(crate) fn new(
4080            stub: std::sync::Arc<dyn super::super::stub::dynamic::Deployment>,
4081        ) -> Self {
4082            Self(RequestBuilder::new(stub))
4083        }
4084
4085        /// Sets the full request, replacing any prior values.
4086        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
4087            mut self,
4088            v: V,
4089        ) -> Self {
4090            self.0.request = v.into();
4091            self
4092        }
4093
4094        /// Sets all the options, replacing any prior values.
4095        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4096            self.0.options = v.into();
4097            self
4098        }
4099
4100        /// Sends the request.
4101        pub async fn send(self) -> Result<()> {
4102            (*self.0.stub)
4103                .delete_operation(self.0.request, self.0.options)
4104                .await
4105                .map(gax::response::Response::into_body)
4106        }
4107
4108        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
4109        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4110            self.0.request.name = v.into();
4111            self
4112        }
4113    }
4114
4115    #[doc(hidden)]
4116    impl gax::options::internal::RequestBuilder for DeleteOperation {
4117        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4118            &mut self.0.options
4119        }
4120    }
4121
4122    /// The request builder for [Deployment::cancel_operation][crate::client::Deployment::cancel_operation] calls.
4123    ///
4124    /// # Example
4125    /// ```no_run
4126    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
4127    /// use builder::deployment::CancelOperation;
4128    /// # tokio_test::block_on(async {
4129    ///
4130    /// let builder = prepare_request_builder();
4131    /// let response = builder.send().await?;
4132    /// # gax::Result::<()>::Ok(()) });
4133    ///
4134    /// fn prepare_request_builder() -> CancelOperation {
4135    ///   # panic!();
4136    ///   // ... details omitted ...
4137    /// }
4138    /// ```
4139    #[derive(Clone, Debug)]
4140    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
4141
4142    impl CancelOperation {
4143        pub(crate) fn new(
4144            stub: std::sync::Arc<dyn super::super::stub::dynamic::Deployment>,
4145        ) -> Self {
4146            Self(RequestBuilder::new(stub))
4147        }
4148
4149        /// Sets the full request, replacing any prior values.
4150        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
4151            mut self,
4152            v: V,
4153        ) -> Self {
4154            self.0.request = v.into();
4155            self
4156        }
4157
4158        /// Sets all the options, replacing any prior values.
4159        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4160            self.0.options = v.into();
4161            self
4162        }
4163
4164        /// Sends the request.
4165        pub async fn send(self) -> Result<()> {
4166            (*self.0.stub)
4167                .cancel_operation(self.0.request, self.0.options)
4168                .await
4169                .map(gax::response::Response::into_body)
4170        }
4171
4172        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
4173        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4174            self.0.request.name = v.into();
4175            self
4176        }
4177    }
4178
4179    #[doc(hidden)]
4180    impl gax::options::internal::RequestBuilder for CancelOperation {
4181        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4182            &mut self.0.options
4183        }
4184    }
4185}
4186
4187pub mod monitoring {
4188    use crate::Result;
4189
4190    /// A builder for [Monitoring][crate::client::Monitoring].
4191    ///
4192    /// ```
4193    /// # tokio_test::block_on(async {
4194    /// # use google_cloud_cloudsecuritycompliance_v1::*;
4195    /// # use builder::monitoring::ClientBuilder;
4196    /// # use client::Monitoring;
4197    /// let builder : ClientBuilder = Monitoring::builder();
4198    /// let client = builder
4199    ///     .with_endpoint("https://cloudsecuritycompliance.googleapis.com")
4200    ///     .build().await?;
4201    /// # gax::client_builder::Result::<()>::Ok(()) });
4202    /// ```
4203    pub type ClientBuilder =
4204        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
4205
4206    pub(crate) mod client {
4207        use super::super::super::client::Monitoring;
4208        pub struct Factory;
4209        impl gax::client_builder::internal::ClientFactory for Factory {
4210            type Client = Monitoring;
4211            type Credentials = gaxi::options::Credentials;
4212            async fn build(
4213                self,
4214                config: gaxi::options::ClientConfig,
4215            ) -> gax::client_builder::Result<Self::Client> {
4216                Self::Client::new(config).await
4217            }
4218        }
4219    }
4220
4221    /// Common implementation for [crate::client::Monitoring] request builders.
4222    #[derive(Clone, Debug)]
4223    pub(crate) struct RequestBuilder<R: std::default::Default> {
4224        stub: std::sync::Arc<dyn super::super::stub::dynamic::Monitoring>,
4225        request: R,
4226        options: gax::options::RequestOptions,
4227    }
4228
4229    impl<R> RequestBuilder<R>
4230    where
4231        R: std::default::Default,
4232    {
4233        pub(crate) fn new(
4234            stub: std::sync::Arc<dyn super::super::stub::dynamic::Monitoring>,
4235        ) -> Self {
4236            Self {
4237                stub,
4238                request: R::default(),
4239                options: gax::options::RequestOptions::default(),
4240            }
4241        }
4242    }
4243
4244    /// The request builder for [Monitoring::list_framework_compliance_summaries][crate::client::Monitoring::list_framework_compliance_summaries] calls.
4245    ///
4246    /// # Example
4247    /// ```no_run
4248    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
4249    /// use builder::monitoring::ListFrameworkComplianceSummaries;
4250    /// # tokio_test::block_on(async {
4251    /// use gax::paginator::ItemPaginator;
4252    ///
4253    /// let builder = prepare_request_builder();
4254    /// let mut items = builder.by_item();
4255    /// while let Some(result) = items.next().await {
4256    ///   let item = result?;
4257    /// }
4258    /// # gax::Result::<()>::Ok(()) });
4259    ///
4260    /// fn prepare_request_builder() -> ListFrameworkComplianceSummaries {
4261    ///   # panic!();
4262    ///   // ... details omitted ...
4263    /// }
4264    /// ```
4265    #[derive(Clone, Debug)]
4266    pub struct ListFrameworkComplianceSummaries(
4267        RequestBuilder<crate::model::ListFrameworkComplianceSummariesRequest>,
4268    );
4269
4270    impl ListFrameworkComplianceSummaries {
4271        pub(crate) fn new(
4272            stub: std::sync::Arc<dyn super::super::stub::dynamic::Monitoring>,
4273        ) -> Self {
4274            Self(RequestBuilder::new(stub))
4275        }
4276
4277        /// Sets the full request, replacing any prior values.
4278        pub fn with_request<V: Into<crate::model::ListFrameworkComplianceSummariesRequest>>(
4279            mut self,
4280            v: V,
4281        ) -> Self {
4282            self.0.request = v.into();
4283            self
4284        }
4285
4286        /// Sets all the options, replacing any prior values.
4287        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4288            self.0.options = v.into();
4289            self
4290        }
4291
4292        /// Sends the request.
4293        pub async fn send(self) -> Result<crate::model::ListFrameworkComplianceSummariesResponse> {
4294            (*self.0.stub)
4295                .list_framework_compliance_summaries(self.0.request, self.0.options)
4296                .await
4297                .map(gax::response::Response::into_body)
4298        }
4299
4300        /// Streams each page in the collection.
4301        pub fn by_page(
4302            self,
4303        ) -> impl gax::paginator::Paginator<
4304            crate::model::ListFrameworkComplianceSummariesResponse,
4305            gax::error::Error,
4306        > {
4307            use std::clone::Clone;
4308            let token = self.0.request.page_token.clone();
4309            let execute = move |token: String| {
4310                let mut builder = self.clone();
4311                builder.0.request = builder.0.request.set_page_token(token);
4312                builder.send()
4313            };
4314            gax::paginator::internal::new_paginator(token, execute)
4315        }
4316
4317        /// Streams each item in the collection.
4318        pub fn by_item(
4319            self,
4320        ) -> impl gax::paginator::ItemPaginator<
4321            crate::model::ListFrameworkComplianceSummariesResponse,
4322            gax::error::Error,
4323        > {
4324            use gax::paginator::Paginator;
4325            self.by_page().items()
4326        }
4327
4328        /// Sets the value of [parent][crate::model::ListFrameworkComplianceSummariesRequest::parent].
4329        ///
4330        /// This is a **required** field for requests.
4331        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4332            self.0.request.parent = v.into();
4333            self
4334        }
4335
4336        /// Sets the value of [page_size][crate::model::ListFrameworkComplianceSummariesRequest::page_size].
4337        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4338            self.0.request.page_size = v.into();
4339            self
4340        }
4341
4342        /// Sets the value of [page_token][crate::model::ListFrameworkComplianceSummariesRequest::page_token].
4343        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4344            self.0.request.page_token = v.into();
4345            self
4346        }
4347
4348        /// Sets the value of [filter][crate::model::ListFrameworkComplianceSummariesRequest::filter].
4349        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4350            self.0.request.filter = v.into();
4351            self
4352        }
4353    }
4354
4355    #[doc(hidden)]
4356    impl gax::options::internal::RequestBuilder for ListFrameworkComplianceSummaries {
4357        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4358            &mut self.0.options
4359        }
4360    }
4361
4362    /// The request builder for [Monitoring::list_finding_summaries][crate::client::Monitoring::list_finding_summaries] calls.
4363    ///
4364    /// # Example
4365    /// ```no_run
4366    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
4367    /// use builder::monitoring::ListFindingSummaries;
4368    /// # tokio_test::block_on(async {
4369    /// use gax::paginator::ItemPaginator;
4370    ///
4371    /// let builder = prepare_request_builder();
4372    /// let mut items = builder.by_item();
4373    /// while let Some(result) = items.next().await {
4374    ///   let item = result?;
4375    /// }
4376    /// # gax::Result::<()>::Ok(()) });
4377    ///
4378    /// fn prepare_request_builder() -> ListFindingSummaries {
4379    ///   # panic!();
4380    ///   // ... details omitted ...
4381    /// }
4382    /// ```
4383    #[derive(Clone, Debug)]
4384    pub struct ListFindingSummaries(RequestBuilder<crate::model::ListFindingSummariesRequest>);
4385
4386    impl ListFindingSummaries {
4387        pub(crate) fn new(
4388            stub: std::sync::Arc<dyn super::super::stub::dynamic::Monitoring>,
4389        ) -> Self {
4390            Self(RequestBuilder::new(stub))
4391        }
4392
4393        /// Sets the full request, replacing any prior values.
4394        pub fn with_request<V: Into<crate::model::ListFindingSummariesRequest>>(
4395            mut self,
4396            v: V,
4397        ) -> Self {
4398            self.0.request = v.into();
4399            self
4400        }
4401
4402        /// Sets all the options, replacing any prior values.
4403        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4404            self.0.options = v.into();
4405            self
4406        }
4407
4408        /// Sends the request.
4409        pub async fn send(self) -> Result<crate::model::ListFindingSummariesResponse> {
4410            (*self.0.stub)
4411                .list_finding_summaries(self.0.request, self.0.options)
4412                .await
4413                .map(gax::response::Response::into_body)
4414        }
4415
4416        /// Streams each page in the collection.
4417        pub fn by_page(
4418            self,
4419        ) -> impl gax::paginator::Paginator<crate::model::ListFindingSummariesResponse, gax::error::Error>
4420        {
4421            use std::clone::Clone;
4422            let token = self.0.request.page_token.clone();
4423            let execute = move |token: String| {
4424                let mut builder = self.clone();
4425                builder.0.request = builder.0.request.set_page_token(token);
4426                builder.send()
4427            };
4428            gax::paginator::internal::new_paginator(token, execute)
4429        }
4430
4431        /// Streams each item in the collection.
4432        pub fn by_item(
4433            self,
4434        ) -> impl gax::paginator::ItemPaginator<
4435            crate::model::ListFindingSummariesResponse,
4436            gax::error::Error,
4437        > {
4438            use gax::paginator::Paginator;
4439            self.by_page().items()
4440        }
4441
4442        /// Sets the value of [parent][crate::model::ListFindingSummariesRequest::parent].
4443        ///
4444        /// This is a **required** field for requests.
4445        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4446            self.0.request.parent = v.into();
4447            self
4448        }
4449
4450        /// Sets the value of [page_size][crate::model::ListFindingSummariesRequest::page_size].
4451        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4452            self.0.request.page_size = v.into();
4453            self
4454        }
4455
4456        /// Sets the value of [page_token][crate::model::ListFindingSummariesRequest::page_token].
4457        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4458            self.0.request.page_token = v.into();
4459            self
4460        }
4461
4462        /// Sets the value of [filter][crate::model::ListFindingSummariesRequest::filter].
4463        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4464            self.0.request.filter = v.into();
4465            self
4466        }
4467
4468        /// Sets the value of [end_time][crate::model::ListFindingSummariesRequest::end_time].
4469        #[deprecated]
4470        pub fn set_end_time<T>(mut self, v: T) -> Self
4471        where
4472            T: std::convert::Into<wkt::Timestamp>,
4473        {
4474            self.0.request.end_time = std::option::Option::Some(v.into());
4475            self
4476        }
4477
4478        /// Sets or clears the value of [end_time][crate::model::ListFindingSummariesRequest::end_time].
4479        #[deprecated]
4480        pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
4481        where
4482            T: std::convert::Into<wkt::Timestamp>,
4483        {
4484            self.0.request.end_time = v.map(|x| x.into());
4485            self
4486        }
4487    }
4488
4489    #[doc(hidden)]
4490    impl gax::options::internal::RequestBuilder for ListFindingSummaries {
4491        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4492            &mut self.0.options
4493        }
4494    }
4495
4496    /// The request builder for [Monitoring::fetch_framework_compliance_report][crate::client::Monitoring::fetch_framework_compliance_report] calls.
4497    ///
4498    /// # Example
4499    /// ```no_run
4500    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
4501    /// use builder::monitoring::FetchFrameworkComplianceReport;
4502    /// # tokio_test::block_on(async {
4503    ///
4504    /// let builder = prepare_request_builder();
4505    /// let response = builder.send().await?;
4506    /// # gax::Result::<()>::Ok(()) });
4507    ///
4508    /// fn prepare_request_builder() -> FetchFrameworkComplianceReport {
4509    ///   # panic!();
4510    ///   // ... details omitted ...
4511    /// }
4512    /// ```
4513    #[derive(Clone, Debug)]
4514    pub struct FetchFrameworkComplianceReport(
4515        RequestBuilder<crate::model::FetchFrameworkComplianceReportRequest>,
4516    );
4517
4518    impl FetchFrameworkComplianceReport {
4519        pub(crate) fn new(
4520            stub: std::sync::Arc<dyn super::super::stub::dynamic::Monitoring>,
4521        ) -> Self {
4522            Self(RequestBuilder::new(stub))
4523        }
4524
4525        /// Sets the full request, replacing any prior values.
4526        pub fn with_request<V: Into<crate::model::FetchFrameworkComplianceReportRequest>>(
4527            mut self,
4528            v: V,
4529        ) -> Self {
4530            self.0.request = v.into();
4531            self
4532        }
4533
4534        /// Sets all the options, replacing any prior values.
4535        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4536            self.0.options = v.into();
4537            self
4538        }
4539
4540        /// Sends the request.
4541        pub async fn send(self) -> Result<crate::model::FrameworkComplianceReport> {
4542            (*self.0.stub)
4543                .fetch_framework_compliance_report(self.0.request, self.0.options)
4544                .await
4545                .map(gax::response::Response::into_body)
4546        }
4547
4548        /// Sets the value of [name][crate::model::FetchFrameworkComplianceReportRequest::name].
4549        ///
4550        /// This is a **required** field for requests.
4551        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4552            self.0.request.name = v.into();
4553            self
4554        }
4555
4556        /// Sets the value of [end_time][crate::model::FetchFrameworkComplianceReportRequest::end_time].
4557        pub fn set_end_time<T>(mut self, v: T) -> Self
4558        where
4559            T: std::convert::Into<wkt::Timestamp>,
4560        {
4561            self.0.request.end_time = std::option::Option::Some(v.into());
4562            self
4563        }
4564
4565        /// Sets or clears the value of [end_time][crate::model::FetchFrameworkComplianceReportRequest::end_time].
4566        pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
4567        where
4568            T: std::convert::Into<wkt::Timestamp>,
4569        {
4570            self.0.request.end_time = v.map(|x| x.into());
4571            self
4572        }
4573    }
4574
4575    #[doc(hidden)]
4576    impl gax::options::internal::RequestBuilder for FetchFrameworkComplianceReport {
4577        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4578            &mut self.0.options
4579        }
4580    }
4581
4582    /// The request builder for [Monitoring::list_control_compliance_summaries][crate::client::Monitoring::list_control_compliance_summaries] calls.
4583    ///
4584    /// # Example
4585    /// ```no_run
4586    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
4587    /// use builder::monitoring::ListControlComplianceSummaries;
4588    /// # tokio_test::block_on(async {
4589    /// use gax::paginator::ItemPaginator;
4590    ///
4591    /// let builder = prepare_request_builder();
4592    /// let mut items = builder.by_item();
4593    /// while let Some(result) = items.next().await {
4594    ///   let item = result?;
4595    /// }
4596    /// # gax::Result::<()>::Ok(()) });
4597    ///
4598    /// fn prepare_request_builder() -> ListControlComplianceSummaries {
4599    ///   # panic!();
4600    ///   // ... details omitted ...
4601    /// }
4602    /// ```
4603    #[derive(Clone, Debug)]
4604    pub struct ListControlComplianceSummaries(
4605        RequestBuilder<crate::model::ListControlComplianceSummariesRequest>,
4606    );
4607
4608    impl ListControlComplianceSummaries {
4609        pub(crate) fn new(
4610            stub: std::sync::Arc<dyn super::super::stub::dynamic::Monitoring>,
4611        ) -> Self {
4612            Self(RequestBuilder::new(stub))
4613        }
4614
4615        /// Sets the full request, replacing any prior values.
4616        pub fn with_request<V: Into<crate::model::ListControlComplianceSummariesRequest>>(
4617            mut self,
4618            v: V,
4619        ) -> Self {
4620            self.0.request = v.into();
4621            self
4622        }
4623
4624        /// Sets all the options, replacing any prior values.
4625        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4626            self.0.options = v.into();
4627            self
4628        }
4629
4630        /// Sends the request.
4631        pub async fn send(self) -> Result<crate::model::ListControlComplianceSummariesResponse> {
4632            (*self.0.stub)
4633                .list_control_compliance_summaries(self.0.request, self.0.options)
4634                .await
4635                .map(gax::response::Response::into_body)
4636        }
4637
4638        /// Streams each page in the collection.
4639        pub fn by_page(
4640            self,
4641        ) -> impl gax::paginator::Paginator<
4642            crate::model::ListControlComplianceSummariesResponse,
4643            gax::error::Error,
4644        > {
4645            use std::clone::Clone;
4646            let token = self.0.request.page_token.clone();
4647            let execute = move |token: String| {
4648                let mut builder = self.clone();
4649                builder.0.request = builder.0.request.set_page_token(token);
4650                builder.send()
4651            };
4652            gax::paginator::internal::new_paginator(token, execute)
4653        }
4654
4655        /// Streams each item in the collection.
4656        pub fn by_item(
4657            self,
4658        ) -> impl gax::paginator::ItemPaginator<
4659            crate::model::ListControlComplianceSummariesResponse,
4660            gax::error::Error,
4661        > {
4662            use gax::paginator::Paginator;
4663            self.by_page().items()
4664        }
4665
4666        /// Sets the value of [parent][crate::model::ListControlComplianceSummariesRequest::parent].
4667        ///
4668        /// This is a **required** field for requests.
4669        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4670            self.0.request.parent = v.into();
4671            self
4672        }
4673
4674        /// Sets the value of [end_time][crate::model::ListControlComplianceSummariesRequest::end_time].
4675        #[deprecated]
4676        pub fn set_end_time<T>(mut self, v: T) -> Self
4677        where
4678            T: std::convert::Into<wkt::Timestamp>,
4679        {
4680            self.0.request.end_time = std::option::Option::Some(v.into());
4681            self
4682        }
4683
4684        /// Sets or clears the value of [end_time][crate::model::ListControlComplianceSummariesRequest::end_time].
4685        #[deprecated]
4686        pub fn set_or_clear_end_time<T>(mut self, v: std::option::Option<T>) -> Self
4687        where
4688            T: std::convert::Into<wkt::Timestamp>,
4689        {
4690            self.0.request.end_time = v.map(|x| x.into());
4691            self
4692        }
4693
4694        /// Sets the value of [page_size][crate::model::ListControlComplianceSummariesRequest::page_size].
4695        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4696            self.0.request.page_size = v.into();
4697            self
4698        }
4699
4700        /// Sets the value of [page_token][crate::model::ListControlComplianceSummariesRequest::page_token].
4701        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4702            self.0.request.page_token = v.into();
4703            self
4704        }
4705
4706        /// Sets the value of [filter][crate::model::ListControlComplianceSummariesRequest::filter].
4707        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4708            self.0.request.filter = v.into();
4709            self
4710        }
4711    }
4712
4713    #[doc(hidden)]
4714    impl gax::options::internal::RequestBuilder for ListControlComplianceSummaries {
4715        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4716            &mut self.0.options
4717        }
4718    }
4719
4720    /// The request builder for [Monitoring::aggregate_framework_compliance_report][crate::client::Monitoring::aggregate_framework_compliance_report] calls.
4721    ///
4722    /// # Example
4723    /// ```no_run
4724    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
4725    /// use builder::monitoring::AggregateFrameworkComplianceReport;
4726    /// # tokio_test::block_on(async {
4727    ///
4728    /// let builder = prepare_request_builder();
4729    /// let response = builder.send().await?;
4730    /// # gax::Result::<()>::Ok(()) });
4731    ///
4732    /// fn prepare_request_builder() -> AggregateFrameworkComplianceReport {
4733    ///   # panic!();
4734    ///   // ... details omitted ...
4735    /// }
4736    /// ```
4737    #[derive(Clone, Debug)]
4738    pub struct AggregateFrameworkComplianceReport(
4739        RequestBuilder<crate::model::AggregateFrameworkComplianceReportRequest>,
4740    );
4741
4742    impl AggregateFrameworkComplianceReport {
4743        pub(crate) fn new(
4744            stub: std::sync::Arc<dyn super::super::stub::dynamic::Monitoring>,
4745        ) -> Self {
4746            Self(RequestBuilder::new(stub))
4747        }
4748
4749        /// Sets the full request, replacing any prior values.
4750        pub fn with_request<V: Into<crate::model::AggregateFrameworkComplianceReportRequest>>(
4751            mut self,
4752            v: V,
4753        ) -> Self {
4754            self.0.request = v.into();
4755            self
4756        }
4757
4758        /// Sets all the options, replacing any prior values.
4759        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4760            self.0.options = v.into();
4761            self
4762        }
4763
4764        /// Sends the request.
4765        pub async fn send(
4766            self,
4767        ) -> Result<crate::model::AggregateFrameworkComplianceReportResponse> {
4768            (*self.0.stub)
4769                .aggregate_framework_compliance_report(self.0.request, self.0.options)
4770                .await
4771                .map(gax::response::Response::into_body)
4772        }
4773
4774        /// Sets the value of [name][crate::model::AggregateFrameworkComplianceReportRequest::name].
4775        ///
4776        /// This is a **required** field for requests.
4777        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4778            self.0.request.name = v.into();
4779            self
4780        }
4781
4782        /// Sets the value of [interval][crate::model::AggregateFrameworkComplianceReportRequest::interval].
4783        pub fn set_interval<T>(mut self, v: T) -> Self
4784        where
4785            T: std::convert::Into<gtype::model::Interval>,
4786        {
4787            self.0.request.interval = std::option::Option::Some(v.into());
4788            self
4789        }
4790
4791        /// Sets or clears the value of [interval][crate::model::AggregateFrameworkComplianceReportRequest::interval].
4792        pub fn set_or_clear_interval<T>(mut self, v: std::option::Option<T>) -> Self
4793        where
4794            T: std::convert::Into<gtype::model::Interval>,
4795        {
4796            self.0.request.interval = v.map(|x| x.into());
4797            self
4798        }
4799
4800        /// Sets the value of [filter][crate::model::AggregateFrameworkComplianceReportRequest::filter].
4801        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4802            self.0.request.filter = v.into();
4803            self
4804        }
4805    }
4806
4807    #[doc(hidden)]
4808    impl gax::options::internal::RequestBuilder for AggregateFrameworkComplianceReport {
4809        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4810            &mut self.0.options
4811        }
4812    }
4813
4814    /// The request builder for [Monitoring::list_locations][crate::client::Monitoring::list_locations] calls.
4815    ///
4816    /// # Example
4817    /// ```no_run
4818    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
4819    /// use builder::monitoring::ListLocations;
4820    /// # tokio_test::block_on(async {
4821    /// use gax::paginator::ItemPaginator;
4822    ///
4823    /// let builder = prepare_request_builder();
4824    /// let mut items = builder.by_item();
4825    /// while let Some(result) = items.next().await {
4826    ///   let item = result?;
4827    /// }
4828    /// # gax::Result::<()>::Ok(()) });
4829    ///
4830    /// fn prepare_request_builder() -> ListLocations {
4831    ///   # panic!();
4832    ///   // ... details omitted ...
4833    /// }
4834    /// ```
4835    #[derive(Clone, Debug)]
4836    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
4837
4838    impl ListLocations {
4839        pub(crate) fn new(
4840            stub: std::sync::Arc<dyn super::super::stub::dynamic::Monitoring>,
4841        ) -> Self {
4842            Self(RequestBuilder::new(stub))
4843        }
4844
4845        /// Sets the full request, replacing any prior values.
4846        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
4847            mut self,
4848            v: V,
4849        ) -> Self {
4850            self.0.request = v.into();
4851            self
4852        }
4853
4854        /// Sets all the options, replacing any prior values.
4855        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4856            self.0.options = v.into();
4857            self
4858        }
4859
4860        /// Sends the request.
4861        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
4862            (*self.0.stub)
4863                .list_locations(self.0.request, self.0.options)
4864                .await
4865                .map(gax::response::Response::into_body)
4866        }
4867
4868        /// Streams each page in the collection.
4869        pub fn by_page(
4870            self,
4871        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
4872        {
4873            use std::clone::Clone;
4874            let token = self.0.request.page_token.clone();
4875            let execute = move |token: String| {
4876                let mut builder = self.clone();
4877                builder.0.request = builder.0.request.set_page_token(token);
4878                builder.send()
4879            };
4880            gax::paginator::internal::new_paginator(token, execute)
4881        }
4882
4883        /// Streams each item in the collection.
4884        pub fn by_item(
4885            self,
4886        ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
4887        {
4888            use gax::paginator::Paginator;
4889            self.by_page().items()
4890        }
4891
4892        /// Sets the value of [name][location::model::ListLocationsRequest::name].
4893        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4894            self.0.request.name = v.into();
4895            self
4896        }
4897
4898        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
4899        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4900            self.0.request.filter = v.into();
4901            self
4902        }
4903
4904        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
4905        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4906            self.0.request.page_size = v.into();
4907            self
4908        }
4909
4910        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
4911        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4912            self.0.request.page_token = v.into();
4913            self
4914        }
4915    }
4916
4917    #[doc(hidden)]
4918    impl gax::options::internal::RequestBuilder for ListLocations {
4919        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4920            &mut self.0.options
4921        }
4922    }
4923
4924    /// The request builder for [Monitoring::get_location][crate::client::Monitoring::get_location] calls.
4925    ///
4926    /// # Example
4927    /// ```no_run
4928    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
4929    /// use builder::monitoring::GetLocation;
4930    /// # tokio_test::block_on(async {
4931    ///
4932    /// let builder = prepare_request_builder();
4933    /// let response = builder.send().await?;
4934    /// # gax::Result::<()>::Ok(()) });
4935    ///
4936    /// fn prepare_request_builder() -> GetLocation {
4937    ///   # panic!();
4938    ///   // ... details omitted ...
4939    /// }
4940    /// ```
4941    #[derive(Clone, Debug)]
4942    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
4943
4944    impl GetLocation {
4945        pub(crate) fn new(
4946            stub: std::sync::Arc<dyn super::super::stub::dynamic::Monitoring>,
4947        ) -> Self {
4948            Self(RequestBuilder::new(stub))
4949        }
4950
4951        /// Sets the full request, replacing any prior values.
4952        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
4953            self.0.request = v.into();
4954            self
4955        }
4956
4957        /// Sets all the options, replacing any prior values.
4958        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4959            self.0.options = v.into();
4960            self
4961        }
4962
4963        /// Sends the request.
4964        pub async fn send(self) -> Result<location::model::Location> {
4965            (*self.0.stub)
4966                .get_location(self.0.request, self.0.options)
4967                .await
4968                .map(gax::response::Response::into_body)
4969        }
4970
4971        /// Sets the value of [name][location::model::GetLocationRequest::name].
4972        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4973            self.0.request.name = v.into();
4974            self
4975        }
4976    }
4977
4978    #[doc(hidden)]
4979    impl gax::options::internal::RequestBuilder for GetLocation {
4980        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4981            &mut self.0.options
4982        }
4983    }
4984
4985    /// The request builder for [Monitoring::list_operations][crate::client::Monitoring::list_operations] calls.
4986    ///
4987    /// # Example
4988    /// ```no_run
4989    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
4990    /// use builder::monitoring::ListOperations;
4991    /// # tokio_test::block_on(async {
4992    /// use gax::paginator::ItemPaginator;
4993    ///
4994    /// let builder = prepare_request_builder();
4995    /// let mut items = builder.by_item();
4996    /// while let Some(result) = items.next().await {
4997    ///   let item = result?;
4998    /// }
4999    /// # gax::Result::<()>::Ok(()) });
5000    ///
5001    /// fn prepare_request_builder() -> ListOperations {
5002    ///   # panic!();
5003    ///   // ... details omitted ...
5004    /// }
5005    /// ```
5006    #[derive(Clone, Debug)]
5007    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
5008
5009    impl ListOperations {
5010        pub(crate) fn new(
5011            stub: std::sync::Arc<dyn super::super::stub::dynamic::Monitoring>,
5012        ) -> Self {
5013            Self(RequestBuilder::new(stub))
5014        }
5015
5016        /// Sets the full request, replacing any prior values.
5017        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
5018            mut self,
5019            v: V,
5020        ) -> Self {
5021            self.0.request = v.into();
5022            self
5023        }
5024
5025        /// Sets all the options, replacing any prior values.
5026        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5027            self.0.options = v.into();
5028            self
5029        }
5030
5031        /// Sends the request.
5032        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
5033            (*self.0.stub)
5034                .list_operations(self.0.request, self.0.options)
5035                .await
5036                .map(gax::response::Response::into_body)
5037        }
5038
5039        /// Streams each page in the collection.
5040        pub fn by_page(
5041            self,
5042        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
5043        {
5044            use std::clone::Clone;
5045            let token = self.0.request.page_token.clone();
5046            let execute = move |token: String| {
5047                let mut builder = self.clone();
5048                builder.0.request = builder.0.request.set_page_token(token);
5049                builder.send()
5050            };
5051            gax::paginator::internal::new_paginator(token, execute)
5052        }
5053
5054        /// Streams each item in the collection.
5055        pub fn by_item(
5056            self,
5057        ) -> impl gax::paginator::ItemPaginator<
5058            longrunning::model::ListOperationsResponse,
5059            gax::error::Error,
5060        > {
5061            use gax::paginator::Paginator;
5062            self.by_page().items()
5063        }
5064
5065        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
5066        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5067            self.0.request.name = v.into();
5068            self
5069        }
5070
5071        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
5072        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5073            self.0.request.filter = v.into();
5074            self
5075        }
5076
5077        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
5078        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5079            self.0.request.page_size = v.into();
5080            self
5081        }
5082
5083        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
5084        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5085            self.0.request.page_token = v.into();
5086            self
5087        }
5088
5089        /// Sets the value of [return_partial_success][longrunning::model::ListOperationsRequest::return_partial_success].
5090        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
5091            self.0.request.return_partial_success = v.into();
5092            self
5093        }
5094    }
5095
5096    #[doc(hidden)]
5097    impl gax::options::internal::RequestBuilder for ListOperations {
5098        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5099            &mut self.0.options
5100        }
5101    }
5102
5103    /// The request builder for [Monitoring::get_operation][crate::client::Monitoring::get_operation] calls.
5104    ///
5105    /// # Example
5106    /// ```no_run
5107    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
5108    /// use builder::monitoring::GetOperation;
5109    /// # tokio_test::block_on(async {
5110    ///
5111    /// let builder = prepare_request_builder();
5112    /// let response = builder.send().await?;
5113    /// # gax::Result::<()>::Ok(()) });
5114    ///
5115    /// fn prepare_request_builder() -> GetOperation {
5116    ///   # panic!();
5117    ///   // ... details omitted ...
5118    /// }
5119    /// ```
5120    #[derive(Clone, Debug)]
5121    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
5122
5123    impl GetOperation {
5124        pub(crate) fn new(
5125            stub: std::sync::Arc<dyn super::super::stub::dynamic::Monitoring>,
5126        ) -> Self {
5127            Self(RequestBuilder::new(stub))
5128        }
5129
5130        /// Sets the full request, replacing any prior values.
5131        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
5132            mut self,
5133            v: V,
5134        ) -> Self {
5135            self.0.request = v.into();
5136            self
5137        }
5138
5139        /// Sets all the options, replacing any prior values.
5140        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5141            self.0.options = v.into();
5142            self
5143        }
5144
5145        /// Sends the request.
5146        pub async fn send(self) -> Result<longrunning::model::Operation> {
5147            (*self.0.stub)
5148                .get_operation(self.0.request, self.0.options)
5149                .await
5150                .map(gax::response::Response::into_body)
5151        }
5152
5153        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
5154        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5155            self.0.request.name = v.into();
5156            self
5157        }
5158    }
5159
5160    #[doc(hidden)]
5161    impl gax::options::internal::RequestBuilder for GetOperation {
5162        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5163            &mut self.0.options
5164        }
5165    }
5166
5167    /// The request builder for [Monitoring::delete_operation][crate::client::Monitoring::delete_operation] calls.
5168    ///
5169    /// # Example
5170    /// ```no_run
5171    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
5172    /// use builder::monitoring::DeleteOperation;
5173    /// # tokio_test::block_on(async {
5174    ///
5175    /// let builder = prepare_request_builder();
5176    /// let response = builder.send().await?;
5177    /// # gax::Result::<()>::Ok(()) });
5178    ///
5179    /// fn prepare_request_builder() -> DeleteOperation {
5180    ///   # panic!();
5181    ///   // ... details omitted ...
5182    /// }
5183    /// ```
5184    #[derive(Clone, Debug)]
5185    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
5186
5187    impl DeleteOperation {
5188        pub(crate) fn new(
5189            stub: std::sync::Arc<dyn super::super::stub::dynamic::Monitoring>,
5190        ) -> Self {
5191            Self(RequestBuilder::new(stub))
5192        }
5193
5194        /// Sets the full request, replacing any prior values.
5195        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
5196            mut self,
5197            v: V,
5198        ) -> Self {
5199            self.0.request = v.into();
5200            self
5201        }
5202
5203        /// Sets all the options, replacing any prior values.
5204        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5205            self.0.options = v.into();
5206            self
5207        }
5208
5209        /// Sends the request.
5210        pub async fn send(self) -> Result<()> {
5211            (*self.0.stub)
5212                .delete_operation(self.0.request, self.0.options)
5213                .await
5214                .map(gax::response::Response::into_body)
5215        }
5216
5217        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
5218        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5219            self.0.request.name = v.into();
5220            self
5221        }
5222    }
5223
5224    #[doc(hidden)]
5225    impl gax::options::internal::RequestBuilder for DeleteOperation {
5226        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5227            &mut self.0.options
5228        }
5229    }
5230
5231    /// The request builder for [Monitoring::cancel_operation][crate::client::Monitoring::cancel_operation] calls.
5232    ///
5233    /// # Example
5234    /// ```no_run
5235    /// # use google_cloud_cloudsecuritycompliance_v1::builder;
5236    /// use builder::monitoring::CancelOperation;
5237    /// # tokio_test::block_on(async {
5238    ///
5239    /// let builder = prepare_request_builder();
5240    /// let response = builder.send().await?;
5241    /// # gax::Result::<()>::Ok(()) });
5242    ///
5243    /// fn prepare_request_builder() -> CancelOperation {
5244    ///   # panic!();
5245    ///   // ... details omitted ...
5246    /// }
5247    /// ```
5248    #[derive(Clone, Debug)]
5249    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
5250
5251    impl CancelOperation {
5252        pub(crate) fn new(
5253            stub: std::sync::Arc<dyn super::super::stub::dynamic::Monitoring>,
5254        ) -> Self {
5255            Self(RequestBuilder::new(stub))
5256        }
5257
5258        /// Sets the full request, replacing any prior values.
5259        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
5260            mut self,
5261            v: V,
5262        ) -> Self {
5263            self.0.request = v.into();
5264            self
5265        }
5266
5267        /// Sets all the options, replacing any prior values.
5268        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5269            self.0.options = v.into();
5270            self
5271        }
5272
5273        /// Sends the request.
5274        pub async fn send(self) -> Result<()> {
5275            (*self.0.stub)
5276                .cancel_operation(self.0.request, self.0.options)
5277                .await
5278                .map(gax::response::Response::into_body)
5279        }
5280
5281        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
5282        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5283            self.0.request.name = v.into();
5284            self
5285        }
5286    }
5287
5288    #[doc(hidden)]
5289    impl gax::options::internal::RequestBuilder for CancelOperation {
5290        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5291            &mut self.0.options
5292        }
5293    }
5294}