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