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