google_cloud_cloudsecuritycompliance_v1/
builder.rs

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