Skip to main content

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