1pub mod security_center {
18 use crate::Result;
19
20 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 #[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 #[derive(Clone, Debug)]
91 pub struct BatchCreateResourceValueConfigs(
92 RequestBuilder<crate::model::BatchCreateResourceValueConfigsRequest>,
93 );
94
95 impl BatchCreateResourceValueConfigs {
96 pub(crate) fn new(
97 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
98 ) -> Self {
99 Self(RequestBuilder::new(stub))
100 }
101
102 pub fn with_request<V: Into<crate::model::BatchCreateResourceValueConfigsRequest>>(
104 mut self,
105 v: V,
106 ) -> Self {
107 self.0.request = v.into();
108 self
109 }
110
111 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
113 self.0.options = v.into();
114 self
115 }
116
117 pub async fn send(self) -> Result<crate::model::BatchCreateResourceValueConfigsResponse> {
119 (*self.0.stub)
120 .batch_create_resource_value_configs(self.0.request, self.0.options)
121 .await
122 .map(gax::response::Response::into_body)
123 }
124
125 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
129 self.0.request.parent = v.into();
130 self
131 }
132
133 pub fn set_requests<T, V>(mut self, v: T) -> Self
137 where
138 T: std::iter::IntoIterator<Item = V>,
139 V: std::convert::Into<crate::model::CreateResourceValueConfigRequest>,
140 {
141 use std::iter::Iterator;
142 self.0.request.requests = v.into_iter().map(|i| i.into()).collect();
143 self
144 }
145 }
146
147 #[doc(hidden)]
148 impl gax::options::internal::RequestBuilder for BatchCreateResourceValueConfigs {
149 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
150 &mut self.0.options
151 }
152 }
153
154 #[derive(Clone, Debug)]
172 pub struct BulkMuteFindings(RequestBuilder<crate::model::BulkMuteFindingsRequest>);
173
174 impl BulkMuteFindings {
175 pub(crate) fn new(
176 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
177 ) -> Self {
178 Self(RequestBuilder::new(stub))
179 }
180
181 pub fn with_request<V: Into<crate::model::BulkMuteFindingsRequest>>(
183 mut self,
184 v: V,
185 ) -> Self {
186 self.0.request = v.into();
187 self
188 }
189
190 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
192 self.0.options = v.into();
193 self
194 }
195
196 pub async fn send(self) -> Result<longrunning::model::Operation> {
203 (*self.0.stub)
204 .bulk_mute_findings(self.0.request, self.0.options)
205 .await
206 .map(gax::response::Response::into_body)
207 }
208
209 pub fn poller(self) -> impl lro::Poller<crate::model::BulkMuteFindingsResponse, ()> {
211 type Operation =
212 lro::internal::Operation<crate::model::BulkMuteFindingsResponse, wkt::Empty>;
213 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
214 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
215
216 let stub = self.0.stub.clone();
217 let mut options = self.0.options.clone();
218 options.set_retry_policy(gax::retry_policy::NeverRetry);
219 let query = move |name| {
220 let stub = stub.clone();
221 let options = options.clone();
222 async {
223 let op = GetOperation::new(stub)
224 .set_name(name)
225 .with_options(options)
226 .send()
227 .await?;
228 Ok(Operation::new(op))
229 }
230 };
231
232 let start = move || async {
233 let op = self.send().await?;
234 Ok(Operation::new(op))
235 };
236
237 lro::internal::new_unit_metadata_poller(
238 polling_error_policy,
239 polling_backoff_policy,
240 start,
241 query,
242 )
243 }
244
245 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
249 self.0.request.parent = v.into();
250 self
251 }
252
253 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
255 self.0.request.filter = v.into();
256 self
257 }
258
259 pub fn set_mute_state<T: Into<crate::model::bulk_mute_findings_request::MuteState>>(
261 mut self,
262 v: T,
263 ) -> Self {
264 self.0.request.mute_state = v.into();
265 self
266 }
267 }
268
269 #[doc(hidden)]
270 impl gax::options::internal::RequestBuilder for BulkMuteFindings {
271 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
272 &mut self.0.options
273 }
274 }
275
276 #[derive(Clone, Debug)]
293 pub struct CreateBigQueryExport(RequestBuilder<crate::model::CreateBigQueryExportRequest>);
294
295 impl CreateBigQueryExport {
296 pub(crate) fn new(
297 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
298 ) -> Self {
299 Self(RequestBuilder::new(stub))
300 }
301
302 pub fn with_request<V: Into<crate::model::CreateBigQueryExportRequest>>(
304 mut self,
305 v: V,
306 ) -> Self {
307 self.0.request = v.into();
308 self
309 }
310
311 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
313 self.0.options = v.into();
314 self
315 }
316
317 pub async fn send(self) -> Result<crate::model::BigQueryExport> {
319 (*self.0.stub)
320 .create_big_query_export(self.0.request, self.0.options)
321 .await
322 .map(gax::response::Response::into_body)
323 }
324
325 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
329 self.0.request.parent = v.into();
330 self
331 }
332
333 pub fn set_big_query_export<T>(mut self, v: T) -> Self
337 where
338 T: std::convert::Into<crate::model::BigQueryExport>,
339 {
340 self.0.request.big_query_export = std::option::Option::Some(v.into());
341 self
342 }
343
344 pub fn set_or_clear_big_query_export<T>(mut self, v: std::option::Option<T>) -> Self
348 where
349 T: std::convert::Into<crate::model::BigQueryExport>,
350 {
351 self.0.request.big_query_export = v.map(|x| x.into());
352 self
353 }
354
355 pub fn set_big_query_export_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
359 self.0.request.big_query_export_id = v.into();
360 self
361 }
362 }
363
364 #[doc(hidden)]
365 impl gax::options::internal::RequestBuilder for CreateBigQueryExport {
366 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
367 &mut self.0.options
368 }
369 }
370
371 #[derive(Clone, Debug)]
388 pub struct CreateFinding(RequestBuilder<crate::model::CreateFindingRequest>);
389
390 impl CreateFinding {
391 pub(crate) fn new(
392 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
393 ) -> Self {
394 Self(RequestBuilder::new(stub))
395 }
396
397 pub fn with_request<V: Into<crate::model::CreateFindingRequest>>(mut self, v: V) -> Self {
399 self.0.request = v.into();
400 self
401 }
402
403 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
405 self.0.options = v.into();
406 self
407 }
408
409 pub async fn send(self) -> Result<crate::model::Finding> {
411 (*self.0.stub)
412 .create_finding(self.0.request, self.0.options)
413 .await
414 .map(gax::response::Response::into_body)
415 }
416
417 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
421 self.0.request.parent = v.into();
422 self
423 }
424
425 pub fn set_finding_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
429 self.0.request.finding_id = v.into();
430 self
431 }
432
433 pub fn set_finding<T>(mut self, v: T) -> Self
437 where
438 T: std::convert::Into<crate::model::Finding>,
439 {
440 self.0.request.finding = std::option::Option::Some(v.into());
441 self
442 }
443
444 pub fn set_or_clear_finding<T>(mut self, v: std::option::Option<T>) -> Self
448 where
449 T: std::convert::Into<crate::model::Finding>,
450 {
451 self.0.request.finding = v.map(|x| x.into());
452 self
453 }
454 }
455
456 #[doc(hidden)]
457 impl gax::options::internal::RequestBuilder for CreateFinding {
458 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
459 &mut self.0.options
460 }
461 }
462
463 #[derive(Clone, Debug)]
480 pub struct CreateMuteConfig(RequestBuilder<crate::model::CreateMuteConfigRequest>);
481
482 impl CreateMuteConfig {
483 pub(crate) fn new(
484 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
485 ) -> Self {
486 Self(RequestBuilder::new(stub))
487 }
488
489 pub fn with_request<V: Into<crate::model::CreateMuteConfigRequest>>(
491 mut self,
492 v: V,
493 ) -> Self {
494 self.0.request = v.into();
495 self
496 }
497
498 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
500 self.0.options = v.into();
501 self
502 }
503
504 pub async fn send(self) -> Result<crate::model::MuteConfig> {
506 (*self.0.stub)
507 .create_mute_config(self.0.request, self.0.options)
508 .await
509 .map(gax::response::Response::into_body)
510 }
511
512 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
516 self.0.request.parent = v.into();
517 self
518 }
519
520 pub fn set_mute_config<T>(mut self, v: T) -> Self
524 where
525 T: std::convert::Into<crate::model::MuteConfig>,
526 {
527 self.0.request.mute_config = std::option::Option::Some(v.into());
528 self
529 }
530
531 pub fn set_or_clear_mute_config<T>(mut self, v: std::option::Option<T>) -> Self
535 where
536 T: std::convert::Into<crate::model::MuteConfig>,
537 {
538 self.0.request.mute_config = v.map(|x| x.into());
539 self
540 }
541
542 pub fn set_mute_config_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
546 self.0.request.mute_config_id = v.into();
547 self
548 }
549 }
550
551 #[doc(hidden)]
552 impl gax::options::internal::RequestBuilder for CreateMuteConfig {
553 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
554 &mut self.0.options
555 }
556 }
557
558 #[derive(Clone, Debug)]
575 pub struct CreateNotificationConfig(
576 RequestBuilder<crate::model::CreateNotificationConfigRequest>,
577 );
578
579 impl CreateNotificationConfig {
580 pub(crate) fn new(
581 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
582 ) -> Self {
583 Self(RequestBuilder::new(stub))
584 }
585
586 pub fn with_request<V: Into<crate::model::CreateNotificationConfigRequest>>(
588 mut self,
589 v: V,
590 ) -> Self {
591 self.0.request = v.into();
592 self
593 }
594
595 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
597 self.0.options = v.into();
598 self
599 }
600
601 pub async fn send(self) -> Result<crate::model::NotificationConfig> {
603 (*self.0.stub)
604 .create_notification_config(self.0.request, self.0.options)
605 .await
606 .map(gax::response::Response::into_body)
607 }
608
609 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
613 self.0.request.parent = v.into();
614 self
615 }
616
617 pub fn set_config_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
621 self.0.request.config_id = v.into();
622 self
623 }
624
625 pub fn set_notification_config<T>(mut self, v: T) -> Self
629 where
630 T: std::convert::Into<crate::model::NotificationConfig>,
631 {
632 self.0.request.notification_config = std::option::Option::Some(v.into());
633 self
634 }
635
636 pub fn set_or_clear_notification_config<T>(mut self, v: std::option::Option<T>) -> Self
640 where
641 T: std::convert::Into<crate::model::NotificationConfig>,
642 {
643 self.0.request.notification_config = v.map(|x| x.into());
644 self
645 }
646 }
647
648 #[doc(hidden)]
649 impl gax::options::internal::RequestBuilder for CreateNotificationConfig {
650 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
651 &mut self.0.options
652 }
653 }
654
655 #[derive(Clone, Debug)]
672 pub struct CreateSource(RequestBuilder<crate::model::CreateSourceRequest>);
673
674 impl CreateSource {
675 pub(crate) fn new(
676 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
677 ) -> Self {
678 Self(RequestBuilder::new(stub))
679 }
680
681 pub fn with_request<V: Into<crate::model::CreateSourceRequest>>(mut self, v: V) -> Self {
683 self.0.request = v.into();
684 self
685 }
686
687 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
689 self.0.options = v.into();
690 self
691 }
692
693 pub async fn send(self) -> Result<crate::model::Source> {
695 (*self.0.stub)
696 .create_source(self.0.request, self.0.options)
697 .await
698 .map(gax::response::Response::into_body)
699 }
700
701 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
705 self.0.request.parent = v.into();
706 self
707 }
708
709 pub fn set_source<T>(mut self, v: T) -> Self
713 where
714 T: std::convert::Into<crate::model::Source>,
715 {
716 self.0.request.source = std::option::Option::Some(v.into());
717 self
718 }
719
720 pub fn set_or_clear_source<T>(mut self, v: std::option::Option<T>) -> Self
724 where
725 T: std::convert::Into<crate::model::Source>,
726 {
727 self.0.request.source = v.map(|x| x.into());
728 self
729 }
730 }
731
732 #[doc(hidden)]
733 impl gax::options::internal::RequestBuilder for CreateSource {
734 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
735 &mut self.0.options
736 }
737 }
738
739 #[derive(Clone, Debug)]
756 pub struct DeleteBigQueryExport(RequestBuilder<crate::model::DeleteBigQueryExportRequest>);
757
758 impl DeleteBigQueryExport {
759 pub(crate) fn new(
760 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
761 ) -> Self {
762 Self(RequestBuilder::new(stub))
763 }
764
765 pub fn with_request<V: Into<crate::model::DeleteBigQueryExportRequest>>(
767 mut self,
768 v: V,
769 ) -> Self {
770 self.0.request = v.into();
771 self
772 }
773
774 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
776 self.0.options = v.into();
777 self
778 }
779
780 pub async fn send(self) -> Result<()> {
782 (*self.0.stub)
783 .delete_big_query_export(self.0.request, self.0.options)
784 .await
785 .map(gax::response::Response::into_body)
786 }
787
788 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
792 self.0.request.name = v.into();
793 self
794 }
795 }
796
797 #[doc(hidden)]
798 impl gax::options::internal::RequestBuilder for DeleteBigQueryExport {
799 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
800 &mut self.0.options
801 }
802 }
803
804 #[derive(Clone, Debug)]
821 pub struct DeleteMuteConfig(RequestBuilder<crate::model::DeleteMuteConfigRequest>);
822
823 impl DeleteMuteConfig {
824 pub(crate) fn new(
825 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
826 ) -> Self {
827 Self(RequestBuilder::new(stub))
828 }
829
830 pub fn with_request<V: Into<crate::model::DeleteMuteConfigRequest>>(
832 mut self,
833 v: V,
834 ) -> Self {
835 self.0.request = v.into();
836 self
837 }
838
839 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
841 self.0.options = v.into();
842 self
843 }
844
845 pub async fn send(self) -> Result<()> {
847 (*self.0.stub)
848 .delete_mute_config(self.0.request, self.0.options)
849 .await
850 .map(gax::response::Response::into_body)
851 }
852
853 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
857 self.0.request.name = v.into();
858 self
859 }
860 }
861
862 #[doc(hidden)]
863 impl gax::options::internal::RequestBuilder for DeleteMuteConfig {
864 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
865 &mut self.0.options
866 }
867 }
868
869 #[derive(Clone, Debug)]
886 pub struct DeleteNotificationConfig(
887 RequestBuilder<crate::model::DeleteNotificationConfigRequest>,
888 );
889
890 impl DeleteNotificationConfig {
891 pub(crate) fn new(
892 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
893 ) -> Self {
894 Self(RequestBuilder::new(stub))
895 }
896
897 pub fn with_request<V: Into<crate::model::DeleteNotificationConfigRequest>>(
899 mut self,
900 v: V,
901 ) -> Self {
902 self.0.request = v.into();
903 self
904 }
905
906 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
908 self.0.options = v.into();
909 self
910 }
911
912 pub async fn send(self) -> Result<()> {
914 (*self.0.stub)
915 .delete_notification_config(self.0.request, self.0.options)
916 .await
917 .map(gax::response::Response::into_body)
918 }
919
920 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
924 self.0.request.name = v.into();
925 self
926 }
927 }
928
929 #[doc(hidden)]
930 impl gax::options::internal::RequestBuilder for DeleteNotificationConfig {
931 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
932 &mut self.0.options
933 }
934 }
935
936 #[derive(Clone, Debug)]
953 pub struct DeleteResourceValueConfig(
954 RequestBuilder<crate::model::DeleteResourceValueConfigRequest>,
955 );
956
957 impl DeleteResourceValueConfig {
958 pub(crate) fn new(
959 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
960 ) -> Self {
961 Self(RequestBuilder::new(stub))
962 }
963
964 pub fn with_request<V: Into<crate::model::DeleteResourceValueConfigRequest>>(
966 mut self,
967 v: V,
968 ) -> Self {
969 self.0.request = v.into();
970 self
971 }
972
973 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
975 self.0.options = v.into();
976 self
977 }
978
979 pub async fn send(self) -> Result<()> {
981 (*self.0.stub)
982 .delete_resource_value_config(self.0.request, self.0.options)
983 .await
984 .map(gax::response::Response::into_body)
985 }
986
987 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
991 self.0.request.name = v.into();
992 self
993 }
994 }
995
996 #[doc(hidden)]
997 impl gax::options::internal::RequestBuilder for DeleteResourceValueConfig {
998 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
999 &mut self.0.options
1000 }
1001 }
1002
1003 #[derive(Clone, Debug)]
1020 pub struct GetBigQueryExport(RequestBuilder<crate::model::GetBigQueryExportRequest>);
1021
1022 impl GetBigQueryExport {
1023 pub(crate) fn new(
1024 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
1025 ) -> Self {
1026 Self(RequestBuilder::new(stub))
1027 }
1028
1029 pub fn with_request<V: Into<crate::model::GetBigQueryExportRequest>>(
1031 mut self,
1032 v: V,
1033 ) -> Self {
1034 self.0.request = v.into();
1035 self
1036 }
1037
1038 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1040 self.0.options = v.into();
1041 self
1042 }
1043
1044 pub async fn send(self) -> Result<crate::model::BigQueryExport> {
1046 (*self.0.stub)
1047 .get_big_query_export(self.0.request, self.0.options)
1048 .await
1049 .map(gax::response::Response::into_body)
1050 }
1051
1052 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1056 self.0.request.name = v.into();
1057 self
1058 }
1059 }
1060
1061 #[doc(hidden)]
1062 impl gax::options::internal::RequestBuilder for GetBigQueryExport {
1063 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1064 &mut self.0.options
1065 }
1066 }
1067
1068 #[derive(Clone, Debug)]
1085 pub struct GetSimulation(RequestBuilder<crate::model::GetSimulationRequest>);
1086
1087 impl GetSimulation {
1088 pub(crate) fn new(
1089 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
1090 ) -> Self {
1091 Self(RequestBuilder::new(stub))
1092 }
1093
1094 pub fn with_request<V: Into<crate::model::GetSimulationRequest>>(mut self, v: V) -> Self {
1096 self.0.request = v.into();
1097 self
1098 }
1099
1100 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1102 self.0.options = v.into();
1103 self
1104 }
1105
1106 pub async fn send(self) -> Result<crate::model::Simulation> {
1108 (*self.0.stub)
1109 .get_simulation(self.0.request, self.0.options)
1110 .await
1111 .map(gax::response::Response::into_body)
1112 }
1113
1114 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1118 self.0.request.name = v.into();
1119 self
1120 }
1121 }
1122
1123 #[doc(hidden)]
1124 impl gax::options::internal::RequestBuilder for GetSimulation {
1125 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1126 &mut self.0.options
1127 }
1128 }
1129
1130 #[derive(Clone, Debug)]
1147 pub struct GetValuedResource(RequestBuilder<crate::model::GetValuedResourceRequest>);
1148
1149 impl GetValuedResource {
1150 pub(crate) fn new(
1151 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
1152 ) -> Self {
1153 Self(RequestBuilder::new(stub))
1154 }
1155
1156 pub fn with_request<V: Into<crate::model::GetValuedResourceRequest>>(
1158 mut self,
1159 v: V,
1160 ) -> Self {
1161 self.0.request = v.into();
1162 self
1163 }
1164
1165 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1167 self.0.options = v.into();
1168 self
1169 }
1170
1171 pub async fn send(self) -> Result<crate::model::ValuedResource> {
1173 (*self.0.stub)
1174 .get_valued_resource(self.0.request, self.0.options)
1175 .await
1176 .map(gax::response::Response::into_body)
1177 }
1178
1179 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1183 self.0.request.name = v.into();
1184 self
1185 }
1186 }
1187
1188 #[doc(hidden)]
1189 impl gax::options::internal::RequestBuilder for GetValuedResource {
1190 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1191 &mut self.0.options
1192 }
1193 }
1194
1195 #[derive(Clone, Debug)]
1212 pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
1213
1214 impl GetIamPolicy {
1215 pub(crate) fn new(
1216 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
1217 ) -> Self {
1218 Self(RequestBuilder::new(stub))
1219 }
1220
1221 pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
1223 self.0.request = v.into();
1224 self
1225 }
1226
1227 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1229 self.0.options = v.into();
1230 self
1231 }
1232
1233 pub async fn send(self) -> Result<iam_v1::model::Policy> {
1235 (*self.0.stub)
1236 .get_iam_policy(self.0.request, self.0.options)
1237 .await
1238 .map(gax::response::Response::into_body)
1239 }
1240
1241 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1245 self.0.request.resource = v.into();
1246 self
1247 }
1248
1249 pub fn set_options<T>(mut self, v: T) -> Self
1251 where
1252 T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
1253 {
1254 self.0.request.options = std::option::Option::Some(v.into());
1255 self
1256 }
1257
1258 pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
1260 where
1261 T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
1262 {
1263 self.0.request.options = v.map(|x| x.into());
1264 self
1265 }
1266 }
1267
1268 #[doc(hidden)]
1269 impl gax::options::internal::RequestBuilder for GetIamPolicy {
1270 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1271 &mut self.0.options
1272 }
1273 }
1274
1275 #[derive(Clone, Debug)]
1292 pub struct GetMuteConfig(RequestBuilder<crate::model::GetMuteConfigRequest>);
1293
1294 impl GetMuteConfig {
1295 pub(crate) fn new(
1296 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
1297 ) -> Self {
1298 Self(RequestBuilder::new(stub))
1299 }
1300
1301 pub fn with_request<V: Into<crate::model::GetMuteConfigRequest>>(mut self, v: V) -> Self {
1303 self.0.request = v.into();
1304 self
1305 }
1306
1307 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1309 self.0.options = v.into();
1310 self
1311 }
1312
1313 pub async fn send(self) -> Result<crate::model::MuteConfig> {
1315 (*self.0.stub)
1316 .get_mute_config(self.0.request, self.0.options)
1317 .await
1318 .map(gax::response::Response::into_body)
1319 }
1320
1321 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1325 self.0.request.name = v.into();
1326 self
1327 }
1328 }
1329
1330 #[doc(hidden)]
1331 impl gax::options::internal::RequestBuilder for GetMuteConfig {
1332 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1333 &mut self.0.options
1334 }
1335 }
1336
1337 #[derive(Clone, Debug)]
1354 pub struct GetNotificationConfig(RequestBuilder<crate::model::GetNotificationConfigRequest>);
1355
1356 impl GetNotificationConfig {
1357 pub(crate) fn new(
1358 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
1359 ) -> Self {
1360 Self(RequestBuilder::new(stub))
1361 }
1362
1363 pub fn with_request<V: Into<crate::model::GetNotificationConfigRequest>>(
1365 mut self,
1366 v: V,
1367 ) -> Self {
1368 self.0.request = v.into();
1369 self
1370 }
1371
1372 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1374 self.0.options = v.into();
1375 self
1376 }
1377
1378 pub async fn send(self) -> Result<crate::model::NotificationConfig> {
1380 (*self.0.stub)
1381 .get_notification_config(self.0.request, self.0.options)
1382 .await
1383 .map(gax::response::Response::into_body)
1384 }
1385
1386 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1390 self.0.request.name = v.into();
1391 self
1392 }
1393 }
1394
1395 #[doc(hidden)]
1396 impl gax::options::internal::RequestBuilder for GetNotificationConfig {
1397 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1398 &mut self.0.options
1399 }
1400 }
1401
1402 #[derive(Clone, Debug)]
1419 pub struct GetResourceValueConfig(RequestBuilder<crate::model::GetResourceValueConfigRequest>);
1420
1421 impl GetResourceValueConfig {
1422 pub(crate) fn new(
1423 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
1424 ) -> Self {
1425 Self(RequestBuilder::new(stub))
1426 }
1427
1428 pub fn with_request<V: Into<crate::model::GetResourceValueConfigRequest>>(
1430 mut self,
1431 v: V,
1432 ) -> Self {
1433 self.0.request = v.into();
1434 self
1435 }
1436
1437 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1439 self.0.options = v.into();
1440 self
1441 }
1442
1443 pub async fn send(self) -> Result<crate::model::ResourceValueConfig> {
1445 (*self.0.stub)
1446 .get_resource_value_config(self.0.request, self.0.options)
1447 .await
1448 .map(gax::response::Response::into_body)
1449 }
1450
1451 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1455 self.0.request.name = v.into();
1456 self
1457 }
1458 }
1459
1460 #[doc(hidden)]
1461 impl gax::options::internal::RequestBuilder for GetResourceValueConfig {
1462 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1463 &mut self.0.options
1464 }
1465 }
1466
1467 #[derive(Clone, Debug)]
1484 pub struct GetSource(RequestBuilder<crate::model::GetSourceRequest>);
1485
1486 impl GetSource {
1487 pub(crate) fn new(
1488 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
1489 ) -> Self {
1490 Self(RequestBuilder::new(stub))
1491 }
1492
1493 pub fn with_request<V: Into<crate::model::GetSourceRequest>>(mut self, v: V) -> Self {
1495 self.0.request = v.into();
1496 self
1497 }
1498
1499 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1501 self.0.options = v.into();
1502 self
1503 }
1504
1505 pub async fn send(self) -> Result<crate::model::Source> {
1507 (*self.0.stub)
1508 .get_source(self.0.request, self.0.options)
1509 .await
1510 .map(gax::response::Response::into_body)
1511 }
1512
1513 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1517 self.0.request.name = v.into();
1518 self
1519 }
1520 }
1521
1522 #[doc(hidden)]
1523 impl gax::options::internal::RequestBuilder for GetSource {
1524 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1525 &mut self.0.options
1526 }
1527 }
1528
1529 #[derive(Clone, Debug)]
1550 pub struct GroupFindings(RequestBuilder<crate::model::GroupFindingsRequest>);
1551
1552 impl GroupFindings {
1553 pub(crate) fn new(
1554 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
1555 ) -> Self {
1556 Self(RequestBuilder::new(stub))
1557 }
1558
1559 pub fn with_request<V: Into<crate::model::GroupFindingsRequest>>(mut self, v: V) -> Self {
1561 self.0.request = v.into();
1562 self
1563 }
1564
1565 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1567 self.0.options = v.into();
1568 self
1569 }
1570
1571 pub async fn send(self) -> Result<crate::model::GroupFindingsResponse> {
1573 (*self.0.stub)
1574 .group_findings(self.0.request, self.0.options)
1575 .await
1576 .map(gax::response::Response::into_body)
1577 }
1578
1579 pub fn by_page(
1581 self,
1582 ) -> impl gax::paginator::Paginator<crate::model::GroupFindingsResponse, gax::error::Error>
1583 {
1584 use std::clone::Clone;
1585 let token = self.0.request.page_token.clone();
1586 let execute = move |token: String| {
1587 let mut builder = self.clone();
1588 builder.0.request = builder.0.request.set_page_token(token);
1589 builder.send()
1590 };
1591 gax::paginator::internal::new_paginator(token, execute)
1592 }
1593
1594 pub fn by_item(
1596 self,
1597 ) -> impl gax::paginator::ItemPaginator<crate::model::GroupFindingsResponse, gax::error::Error>
1598 {
1599 use gax::paginator::Paginator;
1600 self.by_page().items()
1601 }
1602
1603 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1607 self.0.request.parent = v.into();
1608 self
1609 }
1610
1611 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1613 self.0.request.filter = v.into();
1614 self
1615 }
1616
1617 pub fn set_group_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1621 self.0.request.group_by = v.into();
1622 self
1623 }
1624
1625 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1627 self.0.request.page_token = v.into();
1628 self
1629 }
1630
1631 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1633 self.0.request.page_size = v.into();
1634 self
1635 }
1636 }
1637
1638 #[doc(hidden)]
1639 impl gax::options::internal::RequestBuilder for GroupFindings {
1640 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1641 &mut self.0.options
1642 }
1643 }
1644
1645 #[derive(Clone, Debug)]
1666 pub struct ListAttackPaths(RequestBuilder<crate::model::ListAttackPathsRequest>);
1667
1668 impl ListAttackPaths {
1669 pub(crate) fn new(
1670 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
1671 ) -> Self {
1672 Self(RequestBuilder::new(stub))
1673 }
1674
1675 pub fn with_request<V: Into<crate::model::ListAttackPathsRequest>>(mut self, v: V) -> Self {
1677 self.0.request = v.into();
1678 self
1679 }
1680
1681 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1683 self.0.options = v.into();
1684 self
1685 }
1686
1687 pub async fn send(self) -> Result<crate::model::ListAttackPathsResponse> {
1689 (*self.0.stub)
1690 .list_attack_paths(self.0.request, self.0.options)
1691 .await
1692 .map(gax::response::Response::into_body)
1693 }
1694
1695 pub fn by_page(
1697 self,
1698 ) -> impl gax::paginator::Paginator<crate::model::ListAttackPathsResponse, gax::error::Error>
1699 {
1700 use std::clone::Clone;
1701 let token = self.0.request.page_token.clone();
1702 let execute = move |token: String| {
1703 let mut builder = self.clone();
1704 builder.0.request = builder.0.request.set_page_token(token);
1705 builder.send()
1706 };
1707 gax::paginator::internal::new_paginator(token, execute)
1708 }
1709
1710 pub fn by_item(
1712 self,
1713 ) -> impl gax::paginator::ItemPaginator<crate::model::ListAttackPathsResponse, gax::error::Error>
1714 {
1715 use gax::paginator::Paginator;
1716 self.by_page().items()
1717 }
1718
1719 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1723 self.0.request.parent = v.into();
1724 self
1725 }
1726
1727 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1729 self.0.request.filter = v.into();
1730 self
1731 }
1732
1733 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1735 self.0.request.page_token = v.into();
1736 self
1737 }
1738
1739 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1741 self.0.request.page_size = v.into();
1742 self
1743 }
1744 }
1745
1746 #[doc(hidden)]
1747 impl gax::options::internal::RequestBuilder for ListAttackPaths {
1748 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1749 &mut self.0.options
1750 }
1751 }
1752
1753 #[derive(Clone, Debug)]
1774 pub struct ListBigQueryExports(RequestBuilder<crate::model::ListBigQueryExportsRequest>);
1775
1776 impl ListBigQueryExports {
1777 pub(crate) fn new(
1778 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
1779 ) -> Self {
1780 Self(RequestBuilder::new(stub))
1781 }
1782
1783 pub fn with_request<V: Into<crate::model::ListBigQueryExportsRequest>>(
1785 mut self,
1786 v: V,
1787 ) -> Self {
1788 self.0.request = v.into();
1789 self
1790 }
1791
1792 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1794 self.0.options = v.into();
1795 self
1796 }
1797
1798 pub async fn send(self) -> Result<crate::model::ListBigQueryExportsResponse> {
1800 (*self.0.stub)
1801 .list_big_query_exports(self.0.request, self.0.options)
1802 .await
1803 .map(gax::response::Response::into_body)
1804 }
1805
1806 pub fn by_page(
1808 self,
1809 ) -> impl gax::paginator::Paginator<crate::model::ListBigQueryExportsResponse, gax::error::Error>
1810 {
1811 use std::clone::Clone;
1812 let token = self.0.request.page_token.clone();
1813 let execute = move |token: String| {
1814 let mut builder = self.clone();
1815 builder.0.request = builder.0.request.set_page_token(token);
1816 builder.send()
1817 };
1818 gax::paginator::internal::new_paginator(token, execute)
1819 }
1820
1821 pub fn by_item(
1823 self,
1824 ) -> impl gax::paginator::ItemPaginator<
1825 crate::model::ListBigQueryExportsResponse,
1826 gax::error::Error,
1827 > {
1828 use gax::paginator::Paginator;
1829 self.by_page().items()
1830 }
1831
1832 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1836 self.0.request.parent = v.into();
1837 self
1838 }
1839
1840 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1842 self.0.request.page_size = v.into();
1843 self
1844 }
1845
1846 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1848 self.0.request.page_token = v.into();
1849 self
1850 }
1851 }
1852
1853 #[doc(hidden)]
1854 impl gax::options::internal::RequestBuilder for ListBigQueryExports {
1855 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1856 &mut self.0.options
1857 }
1858 }
1859
1860 #[derive(Clone, Debug)]
1881 pub struct ListFindings(RequestBuilder<crate::model::ListFindingsRequest>);
1882
1883 impl ListFindings {
1884 pub(crate) fn new(
1885 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
1886 ) -> Self {
1887 Self(RequestBuilder::new(stub))
1888 }
1889
1890 pub fn with_request<V: Into<crate::model::ListFindingsRequest>>(mut self, v: V) -> Self {
1892 self.0.request = v.into();
1893 self
1894 }
1895
1896 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1898 self.0.options = v.into();
1899 self
1900 }
1901
1902 pub async fn send(self) -> Result<crate::model::ListFindingsResponse> {
1904 (*self.0.stub)
1905 .list_findings(self.0.request, self.0.options)
1906 .await
1907 .map(gax::response::Response::into_body)
1908 }
1909
1910 pub fn by_page(
1912 self,
1913 ) -> impl gax::paginator::Paginator<crate::model::ListFindingsResponse, gax::error::Error>
1914 {
1915 use std::clone::Clone;
1916 let token = self.0.request.page_token.clone();
1917 let execute = move |token: String| {
1918 let mut builder = self.clone();
1919 builder.0.request = builder.0.request.set_page_token(token);
1920 builder.send()
1921 };
1922 gax::paginator::internal::new_paginator(token, execute)
1923 }
1924
1925 pub fn by_item(
1927 self,
1928 ) -> impl gax::paginator::ItemPaginator<crate::model::ListFindingsResponse, gax::error::Error>
1929 {
1930 use gax::paginator::Paginator;
1931 self.by_page().items()
1932 }
1933
1934 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1938 self.0.request.parent = v.into();
1939 self
1940 }
1941
1942 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1944 self.0.request.filter = v.into();
1945 self
1946 }
1947
1948 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1950 self.0.request.order_by = v.into();
1951 self
1952 }
1953
1954 pub fn set_field_mask<T>(mut self, v: T) -> Self
1956 where
1957 T: std::convert::Into<wkt::FieldMask>,
1958 {
1959 self.0.request.field_mask = std::option::Option::Some(v.into());
1960 self
1961 }
1962
1963 pub fn set_or_clear_field_mask<T>(mut self, v: std::option::Option<T>) -> Self
1965 where
1966 T: std::convert::Into<wkt::FieldMask>,
1967 {
1968 self.0.request.field_mask = v.map(|x| x.into());
1969 self
1970 }
1971
1972 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1974 self.0.request.page_token = v.into();
1975 self
1976 }
1977
1978 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1980 self.0.request.page_size = v.into();
1981 self
1982 }
1983 }
1984
1985 #[doc(hidden)]
1986 impl gax::options::internal::RequestBuilder for ListFindings {
1987 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1988 &mut self.0.options
1989 }
1990 }
1991
1992 #[derive(Clone, Debug)]
2013 pub struct ListMuteConfigs(RequestBuilder<crate::model::ListMuteConfigsRequest>);
2014
2015 impl ListMuteConfigs {
2016 pub(crate) fn new(
2017 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
2018 ) -> Self {
2019 Self(RequestBuilder::new(stub))
2020 }
2021
2022 pub fn with_request<V: Into<crate::model::ListMuteConfigsRequest>>(mut self, v: V) -> Self {
2024 self.0.request = v.into();
2025 self
2026 }
2027
2028 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2030 self.0.options = v.into();
2031 self
2032 }
2033
2034 pub async fn send(self) -> Result<crate::model::ListMuteConfigsResponse> {
2036 (*self.0.stub)
2037 .list_mute_configs(self.0.request, self.0.options)
2038 .await
2039 .map(gax::response::Response::into_body)
2040 }
2041
2042 pub fn by_page(
2044 self,
2045 ) -> impl gax::paginator::Paginator<crate::model::ListMuteConfigsResponse, gax::error::Error>
2046 {
2047 use std::clone::Clone;
2048 let token = self.0.request.page_token.clone();
2049 let execute = move |token: String| {
2050 let mut builder = self.clone();
2051 builder.0.request = builder.0.request.set_page_token(token);
2052 builder.send()
2053 };
2054 gax::paginator::internal::new_paginator(token, execute)
2055 }
2056
2057 pub fn by_item(
2059 self,
2060 ) -> impl gax::paginator::ItemPaginator<crate::model::ListMuteConfigsResponse, gax::error::Error>
2061 {
2062 use gax::paginator::Paginator;
2063 self.by_page().items()
2064 }
2065
2066 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2070 self.0.request.parent = v.into();
2071 self
2072 }
2073
2074 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2076 self.0.request.page_size = v.into();
2077 self
2078 }
2079
2080 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2082 self.0.request.page_token = v.into();
2083 self
2084 }
2085 }
2086
2087 #[doc(hidden)]
2088 impl gax::options::internal::RequestBuilder for ListMuteConfigs {
2089 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2090 &mut self.0.options
2091 }
2092 }
2093
2094 #[derive(Clone, Debug)]
2115 pub struct ListNotificationConfigs(
2116 RequestBuilder<crate::model::ListNotificationConfigsRequest>,
2117 );
2118
2119 impl ListNotificationConfigs {
2120 pub(crate) fn new(
2121 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
2122 ) -> Self {
2123 Self(RequestBuilder::new(stub))
2124 }
2125
2126 pub fn with_request<V: Into<crate::model::ListNotificationConfigsRequest>>(
2128 mut self,
2129 v: V,
2130 ) -> Self {
2131 self.0.request = v.into();
2132 self
2133 }
2134
2135 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2137 self.0.options = v.into();
2138 self
2139 }
2140
2141 pub async fn send(self) -> Result<crate::model::ListNotificationConfigsResponse> {
2143 (*self.0.stub)
2144 .list_notification_configs(self.0.request, self.0.options)
2145 .await
2146 .map(gax::response::Response::into_body)
2147 }
2148
2149 pub fn by_page(
2151 self,
2152 ) -> impl gax::paginator::Paginator<
2153 crate::model::ListNotificationConfigsResponse,
2154 gax::error::Error,
2155 > {
2156 use std::clone::Clone;
2157 let token = self.0.request.page_token.clone();
2158 let execute = move |token: String| {
2159 let mut builder = self.clone();
2160 builder.0.request = builder.0.request.set_page_token(token);
2161 builder.send()
2162 };
2163 gax::paginator::internal::new_paginator(token, execute)
2164 }
2165
2166 pub fn by_item(
2168 self,
2169 ) -> impl gax::paginator::ItemPaginator<
2170 crate::model::ListNotificationConfigsResponse,
2171 gax::error::Error,
2172 > {
2173 use gax::paginator::Paginator;
2174 self.by_page().items()
2175 }
2176
2177 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2181 self.0.request.parent = v.into();
2182 self
2183 }
2184
2185 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2187 self.0.request.page_token = v.into();
2188 self
2189 }
2190
2191 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2193 self.0.request.page_size = v.into();
2194 self
2195 }
2196 }
2197
2198 #[doc(hidden)]
2199 impl gax::options::internal::RequestBuilder for ListNotificationConfigs {
2200 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2201 &mut self.0.options
2202 }
2203 }
2204
2205 #[derive(Clone, Debug)]
2226 pub struct ListResourceValueConfigs(
2227 RequestBuilder<crate::model::ListResourceValueConfigsRequest>,
2228 );
2229
2230 impl ListResourceValueConfigs {
2231 pub(crate) fn new(
2232 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
2233 ) -> Self {
2234 Self(RequestBuilder::new(stub))
2235 }
2236
2237 pub fn with_request<V: Into<crate::model::ListResourceValueConfigsRequest>>(
2239 mut self,
2240 v: V,
2241 ) -> Self {
2242 self.0.request = v.into();
2243 self
2244 }
2245
2246 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2248 self.0.options = v.into();
2249 self
2250 }
2251
2252 pub async fn send(self) -> Result<crate::model::ListResourceValueConfigsResponse> {
2254 (*self.0.stub)
2255 .list_resource_value_configs(self.0.request, self.0.options)
2256 .await
2257 .map(gax::response::Response::into_body)
2258 }
2259
2260 pub fn by_page(
2262 self,
2263 ) -> impl gax::paginator::Paginator<
2264 crate::model::ListResourceValueConfigsResponse,
2265 gax::error::Error,
2266 > {
2267 use std::clone::Clone;
2268 let token = self.0.request.page_token.clone();
2269 let execute = move |token: String| {
2270 let mut builder = self.clone();
2271 builder.0.request = builder.0.request.set_page_token(token);
2272 builder.send()
2273 };
2274 gax::paginator::internal::new_paginator(token, execute)
2275 }
2276
2277 pub fn by_item(
2279 self,
2280 ) -> impl gax::paginator::ItemPaginator<
2281 crate::model::ListResourceValueConfigsResponse,
2282 gax::error::Error,
2283 > {
2284 use gax::paginator::Paginator;
2285 self.by_page().items()
2286 }
2287
2288 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2292 self.0.request.parent = v.into();
2293 self
2294 }
2295
2296 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2298 self.0.request.page_size = v.into();
2299 self
2300 }
2301
2302 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2304 self.0.request.page_token = v.into();
2305 self
2306 }
2307 }
2308
2309 #[doc(hidden)]
2310 impl gax::options::internal::RequestBuilder for ListResourceValueConfigs {
2311 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2312 &mut self.0.options
2313 }
2314 }
2315
2316 #[derive(Clone, Debug)]
2337 pub struct ListSources(RequestBuilder<crate::model::ListSourcesRequest>);
2338
2339 impl ListSources {
2340 pub(crate) fn new(
2341 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
2342 ) -> Self {
2343 Self(RequestBuilder::new(stub))
2344 }
2345
2346 pub fn with_request<V: Into<crate::model::ListSourcesRequest>>(mut self, v: V) -> Self {
2348 self.0.request = v.into();
2349 self
2350 }
2351
2352 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2354 self.0.options = v.into();
2355 self
2356 }
2357
2358 pub async fn send(self) -> Result<crate::model::ListSourcesResponse> {
2360 (*self.0.stub)
2361 .list_sources(self.0.request, self.0.options)
2362 .await
2363 .map(gax::response::Response::into_body)
2364 }
2365
2366 pub fn by_page(
2368 self,
2369 ) -> impl gax::paginator::Paginator<crate::model::ListSourcesResponse, gax::error::Error>
2370 {
2371 use std::clone::Clone;
2372 let token = self.0.request.page_token.clone();
2373 let execute = move |token: String| {
2374 let mut builder = self.clone();
2375 builder.0.request = builder.0.request.set_page_token(token);
2376 builder.send()
2377 };
2378 gax::paginator::internal::new_paginator(token, execute)
2379 }
2380
2381 pub fn by_item(
2383 self,
2384 ) -> impl gax::paginator::ItemPaginator<crate::model::ListSourcesResponse, gax::error::Error>
2385 {
2386 use gax::paginator::Paginator;
2387 self.by_page().items()
2388 }
2389
2390 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2394 self.0.request.parent = v.into();
2395 self
2396 }
2397
2398 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2400 self.0.request.page_token = v.into();
2401 self
2402 }
2403
2404 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2406 self.0.request.page_size = v.into();
2407 self
2408 }
2409 }
2410
2411 #[doc(hidden)]
2412 impl gax::options::internal::RequestBuilder for ListSources {
2413 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2414 &mut self.0.options
2415 }
2416 }
2417
2418 #[derive(Clone, Debug)]
2439 pub struct ListValuedResources(RequestBuilder<crate::model::ListValuedResourcesRequest>);
2440
2441 impl ListValuedResources {
2442 pub(crate) fn new(
2443 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
2444 ) -> Self {
2445 Self(RequestBuilder::new(stub))
2446 }
2447
2448 pub fn with_request<V: Into<crate::model::ListValuedResourcesRequest>>(
2450 mut self,
2451 v: V,
2452 ) -> Self {
2453 self.0.request = v.into();
2454 self
2455 }
2456
2457 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2459 self.0.options = v.into();
2460 self
2461 }
2462
2463 pub async fn send(self) -> Result<crate::model::ListValuedResourcesResponse> {
2465 (*self.0.stub)
2466 .list_valued_resources(self.0.request, self.0.options)
2467 .await
2468 .map(gax::response::Response::into_body)
2469 }
2470
2471 pub fn by_page(
2473 self,
2474 ) -> impl gax::paginator::Paginator<crate::model::ListValuedResourcesResponse, gax::error::Error>
2475 {
2476 use std::clone::Clone;
2477 let token = self.0.request.page_token.clone();
2478 let execute = move |token: String| {
2479 let mut builder = self.clone();
2480 builder.0.request = builder.0.request.set_page_token(token);
2481 builder.send()
2482 };
2483 gax::paginator::internal::new_paginator(token, execute)
2484 }
2485
2486 pub fn by_item(
2488 self,
2489 ) -> impl gax::paginator::ItemPaginator<
2490 crate::model::ListValuedResourcesResponse,
2491 gax::error::Error,
2492 > {
2493 use gax::paginator::Paginator;
2494 self.by_page().items()
2495 }
2496
2497 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2501 self.0.request.parent = v.into();
2502 self
2503 }
2504
2505 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2507 self.0.request.filter = v.into();
2508 self
2509 }
2510
2511 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2513 self.0.request.page_token = v.into();
2514 self
2515 }
2516
2517 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2519 self.0.request.page_size = v.into();
2520 self
2521 }
2522
2523 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
2525 self.0.request.order_by = v.into();
2526 self
2527 }
2528 }
2529
2530 #[doc(hidden)]
2531 impl gax::options::internal::RequestBuilder for ListValuedResources {
2532 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2533 &mut self.0.options
2534 }
2535 }
2536
2537 #[derive(Clone, Debug)]
2554 pub struct SetFindingState(RequestBuilder<crate::model::SetFindingStateRequest>);
2555
2556 impl SetFindingState {
2557 pub(crate) fn new(
2558 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
2559 ) -> Self {
2560 Self(RequestBuilder::new(stub))
2561 }
2562
2563 pub fn with_request<V: Into<crate::model::SetFindingStateRequest>>(mut self, v: V) -> Self {
2565 self.0.request = v.into();
2566 self
2567 }
2568
2569 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2571 self.0.options = v.into();
2572 self
2573 }
2574
2575 pub async fn send(self) -> Result<crate::model::Finding> {
2577 (*self.0.stub)
2578 .set_finding_state(self.0.request, self.0.options)
2579 .await
2580 .map(gax::response::Response::into_body)
2581 }
2582
2583 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2587 self.0.request.name = v.into();
2588 self
2589 }
2590
2591 pub fn set_state<T: Into<crate::model::finding::State>>(mut self, v: T) -> Self {
2595 self.0.request.state = v.into();
2596 self
2597 }
2598 }
2599
2600 #[doc(hidden)]
2601 impl gax::options::internal::RequestBuilder for SetFindingState {
2602 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2603 &mut self.0.options
2604 }
2605 }
2606
2607 #[derive(Clone, Debug)]
2624 pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
2625
2626 impl SetIamPolicy {
2627 pub(crate) fn new(
2628 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
2629 ) -> Self {
2630 Self(RequestBuilder::new(stub))
2631 }
2632
2633 pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
2635 self.0.request = v.into();
2636 self
2637 }
2638
2639 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2641 self.0.options = v.into();
2642 self
2643 }
2644
2645 pub async fn send(self) -> Result<iam_v1::model::Policy> {
2647 (*self.0.stub)
2648 .set_iam_policy(self.0.request, self.0.options)
2649 .await
2650 .map(gax::response::Response::into_body)
2651 }
2652
2653 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
2657 self.0.request.resource = v.into();
2658 self
2659 }
2660
2661 pub fn set_policy<T>(mut self, v: T) -> Self
2665 where
2666 T: std::convert::Into<iam_v1::model::Policy>,
2667 {
2668 self.0.request.policy = std::option::Option::Some(v.into());
2669 self
2670 }
2671
2672 pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
2676 where
2677 T: std::convert::Into<iam_v1::model::Policy>,
2678 {
2679 self.0.request.policy = v.map(|x| x.into());
2680 self
2681 }
2682
2683 pub fn set_update_mask<T>(mut self, v: T) -> Self
2685 where
2686 T: std::convert::Into<wkt::FieldMask>,
2687 {
2688 self.0.request.update_mask = std::option::Option::Some(v.into());
2689 self
2690 }
2691
2692 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2694 where
2695 T: std::convert::Into<wkt::FieldMask>,
2696 {
2697 self.0.request.update_mask = v.map(|x| x.into());
2698 self
2699 }
2700 }
2701
2702 #[doc(hidden)]
2703 impl gax::options::internal::RequestBuilder for SetIamPolicy {
2704 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2705 &mut self.0.options
2706 }
2707 }
2708
2709 #[derive(Clone, Debug)]
2726 pub struct SetMute(RequestBuilder<crate::model::SetMuteRequest>);
2727
2728 impl SetMute {
2729 pub(crate) fn new(
2730 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
2731 ) -> Self {
2732 Self(RequestBuilder::new(stub))
2733 }
2734
2735 pub fn with_request<V: Into<crate::model::SetMuteRequest>>(mut self, v: V) -> Self {
2737 self.0.request = v.into();
2738 self
2739 }
2740
2741 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2743 self.0.options = v.into();
2744 self
2745 }
2746
2747 pub async fn send(self) -> Result<crate::model::Finding> {
2749 (*self.0.stub)
2750 .set_mute(self.0.request, self.0.options)
2751 .await
2752 .map(gax::response::Response::into_body)
2753 }
2754
2755 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2759 self.0.request.name = v.into();
2760 self
2761 }
2762
2763 pub fn set_mute<T: Into<crate::model::finding::Mute>>(mut self, v: T) -> Self {
2767 self.0.request.mute = v.into();
2768 self
2769 }
2770 }
2771
2772 #[doc(hidden)]
2773 impl gax::options::internal::RequestBuilder for SetMute {
2774 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2775 &mut self.0.options
2776 }
2777 }
2778
2779 #[derive(Clone, Debug)]
2796 pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
2797
2798 impl TestIamPermissions {
2799 pub(crate) fn new(
2800 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
2801 ) -> Self {
2802 Self(RequestBuilder::new(stub))
2803 }
2804
2805 pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
2807 mut self,
2808 v: V,
2809 ) -> Self {
2810 self.0.request = v.into();
2811 self
2812 }
2813
2814 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2816 self.0.options = v.into();
2817 self
2818 }
2819
2820 pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
2822 (*self.0.stub)
2823 .test_iam_permissions(self.0.request, self.0.options)
2824 .await
2825 .map(gax::response::Response::into_body)
2826 }
2827
2828 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
2832 self.0.request.resource = v.into();
2833 self
2834 }
2835
2836 pub fn set_permissions<T, V>(mut self, v: T) -> Self
2840 where
2841 T: std::iter::IntoIterator<Item = V>,
2842 V: std::convert::Into<std::string::String>,
2843 {
2844 use std::iter::Iterator;
2845 self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
2846 self
2847 }
2848 }
2849
2850 #[doc(hidden)]
2851 impl gax::options::internal::RequestBuilder for TestIamPermissions {
2852 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2853 &mut self.0.options
2854 }
2855 }
2856
2857 #[derive(Clone, Debug)]
2874 pub struct UpdateBigQueryExport(RequestBuilder<crate::model::UpdateBigQueryExportRequest>);
2875
2876 impl UpdateBigQueryExport {
2877 pub(crate) fn new(
2878 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
2879 ) -> Self {
2880 Self(RequestBuilder::new(stub))
2881 }
2882
2883 pub fn with_request<V: Into<crate::model::UpdateBigQueryExportRequest>>(
2885 mut self,
2886 v: V,
2887 ) -> Self {
2888 self.0.request = v.into();
2889 self
2890 }
2891
2892 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2894 self.0.options = v.into();
2895 self
2896 }
2897
2898 pub async fn send(self) -> Result<crate::model::BigQueryExport> {
2900 (*self.0.stub)
2901 .update_big_query_export(self.0.request, self.0.options)
2902 .await
2903 .map(gax::response::Response::into_body)
2904 }
2905
2906 pub fn set_big_query_export<T>(mut self, v: T) -> Self
2910 where
2911 T: std::convert::Into<crate::model::BigQueryExport>,
2912 {
2913 self.0.request.big_query_export = std::option::Option::Some(v.into());
2914 self
2915 }
2916
2917 pub fn set_or_clear_big_query_export<T>(mut self, v: std::option::Option<T>) -> Self
2921 where
2922 T: std::convert::Into<crate::model::BigQueryExport>,
2923 {
2924 self.0.request.big_query_export = v.map(|x| x.into());
2925 self
2926 }
2927
2928 pub fn set_update_mask<T>(mut self, v: T) -> Self
2930 where
2931 T: std::convert::Into<wkt::FieldMask>,
2932 {
2933 self.0.request.update_mask = std::option::Option::Some(v.into());
2934 self
2935 }
2936
2937 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2939 where
2940 T: std::convert::Into<wkt::FieldMask>,
2941 {
2942 self.0.request.update_mask = v.map(|x| x.into());
2943 self
2944 }
2945 }
2946
2947 #[doc(hidden)]
2948 impl gax::options::internal::RequestBuilder for UpdateBigQueryExport {
2949 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2950 &mut self.0.options
2951 }
2952 }
2953
2954 #[derive(Clone, Debug)]
2971 pub struct UpdateExternalSystem(RequestBuilder<crate::model::UpdateExternalSystemRequest>);
2972
2973 impl UpdateExternalSystem {
2974 pub(crate) fn new(
2975 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
2976 ) -> Self {
2977 Self(RequestBuilder::new(stub))
2978 }
2979
2980 pub fn with_request<V: Into<crate::model::UpdateExternalSystemRequest>>(
2982 mut self,
2983 v: V,
2984 ) -> Self {
2985 self.0.request = v.into();
2986 self
2987 }
2988
2989 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2991 self.0.options = v.into();
2992 self
2993 }
2994
2995 pub async fn send(self) -> Result<crate::model::ExternalSystem> {
2997 (*self.0.stub)
2998 .update_external_system(self.0.request, self.0.options)
2999 .await
3000 .map(gax::response::Response::into_body)
3001 }
3002
3003 pub fn set_external_system<T>(mut self, v: T) -> Self
3007 where
3008 T: std::convert::Into<crate::model::ExternalSystem>,
3009 {
3010 self.0.request.external_system = std::option::Option::Some(v.into());
3011 self
3012 }
3013
3014 pub fn set_or_clear_external_system<T>(mut self, v: std::option::Option<T>) -> Self
3018 where
3019 T: std::convert::Into<crate::model::ExternalSystem>,
3020 {
3021 self.0.request.external_system = v.map(|x| x.into());
3022 self
3023 }
3024
3025 pub fn set_update_mask<T>(mut self, v: T) -> Self
3027 where
3028 T: std::convert::Into<wkt::FieldMask>,
3029 {
3030 self.0.request.update_mask = std::option::Option::Some(v.into());
3031 self
3032 }
3033
3034 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3036 where
3037 T: std::convert::Into<wkt::FieldMask>,
3038 {
3039 self.0.request.update_mask = v.map(|x| x.into());
3040 self
3041 }
3042 }
3043
3044 #[doc(hidden)]
3045 impl gax::options::internal::RequestBuilder for UpdateExternalSystem {
3046 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3047 &mut self.0.options
3048 }
3049 }
3050
3051 #[derive(Clone, Debug)]
3068 pub struct UpdateFinding(RequestBuilder<crate::model::UpdateFindingRequest>);
3069
3070 impl UpdateFinding {
3071 pub(crate) fn new(
3072 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
3073 ) -> Self {
3074 Self(RequestBuilder::new(stub))
3075 }
3076
3077 pub fn with_request<V: Into<crate::model::UpdateFindingRequest>>(mut self, v: V) -> Self {
3079 self.0.request = v.into();
3080 self
3081 }
3082
3083 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3085 self.0.options = v.into();
3086 self
3087 }
3088
3089 pub async fn send(self) -> Result<crate::model::Finding> {
3091 (*self.0.stub)
3092 .update_finding(self.0.request, self.0.options)
3093 .await
3094 .map(gax::response::Response::into_body)
3095 }
3096
3097 pub fn set_finding<T>(mut self, v: T) -> Self
3101 where
3102 T: std::convert::Into<crate::model::Finding>,
3103 {
3104 self.0.request.finding = std::option::Option::Some(v.into());
3105 self
3106 }
3107
3108 pub fn set_or_clear_finding<T>(mut self, v: std::option::Option<T>) -> Self
3112 where
3113 T: std::convert::Into<crate::model::Finding>,
3114 {
3115 self.0.request.finding = v.map(|x| x.into());
3116 self
3117 }
3118
3119 pub fn set_update_mask<T>(mut self, v: T) -> Self
3121 where
3122 T: std::convert::Into<wkt::FieldMask>,
3123 {
3124 self.0.request.update_mask = std::option::Option::Some(v.into());
3125 self
3126 }
3127
3128 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3130 where
3131 T: std::convert::Into<wkt::FieldMask>,
3132 {
3133 self.0.request.update_mask = v.map(|x| x.into());
3134 self
3135 }
3136 }
3137
3138 #[doc(hidden)]
3139 impl gax::options::internal::RequestBuilder for UpdateFinding {
3140 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3141 &mut self.0.options
3142 }
3143 }
3144
3145 #[derive(Clone, Debug)]
3162 pub struct UpdateMuteConfig(RequestBuilder<crate::model::UpdateMuteConfigRequest>);
3163
3164 impl UpdateMuteConfig {
3165 pub(crate) fn new(
3166 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
3167 ) -> Self {
3168 Self(RequestBuilder::new(stub))
3169 }
3170
3171 pub fn with_request<V: Into<crate::model::UpdateMuteConfigRequest>>(
3173 mut self,
3174 v: V,
3175 ) -> Self {
3176 self.0.request = v.into();
3177 self
3178 }
3179
3180 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3182 self.0.options = v.into();
3183 self
3184 }
3185
3186 pub async fn send(self) -> Result<crate::model::MuteConfig> {
3188 (*self.0.stub)
3189 .update_mute_config(self.0.request, self.0.options)
3190 .await
3191 .map(gax::response::Response::into_body)
3192 }
3193
3194 pub fn set_mute_config<T>(mut self, v: T) -> Self
3198 where
3199 T: std::convert::Into<crate::model::MuteConfig>,
3200 {
3201 self.0.request.mute_config = std::option::Option::Some(v.into());
3202 self
3203 }
3204
3205 pub fn set_or_clear_mute_config<T>(mut self, v: std::option::Option<T>) -> Self
3209 where
3210 T: std::convert::Into<crate::model::MuteConfig>,
3211 {
3212 self.0.request.mute_config = v.map(|x| x.into());
3213 self
3214 }
3215
3216 pub fn set_update_mask<T>(mut self, v: T) -> Self
3218 where
3219 T: std::convert::Into<wkt::FieldMask>,
3220 {
3221 self.0.request.update_mask = std::option::Option::Some(v.into());
3222 self
3223 }
3224
3225 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3227 where
3228 T: std::convert::Into<wkt::FieldMask>,
3229 {
3230 self.0.request.update_mask = v.map(|x| x.into());
3231 self
3232 }
3233 }
3234
3235 #[doc(hidden)]
3236 impl gax::options::internal::RequestBuilder for UpdateMuteConfig {
3237 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3238 &mut self.0.options
3239 }
3240 }
3241
3242 #[derive(Clone, Debug)]
3259 pub struct UpdateNotificationConfig(
3260 RequestBuilder<crate::model::UpdateNotificationConfigRequest>,
3261 );
3262
3263 impl UpdateNotificationConfig {
3264 pub(crate) fn new(
3265 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
3266 ) -> Self {
3267 Self(RequestBuilder::new(stub))
3268 }
3269
3270 pub fn with_request<V: Into<crate::model::UpdateNotificationConfigRequest>>(
3272 mut self,
3273 v: V,
3274 ) -> Self {
3275 self.0.request = v.into();
3276 self
3277 }
3278
3279 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3281 self.0.options = v.into();
3282 self
3283 }
3284
3285 pub async fn send(self) -> Result<crate::model::NotificationConfig> {
3287 (*self.0.stub)
3288 .update_notification_config(self.0.request, self.0.options)
3289 .await
3290 .map(gax::response::Response::into_body)
3291 }
3292
3293 pub fn set_notification_config<T>(mut self, v: T) -> Self
3297 where
3298 T: std::convert::Into<crate::model::NotificationConfig>,
3299 {
3300 self.0.request.notification_config = std::option::Option::Some(v.into());
3301 self
3302 }
3303
3304 pub fn set_or_clear_notification_config<T>(mut self, v: std::option::Option<T>) -> Self
3308 where
3309 T: std::convert::Into<crate::model::NotificationConfig>,
3310 {
3311 self.0.request.notification_config = v.map(|x| x.into());
3312 self
3313 }
3314
3315 pub fn set_update_mask<T>(mut self, v: T) -> Self
3317 where
3318 T: std::convert::Into<wkt::FieldMask>,
3319 {
3320 self.0.request.update_mask = std::option::Option::Some(v.into());
3321 self
3322 }
3323
3324 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3326 where
3327 T: std::convert::Into<wkt::FieldMask>,
3328 {
3329 self.0.request.update_mask = v.map(|x| x.into());
3330 self
3331 }
3332 }
3333
3334 #[doc(hidden)]
3335 impl gax::options::internal::RequestBuilder for UpdateNotificationConfig {
3336 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3337 &mut self.0.options
3338 }
3339 }
3340
3341 #[derive(Clone, Debug)]
3358 pub struct UpdateResourceValueConfig(
3359 RequestBuilder<crate::model::UpdateResourceValueConfigRequest>,
3360 );
3361
3362 impl UpdateResourceValueConfig {
3363 pub(crate) fn new(
3364 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
3365 ) -> Self {
3366 Self(RequestBuilder::new(stub))
3367 }
3368
3369 pub fn with_request<V: Into<crate::model::UpdateResourceValueConfigRequest>>(
3371 mut self,
3372 v: V,
3373 ) -> Self {
3374 self.0.request = v.into();
3375 self
3376 }
3377
3378 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3380 self.0.options = v.into();
3381 self
3382 }
3383
3384 pub async fn send(self) -> Result<crate::model::ResourceValueConfig> {
3386 (*self.0.stub)
3387 .update_resource_value_config(self.0.request, self.0.options)
3388 .await
3389 .map(gax::response::Response::into_body)
3390 }
3391
3392 pub fn set_resource_value_config<T>(mut self, v: T) -> Self
3396 where
3397 T: std::convert::Into<crate::model::ResourceValueConfig>,
3398 {
3399 self.0.request.resource_value_config = std::option::Option::Some(v.into());
3400 self
3401 }
3402
3403 pub fn set_or_clear_resource_value_config<T>(mut self, v: std::option::Option<T>) -> Self
3407 where
3408 T: std::convert::Into<crate::model::ResourceValueConfig>,
3409 {
3410 self.0.request.resource_value_config = v.map(|x| x.into());
3411 self
3412 }
3413
3414 pub fn set_update_mask<T>(mut self, v: T) -> Self
3416 where
3417 T: std::convert::Into<wkt::FieldMask>,
3418 {
3419 self.0.request.update_mask = std::option::Option::Some(v.into());
3420 self
3421 }
3422
3423 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3425 where
3426 T: std::convert::Into<wkt::FieldMask>,
3427 {
3428 self.0.request.update_mask = v.map(|x| x.into());
3429 self
3430 }
3431 }
3432
3433 #[doc(hidden)]
3434 impl gax::options::internal::RequestBuilder for UpdateResourceValueConfig {
3435 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3436 &mut self.0.options
3437 }
3438 }
3439
3440 #[derive(Clone, Debug)]
3457 pub struct UpdateSecurityMarks(RequestBuilder<crate::model::UpdateSecurityMarksRequest>);
3458
3459 impl UpdateSecurityMarks {
3460 pub(crate) fn new(
3461 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
3462 ) -> Self {
3463 Self(RequestBuilder::new(stub))
3464 }
3465
3466 pub fn with_request<V: Into<crate::model::UpdateSecurityMarksRequest>>(
3468 mut self,
3469 v: V,
3470 ) -> Self {
3471 self.0.request = v.into();
3472 self
3473 }
3474
3475 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3477 self.0.options = v.into();
3478 self
3479 }
3480
3481 pub async fn send(self) -> Result<crate::model::SecurityMarks> {
3483 (*self.0.stub)
3484 .update_security_marks(self.0.request, self.0.options)
3485 .await
3486 .map(gax::response::Response::into_body)
3487 }
3488
3489 pub fn set_security_marks<T>(mut self, v: T) -> Self
3493 where
3494 T: std::convert::Into<crate::model::SecurityMarks>,
3495 {
3496 self.0.request.security_marks = std::option::Option::Some(v.into());
3497 self
3498 }
3499
3500 pub fn set_or_clear_security_marks<T>(mut self, v: std::option::Option<T>) -> Self
3504 where
3505 T: std::convert::Into<crate::model::SecurityMarks>,
3506 {
3507 self.0.request.security_marks = v.map(|x| x.into());
3508 self
3509 }
3510
3511 pub fn set_update_mask<T>(mut self, v: T) -> Self
3513 where
3514 T: std::convert::Into<wkt::FieldMask>,
3515 {
3516 self.0.request.update_mask = std::option::Option::Some(v.into());
3517 self
3518 }
3519
3520 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3522 where
3523 T: std::convert::Into<wkt::FieldMask>,
3524 {
3525 self.0.request.update_mask = v.map(|x| x.into());
3526 self
3527 }
3528 }
3529
3530 #[doc(hidden)]
3531 impl gax::options::internal::RequestBuilder for UpdateSecurityMarks {
3532 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3533 &mut self.0.options
3534 }
3535 }
3536
3537 #[derive(Clone, Debug)]
3554 pub struct UpdateSource(RequestBuilder<crate::model::UpdateSourceRequest>);
3555
3556 impl UpdateSource {
3557 pub(crate) fn new(
3558 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
3559 ) -> Self {
3560 Self(RequestBuilder::new(stub))
3561 }
3562
3563 pub fn with_request<V: Into<crate::model::UpdateSourceRequest>>(mut self, v: V) -> Self {
3565 self.0.request = v.into();
3566 self
3567 }
3568
3569 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3571 self.0.options = v.into();
3572 self
3573 }
3574
3575 pub async fn send(self) -> Result<crate::model::Source> {
3577 (*self.0.stub)
3578 .update_source(self.0.request, self.0.options)
3579 .await
3580 .map(gax::response::Response::into_body)
3581 }
3582
3583 pub fn set_source<T>(mut self, v: T) -> Self
3587 where
3588 T: std::convert::Into<crate::model::Source>,
3589 {
3590 self.0.request.source = std::option::Option::Some(v.into());
3591 self
3592 }
3593
3594 pub fn set_or_clear_source<T>(mut self, v: std::option::Option<T>) -> Self
3598 where
3599 T: std::convert::Into<crate::model::Source>,
3600 {
3601 self.0.request.source = v.map(|x| x.into());
3602 self
3603 }
3604
3605 pub fn set_update_mask<T>(mut self, v: T) -> Self
3607 where
3608 T: std::convert::Into<wkt::FieldMask>,
3609 {
3610 self.0.request.update_mask = std::option::Option::Some(v.into());
3611 self
3612 }
3613
3614 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3616 where
3617 T: std::convert::Into<wkt::FieldMask>,
3618 {
3619 self.0.request.update_mask = v.map(|x| x.into());
3620 self
3621 }
3622 }
3623
3624 #[doc(hidden)]
3625 impl gax::options::internal::RequestBuilder for UpdateSource {
3626 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3627 &mut self.0.options
3628 }
3629 }
3630
3631 #[derive(Clone, Debug)]
3652 pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
3653
3654 impl ListOperations {
3655 pub(crate) fn new(
3656 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
3657 ) -> Self {
3658 Self(RequestBuilder::new(stub))
3659 }
3660
3661 pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
3663 mut self,
3664 v: V,
3665 ) -> Self {
3666 self.0.request = v.into();
3667 self
3668 }
3669
3670 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3672 self.0.options = v.into();
3673 self
3674 }
3675
3676 pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
3678 (*self.0.stub)
3679 .list_operations(self.0.request, self.0.options)
3680 .await
3681 .map(gax::response::Response::into_body)
3682 }
3683
3684 pub fn by_page(
3686 self,
3687 ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
3688 {
3689 use std::clone::Clone;
3690 let token = self.0.request.page_token.clone();
3691 let execute = move |token: String| {
3692 let mut builder = self.clone();
3693 builder.0.request = builder.0.request.set_page_token(token);
3694 builder.send()
3695 };
3696 gax::paginator::internal::new_paginator(token, execute)
3697 }
3698
3699 pub fn by_item(
3701 self,
3702 ) -> impl gax::paginator::ItemPaginator<
3703 longrunning::model::ListOperationsResponse,
3704 gax::error::Error,
3705 > {
3706 use gax::paginator::Paginator;
3707 self.by_page().items()
3708 }
3709
3710 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3712 self.0.request.name = v.into();
3713 self
3714 }
3715
3716 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3718 self.0.request.filter = v.into();
3719 self
3720 }
3721
3722 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3724 self.0.request.page_size = v.into();
3725 self
3726 }
3727
3728 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3730 self.0.request.page_token = v.into();
3731 self
3732 }
3733
3734 pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
3736 self.0.request.return_partial_success = v.into();
3737 self
3738 }
3739 }
3740
3741 #[doc(hidden)]
3742 impl gax::options::internal::RequestBuilder for ListOperations {
3743 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3744 &mut self.0.options
3745 }
3746 }
3747
3748 #[derive(Clone, Debug)]
3765 pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
3766
3767 impl GetOperation {
3768 pub(crate) fn new(
3769 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
3770 ) -> Self {
3771 Self(RequestBuilder::new(stub))
3772 }
3773
3774 pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
3776 mut self,
3777 v: V,
3778 ) -> Self {
3779 self.0.request = v.into();
3780 self
3781 }
3782
3783 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3785 self.0.options = v.into();
3786 self
3787 }
3788
3789 pub async fn send(self) -> Result<longrunning::model::Operation> {
3791 (*self.0.stub)
3792 .get_operation(self.0.request, self.0.options)
3793 .await
3794 .map(gax::response::Response::into_body)
3795 }
3796
3797 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3799 self.0.request.name = v.into();
3800 self
3801 }
3802 }
3803
3804 #[doc(hidden)]
3805 impl gax::options::internal::RequestBuilder for GetOperation {
3806 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3807 &mut self.0.options
3808 }
3809 }
3810
3811 #[derive(Clone, Debug)]
3828 pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
3829
3830 impl DeleteOperation {
3831 pub(crate) fn new(
3832 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
3833 ) -> Self {
3834 Self(RequestBuilder::new(stub))
3835 }
3836
3837 pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
3839 mut self,
3840 v: V,
3841 ) -> Self {
3842 self.0.request = v.into();
3843 self
3844 }
3845
3846 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3848 self.0.options = v.into();
3849 self
3850 }
3851
3852 pub async fn send(self) -> Result<()> {
3854 (*self.0.stub)
3855 .delete_operation(self.0.request, self.0.options)
3856 .await
3857 .map(gax::response::Response::into_body)
3858 }
3859
3860 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3862 self.0.request.name = v.into();
3863 self
3864 }
3865 }
3866
3867 #[doc(hidden)]
3868 impl gax::options::internal::RequestBuilder for DeleteOperation {
3869 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3870 &mut self.0.options
3871 }
3872 }
3873
3874 #[derive(Clone, Debug)]
3891 pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
3892
3893 impl CancelOperation {
3894 pub(crate) fn new(
3895 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecurityCenter>,
3896 ) -> Self {
3897 Self(RequestBuilder::new(stub))
3898 }
3899
3900 pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
3902 mut self,
3903 v: V,
3904 ) -> Self {
3905 self.0.request = v.into();
3906 self
3907 }
3908
3909 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3911 self.0.options = v.into();
3912 self
3913 }
3914
3915 pub async fn send(self) -> Result<()> {
3917 (*self.0.stub)
3918 .cancel_operation(self.0.request, self.0.options)
3919 .await
3920 .map(gax::response::Response::into_body)
3921 }
3922
3923 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3925 self.0.request.name = v.into();
3926 self
3927 }
3928 }
3929
3930 #[doc(hidden)]
3931 impl gax::options::internal::RequestBuilder for CancelOperation {
3932 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3933 &mut self.0.options
3934 }
3935 }
3936}