Skip to main content

google_cloud_securitycenter_v2/
builder.rs

1// Copyright 2025 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// Code generated by sidekick. DO NOT EDIT.
16
17/// Request and client builders for [SecurityCenter][crate::client::SecurityCenter].
18pub mod security_center {
19    use crate::Result;
20
21    /// A builder for [SecurityCenter][crate::client::SecurityCenter].
22    ///
23    /// ```
24    /// # async fn sample() -> google_cloud_gax::client_builder::Result<()> {
25    /// # use google_cloud_securitycenter_v2::*;
26    /// # use builder::security_center::ClientBuilder;
27    /// # use client::SecurityCenter;
28    /// let builder : ClientBuilder = SecurityCenter::builder();
29    /// let client = builder
30    ///     .with_endpoint("https://securitycenter.googleapis.com")
31    ///     .build().await?;
32    /// # Ok(()) }
33    /// ```
34    pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
35
36    pub(crate) mod client {
37        use super::super::super::client::SecurityCenter;
38        pub struct Factory;
39        impl crate::ClientFactory for Factory {
40            type Client = SecurityCenter;
41            type Credentials = gaxi::options::Credentials;
42            async fn build(
43                self,
44                config: gaxi::options::ClientConfig,
45            ) -> crate::ClientBuilderResult<Self::Client> {
46                Self::Client::new(config).await
47            }
48        }
49    }
50
51    /// Common implementation for [crate::client::SecurityCenter] 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::SecurityCenter>,
55        request: R,
56        options: crate::RequestOptions,
57    }
58
59    impl<R> RequestBuilder<R>
60    where
61        R: std::default::Default,
62    {
63        pub(crate) fn new(
64            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
65        ) -> Self {
66            Self {
67                stub,
68                request: R::default(),
69                options: crate::RequestOptions::default(),
70            }
71        }
72    }
73
74    /// The request builder for [SecurityCenter::batch_create_resource_value_configs][crate::client::SecurityCenter::batch_create_resource_value_configs] calls.
75    ///
76    /// # Example
77    /// ```
78    /// # use google_cloud_securitycenter_v2::builder::security_center::BatchCreateResourceValueConfigs;
79    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
80    ///
81    /// let builder = prepare_request_builder();
82    /// let response = builder.send().await?;
83    /// # Ok(()) }
84    ///
85    /// fn prepare_request_builder() -> BatchCreateResourceValueConfigs {
86    ///   # panic!();
87    ///   // ... details omitted ...
88    /// }
89    /// ```
90    #[derive(Clone, Debug)]
91    pub struct BatchCreateResourceValueConfigs(
92        RequestBuilder<crate::model::BatchCreateResourceValueConfigsRequest>,
93    );
94
95    impl BatchCreateResourceValueConfigs {
96        pub(crate) fn new(
97            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
98        ) -> Self {
99            Self(RequestBuilder::new(stub))
100        }
101
102        /// Sets the full request, replacing any prior values.
103        pub fn with_request<V: Into<crate::model::BatchCreateResourceValueConfigsRequest>>(
104            mut self,
105            v: V,
106        ) -> Self {
107            self.0.request = v.into();
108            self
109        }
110
111        /// Sets all the options, replacing any prior values.
112        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
113            self.0.options = v.into();
114            self
115        }
116
117        /// Sends the request.
118        pub async fn send(self) -> Result<crate::model::BatchCreateResourceValueConfigsResponse> {
119            (*self.0.stub)
120                .batch_create_resource_value_configs(self.0.request, self.0.options)
121                .await
122                .map(crate::Response::into_body)
123        }
124
125        /// Sets the value of [parent][crate::model::BatchCreateResourceValueConfigsRequest::parent].
126        ///
127        /// This is a **required** field for requests.
128        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
129            self.0.request.parent = v.into();
130            self
131        }
132
133        /// Sets the value of [requests][crate::model::BatchCreateResourceValueConfigsRequest::requests].
134        ///
135        /// This is a **required** field for requests.
136        pub fn set_requests<T, V>(mut self, v: T) -> Self
137        where
138            T: std::iter::IntoIterator<Item = V>,
139            V: std::convert::Into<crate::model::CreateResourceValueConfigRequest>,
140        {
141            use std::iter::Iterator;
142            self.0.request.requests = v.into_iter().map(|i| i.into()).collect();
143            self
144        }
145    }
146
147    #[doc(hidden)]
148    impl crate::RequestBuilder for BatchCreateResourceValueConfigs {
149        fn request_options(&mut self) -> &mut crate::RequestOptions {
150            &mut self.0.options
151        }
152    }
153
154    /// The request builder for [SecurityCenter::bulk_mute_findings][crate::client::SecurityCenter::bulk_mute_findings] calls.
155    ///
156    /// # Example
157    /// ```
158    /// # use google_cloud_securitycenter_v2::builder::security_center::BulkMuteFindings;
159    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
160    /// use google_cloud_lro::Poller;
161    ///
162    /// let builder = prepare_request_builder();
163    /// let response = builder.poller().until_done().await?;
164    /// # Ok(()) }
165    ///
166    /// fn prepare_request_builder() -> BulkMuteFindings {
167    ///   # panic!();
168    ///   // ... details omitted ...
169    /// }
170    /// ```
171    #[derive(Clone, Debug)]
172    pub struct BulkMuteFindings(RequestBuilder<crate::model::BulkMuteFindingsRequest>);
173
174    impl BulkMuteFindings {
175        pub(crate) fn new(
176            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
177        ) -> Self {
178            Self(RequestBuilder::new(stub))
179        }
180
181        /// Sets the full request, replacing any prior values.
182        pub fn with_request<V: Into<crate::model::BulkMuteFindingsRequest>>(
183            mut self,
184            v: V,
185        ) -> Self {
186            self.0.request = v.into();
187            self
188        }
189
190        /// Sets all the options, replacing any prior values.
191        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
192            self.0.options = v.into();
193            self
194        }
195
196        /// Sends the request.
197        ///
198        /// # Long running operations
199        ///
200        /// This starts, but does not poll, a longrunning operation. More information
201        /// on [bulk_mute_findings][crate::client::SecurityCenter::bulk_mute_findings].
202        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
203            (*self.0.stub)
204                .bulk_mute_findings(self.0.request, self.0.options)
205                .await
206                .map(crate::Response::into_body)
207        }
208
209        /// Creates a [Poller][google_cloud_lro::Poller] to work with `bulk_mute_findings`.
210        pub fn poller(
211            self,
212        ) -> impl google_cloud_lro::Poller<crate::model::BulkMuteFindingsResponse, ()> {
213            type Operation = google_cloud_lro::internal::Operation<
214                crate::model::BulkMuteFindingsResponse,
215                wkt::Empty,
216            >;
217            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
218            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
219
220            let stub = self.0.stub.clone();
221            let mut options = self.0.options.clone();
222            options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
223            let query = move |name| {
224                let stub = stub.clone();
225                let options = options.clone();
226                async {
227                    let op = GetOperation::new(stub)
228                        .set_name(name)
229                        .with_options(options)
230                        .send()
231                        .await?;
232                    Ok(Operation::new(op))
233                }
234            };
235
236            let start = move || async {
237                let op = self.send().await?;
238                Ok(Operation::new(op))
239            };
240
241            google_cloud_lro::internal::new_unit_metadata_poller(
242                polling_error_policy,
243                polling_backoff_policy,
244                start,
245                query,
246            )
247        }
248
249        /// Sets the value of [parent][crate::model::BulkMuteFindingsRequest::parent].
250        ///
251        /// This is a **required** field for requests.
252        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
253            self.0.request.parent = v.into();
254            self
255        }
256
257        /// Sets the value of [filter][crate::model::BulkMuteFindingsRequest::filter].
258        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
259            self.0.request.filter = v.into();
260            self
261        }
262
263        /// Sets the value of [mute_state][crate::model::BulkMuteFindingsRequest::mute_state].
264        pub fn set_mute_state<T: Into<crate::model::bulk_mute_findings_request::MuteState>>(
265            mut self,
266            v: T,
267        ) -> Self {
268            self.0.request.mute_state = v.into();
269            self
270        }
271    }
272
273    #[doc(hidden)]
274    impl crate::RequestBuilder for BulkMuteFindings {
275        fn request_options(&mut self) -> &mut crate::RequestOptions {
276            &mut self.0.options
277        }
278    }
279
280    /// The request builder for [SecurityCenter::create_big_query_export][crate::client::SecurityCenter::create_big_query_export] calls.
281    ///
282    /// # Example
283    /// ```
284    /// # use google_cloud_securitycenter_v2::builder::security_center::CreateBigQueryExport;
285    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
286    ///
287    /// let builder = prepare_request_builder();
288    /// let response = builder.send().await?;
289    /// # Ok(()) }
290    ///
291    /// fn prepare_request_builder() -> CreateBigQueryExport {
292    ///   # panic!();
293    ///   // ... details omitted ...
294    /// }
295    /// ```
296    #[derive(Clone, Debug)]
297    pub struct CreateBigQueryExport(RequestBuilder<crate::model::CreateBigQueryExportRequest>);
298
299    impl CreateBigQueryExport {
300        pub(crate) fn new(
301            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
302        ) -> Self {
303            Self(RequestBuilder::new(stub))
304        }
305
306        /// Sets the full request, replacing any prior values.
307        pub fn with_request<V: Into<crate::model::CreateBigQueryExportRequest>>(
308            mut self,
309            v: V,
310        ) -> Self {
311            self.0.request = v.into();
312            self
313        }
314
315        /// Sets all the options, replacing any prior values.
316        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
317            self.0.options = v.into();
318            self
319        }
320
321        /// Sends the request.
322        pub async fn send(self) -> Result<crate::model::BigQueryExport> {
323            (*self.0.stub)
324                .create_big_query_export(self.0.request, self.0.options)
325                .await
326                .map(crate::Response::into_body)
327        }
328
329        /// Sets the value of [parent][crate::model::CreateBigQueryExportRequest::parent].
330        ///
331        /// This is a **required** field for requests.
332        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
333            self.0.request.parent = v.into();
334            self
335        }
336
337        /// Sets the value of [big_query_export][crate::model::CreateBigQueryExportRequest::big_query_export].
338        ///
339        /// This is a **required** field for requests.
340        pub fn set_big_query_export<T>(mut self, v: T) -> Self
341        where
342            T: std::convert::Into<crate::model::BigQueryExport>,
343        {
344            self.0.request.big_query_export = std::option::Option::Some(v.into());
345            self
346        }
347
348        /// Sets or clears the value of [big_query_export][crate::model::CreateBigQueryExportRequest::big_query_export].
349        ///
350        /// This is a **required** field for requests.
351        pub fn set_or_clear_big_query_export<T>(mut self, v: std::option::Option<T>) -> Self
352        where
353            T: std::convert::Into<crate::model::BigQueryExport>,
354        {
355            self.0.request.big_query_export = v.map(|x| x.into());
356            self
357        }
358
359        /// Sets the value of [big_query_export_id][crate::model::CreateBigQueryExportRequest::big_query_export_id].
360        ///
361        /// This is a **required** field for requests.
362        pub fn set_big_query_export_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
363            self.0.request.big_query_export_id = v.into();
364            self
365        }
366    }
367
368    #[doc(hidden)]
369    impl crate::RequestBuilder for CreateBigQueryExport {
370        fn request_options(&mut self) -> &mut crate::RequestOptions {
371            &mut self.0.options
372        }
373    }
374
375    /// The request builder for [SecurityCenter::create_finding][crate::client::SecurityCenter::create_finding] calls.
376    ///
377    /// # Example
378    /// ```
379    /// # use google_cloud_securitycenter_v2::builder::security_center::CreateFinding;
380    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
381    ///
382    /// let builder = prepare_request_builder();
383    /// let response = builder.send().await?;
384    /// # Ok(()) }
385    ///
386    /// fn prepare_request_builder() -> CreateFinding {
387    ///   # panic!();
388    ///   // ... details omitted ...
389    /// }
390    /// ```
391    #[derive(Clone, Debug)]
392    pub struct CreateFinding(RequestBuilder<crate::model::CreateFindingRequest>);
393
394    impl CreateFinding {
395        pub(crate) fn new(
396            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
397        ) -> Self {
398            Self(RequestBuilder::new(stub))
399        }
400
401        /// Sets the full request, replacing any prior values.
402        pub fn with_request<V: Into<crate::model::CreateFindingRequest>>(mut self, v: V) -> Self {
403            self.0.request = v.into();
404            self
405        }
406
407        /// Sets all the options, replacing any prior values.
408        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
409            self.0.options = v.into();
410            self
411        }
412
413        /// Sends the request.
414        pub async fn send(self) -> Result<crate::model::Finding> {
415            (*self.0.stub)
416                .create_finding(self.0.request, self.0.options)
417                .await
418                .map(crate::Response::into_body)
419        }
420
421        /// Sets the value of [parent][crate::model::CreateFindingRequest::parent].
422        ///
423        /// This is a **required** field for requests.
424        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
425            self.0.request.parent = v.into();
426            self
427        }
428
429        /// Sets the value of [finding_id][crate::model::CreateFindingRequest::finding_id].
430        ///
431        /// This is a **required** field for requests.
432        pub fn set_finding_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
433            self.0.request.finding_id = v.into();
434            self
435        }
436
437        /// Sets the value of [finding][crate::model::CreateFindingRequest::finding].
438        ///
439        /// This is a **required** field for requests.
440        pub fn set_finding<T>(mut self, v: T) -> Self
441        where
442            T: std::convert::Into<crate::model::Finding>,
443        {
444            self.0.request.finding = std::option::Option::Some(v.into());
445            self
446        }
447
448        /// Sets or clears the value of [finding][crate::model::CreateFindingRequest::finding].
449        ///
450        /// This is a **required** field for requests.
451        pub fn set_or_clear_finding<T>(mut self, v: std::option::Option<T>) -> Self
452        where
453            T: std::convert::Into<crate::model::Finding>,
454        {
455            self.0.request.finding = v.map(|x| x.into());
456            self
457        }
458    }
459
460    #[doc(hidden)]
461    impl crate::RequestBuilder for CreateFinding {
462        fn request_options(&mut self) -> &mut crate::RequestOptions {
463            &mut self.0.options
464        }
465    }
466
467    /// The request builder for [SecurityCenter::create_mute_config][crate::client::SecurityCenter::create_mute_config] calls.
468    ///
469    /// # Example
470    /// ```
471    /// # use google_cloud_securitycenter_v2::builder::security_center::CreateMuteConfig;
472    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
473    ///
474    /// let builder = prepare_request_builder();
475    /// let response = builder.send().await?;
476    /// # Ok(()) }
477    ///
478    /// fn prepare_request_builder() -> CreateMuteConfig {
479    ///   # panic!();
480    ///   // ... details omitted ...
481    /// }
482    /// ```
483    #[derive(Clone, Debug)]
484    pub struct CreateMuteConfig(RequestBuilder<crate::model::CreateMuteConfigRequest>);
485
486    impl CreateMuteConfig {
487        pub(crate) fn new(
488            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
489        ) -> Self {
490            Self(RequestBuilder::new(stub))
491        }
492
493        /// Sets the full request, replacing any prior values.
494        pub fn with_request<V: Into<crate::model::CreateMuteConfigRequest>>(
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<crate::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<crate::model::MuteConfig> {
510            (*self.0.stub)
511                .create_mute_config(self.0.request, self.0.options)
512                .await
513                .map(crate::Response::into_body)
514        }
515
516        /// Sets the value of [parent][crate::model::CreateMuteConfigRequest::parent].
517        ///
518        /// This is a **required** field for requests.
519        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
520            self.0.request.parent = v.into();
521            self
522        }
523
524        /// Sets the value of [mute_config][crate::model::CreateMuteConfigRequest::mute_config].
525        ///
526        /// This is a **required** field for requests.
527        pub fn set_mute_config<T>(mut self, v: T) -> Self
528        where
529            T: std::convert::Into<crate::model::MuteConfig>,
530        {
531            self.0.request.mute_config = std::option::Option::Some(v.into());
532            self
533        }
534
535        /// Sets or clears the value of [mute_config][crate::model::CreateMuteConfigRequest::mute_config].
536        ///
537        /// This is a **required** field for requests.
538        pub fn set_or_clear_mute_config<T>(mut self, v: std::option::Option<T>) -> Self
539        where
540            T: std::convert::Into<crate::model::MuteConfig>,
541        {
542            self.0.request.mute_config = v.map(|x| x.into());
543            self
544        }
545
546        /// Sets the value of [mute_config_id][crate::model::CreateMuteConfigRequest::mute_config_id].
547        ///
548        /// This is a **required** field for requests.
549        pub fn set_mute_config_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
550            self.0.request.mute_config_id = v.into();
551            self
552        }
553    }
554
555    #[doc(hidden)]
556    impl crate::RequestBuilder for CreateMuteConfig {
557        fn request_options(&mut self) -> &mut crate::RequestOptions {
558            &mut self.0.options
559        }
560    }
561
562    /// The request builder for [SecurityCenter::create_notification_config][crate::client::SecurityCenter::create_notification_config] calls.
563    ///
564    /// # Example
565    /// ```
566    /// # use google_cloud_securitycenter_v2::builder::security_center::CreateNotificationConfig;
567    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
568    ///
569    /// let builder = prepare_request_builder();
570    /// let response = builder.send().await?;
571    /// # Ok(()) }
572    ///
573    /// fn prepare_request_builder() -> CreateNotificationConfig {
574    ///   # panic!();
575    ///   // ... details omitted ...
576    /// }
577    /// ```
578    #[derive(Clone, Debug)]
579    pub struct CreateNotificationConfig(
580        RequestBuilder<crate::model::CreateNotificationConfigRequest>,
581    );
582
583    impl CreateNotificationConfig {
584        pub(crate) fn new(
585            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
586        ) -> Self {
587            Self(RequestBuilder::new(stub))
588        }
589
590        /// Sets the full request, replacing any prior values.
591        pub fn with_request<V: Into<crate::model::CreateNotificationConfigRequest>>(
592            mut self,
593            v: V,
594        ) -> Self {
595            self.0.request = v.into();
596            self
597        }
598
599        /// Sets all the options, replacing any prior values.
600        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
601            self.0.options = v.into();
602            self
603        }
604
605        /// Sends the request.
606        pub async fn send(self) -> Result<crate::model::NotificationConfig> {
607            (*self.0.stub)
608                .create_notification_config(self.0.request, self.0.options)
609                .await
610                .map(crate::Response::into_body)
611        }
612
613        /// Sets the value of [parent][crate::model::CreateNotificationConfigRequest::parent].
614        ///
615        /// This is a **required** field for requests.
616        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
617            self.0.request.parent = v.into();
618            self
619        }
620
621        /// Sets the value of [config_id][crate::model::CreateNotificationConfigRequest::config_id].
622        ///
623        /// This is a **required** field for requests.
624        pub fn set_config_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
625            self.0.request.config_id = v.into();
626            self
627        }
628
629        /// Sets the value of [notification_config][crate::model::CreateNotificationConfigRequest::notification_config].
630        ///
631        /// This is a **required** field for requests.
632        pub fn set_notification_config<T>(mut self, v: T) -> Self
633        where
634            T: std::convert::Into<crate::model::NotificationConfig>,
635        {
636            self.0.request.notification_config = std::option::Option::Some(v.into());
637            self
638        }
639
640        /// Sets or clears the value of [notification_config][crate::model::CreateNotificationConfigRequest::notification_config].
641        ///
642        /// This is a **required** field for requests.
643        pub fn set_or_clear_notification_config<T>(mut self, v: std::option::Option<T>) -> Self
644        where
645            T: std::convert::Into<crate::model::NotificationConfig>,
646        {
647            self.0.request.notification_config = v.map(|x| x.into());
648            self
649        }
650    }
651
652    #[doc(hidden)]
653    impl crate::RequestBuilder for CreateNotificationConfig {
654        fn request_options(&mut self) -> &mut crate::RequestOptions {
655            &mut self.0.options
656        }
657    }
658
659    /// The request builder for [SecurityCenter::create_source][crate::client::SecurityCenter::create_source] calls.
660    ///
661    /// # Example
662    /// ```
663    /// # use google_cloud_securitycenter_v2::builder::security_center::CreateSource;
664    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
665    ///
666    /// let builder = prepare_request_builder();
667    /// let response = builder.send().await?;
668    /// # Ok(()) }
669    ///
670    /// fn prepare_request_builder() -> CreateSource {
671    ///   # panic!();
672    ///   // ... details omitted ...
673    /// }
674    /// ```
675    #[derive(Clone, Debug)]
676    pub struct CreateSource(RequestBuilder<crate::model::CreateSourceRequest>);
677
678    impl CreateSource {
679        pub(crate) fn new(
680            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
681        ) -> Self {
682            Self(RequestBuilder::new(stub))
683        }
684
685        /// Sets the full request, replacing any prior values.
686        pub fn with_request<V: Into<crate::model::CreateSourceRequest>>(mut self, v: V) -> Self {
687            self.0.request = v.into();
688            self
689        }
690
691        /// Sets all the options, replacing any prior values.
692        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
693            self.0.options = v.into();
694            self
695        }
696
697        /// Sends the request.
698        pub async fn send(self) -> Result<crate::model::Source> {
699            (*self.0.stub)
700                .create_source(self.0.request, self.0.options)
701                .await
702                .map(crate::Response::into_body)
703        }
704
705        /// Sets the value of [parent][crate::model::CreateSourceRequest::parent].
706        ///
707        /// This is a **required** field for requests.
708        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
709            self.0.request.parent = v.into();
710            self
711        }
712
713        /// Sets the value of [source][crate::model::CreateSourceRequest::source].
714        ///
715        /// This is a **required** field for requests.
716        pub fn set_source<T>(mut self, v: T) -> Self
717        where
718            T: std::convert::Into<crate::model::Source>,
719        {
720            self.0.request.source = std::option::Option::Some(v.into());
721            self
722        }
723
724        /// Sets or clears the value of [source][crate::model::CreateSourceRequest::source].
725        ///
726        /// This is a **required** field for requests.
727        pub fn set_or_clear_source<T>(mut self, v: std::option::Option<T>) -> Self
728        where
729            T: std::convert::Into<crate::model::Source>,
730        {
731            self.0.request.source = v.map(|x| x.into());
732            self
733        }
734    }
735
736    #[doc(hidden)]
737    impl crate::RequestBuilder for CreateSource {
738        fn request_options(&mut self) -> &mut crate::RequestOptions {
739            &mut self.0.options
740        }
741    }
742
743    /// The request builder for [SecurityCenter::delete_big_query_export][crate::client::SecurityCenter::delete_big_query_export] calls.
744    ///
745    /// # Example
746    /// ```
747    /// # use google_cloud_securitycenter_v2::builder::security_center::DeleteBigQueryExport;
748    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
749    ///
750    /// let builder = prepare_request_builder();
751    /// let response = builder.send().await?;
752    /// # Ok(()) }
753    ///
754    /// fn prepare_request_builder() -> DeleteBigQueryExport {
755    ///   # panic!();
756    ///   // ... details omitted ...
757    /// }
758    /// ```
759    #[derive(Clone, Debug)]
760    pub struct DeleteBigQueryExport(RequestBuilder<crate::model::DeleteBigQueryExportRequest>);
761
762    impl DeleteBigQueryExport {
763        pub(crate) fn new(
764            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
765        ) -> Self {
766            Self(RequestBuilder::new(stub))
767        }
768
769        /// Sets the full request, replacing any prior values.
770        pub fn with_request<V: Into<crate::model::DeleteBigQueryExportRequest>>(
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<crate::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<()> {
786            (*self.0.stub)
787                .delete_big_query_export(self.0.request, self.0.options)
788                .await
789                .map(crate::Response::into_body)
790        }
791
792        /// Sets the value of [name][crate::model::DeleteBigQueryExportRequest::name].
793        ///
794        /// This is a **required** field for requests.
795        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
796            self.0.request.name = v.into();
797            self
798        }
799    }
800
801    #[doc(hidden)]
802    impl crate::RequestBuilder for DeleteBigQueryExport {
803        fn request_options(&mut self) -> &mut crate::RequestOptions {
804            &mut self.0.options
805        }
806    }
807
808    /// The request builder for [SecurityCenter::delete_mute_config][crate::client::SecurityCenter::delete_mute_config] calls.
809    ///
810    /// # Example
811    /// ```
812    /// # use google_cloud_securitycenter_v2::builder::security_center::DeleteMuteConfig;
813    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
814    ///
815    /// let builder = prepare_request_builder();
816    /// let response = builder.send().await?;
817    /// # Ok(()) }
818    ///
819    /// fn prepare_request_builder() -> DeleteMuteConfig {
820    ///   # panic!();
821    ///   // ... details omitted ...
822    /// }
823    /// ```
824    #[derive(Clone, Debug)]
825    pub struct DeleteMuteConfig(RequestBuilder<crate::model::DeleteMuteConfigRequest>);
826
827    impl DeleteMuteConfig {
828        pub(crate) fn new(
829            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
830        ) -> Self {
831            Self(RequestBuilder::new(stub))
832        }
833
834        /// Sets the full request, replacing any prior values.
835        pub fn with_request<V: Into<crate::model::DeleteMuteConfigRequest>>(
836            mut self,
837            v: V,
838        ) -> Self {
839            self.0.request = v.into();
840            self
841        }
842
843        /// Sets all the options, replacing any prior values.
844        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
845            self.0.options = v.into();
846            self
847        }
848
849        /// Sends the request.
850        pub async fn send(self) -> Result<()> {
851            (*self.0.stub)
852                .delete_mute_config(self.0.request, self.0.options)
853                .await
854                .map(crate::Response::into_body)
855        }
856
857        /// Sets the value of [name][crate::model::DeleteMuteConfigRequest::name].
858        ///
859        /// This is a **required** field for requests.
860        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
861            self.0.request.name = v.into();
862            self
863        }
864    }
865
866    #[doc(hidden)]
867    impl crate::RequestBuilder for DeleteMuteConfig {
868        fn request_options(&mut self) -> &mut crate::RequestOptions {
869            &mut self.0.options
870        }
871    }
872
873    /// The request builder for [SecurityCenter::delete_notification_config][crate::client::SecurityCenter::delete_notification_config] calls.
874    ///
875    /// # Example
876    /// ```
877    /// # use google_cloud_securitycenter_v2::builder::security_center::DeleteNotificationConfig;
878    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
879    ///
880    /// let builder = prepare_request_builder();
881    /// let response = builder.send().await?;
882    /// # Ok(()) }
883    ///
884    /// fn prepare_request_builder() -> DeleteNotificationConfig {
885    ///   # panic!();
886    ///   // ... details omitted ...
887    /// }
888    /// ```
889    #[derive(Clone, Debug)]
890    pub struct DeleteNotificationConfig(
891        RequestBuilder<crate::model::DeleteNotificationConfigRequest>,
892    );
893
894    impl DeleteNotificationConfig {
895        pub(crate) fn new(
896            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
897        ) -> Self {
898            Self(RequestBuilder::new(stub))
899        }
900
901        /// Sets the full request, replacing any prior values.
902        pub fn with_request<V: Into<crate::model::DeleteNotificationConfigRequest>>(
903            mut self,
904            v: V,
905        ) -> Self {
906            self.0.request = v.into();
907            self
908        }
909
910        /// Sets all the options, replacing any prior values.
911        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
912            self.0.options = v.into();
913            self
914        }
915
916        /// Sends the request.
917        pub async fn send(self) -> Result<()> {
918            (*self.0.stub)
919                .delete_notification_config(self.0.request, self.0.options)
920                .await
921                .map(crate::Response::into_body)
922        }
923
924        /// Sets the value of [name][crate::model::DeleteNotificationConfigRequest::name].
925        ///
926        /// This is a **required** field for requests.
927        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
928            self.0.request.name = v.into();
929            self
930        }
931    }
932
933    #[doc(hidden)]
934    impl crate::RequestBuilder for DeleteNotificationConfig {
935        fn request_options(&mut self) -> &mut crate::RequestOptions {
936            &mut self.0.options
937        }
938    }
939
940    /// The request builder for [SecurityCenter::delete_resource_value_config][crate::client::SecurityCenter::delete_resource_value_config] calls.
941    ///
942    /// # Example
943    /// ```
944    /// # use google_cloud_securitycenter_v2::builder::security_center::DeleteResourceValueConfig;
945    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
946    ///
947    /// let builder = prepare_request_builder();
948    /// let response = builder.send().await?;
949    /// # Ok(()) }
950    ///
951    /// fn prepare_request_builder() -> DeleteResourceValueConfig {
952    ///   # panic!();
953    ///   // ... details omitted ...
954    /// }
955    /// ```
956    #[derive(Clone, Debug)]
957    pub struct DeleteResourceValueConfig(
958        RequestBuilder<crate::model::DeleteResourceValueConfigRequest>,
959    );
960
961    impl DeleteResourceValueConfig {
962        pub(crate) fn new(
963            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
964        ) -> Self {
965            Self(RequestBuilder::new(stub))
966        }
967
968        /// Sets the full request, replacing any prior values.
969        pub fn with_request<V: Into<crate::model::DeleteResourceValueConfigRequest>>(
970            mut self,
971            v: V,
972        ) -> Self {
973            self.0.request = v.into();
974            self
975        }
976
977        /// Sets all the options, replacing any prior values.
978        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
979            self.0.options = v.into();
980            self
981        }
982
983        /// Sends the request.
984        pub async fn send(self) -> Result<()> {
985            (*self.0.stub)
986                .delete_resource_value_config(self.0.request, self.0.options)
987                .await
988                .map(crate::Response::into_body)
989        }
990
991        /// Sets the value of [name][crate::model::DeleteResourceValueConfigRequest::name].
992        ///
993        /// This is a **required** field for requests.
994        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
995            self.0.request.name = v.into();
996            self
997        }
998    }
999
1000    #[doc(hidden)]
1001    impl crate::RequestBuilder for DeleteResourceValueConfig {
1002        fn request_options(&mut self) -> &mut crate::RequestOptions {
1003            &mut self.0.options
1004        }
1005    }
1006
1007    /// The request builder for [SecurityCenter::get_big_query_export][crate::client::SecurityCenter::get_big_query_export] calls.
1008    ///
1009    /// # Example
1010    /// ```
1011    /// # use google_cloud_securitycenter_v2::builder::security_center::GetBigQueryExport;
1012    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
1013    ///
1014    /// let builder = prepare_request_builder();
1015    /// let response = builder.send().await?;
1016    /// # Ok(()) }
1017    ///
1018    /// fn prepare_request_builder() -> GetBigQueryExport {
1019    ///   # panic!();
1020    ///   // ... details omitted ...
1021    /// }
1022    /// ```
1023    #[derive(Clone, Debug)]
1024    pub struct GetBigQueryExport(RequestBuilder<crate::model::GetBigQueryExportRequest>);
1025
1026    impl GetBigQueryExport {
1027        pub(crate) fn new(
1028            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
1029        ) -> Self {
1030            Self(RequestBuilder::new(stub))
1031        }
1032
1033        /// Sets the full request, replacing any prior values.
1034        pub fn with_request<V: Into<crate::model::GetBigQueryExportRequest>>(
1035            mut self,
1036            v: V,
1037        ) -> Self {
1038            self.0.request = v.into();
1039            self
1040        }
1041
1042        /// Sets all the options, replacing any prior values.
1043        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1044            self.0.options = v.into();
1045            self
1046        }
1047
1048        /// Sends the request.
1049        pub async fn send(self) -> Result<crate::model::BigQueryExport> {
1050            (*self.0.stub)
1051                .get_big_query_export(self.0.request, self.0.options)
1052                .await
1053                .map(crate::Response::into_body)
1054        }
1055
1056        /// Sets the value of [name][crate::model::GetBigQueryExportRequest::name].
1057        ///
1058        /// This is a **required** field for requests.
1059        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1060            self.0.request.name = v.into();
1061            self
1062        }
1063    }
1064
1065    #[doc(hidden)]
1066    impl crate::RequestBuilder for GetBigQueryExport {
1067        fn request_options(&mut self) -> &mut crate::RequestOptions {
1068            &mut self.0.options
1069        }
1070    }
1071
1072    /// The request builder for [SecurityCenter::get_simulation][crate::client::SecurityCenter::get_simulation] calls.
1073    ///
1074    /// # Example
1075    /// ```
1076    /// # use google_cloud_securitycenter_v2::builder::security_center::GetSimulation;
1077    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
1078    ///
1079    /// let builder = prepare_request_builder();
1080    /// let response = builder.send().await?;
1081    /// # Ok(()) }
1082    ///
1083    /// fn prepare_request_builder() -> GetSimulation {
1084    ///   # panic!();
1085    ///   // ... details omitted ...
1086    /// }
1087    /// ```
1088    #[derive(Clone, Debug)]
1089    pub struct GetSimulation(RequestBuilder<crate::model::GetSimulationRequest>);
1090
1091    impl GetSimulation {
1092        pub(crate) fn new(
1093            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
1094        ) -> Self {
1095            Self(RequestBuilder::new(stub))
1096        }
1097
1098        /// Sets the full request, replacing any prior values.
1099        pub fn with_request<V: Into<crate::model::GetSimulationRequest>>(mut self, v: V) -> Self {
1100            self.0.request = v.into();
1101            self
1102        }
1103
1104        /// Sets all the options, replacing any prior values.
1105        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1106            self.0.options = v.into();
1107            self
1108        }
1109
1110        /// Sends the request.
1111        pub async fn send(self) -> Result<crate::model::Simulation> {
1112            (*self.0.stub)
1113                .get_simulation(self.0.request, self.0.options)
1114                .await
1115                .map(crate::Response::into_body)
1116        }
1117
1118        /// Sets the value of [name][crate::model::GetSimulationRequest::name].
1119        ///
1120        /// This is a **required** field for requests.
1121        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1122            self.0.request.name = v.into();
1123            self
1124        }
1125    }
1126
1127    #[doc(hidden)]
1128    impl crate::RequestBuilder for GetSimulation {
1129        fn request_options(&mut self) -> &mut crate::RequestOptions {
1130            &mut self.0.options
1131        }
1132    }
1133
1134    /// The request builder for [SecurityCenter::get_valued_resource][crate::client::SecurityCenter::get_valued_resource] calls.
1135    ///
1136    /// # Example
1137    /// ```
1138    /// # use google_cloud_securitycenter_v2::builder::security_center::GetValuedResource;
1139    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
1140    ///
1141    /// let builder = prepare_request_builder();
1142    /// let response = builder.send().await?;
1143    /// # Ok(()) }
1144    ///
1145    /// fn prepare_request_builder() -> GetValuedResource {
1146    ///   # panic!();
1147    ///   // ... details omitted ...
1148    /// }
1149    /// ```
1150    #[derive(Clone, Debug)]
1151    pub struct GetValuedResource(RequestBuilder<crate::model::GetValuedResourceRequest>);
1152
1153    impl GetValuedResource {
1154        pub(crate) fn new(
1155            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
1156        ) -> Self {
1157            Self(RequestBuilder::new(stub))
1158        }
1159
1160        /// Sets the full request, replacing any prior values.
1161        pub fn with_request<V: Into<crate::model::GetValuedResourceRequest>>(
1162            mut self,
1163            v: V,
1164        ) -> Self {
1165            self.0.request = v.into();
1166            self
1167        }
1168
1169        /// Sets all the options, replacing any prior values.
1170        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1171            self.0.options = v.into();
1172            self
1173        }
1174
1175        /// Sends the request.
1176        pub async fn send(self) -> Result<crate::model::ValuedResource> {
1177            (*self.0.stub)
1178                .get_valued_resource(self.0.request, self.0.options)
1179                .await
1180                .map(crate::Response::into_body)
1181        }
1182
1183        /// Sets the value of [name][crate::model::GetValuedResourceRequest::name].
1184        ///
1185        /// This is a **required** field for requests.
1186        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1187            self.0.request.name = v.into();
1188            self
1189        }
1190    }
1191
1192    #[doc(hidden)]
1193    impl crate::RequestBuilder for GetValuedResource {
1194        fn request_options(&mut self) -> &mut crate::RequestOptions {
1195            &mut self.0.options
1196        }
1197    }
1198
1199    /// The request builder for [SecurityCenter::get_iam_policy][crate::client::SecurityCenter::get_iam_policy] calls.
1200    ///
1201    /// # Example
1202    /// ```
1203    /// # use google_cloud_securitycenter_v2::builder::security_center::GetIamPolicy;
1204    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
1205    ///
1206    /// let builder = prepare_request_builder();
1207    /// let response = builder.send().await?;
1208    /// # Ok(()) }
1209    ///
1210    /// fn prepare_request_builder() -> GetIamPolicy {
1211    ///   # panic!();
1212    ///   // ... details omitted ...
1213    /// }
1214    /// ```
1215    #[derive(Clone, Debug)]
1216    pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
1217
1218    impl GetIamPolicy {
1219        pub(crate) fn new(
1220            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
1221        ) -> Self {
1222            Self(RequestBuilder::new(stub))
1223        }
1224
1225        /// Sets the full request, replacing any prior values.
1226        pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
1227            mut self,
1228            v: V,
1229        ) -> Self {
1230            self.0.request = v.into();
1231            self
1232        }
1233
1234        /// Sets all the options, replacing any prior values.
1235        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1236            self.0.options = v.into();
1237            self
1238        }
1239
1240        /// Sends the request.
1241        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
1242            (*self.0.stub)
1243                .get_iam_policy(self.0.request, self.0.options)
1244                .await
1245                .map(crate::Response::into_body)
1246        }
1247
1248        /// Sets the value of [resource][google_cloud_iam_v1::model::GetIamPolicyRequest::resource].
1249        ///
1250        /// This is a **required** field for requests.
1251        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1252            self.0.request.resource = v.into();
1253            self
1254        }
1255
1256        /// Sets the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
1257        pub fn set_options<T>(mut self, v: T) -> Self
1258        where
1259            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
1260        {
1261            self.0.request.options = std::option::Option::Some(v.into());
1262            self
1263        }
1264
1265        /// Sets or clears the value of [options][google_cloud_iam_v1::model::GetIamPolicyRequest::options].
1266        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
1267        where
1268            T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
1269        {
1270            self.0.request.options = v.map(|x| x.into());
1271            self
1272        }
1273    }
1274
1275    #[doc(hidden)]
1276    impl crate::RequestBuilder for GetIamPolicy {
1277        fn request_options(&mut self) -> &mut crate::RequestOptions {
1278            &mut self.0.options
1279        }
1280    }
1281
1282    /// The request builder for [SecurityCenter::get_mute_config][crate::client::SecurityCenter::get_mute_config] calls.
1283    ///
1284    /// # Example
1285    /// ```
1286    /// # use google_cloud_securitycenter_v2::builder::security_center::GetMuteConfig;
1287    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
1288    ///
1289    /// let builder = prepare_request_builder();
1290    /// let response = builder.send().await?;
1291    /// # Ok(()) }
1292    ///
1293    /// fn prepare_request_builder() -> GetMuteConfig {
1294    ///   # panic!();
1295    ///   // ... details omitted ...
1296    /// }
1297    /// ```
1298    #[derive(Clone, Debug)]
1299    pub struct GetMuteConfig(RequestBuilder<crate::model::GetMuteConfigRequest>);
1300
1301    impl GetMuteConfig {
1302        pub(crate) fn new(
1303            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
1304        ) -> Self {
1305            Self(RequestBuilder::new(stub))
1306        }
1307
1308        /// Sets the full request, replacing any prior values.
1309        pub fn with_request<V: Into<crate::model::GetMuteConfigRequest>>(mut self, v: V) -> Self {
1310            self.0.request = v.into();
1311            self
1312        }
1313
1314        /// Sets all the options, replacing any prior values.
1315        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1316            self.0.options = v.into();
1317            self
1318        }
1319
1320        /// Sends the request.
1321        pub async fn send(self) -> Result<crate::model::MuteConfig> {
1322            (*self.0.stub)
1323                .get_mute_config(self.0.request, self.0.options)
1324                .await
1325                .map(crate::Response::into_body)
1326        }
1327
1328        /// Sets the value of [name][crate::model::GetMuteConfigRequest::name].
1329        ///
1330        /// This is a **required** field for requests.
1331        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1332            self.0.request.name = v.into();
1333            self
1334        }
1335    }
1336
1337    #[doc(hidden)]
1338    impl crate::RequestBuilder for GetMuteConfig {
1339        fn request_options(&mut self) -> &mut crate::RequestOptions {
1340            &mut self.0.options
1341        }
1342    }
1343
1344    /// The request builder for [SecurityCenter::get_notification_config][crate::client::SecurityCenter::get_notification_config] calls.
1345    ///
1346    /// # Example
1347    /// ```
1348    /// # use google_cloud_securitycenter_v2::builder::security_center::GetNotificationConfig;
1349    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
1350    ///
1351    /// let builder = prepare_request_builder();
1352    /// let response = builder.send().await?;
1353    /// # Ok(()) }
1354    ///
1355    /// fn prepare_request_builder() -> GetNotificationConfig {
1356    ///   # panic!();
1357    ///   // ... details omitted ...
1358    /// }
1359    /// ```
1360    #[derive(Clone, Debug)]
1361    pub struct GetNotificationConfig(RequestBuilder<crate::model::GetNotificationConfigRequest>);
1362
1363    impl GetNotificationConfig {
1364        pub(crate) fn new(
1365            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
1366        ) -> Self {
1367            Self(RequestBuilder::new(stub))
1368        }
1369
1370        /// Sets the full request, replacing any prior values.
1371        pub fn with_request<V: Into<crate::model::GetNotificationConfigRequest>>(
1372            mut self,
1373            v: V,
1374        ) -> Self {
1375            self.0.request = v.into();
1376            self
1377        }
1378
1379        /// Sets all the options, replacing any prior values.
1380        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1381            self.0.options = v.into();
1382            self
1383        }
1384
1385        /// Sends the request.
1386        pub async fn send(self) -> Result<crate::model::NotificationConfig> {
1387            (*self.0.stub)
1388                .get_notification_config(self.0.request, self.0.options)
1389                .await
1390                .map(crate::Response::into_body)
1391        }
1392
1393        /// Sets the value of [name][crate::model::GetNotificationConfigRequest::name].
1394        ///
1395        /// This is a **required** field for requests.
1396        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1397            self.0.request.name = v.into();
1398            self
1399        }
1400    }
1401
1402    #[doc(hidden)]
1403    impl crate::RequestBuilder for GetNotificationConfig {
1404        fn request_options(&mut self) -> &mut crate::RequestOptions {
1405            &mut self.0.options
1406        }
1407    }
1408
1409    /// The request builder for [SecurityCenter::get_resource_value_config][crate::client::SecurityCenter::get_resource_value_config] calls.
1410    ///
1411    /// # Example
1412    /// ```
1413    /// # use google_cloud_securitycenter_v2::builder::security_center::GetResourceValueConfig;
1414    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
1415    ///
1416    /// let builder = prepare_request_builder();
1417    /// let response = builder.send().await?;
1418    /// # Ok(()) }
1419    ///
1420    /// fn prepare_request_builder() -> GetResourceValueConfig {
1421    ///   # panic!();
1422    ///   // ... details omitted ...
1423    /// }
1424    /// ```
1425    #[derive(Clone, Debug)]
1426    pub struct GetResourceValueConfig(RequestBuilder<crate::model::GetResourceValueConfigRequest>);
1427
1428    impl GetResourceValueConfig {
1429        pub(crate) fn new(
1430            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
1431        ) -> Self {
1432            Self(RequestBuilder::new(stub))
1433        }
1434
1435        /// Sets the full request, replacing any prior values.
1436        pub fn with_request<V: Into<crate::model::GetResourceValueConfigRequest>>(
1437            mut self,
1438            v: V,
1439        ) -> Self {
1440            self.0.request = v.into();
1441            self
1442        }
1443
1444        /// Sets all the options, replacing any prior values.
1445        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1446            self.0.options = v.into();
1447            self
1448        }
1449
1450        /// Sends the request.
1451        pub async fn send(self) -> Result<crate::model::ResourceValueConfig> {
1452            (*self.0.stub)
1453                .get_resource_value_config(self.0.request, self.0.options)
1454                .await
1455                .map(crate::Response::into_body)
1456        }
1457
1458        /// Sets the value of [name][crate::model::GetResourceValueConfigRequest::name].
1459        ///
1460        /// This is a **required** field for requests.
1461        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1462            self.0.request.name = v.into();
1463            self
1464        }
1465    }
1466
1467    #[doc(hidden)]
1468    impl crate::RequestBuilder for GetResourceValueConfig {
1469        fn request_options(&mut self) -> &mut crate::RequestOptions {
1470            &mut self.0.options
1471        }
1472    }
1473
1474    /// The request builder for [SecurityCenter::get_source][crate::client::SecurityCenter::get_source] calls.
1475    ///
1476    /// # Example
1477    /// ```
1478    /// # use google_cloud_securitycenter_v2::builder::security_center::GetSource;
1479    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
1480    ///
1481    /// let builder = prepare_request_builder();
1482    /// let response = builder.send().await?;
1483    /// # Ok(()) }
1484    ///
1485    /// fn prepare_request_builder() -> GetSource {
1486    ///   # panic!();
1487    ///   // ... details omitted ...
1488    /// }
1489    /// ```
1490    #[derive(Clone, Debug)]
1491    pub struct GetSource(RequestBuilder<crate::model::GetSourceRequest>);
1492
1493    impl GetSource {
1494        pub(crate) fn new(
1495            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
1496        ) -> Self {
1497            Self(RequestBuilder::new(stub))
1498        }
1499
1500        /// Sets the full request, replacing any prior values.
1501        pub fn with_request<V: Into<crate::model::GetSourceRequest>>(mut self, v: V) -> Self {
1502            self.0.request = v.into();
1503            self
1504        }
1505
1506        /// Sets all the options, replacing any prior values.
1507        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1508            self.0.options = v.into();
1509            self
1510        }
1511
1512        /// Sends the request.
1513        pub async fn send(self) -> Result<crate::model::Source> {
1514            (*self.0.stub)
1515                .get_source(self.0.request, self.0.options)
1516                .await
1517                .map(crate::Response::into_body)
1518        }
1519
1520        /// Sets the value of [name][crate::model::GetSourceRequest::name].
1521        ///
1522        /// This is a **required** field for requests.
1523        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1524            self.0.request.name = v.into();
1525            self
1526        }
1527    }
1528
1529    #[doc(hidden)]
1530    impl crate::RequestBuilder for GetSource {
1531        fn request_options(&mut self) -> &mut crate::RequestOptions {
1532            &mut self.0.options
1533        }
1534    }
1535
1536    /// The request builder for [SecurityCenter::group_findings][crate::client::SecurityCenter::group_findings] calls.
1537    ///
1538    /// # Example
1539    /// ```
1540    /// # use google_cloud_securitycenter_v2::builder::security_center::GroupFindings;
1541    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
1542    /// use google_cloud_gax::paginator::ItemPaginator;
1543    ///
1544    /// let builder = prepare_request_builder();
1545    /// let mut items = builder.by_item();
1546    /// while let Some(result) = items.next().await {
1547    ///   let item = result?;
1548    /// }
1549    /// # Ok(()) }
1550    ///
1551    /// fn prepare_request_builder() -> GroupFindings {
1552    ///   # panic!();
1553    ///   // ... details omitted ...
1554    /// }
1555    /// ```
1556    #[derive(Clone, Debug)]
1557    pub struct GroupFindings(RequestBuilder<crate::model::GroupFindingsRequest>);
1558
1559    impl GroupFindings {
1560        pub(crate) fn new(
1561            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
1562        ) -> Self {
1563            Self(RequestBuilder::new(stub))
1564        }
1565
1566        /// Sets the full request, replacing any prior values.
1567        pub fn with_request<V: Into<crate::model::GroupFindingsRequest>>(mut self, v: V) -> Self {
1568            self.0.request = v.into();
1569            self
1570        }
1571
1572        /// Sets all the options, replacing any prior values.
1573        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1574            self.0.options = v.into();
1575            self
1576        }
1577
1578        /// Sends the request.
1579        pub async fn send(self) -> Result<crate::model::GroupFindingsResponse> {
1580            (*self.0.stub)
1581                .group_findings(self.0.request, self.0.options)
1582                .await
1583                .map(crate::Response::into_body)
1584        }
1585
1586        /// Streams each page in the collection.
1587        pub fn by_page(
1588            self,
1589        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::GroupFindingsResponse, crate::Error>
1590        {
1591            use std::clone::Clone;
1592            let token = self.0.request.page_token.clone();
1593            let execute = move |token: String| {
1594                let mut builder = self.clone();
1595                builder.0.request = builder.0.request.set_page_token(token);
1596                builder.send()
1597            };
1598            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1599        }
1600
1601        /// Streams each item in the collection.
1602        pub fn by_item(
1603            self,
1604        ) -> impl google_cloud_gax::paginator::ItemPaginator<
1605            crate::model::GroupFindingsResponse,
1606            crate::Error,
1607        > {
1608            use google_cloud_gax::paginator::Paginator;
1609            self.by_page().items()
1610        }
1611
1612        /// Sets the value of [parent][crate::model::GroupFindingsRequest::parent].
1613        ///
1614        /// This is a **required** field for requests.
1615        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1616            self.0.request.parent = v.into();
1617            self
1618        }
1619
1620        /// Sets the value of [filter][crate::model::GroupFindingsRequest::filter].
1621        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1622            self.0.request.filter = v.into();
1623            self
1624        }
1625
1626        /// Sets the value of [group_by][crate::model::GroupFindingsRequest::group_by].
1627        ///
1628        /// This is a **required** field for requests.
1629        pub fn set_group_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1630            self.0.request.group_by = v.into();
1631            self
1632        }
1633
1634        /// Sets the value of [page_token][crate::model::GroupFindingsRequest::page_token].
1635        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1636            self.0.request.page_token = v.into();
1637            self
1638        }
1639
1640        /// Sets the value of [page_size][crate::model::GroupFindingsRequest::page_size].
1641        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1642            self.0.request.page_size = v.into();
1643            self
1644        }
1645    }
1646
1647    #[doc(hidden)]
1648    impl crate::RequestBuilder for GroupFindings {
1649        fn request_options(&mut self) -> &mut crate::RequestOptions {
1650            &mut self.0.options
1651        }
1652    }
1653
1654    /// The request builder for [SecurityCenter::list_attack_paths][crate::client::SecurityCenter::list_attack_paths] calls.
1655    ///
1656    /// # Example
1657    /// ```
1658    /// # use google_cloud_securitycenter_v2::builder::security_center::ListAttackPaths;
1659    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
1660    /// use google_cloud_gax::paginator::ItemPaginator;
1661    ///
1662    /// let builder = prepare_request_builder();
1663    /// let mut items = builder.by_item();
1664    /// while let Some(result) = items.next().await {
1665    ///   let item = result?;
1666    /// }
1667    /// # Ok(()) }
1668    ///
1669    /// fn prepare_request_builder() -> ListAttackPaths {
1670    ///   # panic!();
1671    ///   // ... details omitted ...
1672    /// }
1673    /// ```
1674    #[derive(Clone, Debug)]
1675    pub struct ListAttackPaths(RequestBuilder<crate::model::ListAttackPathsRequest>);
1676
1677    impl ListAttackPaths {
1678        pub(crate) fn new(
1679            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
1680        ) -> Self {
1681            Self(RequestBuilder::new(stub))
1682        }
1683
1684        /// Sets the full request, replacing any prior values.
1685        pub fn with_request<V: Into<crate::model::ListAttackPathsRequest>>(mut self, v: V) -> Self {
1686            self.0.request = v.into();
1687            self
1688        }
1689
1690        /// Sets all the options, replacing any prior values.
1691        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1692            self.0.options = v.into();
1693            self
1694        }
1695
1696        /// Sends the request.
1697        pub async fn send(self) -> Result<crate::model::ListAttackPathsResponse> {
1698            (*self.0.stub)
1699                .list_attack_paths(self.0.request, self.0.options)
1700                .await
1701                .map(crate::Response::into_body)
1702        }
1703
1704        /// Streams each page in the collection.
1705        pub fn by_page(
1706            self,
1707        ) -> impl google_cloud_gax::paginator::Paginator<
1708            crate::model::ListAttackPathsResponse,
1709            crate::Error,
1710        > {
1711            use std::clone::Clone;
1712            let token = self.0.request.page_token.clone();
1713            let execute = move |token: String| {
1714                let mut builder = self.clone();
1715                builder.0.request = builder.0.request.set_page_token(token);
1716                builder.send()
1717            };
1718            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1719        }
1720
1721        /// Streams each item in the collection.
1722        pub fn by_item(
1723            self,
1724        ) -> impl google_cloud_gax::paginator::ItemPaginator<
1725            crate::model::ListAttackPathsResponse,
1726            crate::Error,
1727        > {
1728            use google_cloud_gax::paginator::Paginator;
1729            self.by_page().items()
1730        }
1731
1732        /// Sets the value of [parent][crate::model::ListAttackPathsRequest::parent].
1733        ///
1734        /// This is a **required** field for requests.
1735        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1736            self.0.request.parent = v.into();
1737            self
1738        }
1739
1740        /// Sets the value of [filter][crate::model::ListAttackPathsRequest::filter].
1741        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1742            self.0.request.filter = v.into();
1743            self
1744        }
1745
1746        /// Sets the value of [page_token][crate::model::ListAttackPathsRequest::page_token].
1747        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1748            self.0.request.page_token = v.into();
1749            self
1750        }
1751
1752        /// Sets the value of [page_size][crate::model::ListAttackPathsRequest::page_size].
1753        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1754            self.0.request.page_size = v.into();
1755            self
1756        }
1757    }
1758
1759    #[doc(hidden)]
1760    impl crate::RequestBuilder for ListAttackPaths {
1761        fn request_options(&mut self) -> &mut crate::RequestOptions {
1762            &mut self.0.options
1763        }
1764    }
1765
1766    /// The request builder for [SecurityCenter::list_big_query_exports][crate::client::SecurityCenter::list_big_query_exports] calls.
1767    ///
1768    /// # Example
1769    /// ```
1770    /// # use google_cloud_securitycenter_v2::builder::security_center::ListBigQueryExports;
1771    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
1772    /// use google_cloud_gax::paginator::ItemPaginator;
1773    ///
1774    /// let builder = prepare_request_builder();
1775    /// let mut items = builder.by_item();
1776    /// while let Some(result) = items.next().await {
1777    ///   let item = result?;
1778    /// }
1779    /// # Ok(()) }
1780    ///
1781    /// fn prepare_request_builder() -> ListBigQueryExports {
1782    ///   # panic!();
1783    ///   // ... details omitted ...
1784    /// }
1785    /// ```
1786    #[derive(Clone, Debug)]
1787    pub struct ListBigQueryExports(RequestBuilder<crate::model::ListBigQueryExportsRequest>);
1788
1789    impl ListBigQueryExports {
1790        pub(crate) fn new(
1791            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
1792        ) -> Self {
1793            Self(RequestBuilder::new(stub))
1794        }
1795
1796        /// Sets the full request, replacing any prior values.
1797        pub fn with_request<V: Into<crate::model::ListBigQueryExportsRequest>>(
1798            mut self,
1799            v: V,
1800        ) -> Self {
1801            self.0.request = v.into();
1802            self
1803        }
1804
1805        /// Sets all the options, replacing any prior values.
1806        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1807            self.0.options = v.into();
1808            self
1809        }
1810
1811        /// Sends the request.
1812        pub async fn send(self) -> Result<crate::model::ListBigQueryExportsResponse> {
1813            (*self.0.stub)
1814                .list_big_query_exports(self.0.request, self.0.options)
1815                .await
1816                .map(crate::Response::into_body)
1817        }
1818
1819        /// Streams each page in the collection.
1820        pub fn by_page(
1821            self,
1822        ) -> impl google_cloud_gax::paginator::Paginator<
1823            crate::model::ListBigQueryExportsResponse,
1824            crate::Error,
1825        > {
1826            use std::clone::Clone;
1827            let token = self.0.request.page_token.clone();
1828            let execute = move |token: String| {
1829                let mut builder = self.clone();
1830                builder.0.request = builder.0.request.set_page_token(token);
1831                builder.send()
1832            };
1833            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1834        }
1835
1836        /// Streams each item in the collection.
1837        pub fn by_item(
1838            self,
1839        ) -> impl google_cloud_gax::paginator::ItemPaginator<
1840            crate::model::ListBigQueryExportsResponse,
1841            crate::Error,
1842        > {
1843            use google_cloud_gax::paginator::Paginator;
1844            self.by_page().items()
1845        }
1846
1847        /// Sets the value of [parent][crate::model::ListBigQueryExportsRequest::parent].
1848        ///
1849        /// This is a **required** field for requests.
1850        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1851            self.0.request.parent = v.into();
1852            self
1853        }
1854
1855        /// Sets the value of [page_size][crate::model::ListBigQueryExportsRequest::page_size].
1856        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1857            self.0.request.page_size = v.into();
1858            self
1859        }
1860
1861        /// Sets the value of [page_token][crate::model::ListBigQueryExportsRequest::page_token].
1862        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1863            self.0.request.page_token = v.into();
1864            self
1865        }
1866    }
1867
1868    #[doc(hidden)]
1869    impl crate::RequestBuilder for ListBigQueryExports {
1870        fn request_options(&mut self) -> &mut crate::RequestOptions {
1871            &mut self.0.options
1872        }
1873    }
1874
1875    /// The request builder for [SecurityCenter::list_findings][crate::client::SecurityCenter::list_findings] calls.
1876    ///
1877    /// # Example
1878    /// ```
1879    /// # use google_cloud_securitycenter_v2::builder::security_center::ListFindings;
1880    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
1881    /// use google_cloud_gax::paginator::ItemPaginator;
1882    ///
1883    /// let builder = prepare_request_builder();
1884    /// let mut items = builder.by_item();
1885    /// while let Some(result) = items.next().await {
1886    ///   let item = result?;
1887    /// }
1888    /// # Ok(()) }
1889    ///
1890    /// fn prepare_request_builder() -> ListFindings {
1891    ///   # panic!();
1892    ///   // ... details omitted ...
1893    /// }
1894    /// ```
1895    #[derive(Clone, Debug)]
1896    pub struct ListFindings(RequestBuilder<crate::model::ListFindingsRequest>);
1897
1898    impl ListFindings {
1899        pub(crate) fn new(
1900            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
1901        ) -> Self {
1902            Self(RequestBuilder::new(stub))
1903        }
1904
1905        /// Sets the full request, replacing any prior values.
1906        pub fn with_request<V: Into<crate::model::ListFindingsRequest>>(mut self, v: V) -> Self {
1907            self.0.request = v.into();
1908            self
1909        }
1910
1911        /// Sets all the options, replacing any prior values.
1912        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1913            self.0.options = v.into();
1914            self
1915        }
1916
1917        /// Sends the request.
1918        pub async fn send(self) -> Result<crate::model::ListFindingsResponse> {
1919            (*self.0.stub)
1920                .list_findings(self.0.request, self.0.options)
1921                .await
1922                .map(crate::Response::into_body)
1923        }
1924
1925        /// Streams each page in the collection.
1926        pub fn by_page(
1927            self,
1928        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListFindingsResponse, crate::Error>
1929        {
1930            use std::clone::Clone;
1931            let token = self.0.request.page_token.clone();
1932            let execute = move |token: String| {
1933                let mut builder = self.clone();
1934                builder.0.request = builder.0.request.set_page_token(token);
1935                builder.send()
1936            };
1937            google_cloud_gax::paginator::internal::new_paginator(token, execute)
1938        }
1939
1940        /// Streams each item in the collection.
1941        pub fn by_item(
1942            self,
1943        ) -> impl google_cloud_gax::paginator::ItemPaginator<
1944            crate::model::ListFindingsResponse,
1945            crate::Error,
1946        > {
1947            use google_cloud_gax::paginator::Paginator;
1948            self.by_page().items()
1949        }
1950
1951        /// Sets the value of [parent][crate::model::ListFindingsRequest::parent].
1952        ///
1953        /// This is a **required** field for requests.
1954        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1955            self.0.request.parent = v.into();
1956            self
1957        }
1958
1959        /// Sets the value of [filter][crate::model::ListFindingsRequest::filter].
1960        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1961            self.0.request.filter = v.into();
1962            self
1963        }
1964
1965        /// Sets the value of [order_by][crate::model::ListFindingsRequest::order_by].
1966        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1967            self.0.request.order_by = v.into();
1968            self
1969        }
1970
1971        /// Sets the value of [field_mask][crate::model::ListFindingsRequest::field_mask].
1972        pub fn set_field_mask<T>(mut self, v: T) -> Self
1973        where
1974            T: std::convert::Into<wkt::FieldMask>,
1975        {
1976            self.0.request.field_mask = std::option::Option::Some(v.into());
1977            self
1978        }
1979
1980        /// Sets or clears the value of [field_mask][crate::model::ListFindingsRequest::field_mask].
1981        pub fn set_or_clear_field_mask<T>(mut self, v: std::option::Option<T>) -> Self
1982        where
1983            T: std::convert::Into<wkt::FieldMask>,
1984        {
1985            self.0.request.field_mask = v.map(|x| x.into());
1986            self
1987        }
1988
1989        /// Sets the value of [page_token][crate::model::ListFindingsRequest::page_token].
1990        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1991            self.0.request.page_token = v.into();
1992            self
1993        }
1994
1995        /// Sets the value of [page_size][crate::model::ListFindingsRequest::page_size].
1996        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1997            self.0.request.page_size = v.into();
1998            self
1999        }
2000    }
2001
2002    #[doc(hidden)]
2003    impl crate::RequestBuilder for ListFindings {
2004        fn request_options(&mut self) -> &mut crate::RequestOptions {
2005            &mut self.0.options
2006        }
2007    }
2008
2009    /// The request builder for [SecurityCenter::list_mute_configs][crate::client::SecurityCenter::list_mute_configs] calls.
2010    ///
2011    /// # Example
2012    /// ```
2013    /// # use google_cloud_securitycenter_v2::builder::security_center::ListMuteConfigs;
2014    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
2015    /// use google_cloud_gax::paginator::ItemPaginator;
2016    ///
2017    /// let builder = prepare_request_builder();
2018    /// let mut items = builder.by_item();
2019    /// while let Some(result) = items.next().await {
2020    ///   let item = result?;
2021    /// }
2022    /// # Ok(()) }
2023    ///
2024    /// fn prepare_request_builder() -> ListMuteConfigs {
2025    ///   # panic!();
2026    ///   // ... details omitted ...
2027    /// }
2028    /// ```
2029    #[derive(Clone, Debug)]
2030    pub struct ListMuteConfigs(RequestBuilder<crate::model::ListMuteConfigsRequest>);
2031
2032    impl ListMuteConfigs {
2033        pub(crate) fn new(
2034            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
2035        ) -> Self {
2036            Self(RequestBuilder::new(stub))
2037        }
2038
2039        /// Sets the full request, replacing any prior values.
2040        pub fn with_request<V: Into<crate::model::ListMuteConfigsRequest>>(mut self, v: V) -> Self {
2041            self.0.request = v.into();
2042            self
2043        }
2044
2045        /// Sets all the options, replacing any prior values.
2046        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2047            self.0.options = v.into();
2048            self
2049        }
2050
2051        /// Sends the request.
2052        pub async fn send(self) -> Result<crate::model::ListMuteConfigsResponse> {
2053            (*self.0.stub)
2054                .list_mute_configs(self.0.request, self.0.options)
2055                .await
2056                .map(crate::Response::into_body)
2057        }
2058
2059        /// Streams each page in the collection.
2060        pub fn by_page(
2061            self,
2062        ) -> impl google_cloud_gax::paginator::Paginator<
2063            crate::model::ListMuteConfigsResponse,
2064            crate::Error,
2065        > {
2066            use std::clone::Clone;
2067            let token = self.0.request.page_token.clone();
2068            let execute = move |token: String| {
2069                let mut builder = self.clone();
2070                builder.0.request = builder.0.request.set_page_token(token);
2071                builder.send()
2072            };
2073            google_cloud_gax::paginator::internal::new_paginator(token, execute)
2074        }
2075
2076        /// Streams each item in the collection.
2077        pub fn by_item(
2078            self,
2079        ) -> impl google_cloud_gax::paginator::ItemPaginator<
2080            crate::model::ListMuteConfigsResponse,
2081            crate::Error,
2082        > {
2083            use google_cloud_gax::paginator::Paginator;
2084            self.by_page().items()
2085        }
2086
2087        /// Sets the value of [parent][crate::model::ListMuteConfigsRequest::parent].
2088        ///
2089        /// This is a **required** field for requests.
2090        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2091            self.0.request.parent = v.into();
2092            self
2093        }
2094
2095        /// Sets the value of [page_size][crate::model::ListMuteConfigsRequest::page_size].
2096        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2097            self.0.request.page_size = v.into();
2098            self
2099        }
2100
2101        /// Sets the value of [page_token][crate::model::ListMuteConfigsRequest::page_token].
2102        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2103            self.0.request.page_token = v.into();
2104            self
2105        }
2106    }
2107
2108    #[doc(hidden)]
2109    impl crate::RequestBuilder for ListMuteConfigs {
2110        fn request_options(&mut self) -> &mut crate::RequestOptions {
2111            &mut self.0.options
2112        }
2113    }
2114
2115    /// The request builder for [SecurityCenter::list_notification_configs][crate::client::SecurityCenter::list_notification_configs] calls.
2116    ///
2117    /// # Example
2118    /// ```
2119    /// # use google_cloud_securitycenter_v2::builder::security_center::ListNotificationConfigs;
2120    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
2121    /// use google_cloud_gax::paginator::ItemPaginator;
2122    ///
2123    /// let builder = prepare_request_builder();
2124    /// let mut items = builder.by_item();
2125    /// while let Some(result) = items.next().await {
2126    ///   let item = result?;
2127    /// }
2128    /// # Ok(()) }
2129    ///
2130    /// fn prepare_request_builder() -> ListNotificationConfigs {
2131    ///   # panic!();
2132    ///   // ... details omitted ...
2133    /// }
2134    /// ```
2135    #[derive(Clone, Debug)]
2136    pub struct ListNotificationConfigs(
2137        RequestBuilder<crate::model::ListNotificationConfigsRequest>,
2138    );
2139
2140    impl ListNotificationConfigs {
2141        pub(crate) fn new(
2142            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
2143        ) -> Self {
2144            Self(RequestBuilder::new(stub))
2145        }
2146
2147        /// Sets the full request, replacing any prior values.
2148        pub fn with_request<V: Into<crate::model::ListNotificationConfigsRequest>>(
2149            mut self,
2150            v: V,
2151        ) -> Self {
2152            self.0.request = v.into();
2153            self
2154        }
2155
2156        /// Sets all the options, replacing any prior values.
2157        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2158            self.0.options = v.into();
2159            self
2160        }
2161
2162        /// Sends the request.
2163        pub async fn send(self) -> Result<crate::model::ListNotificationConfigsResponse> {
2164            (*self.0.stub)
2165                .list_notification_configs(self.0.request, self.0.options)
2166                .await
2167                .map(crate::Response::into_body)
2168        }
2169
2170        /// Streams each page in the collection.
2171        pub fn by_page(
2172            self,
2173        ) -> impl google_cloud_gax::paginator::Paginator<
2174            crate::model::ListNotificationConfigsResponse,
2175            crate::Error,
2176        > {
2177            use std::clone::Clone;
2178            let token = self.0.request.page_token.clone();
2179            let execute = move |token: String| {
2180                let mut builder = self.clone();
2181                builder.0.request = builder.0.request.set_page_token(token);
2182                builder.send()
2183            };
2184            google_cloud_gax::paginator::internal::new_paginator(token, execute)
2185        }
2186
2187        /// Streams each item in the collection.
2188        pub fn by_item(
2189            self,
2190        ) -> impl google_cloud_gax::paginator::ItemPaginator<
2191            crate::model::ListNotificationConfigsResponse,
2192            crate::Error,
2193        > {
2194            use google_cloud_gax::paginator::Paginator;
2195            self.by_page().items()
2196        }
2197
2198        /// Sets the value of [parent][crate::model::ListNotificationConfigsRequest::parent].
2199        ///
2200        /// This is a **required** field for requests.
2201        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2202            self.0.request.parent = v.into();
2203            self
2204        }
2205
2206        /// Sets the value of [page_token][crate::model::ListNotificationConfigsRequest::page_token].
2207        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2208            self.0.request.page_token = v.into();
2209            self
2210        }
2211
2212        /// Sets the value of [page_size][crate::model::ListNotificationConfigsRequest::page_size].
2213        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2214            self.0.request.page_size = v.into();
2215            self
2216        }
2217    }
2218
2219    #[doc(hidden)]
2220    impl crate::RequestBuilder for ListNotificationConfigs {
2221        fn request_options(&mut self) -> &mut crate::RequestOptions {
2222            &mut self.0.options
2223        }
2224    }
2225
2226    /// The request builder for [SecurityCenter::list_resource_value_configs][crate::client::SecurityCenter::list_resource_value_configs] calls.
2227    ///
2228    /// # Example
2229    /// ```
2230    /// # use google_cloud_securitycenter_v2::builder::security_center::ListResourceValueConfigs;
2231    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
2232    /// use google_cloud_gax::paginator::ItemPaginator;
2233    ///
2234    /// let builder = prepare_request_builder();
2235    /// let mut items = builder.by_item();
2236    /// while let Some(result) = items.next().await {
2237    ///   let item = result?;
2238    /// }
2239    /// # Ok(()) }
2240    ///
2241    /// fn prepare_request_builder() -> ListResourceValueConfigs {
2242    ///   # panic!();
2243    ///   // ... details omitted ...
2244    /// }
2245    /// ```
2246    #[derive(Clone, Debug)]
2247    pub struct ListResourceValueConfigs(
2248        RequestBuilder<crate::model::ListResourceValueConfigsRequest>,
2249    );
2250
2251    impl ListResourceValueConfigs {
2252        pub(crate) fn new(
2253            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
2254        ) -> Self {
2255            Self(RequestBuilder::new(stub))
2256        }
2257
2258        /// Sets the full request, replacing any prior values.
2259        pub fn with_request<V: Into<crate::model::ListResourceValueConfigsRequest>>(
2260            mut self,
2261            v: V,
2262        ) -> Self {
2263            self.0.request = v.into();
2264            self
2265        }
2266
2267        /// Sets all the options, replacing any prior values.
2268        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2269            self.0.options = v.into();
2270            self
2271        }
2272
2273        /// Sends the request.
2274        pub async fn send(self) -> Result<crate::model::ListResourceValueConfigsResponse> {
2275            (*self.0.stub)
2276                .list_resource_value_configs(self.0.request, self.0.options)
2277                .await
2278                .map(crate::Response::into_body)
2279        }
2280
2281        /// Streams each page in the collection.
2282        pub fn by_page(
2283            self,
2284        ) -> impl google_cloud_gax::paginator::Paginator<
2285            crate::model::ListResourceValueConfigsResponse,
2286            crate::Error,
2287        > {
2288            use std::clone::Clone;
2289            let token = self.0.request.page_token.clone();
2290            let execute = move |token: String| {
2291                let mut builder = self.clone();
2292                builder.0.request = builder.0.request.set_page_token(token);
2293                builder.send()
2294            };
2295            google_cloud_gax::paginator::internal::new_paginator(token, execute)
2296        }
2297
2298        /// Streams each item in the collection.
2299        pub fn by_item(
2300            self,
2301        ) -> impl google_cloud_gax::paginator::ItemPaginator<
2302            crate::model::ListResourceValueConfigsResponse,
2303            crate::Error,
2304        > {
2305            use google_cloud_gax::paginator::Paginator;
2306            self.by_page().items()
2307        }
2308
2309        /// Sets the value of [parent][crate::model::ListResourceValueConfigsRequest::parent].
2310        ///
2311        /// This is a **required** field for requests.
2312        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2313            self.0.request.parent = v.into();
2314            self
2315        }
2316
2317        /// Sets the value of [page_size][crate::model::ListResourceValueConfigsRequest::page_size].
2318        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2319            self.0.request.page_size = v.into();
2320            self
2321        }
2322
2323        /// Sets the value of [page_token][crate::model::ListResourceValueConfigsRequest::page_token].
2324        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2325            self.0.request.page_token = v.into();
2326            self
2327        }
2328    }
2329
2330    #[doc(hidden)]
2331    impl crate::RequestBuilder for ListResourceValueConfigs {
2332        fn request_options(&mut self) -> &mut crate::RequestOptions {
2333            &mut self.0.options
2334        }
2335    }
2336
2337    /// The request builder for [SecurityCenter::list_sources][crate::client::SecurityCenter::list_sources] calls.
2338    ///
2339    /// # Example
2340    /// ```
2341    /// # use google_cloud_securitycenter_v2::builder::security_center::ListSources;
2342    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
2343    /// use google_cloud_gax::paginator::ItemPaginator;
2344    ///
2345    /// let builder = prepare_request_builder();
2346    /// let mut items = builder.by_item();
2347    /// while let Some(result) = items.next().await {
2348    ///   let item = result?;
2349    /// }
2350    /// # Ok(()) }
2351    ///
2352    /// fn prepare_request_builder() -> ListSources {
2353    ///   # panic!();
2354    ///   // ... details omitted ...
2355    /// }
2356    /// ```
2357    #[derive(Clone, Debug)]
2358    pub struct ListSources(RequestBuilder<crate::model::ListSourcesRequest>);
2359
2360    impl ListSources {
2361        pub(crate) fn new(
2362            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
2363        ) -> Self {
2364            Self(RequestBuilder::new(stub))
2365        }
2366
2367        /// Sets the full request, replacing any prior values.
2368        pub fn with_request<V: Into<crate::model::ListSourcesRequest>>(mut self, v: V) -> Self {
2369            self.0.request = v.into();
2370            self
2371        }
2372
2373        /// Sets all the options, replacing any prior values.
2374        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2375            self.0.options = v.into();
2376            self
2377        }
2378
2379        /// Sends the request.
2380        pub async fn send(self) -> Result<crate::model::ListSourcesResponse> {
2381            (*self.0.stub)
2382                .list_sources(self.0.request, self.0.options)
2383                .await
2384                .map(crate::Response::into_body)
2385        }
2386
2387        /// Streams each page in the collection.
2388        pub fn by_page(
2389            self,
2390        ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListSourcesResponse, crate::Error>
2391        {
2392            use std::clone::Clone;
2393            let token = self.0.request.page_token.clone();
2394            let execute = move |token: String| {
2395                let mut builder = self.clone();
2396                builder.0.request = builder.0.request.set_page_token(token);
2397                builder.send()
2398            };
2399            google_cloud_gax::paginator::internal::new_paginator(token, execute)
2400        }
2401
2402        /// Streams each item in the collection.
2403        pub fn by_item(
2404            self,
2405        ) -> impl google_cloud_gax::paginator::ItemPaginator<
2406            crate::model::ListSourcesResponse,
2407            crate::Error,
2408        > {
2409            use google_cloud_gax::paginator::Paginator;
2410            self.by_page().items()
2411        }
2412
2413        /// Sets the value of [parent][crate::model::ListSourcesRequest::parent].
2414        ///
2415        /// This is a **required** field for requests.
2416        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2417            self.0.request.parent = v.into();
2418            self
2419        }
2420
2421        /// Sets the value of [page_token][crate::model::ListSourcesRequest::page_token].
2422        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2423            self.0.request.page_token = v.into();
2424            self
2425        }
2426
2427        /// Sets the value of [page_size][crate::model::ListSourcesRequest::page_size].
2428        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2429            self.0.request.page_size = v.into();
2430            self
2431        }
2432    }
2433
2434    #[doc(hidden)]
2435    impl crate::RequestBuilder for ListSources {
2436        fn request_options(&mut self) -> &mut crate::RequestOptions {
2437            &mut self.0.options
2438        }
2439    }
2440
2441    /// The request builder for [SecurityCenter::list_valued_resources][crate::client::SecurityCenter::list_valued_resources] calls.
2442    ///
2443    /// # Example
2444    /// ```
2445    /// # use google_cloud_securitycenter_v2::builder::security_center::ListValuedResources;
2446    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
2447    /// use google_cloud_gax::paginator::ItemPaginator;
2448    ///
2449    /// let builder = prepare_request_builder();
2450    /// let mut items = builder.by_item();
2451    /// while let Some(result) = items.next().await {
2452    ///   let item = result?;
2453    /// }
2454    /// # Ok(()) }
2455    ///
2456    /// fn prepare_request_builder() -> ListValuedResources {
2457    ///   # panic!();
2458    ///   // ... details omitted ...
2459    /// }
2460    /// ```
2461    #[derive(Clone, Debug)]
2462    pub struct ListValuedResources(RequestBuilder<crate::model::ListValuedResourcesRequest>);
2463
2464    impl ListValuedResources {
2465        pub(crate) fn new(
2466            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
2467        ) -> Self {
2468            Self(RequestBuilder::new(stub))
2469        }
2470
2471        /// Sets the full request, replacing any prior values.
2472        pub fn with_request<V: Into<crate::model::ListValuedResourcesRequest>>(
2473            mut self,
2474            v: V,
2475        ) -> Self {
2476            self.0.request = v.into();
2477            self
2478        }
2479
2480        /// Sets all the options, replacing any prior values.
2481        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2482            self.0.options = v.into();
2483            self
2484        }
2485
2486        /// Sends the request.
2487        pub async fn send(self) -> Result<crate::model::ListValuedResourcesResponse> {
2488            (*self.0.stub)
2489                .list_valued_resources(self.0.request, self.0.options)
2490                .await
2491                .map(crate::Response::into_body)
2492        }
2493
2494        /// Streams each page in the collection.
2495        pub fn by_page(
2496            self,
2497        ) -> impl google_cloud_gax::paginator::Paginator<
2498            crate::model::ListValuedResourcesResponse,
2499            crate::Error,
2500        > {
2501            use std::clone::Clone;
2502            let token = self.0.request.page_token.clone();
2503            let execute = move |token: String| {
2504                let mut builder = self.clone();
2505                builder.0.request = builder.0.request.set_page_token(token);
2506                builder.send()
2507            };
2508            google_cloud_gax::paginator::internal::new_paginator(token, execute)
2509        }
2510
2511        /// Streams each item in the collection.
2512        pub fn by_item(
2513            self,
2514        ) -> impl google_cloud_gax::paginator::ItemPaginator<
2515            crate::model::ListValuedResourcesResponse,
2516            crate::Error,
2517        > {
2518            use google_cloud_gax::paginator::Paginator;
2519            self.by_page().items()
2520        }
2521
2522        /// Sets the value of [parent][crate::model::ListValuedResourcesRequest::parent].
2523        ///
2524        /// This is a **required** field for requests.
2525        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2526            self.0.request.parent = v.into();
2527            self
2528        }
2529
2530        /// Sets the value of [filter][crate::model::ListValuedResourcesRequest::filter].
2531        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2532            self.0.request.filter = v.into();
2533            self
2534        }
2535
2536        /// Sets the value of [page_token][crate::model::ListValuedResourcesRequest::page_token].
2537        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2538            self.0.request.page_token = v.into();
2539            self
2540        }
2541
2542        /// Sets the value of [page_size][crate::model::ListValuedResourcesRequest::page_size].
2543        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2544            self.0.request.page_size = v.into();
2545            self
2546        }
2547
2548        /// Sets the value of [order_by][crate::model::ListValuedResourcesRequest::order_by].
2549        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
2550            self.0.request.order_by = v.into();
2551            self
2552        }
2553    }
2554
2555    #[doc(hidden)]
2556    impl crate::RequestBuilder for ListValuedResources {
2557        fn request_options(&mut self) -> &mut crate::RequestOptions {
2558            &mut self.0.options
2559        }
2560    }
2561
2562    /// The request builder for [SecurityCenter::set_finding_state][crate::client::SecurityCenter::set_finding_state] calls.
2563    ///
2564    /// # Example
2565    /// ```
2566    /// # use google_cloud_securitycenter_v2::builder::security_center::SetFindingState;
2567    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
2568    ///
2569    /// let builder = prepare_request_builder();
2570    /// let response = builder.send().await?;
2571    /// # Ok(()) }
2572    ///
2573    /// fn prepare_request_builder() -> SetFindingState {
2574    ///   # panic!();
2575    ///   // ... details omitted ...
2576    /// }
2577    /// ```
2578    #[derive(Clone, Debug)]
2579    pub struct SetFindingState(RequestBuilder<crate::model::SetFindingStateRequest>);
2580
2581    impl SetFindingState {
2582        pub(crate) fn new(
2583            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
2584        ) -> Self {
2585            Self(RequestBuilder::new(stub))
2586        }
2587
2588        /// Sets the full request, replacing any prior values.
2589        pub fn with_request<V: Into<crate::model::SetFindingStateRequest>>(mut self, v: V) -> Self {
2590            self.0.request = v.into();
2591            self
2592        }
2593
2594        /// Sets all the options, replacing any prior values.
2595        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2596            self.0.options = v.into();
2597            self
2598        }
2599
2600        /// Sends the request.
2601        pub async fn send(self) -> Result<crate::model::Finding> {
2602            (*self.0.stub)
2603                .set_finding_state(self.0.request, self.0.options)
2604                .await
2605                .map(crate::Response::into_body)
2606        }
2607
2608        /// Sets the value of [name][crate::model::SetFindingStateRequest::name].
2609        ///
2610        /// This is a **required** field for requests.
2611        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2612            self.0.request.name = v.into();
2613            self
2614        }
2615
2616        /// Sets the value of [state][crate::model::SetFindingStateRequest::state].
2617        ///
2618        /// This is a **required** field for requests.
2619        pub fn set_state<T: Into<crate::model::finding::State>>(mut self, v: T) -> Self {
2620            self.0.request.state = v.into();
2621            self
2622        }
2623    }
2624
2625    #[doc(hidden)]
2626    impl crate::RequestBuilder for SetFindingState {
2627        fn request_options(&mut self) -> &mut crate::RequestOptions {
2628            &mut self.0.options
2629        }
2630    }
2631
2632    /// The request builder for [SecurityCenter::set_iam_policy][crate::client::SecurityCenter::set_iam_policy] calls.
2633    ///
2634    /// # Example
2635    /// ```
2636    /// # use google_cloud_securitycenter_v2::builder::security_center::SetIamPolicy;
2637    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
2638    ///
2639    /// let builder = prepare_request_builder();
2640    /// let response = builder.send().await?;
2641    /// # Ok(()) }
2642    ///
2643    /// fn prepare_request_builder() -> SetIamPolicy {
2644    ///   # panic!();
2645    ///   // ... details omitted ...
2646    /// }
2647    /// ```
2648    #[derive(Clone, Debug)]
2649    pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
2650
2651    impl SetIamPolicy {
2652        pub(crate) fn new(
2653            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
2654        ) -> Self {
2655            Self(RequestBuilder::new(stub))
2656        }
2657
2658        /// Sets the full request, replacing any prior values.
2659        pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
2660            mut self,
2661            v: V,
2662        ) -> Self {
2663            self.0.request = v.into();
2664            self
2665        }
2666
2667        /// Sets all the options, replacing any prior values.
2668        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2669            self.0.options = v.into();
2670            self
2671        }
2672
2673        /// Sends the request.
2674        pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
2675            (*self.0.stub)
2676                .set_iam_policy(self.0.request, self.0.options)
2677                .await
2678                .map(crate::Response::into_body)
2679        }
2680
2681        /// Sets the value of [resource][google_cloud_iam_v1::model::SetIamPolicyRequest::resource].
2682        ///
2683        /// This is a **required** field for requests.
2684        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
2685            self.0.request.resource = v.into();
2686            self
2687        }
2688
2689        /// Sets the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
2690        ///
2691        /// This is a **required** field for requests.
2692        pub fn set_policy<T>(mut self, v: T) -> Self
2693        where
2694            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
2695        {
2696            self.0.request.policy = std::option::Option::Some(v.into());
2697            self
2698        }
2699
2700        /// Sets or clears the value of [policy][google_cloud_iam_v1::model::SetIamPolicyRequest::policy].
2701        ///
2702        /// This is a **required** field for requests.
2703        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
2704        where
2705            T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
2706        {
2707            self.0.request.policy = v.map(|x| x.into());
2708            self
2709        }
2710
2711        /// Sets the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
2712        pub fn set_update_mask<T>(mut self, v: T) -> Self
2713        where
2714            T: std::convert::Into<wkt::FieldMask>,
2715        {
2716            self.0.request.update_mask = std::option::Option::Some(v.into());
2717            self
2718        }
2719
2720        /// Sets or clears the value of [update_mask][google_cloud_iam_v1::model::SetIamPolicyRequest::update_mask].
2721        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2722        where
2723            T: std::convert::Into<wkt::FieldMask>,
2724        {
2725            self.0.request.update_mask = v.map(|x| x.into());
2726            self
2727        }
2728    }
2729
2730    #[doc(hidden)]
2731    impl crate::RequestBuilder for SetIamPolicy {
2732        fn request_options(&mut self) -> &mut crate::RequestOptions {
2733            &mut self.0.options
2734        }
2735    }
2736
2737    /// The request builder for [SecurityCenter::set_mute][crate::client::SecurityCenter::set_mute] calls.
2738    ///
2739    /// # Example
2740    /// ```
2741    /// # use google_cloud_securitycenter_v2::builder::security_center::SetMute;
2742    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
2743    ///
2744    /// let builder = prepare_request_builder();
2745    /// let response = builder.send().await?;
2746    /// # Ok(()) }
2747    ///
2748    /// fn prepare_request_builder() -> SetMute {
2749    ///   # panic!();
2750    ///   // ... details omitted ...
2751    /// }
2752    /// ```
2753    #[derive(Clone, Debug)]
2754    pub struct SetMute(RequestBuilder<crate::model::SetMuteRequest>);
2755
2756    impl SetMute {
2757        pub(crate) fn new(
2758            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
2759        ) -> Self {
2760            Self(RequestBuilder::new(stub))
2761        }
2762
2763        /// Sets the full request, replacing any prior values.
2764        pub fn with_request<V: Into<crate::model::SetMuteRequest>>(mut self, v: V) -> Self {
2765            self.0.request = v.into();
2766            self
2767        }
2768
2769        /// Sets all the options, replacing any prior values.
2770        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2771            self.0.options = v.into();
2772            self
2773        }
2774
2775        /// Sends the request.
2776        pub async fn send(self) -> Result<crate::model::Finding> {
2777            (*self.0.stub)
2778                .set_mute(self.0.request, self.0.options)
2779                .await
2780                .map(crate::Response::into_body)
2781        }
2782
2783        /// Sets the value of [name][crate::model::SetMuteRequest::name].
2784        ///
2785        /// This is a **required** field for requests.
2786        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2787            self.0.request.name = v.into();
2788            self
2789        }
2790
2791        /// Sets the value of [mute][crate::model::SetMuteRequest::mute].
2792        ///
2793        /// This is a **required** field for requests.
2794        pub fn set_mute<T: Into<crate::model::finding::Mute>>(mut self, v: T) -> Self {
2795            self.0.request.mute = v.into();
2796            self
2797        }
2798    }
2799
2800    #[doc(hidden)]
2801    impl crate::RequestBuilder for SetMute {
2802        fn request_options(&mut self) -> &mut crate::RequestOptions {
2803            &mut self.0.options
2804        }
2805    }
2806
2807    /// The request builder for [SecurityCenter::test_iam_permissions][crate::client::SecurityCenter::test_iam_permissions] calls.
2808    ///
2809    /// # Example
2810    /// ```
2811    /// # use google_cloud_securitycenter_v2::builder::security_center::TestIamPermissions;
2812    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
2813    ///
2814    /// let builder = prepare_request_builder();
2815    /// let response = builder.send().await?;
2816    /// # Ok(()) }
2817    ///
2818    /// fn prepare_request_builder() -> TestIamPermissions {
2819    ///   # panic!();
2820    ///   // ... details omitted ...
2821    /// }
2822    /// ```
2823    #[derive(Clone, Debug)]
2824    pub struct TestIamPermissions(
2825        RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
2826    );
2827
2828    impl TestIamPermissions {
2829        pub(crate) fn new(
2830            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
2831        ) -> Self {
2832            Self(RequestBuilder::new(stub))
2833        }
2834
2835        /// Sets the full request, replacing any prior values.
2836        pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
2837            mut self,
2838            v: V,
2839        ) -> Self {
2840            self.0.request = v.into();
2841            self
2842        }
2843
2844        /// Sets all the options, replacing any prior values.
2845        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2846            self.0.options = v.into();
2847            self
2848        }
2849
2850        /// Sends the request.
2851        pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
2852            (*self.0.stub)
2853                .test_iam_permissions(self.0.request, self.0.options)
2854                .await
2855                .map(crate::Response::into_body)
2856        }
2857
2858        /// Sets the value of [resource][google_cloud_iam_v1::model::TestIamPermissionsRequest::resource].
2859        ///
2860        /// This is a **required** field for requests.
2861        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
2862            self.0.request.resource = v.into();
2863            self
2864        }
2865
2866        /// Sets the value of [permissions][google_cloud_iam_v1::model::TestIamPermissionsRequest::permissions].
2867        ///
2868        /// This is a **required** field for requests.
2869        pub fn set_permissions<T, V>(mut self, v: T) -> Self
2870        where
2871            T: std::iter::IntoIterator<Item = V>,
2872            V: std::convert::Into<std::string::String>,
2873        {
2874            use std::iter::Iterator;
2875            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
2876            self
2877        }
2878    }
2879
2880    #[doc(hidden)]
2881    impl crate::RequestBuilder for TestIamPermissions {
2882        fn request_options(&mut self) -> &mut crate::RequestOptions {
2883            &mut self.0.options
2884        }
2885    }
2886
2887    /// The request builder for [SecurityCenter::update_big_query_export][crate::client::SecurityCenter::update_big_query_export] calls.
2888    ///
2889    /// # Example
2890    /// ```
2891    /// # use google_cloud_securitycenter_v2::builder::security_center::UpdateBigQueryExport;
2892    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
2893    ///
2894    /// let builder = prepare_request_builder();
2895    /// let response = builder.send().await?;
2896    /// # Ok(()) }
2897    ///
2898    /// fn prepare_request_builder() -> UpdateBigQueryExport {
2899    ///   # panic!();
2900    ///   // ... details omitted ...
2901    /// }
2902    /// ```
2903    #[derive(Clone, Debug)]
2904    pub struct UpdateBigQueryExport(RequestBuilder<crate::model::UpdateBigQueryExportRequest>);
2905
2906    impl UpdateBigQueryExport {
2907        pub(crate) fn new(
2908            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
2909        ) -> Self {
2910            Self(RequestBuilder::new(stub))
2911        }
2912
2913        /// Sets the full request, replacing any prior values.
2914        pub fn with_request<V: Into<crate::model::UpdateBigQueryExportRequest>>(
2915            mut self,
2916            v: V,
2917        ) -> Self {
2918            self.0.request = v.into();
2919            self
2920        }
2921
2922        /// Sets all the options, replacing any prior values.
2923        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2924            self.0.options = v.into();
2925            self
2926        }
2927
2928        /// Sends the request.
2929        pub async fn send(self) -> Result<crate::model::BigQueryExport> {
2930            (*self.0.stub)
2931                .update_big_query_export(self.0.request, self.0.options)
2932                .await
2933                .map(crate::Response::into_body)
2934        }
2935
2936        /// Sets the value of [big_query_export][crate::model::UpdateBigQueryExportRequest::big_query_export].
2937        ///
2938        /// This is a **required** field for requests.
2939        pub fn set_big_query_export<T>(mut self, v: T) -> Self
2940        where
2941            T: std::convert::Into<crate::model::BigQueryExport>,
2942        {
2943            self.0.request.big_query_export = std::option::Option::Some(v.into());
2944            self
2945        }
2946
2947        /// Sets or clears the value of [big_query_export][crate::model::UpdateBigQueryExportRequest::big_query_export].
2948        ///
2949        /// This is a **required** field for requests.
2950        pub fn set_or_clear_big_query_export<T>(mut self, v: std::option::Option<T>) -> Self
2951        where
2952            T: std::convert::Into<crate::model::BigQueryExport>,
2953        {
2954            self.0.request.big_query_export = v.map(|x| x.into());
2955            self
2956        }
2957
2958        /// Sets the value of [update_mask][crate::model::UpdateBigQueryExportRequest::update_mask].
2959        pub fn set_update_mask<T>(mut self, v: T) -> Self
2960        where
2961            T: std::convert::Into<wkt::FieldMask>,
2962        {
2963            self.0.request.update_mask = std::option::Option::Some(v.into());
2964            self
2965        }
2966
2967        /// Sets or clears the value of [update_mask][crate::model::UpdateBigQueryExportRequest::update_mask].
2968        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2969        where
2970            T: std::convert::Into<wkt::FieldMask>,
2971        {
2972            self.0.request.update_mask = v.map(|x| x.into());
2973            self
2974        }
2975    }
2976
2977    #[doc(hidden)]
2978    impl crate::RequestBuilder for UpdateBigQueryExport {
2979        fn request_options(&mut self) -> &mut crate::RequestOptions {
2980            &mut self.0.options
2981        }
2982    }
2983
2984    /// The request builder for [SecurityCenter::update_external_system][crate::client::SecurityCenter::update_external_system] calls.
2985    ///
2986    /// # Example
2987    /// ```
2988    /// # use google_cloud_securitycenter_v2::builder::security_center::UpdateExternalSystem;
2989    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
2990    ///
2991    /// let builder = prepare_request_builder();
2992    /// let response = builder.send().await?;
2993    /// # Ok(()) }
2994    ///
2995    /// fn prepare_request_builder() -> UpdateExternalSystem {
2996    ///   # panic!();
2997    ///   // ... details omitted ...
2998    /// }
2999    /// ```
3000    #[derive(Clone, Debug)]
3001    pub struct UpdateExternalSystem(RequestBuilder<crate::model::UpdateExternalSystemRequest>);
3002
3003    impl UpdateExternalSystem {
3004        pub(crate) fn new(
3005            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
3006        ) -> Self {
3007            Self(RequestBuilder::new(stub))
3008        }
3009
3010        /// Sets the full request, replacing any prior values.
3011        pub fn with_request<V: Into<crate::model::UpdateExternalSystemRequest>>(
3012            mut self,
3013            v: V,
3014        ) -> Self {
3015            self.0.request = v.into();
3016            self
3017        }
3018
3019        /// Sets all the options, replacing any prior values.
3020        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3021            self.0.options = v.into();
3022            self
3023        }
3024
3025        /// Sends the request.
3026        pub async fn send(self) -> Result<crate::model::ExternalSystem> {
3027            (*self.0.stub)
3028                .update_external_system(self.0.request, self.0.options)
3029                .await
3030                .map(crate::Response::into_body)
3031        }
3032
3033        /// Sets the value of [external_system][crate::model::UpdateExternalSystemRequest::external_system].
3034        ///
3035        /// This is a **required** field for requests.
3036        pub fn set_external_system<T>(mut self, v: T) -> Self
3037        where
3038            T: std::convert::Into<crate::model::ExternalSystem>,
3039        {
3040            self.0.request.external_system = std::option::Option::Some(v.into());
3041            self
3042        }
3043
3044        /// Sets or clears the value of [external_system][crate::model::UpdateExternalSystemRequest::external_system].
3045        ///
3046        /// This is a **required** field for requests.
3047        pub fn set_or_clear_external_system<T>(mut self, v: std::option::Option<T>) -> Self
3048        where
3049            T: std::convert::Into<crate::model::ExternalSystem>,
3050        {
3051            self.0.request.external_system = v.map(|x| x.into());
3052            self
3053        }
3054
3055        /// Sets the value of [update_mask][crate::model::UpdateExternalSystemRequest::update_mask].
3056        pub fn set_update_mask<T>(mut self, v: T) -> Self
3057        where
3058            T: std::convert::Into<wkt::FieldMask>,
3059        {
3060            self.0.request.update_mask = std::option::Option::Some(v.into());
3061            self
3062        }
3063
3064        /// Sets or clears the value of [update_mask][crate::model::UpdateExternalSystemRequest::update_mask].
3065        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3066        where
3067            T: std::convert::Into<wkt::FieldMask>,
3068        {
3069            self.0.request.update_mask = v.map(|x| x.into());
3070            self
3071        }
3072    }
3073
3074    #[doc(hidden)]
3075    impl crate::RequestBuilder for UpdateExternalSystem {
3076        fn request_options(&mut self) -> &mut crate::RequestOptions {
3077            &mut self.0.options
3078        }
3079    }
3080
3081    /// The request builder for [SecurityCenter::update_finding][crate::client::SecurityCenter::update_finding] calls.
3082    ///
3083    /// # Example
3084    /// ```
3085    /// # use google_cloud_securitycenter_v2::builder::security_center::UpdateFinding;
3086    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
3087    ///
3088    /// let builder = prepare_request_builder();
3089    /// let response = builder.send().await?;
3090    /// # Ok(()) }
3091    ///
3092    /// fn prepare_request_builder() -> UpdateFinding {
3093    ///   # panic!();
3094    ///   // ... details omitted ...
3095    /// }
3096    /// ```
3097    #[derive(Clone, Debug)]
3098    pub struct UpdateFinding(RequestBuilder<crate::model::UpdateFindingRequest>);
3099
3100    impl UpdateFinding {
3101        pub(crate) fn new(
3102            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
3103        ) -> Self {
3104            Self(RequestBuilder::new(stub))
3105        }
3106
3107        /// Sets the full request, replacing any prior values.
3108        pub fn with_request<V: Into<crate::model::UpdateFindingRequest>>(mut self, v: V) -> Self {
3109            self.0.request = v.into();
3110            self
3111        }
3112
3113        /// Sets all the options, replacing any prior values.
3114        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3115            self.0.options = v.into();
3116            self
3117        }
3118
3119        /// Sends the request.
3120        pub async fn send(self) -> Result<crate::model::Finding> {
3121            (*self.0.stub)
3122                .update_finding(self.0.request, self.0.options)
3123                .await
3124                .map(crate::Response::into_body)
3125        }
3126
3127        /// Sets the value of [finding][crate::model::UpdateFindingRequest::finding].
3128        ///
3129        /// This is a **required** field for requests.
3130        pub fn set_finding<T>(mut self, v: T) -> Self
3131        where
3132            T: std::convert::Into<crate::model::Finding>,
3133        {
3134            self.0.request.finding = std::option::Option::Some(v.into());
3135            self
3136        }
3137
3138        /// Sets or clears the value of [finding][crate::model::UpdateFindingRequest::finding].
3139        ///
3140        /// This is a **required** field for requests.
3141        pub fn set_or_clear_finding<T>(mut self, v: std::option::Option<T>) -> Self
3142        where
3143            T: std::convert::Into<crate::model::Finding>,
3144        {
3145            self.0.request.finding = v.map(|x| x.into());
3146            self
3147        }
3148
3149        /// Sets the value of [update_mask][crate::model::UpdateFindingRequest::update_mask].
3150        pub fn set_update_mask<T>(mut self, v: T) -> Self
3151        where
3152            T: std::convert::Into<wkt::FieldMask>,
3153        {
3154            self.0.request.update_mask = std::option::Option::Some(v.into());
3155            self
3156        }
3157
3158        /// Sets or clears the value of [update_mask][crate::model::UpdateFindingRequest::update_mask].
3159        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3160        where
3161            T: std::convert::Into<wkt::FieldMask>,
3162        {
3163            self.0.request.update_mask = v.map(|x| x.into());
3164            self
3165        }
3166    }
3167
3168    #[doc(hidden)]
3169    impl crate::RequestBuilder for UpdateFinding {
3170        fn request_options(&mut self) -> &mut crate::RequestOptions {
3171            &mut self.0.options
3172        }
3173    }
3174
3175    /// The request builder for [SecurityCenter::update_mute_config][crate::client::SecurityCenter::update_mute_config] calls.
3176    ///
3177    /// # Example
3178    /// ```
3179    /// # use google_cloud_securitycenter_v2::builder::security_center::UpdateMuteConfig;
3180    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
3181    ///
3182    /// let builder = prepare_request_builder();
3183    /// let response = builder.send().await?;
3184    /// # Ok(()) }
3185    ///
3186    /// fn prepare_request_builder() -> UpdateMuteConfig {
3187    ///   # panic!();
3188    ///   // ... details omitted ...
3189    /// }
3190    /// ```
3191    #[derive(Clone, Debug)]
3192    pub struct UpdateMuteConfig(RequestBuilder<crate::model::UpdateMuteConfigRequest>);
3193
3194    impl UpdateMuteConfig {
3195        pub(crate) fn new(
3196            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
3197        ) -> Self {
3198            Self(RequestBuilder::new(stub))
3199        }
3200
3201        /// Sets the full request, replacing any prior values.
3202        pub fn with_request<V: Into<crate::model::UpdateMuteConfigRequest>>(
3203            mut self,
3204            v: V,
3205        ) -> Self {
3206            self.0.request = v.into();
3207            self
3208        }
3209
3210        /// Sets all the options, replacing any prior values.
3211        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3212            self.0.options = v.into();
3213            self
3214        }
3215
3216        /// Sends the request.
3217        pub async fn send(self) -> Result<crate::model::MuteConfig> {
3218            (*self.0.stub)
3219                .update_mute_config(self.0.request, self.0.options)
3220                .await
3221                .map(crate::Response::into_body)
3222        }
3223
3224        /// Sets the value of [mute_config][crate::model::UpdateMuteConfigRequest::mute_config].
3225        ///
3226        /// This is a **required** field for requests.
3227        pub fn set_mute_config<T>(mut self, v: T) -> Self
3228        where
3229            T: std::convert::Into<crate::model::MuteConfig>,
3230        {
3231            self.0.request.mute_config = std::option::Option::Some(v.into());
3232            self
3233        }
3234
3235        /// Sets or clears the value of [mute_config][crate::model::UpdateMuteConfigRequest::mute_config].
3236        ///
3237        /// This is a **required** field for requests.
3238        pub fn set_or_clear_mute_config<T>(mut self, v: std::option::Option<T>) -> Self
3239        where
3240            T: std::convert::Into<crate::model::MuteConfig>,
3241        {
3242            self.0.request.mute_config = v.map(|x| x.into());
3243            self
3244        }
3245
3246        /// Sets the value of [update_mask][crate::model::UpdateMuteConfigRequest::update_mask].
3247        pub fn set_update_mask<T>(mut self, v: T) -> Self
3248        where
3249            T: std::convert::Into<wkt::FieldMask>,
3250        {
3251            self.0.request.update_mask = std::option::Option::Some(v.into());
3252            self
3253        }
3254
3255        /// Sets or clears the value of [update_mask][crate::model::UpdateMuteConfigRequest::update_mask].
3256        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3257        where
3258            T: std::convert::Into<wkt::FieldMask>,
3259        {
3260            self.0.request.update_mask = v.map(|x| x.into());
3261            self
3262        }
3263    }
3264
3265    #[doc(hidden)]
3266    impl crate::RequestBuilder for UpdateMuteConfig {
3267        fn request_options(&mut self) -> &mut crate::RequestOptions {
3268            &mut self.0.options
3269        }
3270    }
3271
3272    /// The request builder for [SecurityCenter::update_notification_config][crate::client::SecurityCenter::update_notification_config] calls.
3273    ///
3274    /// # Example
3275    /// ```
3276    /// # use google_cloud_securitycenter_v2::builder::security_center::UpdateNotificationConfig;
3277    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
3278    ///
3279    /// let builder = prepare_request_builder();
3280    /// let response = builder.send().await?;
3281    /// # Ok(()) }
3282    ///
3283    /// fn prepare_request_builder() -> UpdateNotificationConfig {
3284    ///   # panic!();
3285    ///   // ... details omitted ...
3286    /// }
3287    /// ```
3288    #[derive(Clone, Debug)]
3289    pub struct UpdateNotificationConfig(
3290        RequestBuilder<crate::model::UpdateNotificationConfigRequest>,
3291    );
3292
3293    impl UpdateNotificationConfig {
3294        pub(crate) fn new(
3295            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
3296        ) -> Self {
3297            Self(RequestBuilder::new(stub))
3298        }
3299
3300        /// Sets the full request, replacing any prior values.
3301        pub fn with_request<V: Into<crate::model::UpdateNotificationConfigRequest>>(
3302            mut self,
3303            v: V,
3304        ) -> Self {
3305            self.0.request = v.into();
3306            self
3307        }
3308
3309        /// Sets all the options, replacing any prior values.
3310        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3311            self.0.options = v.into();
3312            self
3313        }
3314
3315        /// Sends the request.
3316        pub async fn send(self) -> Result<crate::model::NotificationConfig> {
3317            (*self.0.stub)
3318                .update_notification_config(self.0.request, self.0.options)
3319                .await
3320                .map(crate::Response::into_body)
3321        }
3322
3323        /// Sets the value of [notification_config][crate::model::UpdateNotificationConfigRequest::notification_config].
3324        ///
3325        /// This is a **required** field for requests.
3326        pub fn set_notification_config<T>(mut self, v: T) -> Self
3327        where
3328            T: std::convert::Into<crate::model::NotificationConfig>,
3329        {
3330            self.0.request.notification_config = std::option::Option::Some(v.into());
3331            self
3332        }
3333
3334        /// Sets or clears the value of [notification_config][crate::model::UpdateNotificationConfigRequest::notification_config].
3335        ///
3336        /// This is a **required** field for requests.
3337        pub fn set_or_clear_notification_config<T>(mut self, v: std::option::Option<T>) -> Self
3338        where
3339            T: std::convert::Into<crate::model::NotificationConfig>,
3340        {
3341            self.0.request.notification_config = v.map(|x| x.into());
3342            self
3343        }
3344
3345        /// Sets the value of [update_mask][crate::model::UpdateNotificationConfigRequest::update_mask].
3346        pub fn set_update_mask<T>(mut self, v: T) -> Self
3347        where
3348            T: std::convert::Into<wkt::FieldMask>,
3349        {
3350            self.0.request.update_mask = std::option::Option::Some(v.into());
3351            self
3352        }
3353
3354        /// Sets or clears the value of [update_mask][crate::model::UpdateNotificationConfigRequest::update_mask].
3355        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3356        where
3357            T: std::convert::Into<wkt::FieldMask>,
3358        {
3359            self.0.request.update_mask = v.map(|x| x.into());
3360            self
3361        }
3362    }
3363
3364    #[doc(hidden)]
3365    impl crate::RequestBuilder for UpdateNotificationConfig {
3366        fn request_options(&mut self) -> &mut crate::RequestOptions {
3367            &mut self.0.options
3368        }
3369    }
3370
3371    /// The request builder for [SecurityCenter::update_resource_value_config][crate::client::SecurityCenter::update_resource_value_config] calls.
3372    ///
3373    /// # Example
3374    /// ```
3375    /// # use google_cloud_securitycenter_v2::builder::security_center::UpdateResourceValueConfig;
3376    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
3377    ///
3378    /// let builder = prepare_request_builder();
3379    /// let response = builder.send().await?;
3380    /// # Ok(()) }
3381    ///
3382    /// fn prepare_request_builder() -> UpdateResourceValueConfig {
3383    ///   # panic!();
3384    ///   // ... details omitted ...
3385    /// }
3386    /// ```
3387    #[derive(Clone, Debug)]
3388    pub struct UpdateResourceValueConfig(
3389        RequestBuilder<crate::model::UpdateResourceValueConfigRequest>,
3390    );
3391
3392    impl UpdateResourceValueConfig {
3393        pub(crate) fn new(
3394            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
3395        ) -> Self {
3396            Self(RequestBuilder::new(stub))
3397        }
3398
3399        /// Sets the full request, replacing any prior values.
3400        pub fn with_request<V: Into<crate::model::UpdateResourceValueConfigRequest>>(
3401            mut self,
3402            v: V,
3403        ) -> Self {
3404            self.0.request = v.into();
3405            self
3406        }
3407
3408        /// Sets all the options, replacing any prior values.
3409        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3410            self.0.options = v.into();
3411            self
3412        }
3413
3414        /// Sends the request.
3415        pub async fn send(self) -> Result<crate::model::ResourceValueConfig> {
3416            (*self.0.stub)
3417                .update_resource_value_config(self.0.request, self.0.options)
3418                .await
3419                .map(crate::Response::into_body)
3420        }
3421
3422        /// Sets the value of [resource_value_config][crate::model::UpdateResourceValueConfigRequest::resource_value_config].
3423        ///
3424        /// This is a **required** field for requests.
3425        pub fn set_resource_value_config<T>(mut self, v: T) -> Self
3426        where
3427            T: std::convert::Into<crate::model::ResourceValueConfig>,
3428        {
3429            self.0.request.resource_value_config = std::option::Option::Some(v.into());
3430            self
3431        }
3432
3433        /// Sets or clears the value of [resource_value_config][crate::model::UpdateResourceValueConfigRequest::resource_value_config].
3434        ///
3435        /// This is a **required** field for requests.
3436        pub fn set_or_clear_resource_value_config<T>(mut self, v: std::option::Option<T>) -> Self
3437        where
3438            T: std::convert::Into<crate::model::ResourceValueConfig>,
3439        {
3440            self.0.request.resource_value_config = v.map(|x| x.into());
3441            self
3442        }
3443
3444        /// Sets the value of [update_mask][crate::model::UpdateResourceValueConfigRequest::update_mask].
3445        pub fn set_update_mask<T>(mut self, v: T) -> Self
3446        where
3447            T: std::convert::Into<wkt::FieldMask>,
3448        {
3449            self.0.request.update_mask = std::option::Option::Some(v.into());
3450            self
3451        }
3452
3453        /// Sets or clears the value of [update_mask][crate::model::UpdateResourceValueConfigRequest::update_mask].
3454        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3455        where
3456            T: std::convert::Into<wkt::FieldMask>,
3457        {
3458            self.0.request.update_mask = v.map(|x| x.into());
3459            self
3460        }
3461    }
3462
3463    #[doc(hidden)]
3464    impl crate::RequestBuilder for UpdateResourceValueConfig {
3465        fn request_options(&mut self) -> &mut crate::RequestOptions {
3466            &mut self.0.options
3467        }
3468    }
3469
3470    /// The request builder for [SecurityCenter::update_security_marks][crate::client::SecurityCenter::update_security_marks] calls.
3471    ///
3472    /// # Example
3473    /// ```
3474    /// # use google_cloud_securitycenter_v2::builder::security_center::UpdateSecurityMarks;
3475    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
3476    ///
3477    /// let builder = prepare_request_builder();
3478    /// let response = builder.send().await?;
3479    /// # Ok(()) }
3480    ///
3481    /// fn prepare_request_builder() -> UpdateSecurityMarks {
3482    ///   # panic!();
3483    ///   // ... details omitted ...
3484    /// }
3485    /// ```
3486    #[derive(Clone, Debug)]
3487    pub struct UpdateSecurityMarks(RequestBuilder<crate::model::UpdateSecurityMarksRequest>);
3488
3489    impl UpdateSecurityMarks {
3490        pub(crate) fn new(
3491            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
3492        ) -> Self {
3493            Self(RequestBuilder::new(stub))
3494        }
3495
3496        /// Sets the full request, replacing any prior values.
3497        pub fn with_request<V: Into<crate::model::UpdateSecurityMarksRequest>>(
3498            mut self,
3499            v: V,
3500        ) -> Self {
3501            self.0.request = v.into();
3502            self
3503        }
3504
3505        /// Sets all the options, replacing any prior values.
3506        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3507            self.0.options = v.into();
3508            self
3509        }
3510
3511        /// Sends the request.
3512        pub async fn send(self) -> Result<crate::model::SecurityMarks> {
3513            (*self.0.stub)
3514                .update_security_marks(self.0.request, self.0.options)
3515                .await
3516                .map(crate::Response::into_body)
3517        }
3518
3519        /// Sets the value of [security_marks][crate::model::UpdateSecurityMarksRequest::security_marks].
3520        ///
3521        /// This is a **required** field for requests.
3522        pub fn set_security_marks<T>(mut self, v: T) -> Self
3523        where
3524            T: std::convert::Into<crate::model::SecurityMarks>,
3525        {
3526            self.0.request.security_marks = std::option::Option::Some(v.into());
3527            self
3528        }
3529
3530        /// Sets or clears the value of [security_marks][crate::model::UpdateSecurityMarksRequest::security_marks].
3531        ///
3532        /// This is a **required** field for requests.
3533        pub fn set_or_clear_security_marks<T>(mut self, v: std::option::Option<T>) -> Self
3534        where
3535            T: std::convert::Into<crate::model::SecurityMarks>,
3536        {
3537            self.0.request.security_marks = v.map(|x| x.into());
3538            self
3539        }
3540
3541        /// Sets the value of [update_mask][crate::model::UpdateSecurityMarksRequest::update_mask].
3542        pub fn set_update_mask<T>(mut self, v: T) -> Self
3543        where
3544            T: std::convert::Into<wkt::FieldMask>,
3545        {
3546            self.0.request.update_mask = std::option::Option::Some(v.into());
3547            self
3548        }
3549
3550        /// Sets or clears the value of [update_mask][crate::model::UpdateSecurityMarksRequest::update_mask].
3551        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3552        where
3553            T: std::convert::Into<wkt::FieldMask>,
3554        {
3555            self.0.request.update_mask = v.map(|x| x.into());
3556            self
3557        }
3558    }
3559
3560    #[doc(hidden)]
3561    impl crate::RequestBuilder for UpdateSecurityMarks {
3562        fn request_options(&mut self) -> &mut crate::RequestOptions {
3563            &mut self.0.options
3564        }
3565    }
3566
3567    /// The request builder for [SecurityCenter::update_source][crate::client::SecurityCenter::update_source] calls.
3568    ///
3569    /// # Example
3570    /// ```
3571    /// # use google_cloud_securitycenter_v2::builder::security_center::UpdateSource;
3572    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
3573    ///
3574    /// let builder = prepare_request_builder();
3575    /// let response = builder.send().await?;
3576    /// # Ok(()) }
3577    ///
3578    /// fn prepare_request_builder() -> UpdateSource {
3579    ///   # panic!();
3580    ///   // ... details omitted ...
3581    /// }
3582    /// ```
3583    #[derive(Clone, Debug)]
3584    pub struct UpdateSource(RequestBuilder<crate::model::UpdateSourceRequest>);
3585
3586    impl UpdateSource {
3587        pub(crate) fn new(
3588            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
3589        ) -> Self {
3590            Self(RequestBuilder::new(stub))
3591        }
3592
3593        /// Sets the full request, replacing any prior values.
3594        pub fn with_request<V: Into<crate::model::UpdateSourceRequest>>(mut self, v: V) -> Self {
3595            self.0.request = v.into();
3596            self
3597        }
3598
3599        /// Sets all the options, replacing any prior values.
3600        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3601            self.0.options = v.into();
3602            self
3603        }
3604
3605        /// Sends the request.
3606        pub async fn send(self) -> Result<crate::model::Source> {
3607            (*self.0.stub)
3608                .update_source(self.0.request, self.0.options)
3609                .await
3610                .map(crate::Response::into_body)
3611        }
3612
3613        /// Sets the value of [source][crate::model::UpdateSourceRequest::source].
3614        ///
3615        /// This is a **required** field for requests.
3616        pub fn set_source<T>(mut self, v: T) -> Self
3617        where
3618            T: std::convert::Into<crate::model::Source>,
3619        {
3620            self.0.request.source = std::option::Option::Some(v.into());
3621            self
3622        }
3623
3624        /// Sets or clears the value of [source][crate::model::UpdateSourceRequest::source].
3625        ///
3626        /// This is a **required** field for requests.
3627        pub fn set_or_clear_source<T>(mut self, v: std::option::Option<T>) -> Self
3628        where
3629            T: std::convert::Into<crate::model::Source>,
3630        {
3631            self.0.request.source = v.map(|x| x.into());
3632            self
3633        }
3634
3635        /// Sets the value of [update_mask][crate::model::UpdateSourceRequest::update_mask].
3636        pub fn set_update_mask<T>(mut self, v: T) -> Self
3637        where
3638            T: std::convert::Into<wkt::FieldMask>,
3639        {
3640            self.0.request.update_mask = std::option::Option::Some(v.into());
3641            self
3642        }
3643
3644        /// Sets or clears the value of [update_mask][crate::model::UpdateSourceRequest::update_mask].
3645        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3646        where
3647            T: std::convert::Into<wkt::FieldMask>,
3648        {
3649            self.0.request.update_mask = v.map(|x| x.into());
3650            self
3651        }
3652    }
3653
3654    #[doc(hidden)]
3655    impl crate::RequestBuilder for UpdateSource {
3656        fn request_options(&mut self) -> &mut crate::RequestOptions {
3657            &mut self.0.options
3658        }
3659    }
3660
3661    /// The request builder for [SecurityCenter::list_operations][crate::client::SecurityCenter::list_operations] calls.
3662    ///
3663    /// # Example
3664    /// ```
3665    /// # use google_cloud_securitycenter_v2::builder::security_center::ListOperations;
3666    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
3667    /// use google_cloud_gax::paginator::ItemPaginator;
3668    ///
3669    /// let builder = prepare_request_builder();
3670    /// let mut items = builder.by_item();
3671    /// while let Some(result) = items.next().await {
3672    ///   let item = result?;
3673    /// }
3674    /// # Ok(()) }
3675    ///
3676    /// fn prepare_request_builder() -> ListOperations {
3677    ///   # panic!();
3678    ///   // ... details omitted ...
3679    /// }
3680    /// ```
3681    #[derive(Clone, Debug)]
3682    pub struct ListOperations(
3683        RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
3684    );
3685
3686    impl ListOperations {
3687        pub(crate) fn new(
3688            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
3689        ) -> Self {
3690            Self(RequestBuilder::new(stub))
3691        }
3692
3693        /// Sets the full request, replacing any prior values.
3694        pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
3695            mut self,
3696            v: V,
3697        ) -> Self {
3698            self.0.request = v.into();
3699            self
3700        }
3701
3702        /// Sets all the options, replacing any prior values.
3703        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3704            self.0.options = v.into();
3705            self
3706        }
3707
3708        /// Sends the request.
3709        pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
3710            (*self.0.stub)
3711                .list_operations(self.0.request, self.0.options)
3712                .await
3713                .map(crate::Response::into_body)
3714        }
3715
3716        /// Streams each page in the collection.
3717        pub fn by_page(
3718            self,
3719        ) -> impl google_cloud_gax::paginator::Paginator<
3720            google_cloud_longrunning::model::ListOperationsResponse,
3721            crate::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            google_cloud_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 google_cloud_gax::paginator::ItemPaginator<
3737            google_cloud_longrunning::model::ListOperationsResponse,
3738            crate::Error,
3739        > {
3740            use google_cloud_gax::paginator::Paginator;
3741            self.by_page().items()
3742        }
3743
3744        /// Sets the value of [name][google_cloud_longrunning::model::ListOperationsRequest::name].
3745        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3746            self.0.request.name = v.into();
3747            self
3748        }
3749
3750        /// Sets the value of [filter][google_cloud_longrunning::model::ListOperationsRequest::filter].
3751        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3752            self.0.request.filter = v.into();
3753            self
3754        }
3755
3756        /// Sets the value of [page_size][google_cloud_longrunning::model::ListOperationsRequest::page_size].
3757        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3758            self.0.request.page_size = v.into();
3759            self
3760        }
3761
3762        /// Sets the value of [page_token][google_cloud_longrunning::model::ListOperationsRequest::page_token].
3763        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3764            self.0.request.page_token = v.into();
3765            self
3766        }
3767
3768        /// Sets the value of [return_partial_success][google_cloud_longrunning::model::ListOperationsRequest::return_partial_success].
3769        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
3770            self.0.request.return_partial_success = v.into();
3771            self
3772        }
3773    }
3774
3775    #[doc(hidden)]
3776    impl crate::RequestBuilder for ListOperations {
3777        fn request_options(&mut self) -> &mut crate::RequestOptions {
3778            &mut self.0.options
3779        }
3780    }
3781
3782    /// The request builder for [SecurityCenter::get_operation][crate::client::SecurityCenter::get_operation] calls.
3783    ///
3784    /// # Example
3785    /// ```
3786    /// # use google_cloud_securitycenter_v2::builder::security_center::GetOperation;
3787    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
3788    ///
3789    /// let builder = prepare_request_builder();
3790    /// let response = builder.send().await?;
3791    /// # Ok(()) }
3792    ///
3793    /// fn prepare_request_builder() -> GetOperation {
3794    ///   # panic!();
3795    ///   // ... details omitted ...
3796    /// }
3797    /// ```
3798    #[derive(Clone, Debug)]
3799    pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
3800
3801    impl GetOperation {
3802        pub(crate) fn new(
3803            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
3804        ) -> Self {
3805            Self(RequestBuilder::new(stub))
3806        }
3807
3808        /// Sets the full request, replacing any prior values.
3809        pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
3810            mut self,
3811            v: V,
3812        ) -> Self {
3813            self.0.request = v.into();
3814            self
3815        }
3816
3817        /// Sets all the options, replacing any prior values.
3818        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3819            self.0.options = v.into();
3820            self
3821        }
3822
3823        /// Sends the request.
3824        pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3825            (*self.0.stub)
3826                .get_operation(self.0.request, self.0.options)
3827                .await
3828                .map(crate::Response::into_body)
3829        }
3830
3831        /// Sets the value of [name][google_cloud_longrunning::model::GetOperationRequest::name].
3832        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3833            self.0.request.name = v.into();
3834            self
3835        }
3836    }
3837
3838    #[doc(hidden)]
3839    impl crate::RequestBuilder for GetOperation {
3840        fn request_options(&mut self) -> &mut crate::RequestOptions {
3841            &mut self.0.options
3842        }
3843    }
3844
3845    /// The request builder for [SecurityCenter::delete_operation][crate::client::SecurityCenter::delete_operation] calls.
3846    ///
3847    /// # Example
3848    /// ```
3849    /// # use google_cloud_securitycenter_v2::builder::security_center::DeleteOperation;
3850    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
3851    ///
3852    /// let builder = prepare_request_builder();
3853    /// let response = builder.send().await?;
3854    /// # Ok(()) }
3855    ///
3856    /// fn prepare_request_builder() -> DeleteOperation {
3857    ///   # panic!();
3858    ///   // ... details omitted ...
3859    /// }
3860    /// ```
3861    #[derive(Clone, Debug)]
3862    pub struct DeleteOperation(
3863        RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
3864    );
3865
3866    impl DeleteOperation {
3867        pub(crate) fn new(
3868            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
3869        ) -> Self {
3870            Self(RequestBuilder::new(stub))
3871        }
3872
3873        /// Sets the full request, replacing any prior values.
3874        pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
3875            mut self,
3876            v: V,
3877        ) -> Self {
3878            self.0.request = v.into();
3879            self
3880        }
3881
3882        /// Sets all the options, replacing any prior values.
3883        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3884            self.0.options = v.into();
3885            self
3886        }
3887
3888        /// Sends the request.
3889        pub async fn send(self) -> Result<()> {
3890            (*self.0.stub)
3891                .delete_operation(self.0.request, self.0.options)
3892                .await
3893                .map(crate::Response::into_body)
3894        }
3895
3896        /// Sets the value of [name][google_cloud_longrunning::model::DeleteOperationRequest::name].
3897        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3898            self.0.request.name = v.into();
3899            self
3900        }
3901    }
3902
3903    #[doc(hidden)]
3904    impl crate::RequestBuilder for DeleteOperation {
3905        fn request_options(&mut self) -> &mut crate::RequestOptions {
3906            &mut self.0.options
3907        }
3908    }
3909
3910    /// The request builder for [SecurityCenter::cancel_operation][crate::client::SecurityCenter::cancel_operation] calls.
3911    ///
3912    /// # Example
3913    /// ```
3914    /// # use google_cloud_securitycenter_v2::builder::security_center::CancelOperation;
3915    /// # async fn sample() -> google_cloud_securitycenter_v2::Result<()> {
3916    ///
3917    /// let builder = prepare_request_builder();
3918    /// let response = builder.send().await?;
3919    /// # Ok(()) }
3920    ///
3921    /// fn prepare_request_builder() -> CancelOperation {
3922    ///   # panic!();
3923    ///   // ... details omitted ...
3924    /// }
3925    /// ```
3926    #[derive(Clone, Debug)]
3927    pub struct CancelOperation(
3928        RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
3929    );
3930
3931    impl CancelOperation {
3932        pub(crate) fn new(
3933            stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
3934        ) -> Self {
3935            Self(RequestBuilder::new(stub))
3936        }
3937
3938        /// Sets the full request, replacing any prior values.
3939        pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
3940            mut self,
3941            v: V,
3942        ) -> Self {
3943            self.0.request = v.into();
3944            self
3945        }
3946
3947        /// Sets all the options, replacing any prior values.
3948        pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3949            self.0.options = v.into();
3950            self
3951        }
3952
3953        /// Sends the request.
3954        pub async fn send(self) -> Result<()> {
3955            (*self.0.stub)
3956                .cancel_operation(self.0.request, self.0.options)
3957                .await
3958                .map(crate::Response::into_body)
3959        }
3960
3961        /// Sets the value of [name][google_cloud_longrunning::model::CancelOperationRequest::name].
3962        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3963            self.0.request.name = v.into();
3964            self
3965        }
3966    }
3967
3968    #[doc(hidden)]
3969    impl crate::RequestBuilder for CancelOperation {
3970        fn request_options(&mut self) -> &mut crate::RequestOptions {
3971            &mut self.0.options
3972        }
3973    }
3974}