Skip to main content

google_cloud_cloudsecuritycompliance_v1/
builder.rs

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