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