1pub mod business_glossary_service {
19 use crate::Result;
20
21 pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
35
36 pub(crate) mod client {
37 use super::super::super::client::BusinessGlossaryService;
38 pub struct Factory;
39 impl crate::ClientFactory for Factory {
40 type Client = BusinessGlossaryService;
41 type Credentials = gaxi::options::Credentials;
42 async fn build(
43 self,
44 config: gaxi::options::ClientConfig,
45 ) -> crate::ClientBuilderResult<Self::Client> {
46 Self::Client::new(config).await
47 }
48 }
49 }
50
51 #[derive(Clone, Debug)]
53 pub(crate) struct RequestBuilder<R: std::default::Default> {
54 stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
55 request: R,
56 options: crate::RequestOptions,
57 }
58
59 impl<R> RequestBuilder<R>
60 where
61 R: std::default::Default,
62 {
63 pub(crate) fn new(
64 stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
65 ) -> Self {
66 Self {
67 stub,
68 request: R::default(),
69 options: crate::RequestOptions::default(),
70 }
71 }
72 }
73
74 #[derive(Clone, Debug)]
92 pub struct CreateGlossary(RequestBuilder<crate::model::CreateGlossaryRequest>);
93
94 impl CreateGlossary {
95 pub(crate) fn new(
96 stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
97 ) -> Self {
98 Self(RequestBuilder::new(stub))
99 }
100
101 pub fn with_request<V: Into<crate::model::CreateGlossaryRequest>>(mut self, v: V) -> Self {
103 self.0.request = v.into();
104 self
105 }
106
107 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
109 self.0.options = v.into();
110 self
111 }
112
113 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
120 (*self.0.stub)
121 .create_glossary(self.0.request, self.0.options)
122 .await
123 .map(crate::Response::into_body)
124 }
125
126 pub fn poller(
128 self,
129 ) -> impl google_cloud_lro::Poller<crate::model::Glossary, crate::model::OperationMetadata>
130 {
131 type Operation = google_cloud_lro::internal::Operation<
132 crate::model::Glossary,
133 crate::model::OperationMetadata,
134 >;
135 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
136 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
137 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
138 if let Some(ref mut details) = poller_options.tracing {
139 details.method_name = "google_cloud_dataplex_v1::client::BusinessGlossaryService::create_glossary::until_done";
140 }
141
142 let stub = self.0.stub.clone();
143 let mut options = self.0.options.clone();
144 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
145 let query = move |name| {
146 let stub = stub.clone();
147 let options = options.clone();
148 async {
149 let op = GetOperation::new(stub)
150 .set_name(name)
151 .with_options(options)
152 .send()
153 .await?;
154 Ok(Operation::new(op))
155 }
156 };
157
158 let start = move || async {
159 let op = self.send().await?;
160 Ok(Operation::new(op))
161 };
162
163 use google_cloud_lro::internal::PollerExt;
164 {
165 google_cloud_lro::internal::new_poller(
166 polling_error_policy,
167 polling_backoff_policy,
168 start,
169 query,
170 )
171 }
172 .with_options(poller_options)
173 }
174
175 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
179 self.0.request.parent = v.into();
180 self
181 }
182
183 pub fn set_glossary_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
187 self.0.request.glossary_id = v.into();
188 self
189 }
190
191 pub fn set_glossary<T>(mut self, v: T) -> Self
195 where
196 T: std::convert::Into<crate::model::Glossary>,
197 {
198 self.0.request.glossary = std::option::Option::Some(v.into());
199 self
200 }
201
202 pub fn set_or_clear_glossary<T>(mut self, v: std::option::Option<T>) -> Self
206 where
207 T: std::convert::Into<crate::model::Glossary>,
208 {
209 self.0.request.glossary = v.map(|x| x.into());
210 self
211 }
212
213 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
215 self.0.request.validate_only = v.into();
216 self
217 }
218 }
219
220 #[doc(hidden)]
221 impl crate::RequestBuilder for CreateGlossary {
222 fn request_options(&mut self) -> &mut crate::RequestOptions {
223 &mut self.0.options
224 }
225 }
226
227 #[derive(Clone, Debug)]
245 pub struct UpdateGlossary(RequestBuilder<crate::model::UpdateGlossaryRequest>);
246
247 impl UpdateGlossary {
248 pub(crate) fn new(
249 stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
250 ) -> Self {
251 Self(RequestBuilder::new(stub))
252 }
253
254 pub fn with_request<V: Into<crate::model::UpdateGlossaryRequest>>(mut self, v: V) -> Self {
256 self.0.request = v.into();
257 self
258 }
259
260 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
262 self.0.options = v.into();
263 self
264 }
265
266 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
273 (*self.0.stub)
274 .update_glossary(self.0.request, self.0.options)
275 .await
276 .map(crate::Response::into_body)
277 }
278
279 pub fn poller(
281 self,
282 ) -> impl google_cloud_lro::Poller<crate::model::Glossary, crate::model::OperationMetadata>
283 {
284 type Operation = google_cloud_lro::internal::Operation<
285 crate::model::Glossary,
286 crate::model::OperationMetadata,
287 >;
288 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
289 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
290 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
291 if let Some(ref mut details) = poller_options.tracing {
292 details.method_name = "google_cloud_dataplex_v1::client::BusinessGlossaryService::update_glossary::until_done";
293 }
294
295 let stub = self.0.stub.clone();
296 let mut options = self.0.options.clone();
297 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
298 let query = move |name| {
299 let stub = stub.clone();
300 let options = options.clone();
301 async {
302 let op = GetOperation::new(stub)
303 .set_name(name)
304 .with_options(options)
305 .send()
306 .await?;
307 Ok(Operation::new(op))
308 }
309 };
310
311 let start = move || async {
312 let op = self.send().await?;
313 Ok(Operation::new(op))
314 };
315
316 use google_cloud_lro::internal::PollerExt;
317 {
318 google_cloud_lro::internal::new_poller(
319 polling_error_policy,
320 polling_backoff_policy,
321 start,
322 query,
323 )
324 }
325 .with_options(poller_options)
326 }
327
328 pub fn set_glossary<T>(mut self, v: T) -> Self
332 where
333 T: std::convert::Into<crate::model::Glossary>,
334 {
335 self.0.request.glossary = std::option::Option::Some(v.into());
336 self
337 }
338
339 pub fn set_or_clear_glossary<T>(mut self, v: std::option::Option<T>) -> Self
343 where
344 T: std::convert::Into<crate::model::Glossary>,
345 {
346 self.0.request.glossary = v.map(|x| x.into());
347 self
348 }
349
350 pub fn set_update_mask<T>(mut self, v: T) -> Self
354 where
355 T: std::convert::Into<wkt::FieldMask>,
356 {
357 self.0.request.update_mask = std::option::Option::Some(v.into());
358 self
359 }
360
361 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
365 where
366 T: std::convert::Into<wkt::FieldMask>,
367 {
368 self.0.request.update_mask = v.map(|x| x.into());
369 self
370 }
371
372 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
374 self.0.request.validate_only = v.into();
375 self
376 }
377 }
378
379 #[doc(hidden)]
380 impl crate::RequestBuilder for UpdateGlossary {
381 fn request_options(&mut self) -> &mut crate::RequestOptions {
382 &mut self.0.options
383 }
384 }
385
386 #[derive(Clone, Debug)]
404 pub struct DeleteGlossary(RequestBuilder<crate::model::DeleteGlossaryRequest>);
405
406 impl DeleteGlossary {
407 pub(crate) fn new(
408 stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
409 ) -> Self {
410 Self(RequestBuilder::new(stub))
411 }
412
413 pub fn with_request<V: Into<crate::model::DeleteGlossaryRequest>>(mut self, v: V) -> Self {
415 self.0.request = v.into();
416 self
417 }
418
419 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
421 self.0.options = v.into();
422 self
423 }
424
425 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
432 (*self.0.stub)
433 .delete_glossary(self.0.request, self.0.options)
434 .await
435 .map(crate::Response::into_body)
436 }
437
438 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
440 type Operation =
441 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
442 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
443 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
444 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
445 if let Some(ref mut details) = poller_options.tracing {
446 details.method_name = "google_cloud_dataplex_v1::client::BusinessGlossaryService::delete_glossary::until_done";
447 }
448
449 let stub = self.0.stub.clone();
450 let mut options = self.0.options.clone();
451 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
452 let query = move |name| {
453 let stub = stub.clone();
454 let options = options.clone();
455 async {
456 let op = GetOperation::new(stub)
457 .set_name(name)
458 .with_options(options)
459 .send()
460 .await?;
461 Ok(Operation::new(op))
462 }
463 };
464
465 let start = move || async {
466 let op = self.send().await?;
467 Ok(Operation::new(op))
468 };
469
470 use google_cloud_lro::internal::PollerExt;
471 {
472 google_cloud_lro::internal::new_unit_response_poller(
473 polling_error_policy,
474 polling_backoff_policy,
475 start,
476 query,
477 )
478 }
479 .with_options(poller_options)
480 }
481
482 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
486 self.0.request.name = v.into();
487 self
488 }
489
490 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
492 self.0.request.etag = v.into();
493 self
494 }
495 }
496
497 #[doc(hidden)]
498 impl crate::RequestBuilder for DeleteGlossary {
499 fn request_options(&mut self) -> &mut crate::RequestOptions {
500 &mut self.0.options
501 }
502 }
503
504 #[derive(Clone, Debug)]
521 pub struct GetGlossary(RequestBuilder<crate::model::GetGlossaryRequest>);
522
523 impl GetGlossary {
524 pub(crate) fn new(
525 stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
526 ) -> Self {
527 Self(RequestBuilder::new(stub))
528 }
529
530 pub fn with_request<V: Into<crate::model::GetGlossaryRequest>>(mut self, v: V) -> Self {
532 self.0.request = v.into();
533 self
534 }
535
536 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
538 self.0.options = v.into();
539 self
540 }
541
542 pub async fn send(self) -> Result<crate::model::Glossary> {
544 (*self.0.stub)
545 .get_glossary(self.0.request, self.0.options)
546 .await
547 .map(crate::Response::into_body)
548 }
549
550 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
554 self.0.request.name = v.into();
555 self
556 }
557 }
558
559 #[doc(hidden)]
560 impl crate::RequestBuilder for GetGlossary {
561 fn request_options(&mut self) -> &mut crate::RequestOptions {
562 &mut self.0.options
563 }
564 }
565
566 #[derive(Clone, Debug)]
587 pub struct ListGlossaries(RequestBuilder<crate::model::ListGlossariesRequest>);
588
589 impl ListGlossaries {
590 pub(crate) fn new(
591 stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
592 ) -> Self {
593 Self(RequestBuilder::new(stub))
594 }
595
596 pub fn with_request<V: Into<crate::model::ListGlossariesRequest>>(mut self, v: V) -> Self {
598 self.0.request = v.into();
599 self
600 }
601
602 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
604 self.0.options = v.into();
605 self
606 }
607
608 pub async fn send(self) -> Result<crate::model::ListGlossariesResponse> {
610 (*self.0.stub)
611 .list_glossaries(self.0.request, self.0.options)
612 .await
613 .map(crate::Response::into_body)
614 }
615
616 pub fn by_page(
618 self,
619 ) -> impl google_cloud_gax::paginator::Paginator<
620 crate::model::ListGlossariesResponse,
621 crate::Error,
622 > {
623 use std::clone::Clone;
624 let token = self.0.request.page_token.clone();
625 let execute = move |token: String| {
626 let mut builder = self.clone();
627 builder.0.request = builder.0.request.set_page_token(token);
628 builder.send()
629 };
630 google_cloud_gax::paginator::internal::new_paginator(token, execute)
631 }
632
633 pub fn by_item(
635 self,
636 ) -> impl google_cloud_gax::paginator::ItemPaginator<
637 crate::model::ListGlossariesResponse,
638 crate::Error,
639 > {
640 use google_cloud_gax::paginator::Paginator;
641 self.by_page().items()
642 }
643
644 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
648 self.0.request.parent = v.into();
649 self
650 }
651
652 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
654 self.0.request.page_size = v.into();
655 self
656 }
657
658 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
660 self.0.request.page_token = v.into();
661 self
662 }
663
664 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
666 self.0.request.filter = v.into();
667 self
668 }
669
670 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
672 self.0.request.order_by = v.into();
673 self
674 }
675 }
676
677 #[doc(hidden)]
678 impl crate::RequestBuilder for ListGlossaries {
679 fn request_options(&mut self) -> &mut crate::RequestOptions {
680 &mut self.0.options
681 }
682 }
683
684 #[derive(Clone, Debug)]
701 pub struct CreateGlossaryCategory(RequestBuilder<crate::model::CreateGlossaryCategoryRequest>);
702
703 impl CreateGlossaryCategory {
704 pub(crate) fn new(
705 stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
706 ) -> Self {
707 Self(RequestBuilder::new(stub))
708 }
709
710 pub fn with_request<V: Into<crate::model::CreateGlossaryCategoryRequest>>(
712 mut self,
713 v: V,
714 ) -> Self {
715 self.0.request = v.into();
716 self
717 }
718
719 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
721 self.0.options = v.into();
722 self
723 }
724
725 pub async fn send(self) -> Result<crate::model::GlossaryCategory> {
727 (*self.0.stub)
728 .create_glossary_category(self.0.request, self.0.options)
729 .await
730 .map(crate::Response::into_body)
731 }
732
733 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
737 self.0.request.parent = v.into();
738 self
739 }
740
741 pub fn set_category_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
745 self.0.request.category_id = v.into();
746 self
747 }
748
749 pub fn set_category<T>(mut self, v: T) -> Self
753 where
754 T: std::convert::Into<crate::model::GlossaryCategory>,
755 {
756 self.0.request.category = std::option::Option::Some(v.into());
757 self
758 }
759
760 pub fn set_or_clear_category<T>(mut self, v: std::option::Option<T>) -> Self
764 where
765 T: std::convert::Into<crate::model::GlossaryCategory>,
766 {
767 self.0.request.category = v.map(|x| x.into());
768 self
769 }
770 }
771
772 #[doc(hidden)]
773 impl crate::RequestBuilder for CreateGlossaryCategory {
774 fn request_options(&mut self) -> &mut crate::RequestOptions {
775 &mut self.0.options
776 }
777 }
778
779 #[derive(Clone, Debug)]
796 pub struct UpdateGlossaryCategory(RequestBuilder<crate::model::UpdateGlossaryCategoryRequest>);
797
798 impl UpdateGlossaryCategory {
799 pub(crate) fn new(
800 stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
801 ) -> Self {
802 Self(RequestBuilder::new(stub))
803 }
804
805 pub fn with_request<V: Into<crate::model::UpdateGlossaryCategoryRequest>>(
807 mut self,
808 v: V,
809 ) -> Self {
810 self.0.request = v.into();
811 self
812 }
813
814 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
816 self.0.options = v.into();
817 self
818 }
819
820 pub async fn send(self) -> Result<crate::model::GlossaryCategory> {
822 (*self.0.stub)
823 .update_glossary_category(self.0.request, self.0.options)
824 .await
825 .map(crate::Response::into_body)
826 }
827
828 pub fn set_category<T>(mut self, v: T) -> Self
832 where
833 T: std::convert::Into<crate::model::GlossaryCategory>,
834 {
835 self.0.request.category = std::option::Option::Some(v.into());
836 self
837 }
838
839 pub fn set_or_clear_category<T>(mut self, v: std::option::Option<T>) -> Self
843 where
844 T: std::convert::Into<crate::model::GlossaryCategory>,
845 {
846 self.0.request.category = v.map(|x| x.into());
847 self
848 }
849
850 pub fn set_update_mask<T>(mut self, v: T) -> Self
854 where
855 T: std::convert::Into<wkt::FieldMask>,
856 {
857 self.0.request.update_mask = std::option::Option::Some(v.into());
858 self
859 }
860
861 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
865 where
866 T: std::convert::Into<wkt::FieldMask>,
867 {
868 self.0.request.update_mask = v.map(|x| x.into());
869 self
870 }
871 }
872
873 #[doc(hidden)]
874 impl crate::RequestBuilder for UpdateGlossaryCategory {
875 fn request_options(&mut self) -> &mut crate::RequestOptions {
876 &mut self.0.options
877 }
878 }
879
880 #[derive(Clone, Debug)]
897 pub struct DeleteGlossaryCategory(RequestBuilder<crate::model::DeleteGlossaryCategoryRequest>);
898
899 impl DeleteGlossaryCategory {
900 pub(crate) fn new(
901 stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
902 ) -> Self {
903 Self(RequestBuilder::new(stub))
904 }
905
906 pub fn with_request<V: Into<crate::model::DeleteGlossaryCategoryRequest>>(
908 mut self,
909 v: V,
910 ) -> Self {
911 self.0.request = v.into();
912 self
913 }
914
915 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
917 self.0.options = v.into();
918 self
919 }
920
921 pub async fn send(self) -> Result<()> {
923 (*self.0.stub)
924 .delete_glossary_category(self.0.request, self.0.options)
925 .await
926 .map(crate::Response::into_body)
927 }
928
929 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
933 self.0.request.name = v.into();
934 self
935 }
936 }
937
938 #[doc(hidden)]
939 impl crate::RequestBuilder for DeleteGlossaryCategory {
940 fn request_options(&mut self) -> &mut crate::RequestOptions {
941 &mut self.0.options
942 }
943 }
944
945 #[derive(Clone, Debug)]
962 pub struct GetGlossaryCategory(RequestBuilder<crate::model::GetGlossaryCategoryRequest>);
963
964 impl GetGlossaryCategory {
965 pub(crate) fn new(
966 stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
967 ) -> Self {
968 Self(RequestBuilder::new(stub))
969 }
970
971 pub fn with_request<V: Into<crate::model::GetGlossaryCategoryRequest>>(
973 mut self,
974 v: V,
975 ) -> Self {
976 self.0.request = v.into();
977 self
978 }
979
980 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
982 self.0.options = v.into();
983 self
984 }
985
986 pub async fn send(self) -> Result<crate::model::GlossaryCategory> {
988 (*self.0.stub)
989 .get_glossary_category(self.0.request, self.0.options)
990 .await
991 .map(crate::Response::into_body)
992 }
993
994 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
998 self.0.request.name = v.into();
999 self
1000 }
1001 }
1002
1003 #[doc(hidden)]
1004 impl crate::RequestBuilder for GetGlossaryCategory {
1005 fn request_options(&mut self) -> &mut crate::RequestOptions {
1006 &mut self.0.options
1007 }
1008 }
1009
1010 #[derive(Clone, Debug)]
1031 pub struct ListGlossaryCategories(RequestBuilder<crate::model::ListGlossaryCategoriesRequest>);
1032
1033 impl ListGlossaryCategories {
1034 pub(crate) fn new(
1035 stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1036 ) -> Self {
1037 Self(RequestBuilder::new(stub))
1038 }
1039
1040 pub fn with_request<V: Into<crate::model::ListGlossaryCategoriesRequest>>(
1042 mut self,
1043 v: V,
1044 ) -> Self {
1045 self.0.request = v.into();
1046 self
1047 }
1048
1049 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1051 self.0.options = v.into();
1052 self
1053 }
1054
1055 pub async fn send(self) -> Result<crate::model::ListGlossaryCategoriesResponse> {
1057 (*self.0.stub)
1058 .list_glossary_categories(self.0.request, self.0.options)
1059 .await
1060 .map(crate::Response::into_body)
1061 }
1062
1063 pub fn by_page(
1065 self,
1066 ) -> impl google_cloud_gax::paginator::Paginator<
1067 crate::model::ListGlossaryCategoriesResponse,
1068 crate::Error,
1069 > {
1070 use std::clone::Clone;
1071 let token = self.0.request.page_token.clone();
1072 let execute = move |token: String| {
1073 let mut builder = self.clone();
1074 builder.0.request = builder.0.request.set_page_token(token);
1075 builder.send()
1076 };
1077 google_cloud_gax::paginator::internal::new_paginator(token, execute)
1078 }
1079
1080 pub fn by_item(
1082 self,
1083 ) -> impl google_cloud_gax::paginator::ItemPaginator<
1084 crate::model::ListGlossaryCategoriesResponse,
1085 crate::Error,
1086 > {
1087 use google_cloud_gax::paginator::Paginator;
1088 self.by_page().items()
1089 }
1090
1091 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1095 self.0.request.parent = v.into();
1096 self
1097 }
1098
1099 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1101 self.0.request.page_size = v.into();
1102 self
1103 }
1104
1105 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1107 self.0.request.page_token = v.into();
1108 self
1109 }
1110
1111 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1113 self.0.request.filter = v.into();
1114 self
1115 }
1116
1117 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1119 self.0.request.order_by = v.into();
1120 self
1121 }
1122 }
1123
1124 #[doc(hidden)]
1125 impl crate::RequestBuilder for ListGlossaryCategories {
1126 fn request_options(&mut self) -> &mut crate::RequestOptions {
1127 &mut self.0.options
1128 }
1129 }
1130
1131 #[derive(Clone, Debug)]
1148 pub struct CreateGlossaryTerm(RequestBuilder<crate::model::CreateGlossaryTermRequest>);
1149
1150 impl CreateGlossaryTerm {
1151 pub(crate) fn new(
1152 stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1153 ) -> Self {
1154 Self(RequestBuilder::new(stub))
1155 }
1156
1157 pub fn with_request<V: Into<crate::model::CreateGlossaryTermRequest>>(
1159 mut self,
1160 v: V,
1161 ) -> Self {
1162 self.0.request = v.into();
1163 self
1164 }
1165
1166 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1168 self.0.options = v.into();
1169 self
1170 }
1171
1172 pub async fn send(self) -> Result<crate::model::GlossaryTerm> {
1174 (*self.0.stub)
1175 .create_glossary_term(self.0.request, self.0.options)
1176 .await
1177 .map(crate::Response::into_body)
1178 }
1179
1180 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1184 self.0.request.parent = v.into();
1185 self
1186 }
1187
1188 pub fn set_term_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1192 self.0.request.term_id = v.into();
1193 self
1194 }
1195
1196 pub fn set_term<T>(mut self, v: T) -> Self
1200 where
1201 T: std::convert::Into<crate::model::GlossaryTerm>,
1202 {
1203 self.0.request.term = std::option::Option::Some(v.into());
1204 self
1205 }
1206
1207 pub fn set_or_clear_term<T>(mut self, v: std::option::Option<T>) -> Self
1211 where
1212 T: std::convert::Into<crate::model::GlossaryTerm>,
1213 {
1214 self.0.request.term = v.map(|x| x.into());
1215 self
1216 }
1217 }
1218
1219 #[doc(hidden)]
1220 impl crate::RequestBuilder for CreateGlossaryTerm {
1221 fn request_options(&mut self) -> &mut crate::RequestOptions {
1222 &mut self.0.options
1223 }
1224 }
1225
1226 #[derive(Clone, Debug)]
1243 pub struct UpdateGlossaryTerm(RequestBuilder<crate::model::UpdateGlossaryTermRequest>);
1244
1245 impl UpdateGlossaryTerm {
1246 pub(crate) fn new(
1247 stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1248 ) -> Self {
1249 Self(RequestBuilder::new(stub))
1250 }
1251
1252 pub fn with_request<V: Into<crate::model::UpdateGlossaryTermRequest>>(
1254 mut self,
1255 v: V,
1256 ) -> Self {
1257 self.0.request = v.into();
1258 self
1259 }
1260
1261 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1263 self.0.options = v.into();
1264 self
1265 }
1266
1267 pub async fn send(self) -> Result<crate::model::GlossaryTerm> {
1269 (*self.0.stub)
1270 .update_glossary_term(self.0.request, self.0.options)
1271 .await
1272 .map(crate::Response::into_body)
1273 }
1274
1275 pub fn set_term<T>(mut self, v: T) -> Self
1279 where
1280 T: std::convert::Into<crate::model::GlossaryTerm>,
1281 {
1282 self.0.request.term = std::option::Option::Some(v.into());
1283 self
1284 }
1285
1286 pub fn set_or_clear_term<T>(mut self, v: std::option::Option<T>) -> Self
1290 where
1291 T: std::convert::Into<crate::model::GlossaryTerm>,
1292 {
1293 self.0.request.term = v.map(|x| x.into());
1294 self
1295 }
1296
1297 pub fn set_update_mask<T>(mut self, v: T) -> Self
1301 where
1302 T: std::convert::Into<wkt::FieldMask>,
1303 {
1304 self.0.request.update_mask = std::option::Option::Some(v.into());
1305 self
1306 }
1307
1308 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1312 where
1313 T: std::convert::Into<wkt::FieldMask>,
1314 {
1315 self.0.request.update_mask = v.map(|x| x.into());
1316 self
1317 }
1318 }
1319
1320 #[doc(hidden)]
1321 impl crate::RequestBuilder for UpdateGlossaryTerm {
1322 fn request_options(&mut self) -> &mut crate::RequestOptions {
1323 &mut self.0.options
1324 }
1325 }
1326
1327 #[derive(Clone, Debug)]
1344 pub struct DeleteGlossaryTerm(RequestBuilder<crate::model::DeleteGlossaryTermRequest>);
1345
1346 impl DeleteGlossaryTerm {
1347 pub(crate) fn new(
1348 stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1349 ) -> Self {
1350 Self(RequestBuilder::new(stub))
1351 }
1352
1353 pub fn with_request<V: Into<crate::model::DeleteGlossaryTermRequest>>(
1355 mut self,
1356 v: V,
1357 ) -> Self {
1358 self.0.request = v.into();
1359 self
1360 }
1361
1362 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1364 self.0.options = v.into();
1365 self
1366 }
1367
1368 pub async fn send(self) -> Result<()> {
1370 (*self.0.stub)
1371 .delete_glossary_term(self.0.request, self.0.options)
1372 .await
1373 .map(crate::Response::into_body)
1374 }
1375
1376 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1380 self.0.request.name = v.into();
1381 self
1382 }
1383 }
1384
1385 #[doc(hidden)]
1386 impl crate::RequestBuilder for DeleteGlossaryTerm {
1387 fn request_options(&mut self) -> &mut crate::RequestOptions {
1388 &mut self.0.options
1389 }
1390 }
1391
1392 #[derive(Clone, Debug)]
1409 pub struct GetGlossaryTerm(RequestBuilder<crate::model::GetGlossaryTermRequest>);
1410
1411 impl GetGlossaryTerm {
1412 pub(crate) fn new(
1413 stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1414 ) -> Self {
1415 Self(RequestBuilder::new(stub))
1416 }
1417
1418 pub fn with_request<V: Into<crate::model::GetGlossaryTermRequest>>(mut self, v: V) -> Self {
1420 self.0.request = v.into();
1421 self
1422 }
1423
1424 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1426 self.0.options = v.into();
1427 self
1428 }
1429
1430 pub async fn send(self) -> Result<crate::model::GlossaryTerm> {
1432 (*self.0.stub)
1433 .get_glossary_term(self.0.request, self.0.options)
1434 .await
1435 .map(crate::Response::into_body)
1436 }
1437
1438 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1442 self.0.request.name = v.into();
1443 self
1444 }
1445 }
1446
1447 #[doc(hidden)]
1448 impl crate::RequestBuilder for GetGlossaryTerm {
1449 fn request_options(&mut self) -> &mut crate::RequestOptions {
1450 &mut self.0.options
1451 }
1452 }
1453
1454 #[derive(Clone, Debug)]
1475 pub struct ListGlossaryTerms(RequestBuilder<crate::model::ListGlossaryTermsRequest>);
1476
1477 impl ListGlossaryTerms {
1478 pub(crate) fn new(
1479 stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1480 ) -> Self {
1481 Self(RequestBuilder::new(stub))
1482 }
1483
1484 pub fn with_request<V: Into<crate::model::ListGlossaryTermsRequest>>(
1486 mut self,
1487 v: V,
1488 ) -> Self {
1489 self.0.request = v.into();
1490 self
1491 }
1492
1493 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1495 self.0.options = v.into();
1496 self
1497 }
1498
1499 pub async fn send(self) -> Result<crate::model::ListGlossaryTermsResponse> {
1501 (*self.0.stub)
1502 .list_glossary_terms(self.0.request, self.0.options)
1503 .await
1504 .map(crate::Response::into_body)
1505 }
1506
1507 pub fn by_page(
1509 self,
1510 ) -> impl google_cloud_gax::paginator::Paginator<
1511 crate::model::ListGlossaryTermsResponse,
1512 crate::Error,
1513 > {
1514 use std::clone::Clone;
1515 let token = self.0.request.page_token.clone();
1516 let execute = move |token: String| {
1517 let mut builder = self.clone();
1518 builder.0.request = builder.0.request.set_page_token(token);
1519 builder.send()
1520 };
1521 google_cloud_gax::paginator::internal::new_paginator(token, execute)
1522 }
1523
1524 pub fn by_item(
1526 self,
1527 ) -> impl google_cloud_gax::paginator::ItemPaginator<
1528 crate::model::ListGlossaryTermsResponse,
1529 crate::Error,
1530 > {
1531 use google_cloud_gax::paginator::Paginator;
1532 self.by_page().items()
1533 }
1534
1535 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1539 self.0.request.parent = v.into();
1540 self
1541 }
1542
1543 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1545 self.0.request.page_size = v.into();
1546 self
1547 }
1548
1549 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1551 self.0.request.page_token = v.into();
1552 self
1553 }
1554
1555 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1557 self.0.request.filter = v.into();
1558 self
1559 }
1560
1561 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1563 self.0.request.order_by = v.into();
1564 self
1565 }
1566 }
1567
1568 #[doc(hidden)]
1569 impl crate::RequestBuilder for ListGlossaryTerms {
1570 fn request_options(&mut self) -> &mut crate::RequestOptions {
1571 &mut self.0.options
1572 }
1573 }
1574
1575 #[derive(Clone, Debug)]
1596 pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
1597
1598 impl ListLocations {
1599 pub(crate) fn new(
1600 stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1601 ) -> Self {
1602 Self(RequestBuilder::new(stub))
1603 }
1604
1605 pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
1607 mut self,
1608 v: V,
1609 ) -> Self {
1610 self.0.request = v.into();
1611 self
1612 }
1613
1614 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1616 self.0.options = v.into();
1617 self
1618 }
1619
1620 pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
1622 (*self.0.stub)
1623 .list_locations(self.0.request, self.0.options)
1624 .await
1625 .map(crate::Response::into_body)
1626 }
1627
1628 pub fn by_page(
1630 self,
1631 ) -> impl google_cloud_gax::paginator::Paginator<
1632 google_cloud_location::model::ListLocationsResponse,
1633 crate::Error,
1634 > {
1635 use std::clone::Clone;
1636 let token = self.0.request.page_token.clone();
1637 let execute = move |token: String| {
1638 let mut builder = self.clone();
1639 builder.0.request = builder.0.request.set_page_token(token);
1640 builder.send()
1641 };
1642 google_cloud_gax::paginator::internal::new_paginator(token, execute)
1643 }
1644
1645 pub fn by_item(
1647 self,
1648 ) -> impl google_cloud_gax::paginator::ItemPaginator<
1649 google_cloud_location::model::ListLocationsResponse,
1650 crate::Error,
1651 > {
1652 use google_cloud_gax::paginator::Paginator;
1653 self.by_page().items()
1654 }
1655
1656 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1658 self.0.request.name = v.into();
1659 self
1660 }
1661
1662 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1664 self.0.request.filter = v.into();
1665 self
1666 }
1667
1668 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1670 self.0.request.page_size = v.into();
1671 self
1672 }
1673
1674 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1676 self.0.request.page_token = v.into();
1677 self
1678 }
1679 }
1680
1681 #[doc(hidden)]
1682 impl crate::RequestBuilder for ListLocations {
1683 fn request_options(&mut self) -> &mut crate::RequestOptions {
1684 &mut self.0.options
1685 }
1686 }
1687
1688 #[derive(Clone, Debug)]
1705 pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
1706
1707 impl GetLocation {
1708 pub(crate) fn new(
1709 stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1710 ) -> Self {
1711 Self(RequestBuilder::new(stub))
1712 }
1713
1714 pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
1716 mut self,
1717 v: V,
1718 ) -> Self {
1719 self.0.request = v.into();
1720 self
1721 }
1722
1723 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1725 self.0.options = v.into();
1726 self
1727 }
1728
1729 pub async fn send(self) -> Result<google_cloud_location::model::Location> {
1731 (*self.0.stub)
1732 .get_location(self.0.request, self.0.options)
1733 .await
1734 .map(crate::Response::into_body)
1735 }
1736
1737 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1739 self.0.request.name = v.into();
1740 self
1741 }
1742 }
1743
1744 #[doc(hidden)]
1745 impl crate::RequestBuilder for GetLocation {
1746 fn request_options(&mut self) -> &mut crate::RequestOptions {
1747 &mut self.0.options
1748 }
1749 }
1750
1751 #[derive(Clone, Debug)]
1768 pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
1769
1770 impl SetIamPolicy {
1771 pub(crate) fn new(
1772 stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1773 ) -> Self {
1774 Self(RequestBuilder::new(stub))
1775 }
1776
1777 pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
1779 mut self,
1780 v: V,
1781 ) -> Self {
1782 self.0.request = v.into();
1783 self
1784 }
1785
1786 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1788 self.0.options = v.into();
1789 self
1790 }
1791
1792 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
1794 (*self.0.stub)
1795 .set_iam_policy(self.0.request, self.0.options)
1796 .await
1797 .map(crate::Response::into_body)
1798 }
1799
1800 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1804 self.0.request.resource = v.into();
1805 self
1806 }
1807
1808 pub fn set_policy<T>(mut self, v: T) -> Self
1812 where
1813 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
1814 {
1815 self.0.request.policy = std::option::Option::Some(v.into());
1816 self
1817 }
1818
1819 pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
1823 where
1824 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
1825 {
1826 self.0.request.policy = v.map(|x| x.into());
1827 self
1828 }
1829
1830 pub fn set_update_mask<T>(mut self, v: T) -> Self
1832 where
1833 T: std::convert::Into<wkt::FieldMask>,
1834 {
1835 self.0.request.update_mask = std::option::Option::Some(v.into());
1836 self
1837 }
1838
1839 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1841 where
1842 T: std::convert::Into<wkt::FieldMask>,
1843 {
1844 self.0.request.update_mask = v.map(|x| x.into());
1845 self
1846 }
1847 }
1848
1849 #[doc(hidden)]
1850 impl crate::RequestBuilder for SetIamPolicy {
1851 fn request_options(&mut self) -> &mut crate::RequestOptions {
1852 &mut self.0.options
1853 }
1854 }
1855
1856 #[derive(Clone, Debug)]
1873 pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
1874
1875 impl GetIamPolicy {
1876 pub(crate) fn new(
1877 stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1878 ) -> Self {
1879 Self(RequestBuilder::new(stub))
1880 }
1881
1882 pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
1884 mut self,
1885 v: V,
1886 ) -> Self {
1887 self.0.request = v.into();
1888 self
1889 }
1890
1891 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1893 self.0.options = v.into();
1894 self
1895 }
1896
1897 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
1899 (*self.0.stub)
1900 .get_iam_policy(self.0.request, self.0.options)
1901 .await
1902 .map(crate::Response::into_body)
1903 }
1904
1905 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1909 self.0.request.resource = v.into();
1910 self
1911 }
1912
1913 pub fn set_options<T>(mut self, v: T) -> Self
1915 where
1916 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
1917 {
1918 self.0.request.options = std::option::Option::Some(v.into());
1919 self
1920 }
1921
1922 pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
1924 where
1925 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
1926 {
1927 self.0.request.options = v.map(|x| x.into());
1928 self
1929 }
1930 }
1931
1932 #[doc(hidden)]
1933 impl crate::RequestBuilder for GetIamPolicy {
1934 fn request_options(&mut self) -> &mut crate::RequestOptions {
1935 &mut self.0.options
1936 }
1937 }
1938
1939 #[derive(Clone, Debug)]
1956 pub struct TestIamPermissions(
1957 RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
1958 );
1959
1960 impl TestIamPermissions {
1961 pub(crate) fn new(
1962 stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1963 ) -> Self {
1964 Self(RequestBuilder::new(stub))
1965 }
1966
1967 pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
1969 mut self,
1970 v: V,
1971 ) -> Self {
1972 self.0.request = v.into();
1973 self
1974 }
1975
1976 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1978 self.0.options = v.into();
1979 self
1980 }
1981
1982 pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
1984 (*self.0.stub)
1985 .test_iam_permissions(self.0.request, self.0.options)
1986 .await
1987 .map(crate::Response::into_body)
1988 }
1989
1990 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1994 self.0.request.resource = v.into();
1995 self
1996 }
1997
1998 pub fn set_permissions<T, V>(mut self, v: T) -> Self
2002 where
2003 T: std::iter::IntoIterator<Item = V>,
2004 V: std::convert::Into<std::string::String>,
2005 {
2006 use std::iter::Iterator;
2007 self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
2008 self
2009 }
2010 }
2011
2012 #[doc(hidden)]
2013 impl crate::RequestBuilder for TestIamPermissions {
2014 fn request_options(&mut self) -> &mut crate::RequestOptions {
2015 &mut self.0.options
2016 }
2017 }
2018
2019 #[derive(Clone, Debug)]
2040 pub struct ListOperations(
2041 RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
2042 );
2043
2044 impl ListOperations {
2045 pub(crate) fn new(
2046 stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
2047 ) -> Self {
2048 Self(RequestBuilder::new(stub))
2049 }
2050
2051 pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
2053 mut self,
2054 v: V,
2055 ) -> Self {
2056 self.0.request = v.into();
2057 self
2058 }
2059
2060 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2062 self.0.options = v.into();
2063 self
2064 }
2065
2066 pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
2068 (*self.0.stub)
2069 .list_operations(self.0.request, self.0.options)
2070 .await
2071 .map(crate::Response::into_body)
2072 }
2073
2074 pub fn by_page(
2076 self,
2077 ) -> impl google_cloud_gax::paginator::Paginator<
2078 google_cloud_longrunning::model::ListOperationsResponse,
2079 crate::Error,
2080 > {
2081 use std::clone::Clone;
2082 let token = self.0.request.page_token.clone();
2083 let execute = move |token: String| {
2084 let mut builder = self.clone();
2085 builder.0.request = builder.0.request.set_page_token(token);
2086 builder.send()
2087 };
2088 google_cloud_gax::paginator::internal::new_paginator(token, execute)
2089 }
2090
2091 pub fn by_item(
2093 self,
2094 ) -> impl google_cloud_gax::paginator::ItemPaginator<
2095 google_cloud_longrunning::model::ListOperationsResponse,
2096 crate::Error,
2097 > {
2098 use google_cloud_gax::paginator::Paginator;
2099 self.by_page().items()
2100 }
2101
2102 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2104 self.0.request.name = v.into();
2105 self
2106 }
2107
2108 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2110 self.0.request.filter = v.into();
2111 self
2112 }
2113
2114 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2116 self.0.request.page_size = v.into();
2117 self
2118 }
2119
2120 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2122 self.0.request.page_token = v.into();
2123 self
2124 }
2125
2126 pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
2128 self.0.request.return_partial_success = v.into();
2129 self
2130 }
2131 }
2132
2133 #[doc(hidden)]
2134 impl crate::RequestBuilder for ListOperations {
2135 fn request_options(&mut self) -> &mut crate::RequestOptions {
2136 &mut self.0.options
2137 }
2138 }
2139
2140 #[derive(Clone, Debug)]
2157 pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
2158
2159 impl GetOperation {
2160 pub(crate) fn new(
2161 stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
2162 ) -> Self {
2163 Self(RequestBuilder::new(stub))
2164 }
2165
2166 pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
2168 mut self,
2169 v: V,
2170 ) -> Self {
2171 self.0.request = v.into();
2172 self
2173 }
2174
2175 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2177 self.0.options = v.into();
2178 self
2179 }
2180
2181 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2183 (*self.0.stub)
2184 .get_operation(self.0.request, self.0.options)
2185 .await
2186 .map(crate::Response::into_body)
2187 }
2188
2189 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2191 self.0.request.name = v.into();
2192 self
2193 }
2194 }
2195
2196 #[doc(hidden)]
2197 impl crate::RequestBuilder for GetOperation {
2198 fn request_options(&mut self) -> &mut crate::RequestOptions {
2199 &mut self.0.options
2200 }
2201 }
2202
2203 #[derive(Clone, Debug)]
2220 pub struct DeleteOperation(
2221 RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
2222 );
2223
2224 impl DeleteOperation {
2225 pub(crate) fn new(
2226 stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
2227 ) -> Self {
2228 Self(RequestBuilder::new(stub))
2229 }
2230
2231 pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
2233 mut self,
2234 v: V,
2235 ) -> Self {
2236 self.0.request = v.into();
2237 self
2238 }
2239
2240 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2242 self.0.options = v.into();
2243 self
2244 }
2245
2246 pub async fn send(self) -> Result<()> {
2248 (*self.0.stub)
2249 .delete_operation(self.0.request, self.0.options)
2250 .await
2251 .map(crate::Response::into_body)
2252 }
2253
2254 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2256 self.0.request.name = v.into();
2257 self
2258 }
2259 }
2260
2261 #[doc(hidden)]
2262 impl crate::RequestBuilder for DeleteOperation {
2263 fn request_options(&mut self) -> &mut crate::RequestOptions {
2264 &mut self.0.options
2265 }
2266 }
2267
2268 #[derive(Clone, Debug)]
2285 pub struct CancelOperation(
2286 RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
2287 );
2288
2289 impl CancelOperation {
2290 pub(crate) fn new(
2291 stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
2292 ) -> Self {
2293 Self(RequestBuilder::new(stub))
2294 }
2295
2296 pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
2298 mut self,
2299 v: V,
2300 ) -> Self {
2301 self.0.request = v.into();
2302 self
2303 }
2304
2305 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2307 self.0.options = v.into();
2308 self
2309 }
2310
2311 pub async fn send(self) -> Result<()> {
2313 (*self.0.stub)
2314 .cancel_operation(self.0.request, self.0.options)
2315 .await
2316 .map(crate::Response::into_body)
2317 }
2318
2319 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2321 self.0.request.name = v.into();
2322 self
2323 }
2324 }
2325
2326 #[doc(hidden)]
2327 impl crate::RequestBuilder for CancelOperation {
2328 fn request_options(&mut self) -> &mut crate::RequestOptions {
2329 &mut self.0.options
2330 }
2331 }
2332}
2333
2334pub mod catalog_service {
2336 use crate::Result;
2337
2338 pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
2352
2353 pub(crate) mod client {
2354 use super::super::super::client::CatalogService;
2355 pub struct Factory;
2356 impl crate::ClientFactory for Factory {
2357 type Client = CatalogService;
2358 type Credentials = gaxi::options::Credentials;
2359 async fn build(
2360 self,
2361 config: gaxi::options::ClientConfig,
2362 ) -> crate::ClientBuilderResult<Self::Client> {
2363 Self::Client::new(config).await
2364 }
2365 }
2366 }
2367
2368 #[derive(Clone, Debug)]
2370 pub(crate) struct RequestBuilder<R: std::default::Default> {
2371 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2372 request: R,
2373 options: crate::RequestOptions,
2374 }
2375
2376 impl<R> RequestBuilder<R>
2377 where
2378 R: std::default::Default,
2379 {
2380 pub(crate) fn new(
2381 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2382 ) -> Self {
2383 Self {
2384 stub,
2385 request: R::default(),
2386 options: crate::RequestOptions::default(),
2387 }
2388 }
2389 }
2390
2391 #[derive(Clone, Debug)]
2409 pub struct CreateEntryType(RequestBuilder<crate::model::CreateEntryTypeRequest>);
2410
2411 impl CreateEntryType {
2412 pub(crate) fn new(
2413 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2414 ) -> Self {
2415 Self(RequestBuilder::new(stub))
2416 }
2417
2418 pub fn with_request<V: Into<crate::model::CreateEntryTypeRequest>>(mut self, v: V) -> Self {
2420 self.0.request = v.into();
2421 self
2422 }
2423
2424 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2426 self.0.options = v.into();
2427 self
2428 }
2429
2430 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2437 (*self.0.stub)
2438 .create_entry_type(self.0.request, self.0.options)
2439 .await
2440 .map(crate::Response::into_body)
2441 }
2442
2443 pub fn poller(
2445 self,
2446 ) -> impl google_cloud_lro::Poller<crate::model::EntryType, crate::model::OperationMetadata>
2447 {
2448 type Operation = google_cloud_lro::internal::Operation<
2449 crate::model::EntryType,
2450 crate::model::OperationMetadata,
2451 >;
2452 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2453 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2454 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2455 if let Some(ref mut details) = poller_options.tracing {
2456 details.method_name = "google_cloud_dataplex_v1::client::CatalogService::create_entry_type::until_done";
2457 }
2458
2459 let stub = self.0.stub.clone();
2460 let mut options = self.0.options.clone();
2461 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2462 let query = move |name| {
2463 let stub = stub.clone();
2464 let options = options.clone();
2465 async {
2466 let op = GetOperation::new(stub)
2467 .set_name(name)
2468 .with_options(options)
2469 .send()
2470 .await?;
2471 Ok(Operation::new(op))
2472 }
2473 };
2474
2475 let start = move || async {
2476 let op = self.send().await?;
2477 Ok(Operation::new(op))
2478 };
2479
2480 use google_cloud_lro::internal::PollerExt;
2481 {
2482 google_cloud_lro::internal::new_poller(
2483 polling_error_policy,
2484 polling_backoff_policy,
2485 start,
2486 query,
2487 )
2488 }
2489 .with_options(poller_options)
2490 }
2491
2492 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2496 self.0.request.parent = v.into();
2497 self
2498 }
2499
2500 pub fn set_entry_type_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2504 self.0.request.entry_type_id = v.into();
2505 self
2506 }
2507
2508 pub fn set_entry_type<T>(mut self, v: T) -> Self
2512 where
2513 T: std::convert::Into<crate::model::EntryType>,
2514 {
2515 self.0.request.entry_type = std::option::Option::Some(v.into());
2516 self
2517 }
2518
2519 pub fn set_or_clear_entry_type<T>(mut self, v: std::option::Option<T>) -> Self
2523 where
2524 T: std::convert::Into<crate::model::EntryType>,
2525 {
2526 self.0.request.entry_type = v.map(|x| x.into());
2527 self
2528 }
2529
2530 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2532 self.0.request.validate_only = v.into();
2533 self
2534 }
2535 }
2536
2537 #[doc(hidden)]
2538 impl crate::RequestBuilder for CreateEntryType {
2539 fn request_options(&mut self) -> &mut crate::RequestOptions {
2540 &mut self.0.options
2541 }
2542 }
2543
2544 #[derive(Clone, Debug)]
2562 pub struct UpdateEntryType(RequestBuilder<crate::model::UpdateEntryTypeRequest>);
2563
2564 impl UpdateEntryType {
2565 pub(crate) fn new(
2566 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2567 ) -> Self {
2568 Self(RequestBuilder::new(stub))
2569 }
2570
2571 pub fn with_request<V: Into<crate::model::UpdateEntryTypeRequest>>(mut self, v: V) -> Self {
2573 self.0.request = v.into();
2574 self
2575 }
2576
2577 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2579 self.0.options = v.into();
2580 self
2581 }
2582
2583 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2590 (*self.0.stub)
2591 .update_entry_type(self.0.request, self.0.options)
2592 .await
2593 .map(crate::Response::into_body)
2594 }
2595
2596 pub fn poller(
2598 self,
2599 ) -> impl google_cloud_lro::Poller<crate::model::EntryType, crate::model::OperationMetadata>
2600 {
2601 type Operation = google_cloud_lro::internal::Operation<
2602 crate::model::EntryType,
2603 crate::model::OperationMetadata,
2604 >;
2605 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2606 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2607 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2608 if let Some(ref mut details) = poller_options.tracing {
2609 details.method_name = "google_cloud_dataplex_v1::client::CatalogService::update_entry_type::until_done";
2610 }
2611
2612 let stub = self.0.stub.clone();
2613 let mut options = self.0.options.clone();
2614 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2615 let query = move |name| {
2616 let stub = stub.clone();
2617 let options = options.clone();
2618 async {
2619 let op = GetOperation::new(stub)
2620 .set_name(name)
2621 .with_options(options)
2622 .send()
2623 .await?;
2624 Ok(Operation::new(op))
2625 }
2626 };
2627
2628 let start = move || async {
2629 let op = self.send().await?;
2630 Ok(Operation::new(op))
2631 };
2632
2633 use google_cloud_lro::internal::PollerExt;
2634 {
2635 google_cloud_lro::internal::new_poller(
2636 polling_error_policy,
2637 polling_backoff_policy,
2638 start,
2639 query,
2640 )
2641 }
2642 .with_options(poller_options)
2643 }
2644
2645 pub fn set_entry_type<T>(mut self, v: T) -> Self
2649 where
2650 T: std::convert::Into<crate::model::EntryType>,
2651 {
2652 self.0.request.entry_type = std::option::Option::Some(v.into());
2653 self
2654 }
2655
2656 pub fn set_or_clear_entry_type<T>(mut self, v: std::option::Option<T>) -> Self
2660 where
2661 T: std::convert::Into<crate::model::EntryType>,
2662 {
2663 self.0.request.entry_type = v.map(|x| x.into());
2664 self
2665 }
2666
2667 pub fn set_update_mask<T>(mut self, v: T) -> Self
2671 where
2672 T: std::convert::Into<wkt::FieldMask>,
2673 {
2674 self.0.request.update_mask = std::option::Option::Some(v.into());
2675 self
2676 }
2677
2678 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2682 where
2683 T: std::convert::Into<wkt::FieldMask>,
2684 {
2685 self.0.request.update_mask = v.map(|x| x.into());
2686 self
2687 }
2688
2689 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2691 self.0.request.validate_only = v.into();
2692 self
2693 }
2694 }
2695
2696 #[doc(hidden)]
2697 impl crate::RequestBuilder for UpdateEntryType {
2698 fn request_options(&mut self) -> &mut crate::RequestOptions {
2699 &mut self.0.options
2700 }
2701 }
2702
2703 #[derive(Clone, Debug)]
2721 pub struct DeleteEntryType(RequestBuilder<crate::model::DeleteEntryTypeRequest>);
2722
2723 impl DeleteEntryType {
2724 pub(crate) fn new(
2725 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2726 ) -> Self {
2727 Self(RequestBuilder::new(stub))
2728 }
2729
2730 pub fn with_request<V: Into<crate::model::DeleteEntryTypeRequest>>(mut self, v: V) -> Self {
2732 self.0.request = v.into();
2733 self
2734 }
2735
2736 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2738 self.0.options = v.into();
2739 self
2740 }
2741
2742 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2749 (*self.0.stub)
2750 .delete_entry_type(self.0.request, self.0.options)
2751 .await
2752 .map(crate::Response::into_body)
2753 }
2754
2755 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
2757 type Operation =
2758 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
2759 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2760 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2761 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2762 if let Some(ref mut details) = poller_options.tracing {
2763 details.method_name = "google_cloud_dataplex_v1::client::CatalogService::delete_entry_type::until_done";
2764 }
2765
2766 let stub = self.0.stub.clone();
2767 let mut options = self.0.options.clone();
2768 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2769 let query = move |name| {
2770 let stub = stub.clone();
2771 let options = options.clone();
2772 async {
2773 let op = GetOperation::new(stub)
2774 .set_name(name)
2775 .with_options(options)
2776 .send()
2777 .await?;
2778 Ok(Operation::new(op))
2779 }
2780 };
2781
2782 let start = move || async {
2783 let op = self.send().await?;
2784 Ok(Operation::new(op))
2785 };
2786
2787 use google_cloud_lro::internal::PollerExt;
2788 {
2789 google_cloud_lro::internal::new_unit_response_poller(
2790 polling_error_policy,
2791 polling_backoff_policy,
2792 start,
2793 query,
2794 )
2795 }
2796 .with_options(poller_options)
2797 }
2798
2799 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2803 self.0.request.name = v.into();
2804 self
2805 }
2806
2807 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
2809 self.0.request.etag = v.into();
2810 self
2811 }
2812 }
2813
2814 #[doc(hidden)]
2815 impl crate::RequestBuilder for DeleteEntryType {
2816 fn request_options(&mut self) -> &mut crate::RequestOptions {
2817 &mut self.0.options
2818 }
2819 }
2820
2821 #[derive(Clone, Debug)]
2842 pub struct ListEntryTypes(RequestBuilder<crate::model::ListEntryTypesRequest>);
2843
2844 impl ListEntryTypes {
2845 pub(crate) fn new(
2846 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2847 ) -> Self {
2848 Self(RequestBuilder::new(stub))
2849 }
2850
2851 pub fn with_request<V: Into<crate::model::ListEntryTypesRequest>>(mut self, v: V) -> Self {
2853 self.0.request = v.into();
2854 self
2855 }
2856
2857 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2859 self.0.options = v.into();
2860 self
2861 }
2862
2863 pub async fn send(self) -> Result<crate::model::ListEntryTypesResponse> {
2865 (*self.0.stub)
2866 .list_entry_types(self.0.request, self.0.options)
2867 .await
2868 .map(crate::Response::into_body)
2869 }
2870
2871 pub fn by_page(
2873 self,
2874 ) -> impl google_cloud_gax::paginator::Paginator<
2875 crate::model::ListEntryTypesResponse,
2876 crate::Error,
2877 > {
2878 use std::clone::Clone;
2879 let token = self.0.request.page_token.clone();
2880 let execute = move |token: String| {
2881 let mut builder = self.clone();
2882 builder.0.request = builder.0.request.set_page_token(token);
2883 builder.send()
2884 };
2885 google_cloud_gax::paginator::internal::new_paginator(token, execute)
2886 }
2887
2888 pub fn by_item(
2890 self,
2891 ) -> impl google_cloud_gax::paginator::ItemPaginator<
2892 crate::model::ListEntryTypesResponse,
2893 crate::Error,
2894 > {
2895 use google_cloud_gax::paginator::Paginator;
2896 self.by_page().items()
2897 }
2898
2899 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2903 self.0.request.parent = v.into();
2904 self
2905 }
2906
2907 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2909 self.0.request.page_size = v.into();
2910 self
2911 }
2912
2913 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2915 self.0.request.page_token = v.into();
2916 self
2917 }
2918
2919 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2921 self.0.request.filter = v.into();
2922 self
2923 }
2924
2925 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
2927 self.0.request.order_by = v.into();
2928 self
2929 }
2930 }
2931
2932 #[doc(hidden)]
2933 impl crate::RequestBuilder for ListEntryTypes {
2934 fn request_options(&mut self) -> &mut crate::RequestOptions {
2935 &mut self.0.options
2936 }
2937 }
2938
2939 #[derive(Clone, Debug)]
2956 pub struct GetEntryType(RequestBuilder<crate::model::GetEntryTypeRequest>);
2957
2958 impl GetEntryType {
2959 pub(crate) fn new(
2960 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2961 ) -> Self {
2962 Self(RequestBuilder::new(stub))
2963 }
2964
2965 pub fn with_request<V: Into<crate::model::GetEntryTypeRequest>>(mut self, v: V) -> Self {
2967 self.0.request = v.into();
2968 self
2969 }
2970
2971 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2973 self.0.options = v.into();
2974 self
2975 }
2976
2977 pub async fn send(self) -> Result<crate::model::EntryType> {
2979 (*self.0.stub)
2980 .get_entry_type(self.0.request, self.0.options)
2981 .await
2982 .map(crate::Response::into_body)
2983 }
2984
2985 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2989 self.0.request.name = v.into();
2990 self
2991 }
2992 }
2993
2994 #[doc(hidden)]
2995 impl crate::RequestBuilder for GetEntryType {
2996 fn request_options(&mut self) -> &mut crate::RequestOptions {
2997 &mut self.0.options
2998 }
2999 }
3000
3001 #[derive(Clone, Debug)]
3019 pub struct CreateAspectType(RequestBuilder<crate::model::CreateAspectTypeRequest>);
3020
3021 impl CreateAspectType {
3022 pub(crate) fn new(
3023 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3024 ) -> Self {
3025 Self(RequestBuilder::new(stub))
3026 }
3027
3028 pub fn with_request<V: Into<crate::model::CreateAspectTypeRequest>>(
3030 mut self,
3031 v: V,
3032 ) -> Self {
3033 self.0.request = v.into();
3034 self
3035 }
3036
3037 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3039 self.0.options = v.into();
3040 self
3041 }
3042
3043 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3050 (*self.0.stub)
3051 .create_aspect_type(self.0.request, self.0.options)
3052 .await
3053 .map(crate::Response::into_body)
3054 }
3055
3056 pub fn poller(
3058 self,
3059 ) -> impl google_cloud_lro::Poller<crate::model::AspectType, crate::model::OperationMetadata>
3060 {
3061 type Operation = google_cloud_lro::internal::Operation<
3062 crate::model::AspectType,
3063 crate::model::OperationMetadata,
3064 >;
3065 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3066 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3067 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3068 if let Some(ref mut details) = poller_options.tracing {
3069 details.method_name = "google_cloud_dataplex_v1::client::CatalogService::create_aspect_type::until_done";
3070 }
3071
3072 let stub = self.0.stub.clone();
3073 let mut options = self.0.options.clone();
3074 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3075 let query = move |name| {
3076 let stub = stub.clone();
3077 let options = options.clone();
3078 async {
3079 let op = GetOperation::new(stub)
3080 .set_name(name)
3081 .with_options(options)
3082 .send()
3083 .await?;
3084 Ok(Operation::new(op))
3085 }
3086 };
3087
3088 let start = move || async {
3089 let op = self.send().await?;
3090 Ok(Operation::new(op))
3091 };
3092
3093 use google_cloud_lro::internal::PollerExt;
3094 {
3095 google_cloud_lro::internal::new_poller(
3096 polling_error_policy,
3097 polling_backoff_policy,
3098 start,
3099 query,
3100 )
3101 }
3102 .with_options(poller_options)
3103 }
3104
3105 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3109 self.0.request.parent = v.into();
3110 self
3111 }
3112
3113 pub fn set_aspect_type_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3117 self.0.request.aspect_type_id = v.into();
3118 self
3119 }
3120
3121 pub fn set_aspect_type<T>(mut self, v: T) -> Self
3125 where
3126 T: std::convert::Into<crate::model::AspectType>,
3127 {
3128 self.0.request.aspect_type = std::option::Option::Some(v.into());
3129 self
3130 }
3131
3132 pub fn set_or_clear_aspect_type<T>(mut self, v: std::option::Option<T>) -> Self
3136 where
3137 T: std::convert::Into<crate::model::AspectType>,
3138 {
3139 self.0.request.aspect_type = v.map(|x| x.into());
3140 self
3141 }
3142
3143 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3145 self.0.request.validate_only = v.into();
3146 self
3147 }
3148 }
3149
3150 #[doc(hidden)]
3151 impl crate::RequestBuilder for CreateAspectType {
3152 fn request_options(&mut self) -> &mut crate::RequestOptions {
3153 &mut self.0.options
3154 }
3155 }
3156
3157 #[derive(Clone, Debug)]
3175 pub struct UpdateAspectType(RequestBuilder<crate::model::UpdateAspectTypeRequest>);
3176
3177 impl UpdateAspectType {
3178 pub(crate) fn new(
3179 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3180 ) -> Self {
3181 Self(RequestBuilder::new(stub))
3182 }
3183
3184 pub fn with_request<V: Into<crate::model::UpdateAspectTypeRequest>>(
3186 mut self,
3187 v: V,
3188 ) -> Self {
3189 self.0.request = v.into();
3190 self
3191 }
3192
3193 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3195 self.0.options = v.into();
3196 self
3197 }
3198
3199 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3206 (*self.0.stub)
3207 .update_aspect_type(self.0.request, self.0.options)
3208 .await
3209 .map(crate::Response::into_body)
3210 }
3211
3212 pub fn poller(
3214 self,
3215 ) -> impl google_cloud_lro::Poller<crate::model::AspectType, crate::model::OperationMetadata>
3216 {
3217 type Operation = google_cloud_lro::internal::Operation<
3218 crate::model::AspectType,
3219 crate::model::OperationMetadata,
3220 >;
3221 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3222 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3223 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3224 if let Some(ref mut details) = poller_options.tracing {
3225 details.method_name = "google_cloud_dataplex_v1::client::CatalogService::update_aspect_type::until_done";
3226 }
3227
3228 let stub = self.0.stub.clone();
3229 let mut options = self.0.options.clone();
3230 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3231 let query = move |name| {
3232 let stub = stub.clone();
3233 let options = options.clone();
3234 async {
3235 let op = GetOperation::new(stub)
3236 .set_name(name)
3237 .with_options(options)
3238 .send()
3239 .await?;
3240 Ok(Operation::new(op))
3241 }
3242 };
3243
3244 let start = move || async {
3245 let op = self.send().await?;
3246 Ok(Operation::new(op))
3247 };
3248
3249 use google_cloud_lro::internal::PollerExt;
3250 {
3251 google_cloud_lro::internal::new_poller(
3252 polling_error_policy,
3253 polling_backoff_policy,
3254 start,
3255 query,
3256 )
3257 }
3258 .with_options(poller_options)
3259 }
3260
3261 pub fn set_aspect_type<T>(mut self, v: T) -> Self
3265 where
3266 T: std::convert::Into<crate::model::AspectType>,
3267 {
3268 self.0.request.aspect_type = std::option::Option::Some(v.into());
3269 self
3270 }
3271
3272 pub fn set_or_clear_aspect_type<T>(mut self, v: std::option::Option<T>) -> Self
3276 where
3277 T: std::convert::Into<crate::model::AspectType>,
3278 {
3279 self.0.request.aspect_type = v.map(|x| x.into());
3280 self
3281 }
3282
3283 pub fn set_update_mask<T>(mut self, v: T) -> Self
3287 where
3288 T: std::convert::Into<wkt::FieldMask>,
3289 {
3290 self.0.request.update_mask = std::option::Option::Some(v.into());
3291 self
3292 }
3293
3294 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3298 where
3299 T: std::convert::Into<wkt::FieldMask>,
3300 {
3301 self.0.request.update_mask = v.map(|x| x.into());
3302 self
3303 }
3304
3305 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3307 self.0.request.validate_only = v.into();
3308 self
3309 }
3310 }
3311
3312 #[doc(hidden)]
3313 impl crate::RequestBuilder for UpdateAspectType {
3314 fn request_options(&mut self) -> &mut crate::RequestOptions {
3315 &mut self.0.options
3316 }
3317 }
3318
3319 #[derive(Clone, Debug)]
3337 pub struct DeleteAspectType(RequestBuilder<crate::model::DeleteAspectTypeRequest>);
3338
3339 impl DeleteAspectType {
3340 pub(crate) fn new(
3341 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3342 ) -> Self {
3343 Self(RequestBuilder::new(stub))
3344 }
3345
3346 pub fn with_request<V: Into<crate::model::DeleteAspectTypeRequest>>(
3348 mut self,
3349 v: V,
3350 ) -> Self {
3351 self.0.request = v.into();
3352 self
3353 }
3354
3355 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3357 self.0.options = v.into();
3358 self
3359 }
3360
3361 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3368 (*self.0.stub)
3369 .delete_aspect_type(self.0.request, self.0.options)
3370 .await
3371 .map(crate::Response::into_body)
3372 }
3373
3374 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
3376 type Operation =
3377 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3378 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3379 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3380 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3381 if let Some(ref mut details) = poller_options.tracing {
3382 details.method_name = "google_cloud_dataplex_v1::client::CatalogService::delete_aspect_type::until_done";
3383 }
3384
3385 let stub = self.0.stub.clone();
3386 let mut options = self.0.options.clone();
3387 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3388 let query = move |name| {
3389 let stub = stub.clone();
3390 let options = options.clone();
3391 async {
3392 let op = GetOperation::new(stub)
3393 .set_name(name)
3394 .with_options(options)
3395 .send()
3396 .await?;
3397 Ok(Operation::new(op))
3398 }
3399 };
3400
3401 let start = move || async {
3402 let op = self.send().await?;
3403 Ok(Operation::new(op))
3404 };
3405
3406 use google_cloud_lro::internal::PollerExt;
3407 {
3408 google_cloud_lro::internal::new_unit_response_poller(
3409 polling_error_policy,
3410 polling_backoff_policy,
3411 start,
3412 query,
3413 )
3414 }
3415 .with_options(poller_options)
3416 }
3417
3418 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3422 self.0.request.name = v.into();
3423 self
3424 }
3425
3426 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
3428 self.0.request.etag = v.into();
3429 self
3430 }
3431 }
3432
3433 #[doc(hidden)]
3434 impl crate::RequestBuilder for DeleteAspectType {
3435 fn request_options(&mut self) -> &mut crate::RequestOptions {
3436 &mut self.0.options
3437 }
3438 }
3439
3440 #[derive(Clone, Debug)]
3461 pub struct ListAspectTypes(RequestBuilder<crate::model::ListAspectTypesRequest>);
3462
3463 impl ListAspectTypes {
3464 pub(crate) fn new(
3465 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3466 ) -> Self {
3467 Self(RequestBuilder::new(stub))
3468 }
3469
3470 pub fn with_request<V: Into<crate::model::ListAspectTypesRequest>>(mut self, v: V) -> Self {
3472 self.0.request = v.into();
3473 self
3474 }
3475
3476 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3478 self.0.options = v.into();
3479 self
3480 }
3481
3482 pub async fn send(self) -> Result<crate::model::ListAspectTypesResponse> {
3484 (*self.0.stub)
3485 .list_aspect_types(self.0.request, self.0.options)
3486 .await
3487 .map(crate::Response::into_body)
3488 }
3489
3490 pub fn by_page(
3492 self,
3493 ) -> impl google_cloud_gax::paginator::Paginator<
3494 crate::model::ListAspectTypesResponse,
3495 crate::Error,
3496 > {
3497 use std::clone::Clone;
3498 let token = self.0.request.page_token.clone();
3499 let execute = move |token: String| {
3500 let mut builder = self.clone();
3501 builder.0.request = builder.0.request.set_page_token(token);
3502 builder.send()
3503 };
3504 google_cloud_gax::paginator::internal::new_paginator(token, execute)
3505 }
3506
3507 pub fn by_item(
3509 self,
3510 ) -> impl google_cloud_gax::paginator::ItemPaginator<
3511 crate::model::ListAspectTypesResponse,
3512 crate::Error,
3513 > {
3514 use google_cloud_gax::paginator::Paginator;
3515 self.by_page().items()
3516 }
3517
3518 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3522 self.0.request.parent = v.into();
3523 self
3524 }
3525
3526 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3528 self.0.request.page_size = v.into();
3529 self
3530 }
3531
3532 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3534 self.0.request.page_token = v.into();
3535 self
3536 }
3537
3538 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3540 self.0.request.filter = v.into();
3541 self
3542 }
3543
3544 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3546 self.0.request.order_by = v.into();
3547 self
3548 }
3549 }
3550
3551 #[doc(hidden)]
3552 impl crate::RequestBuilder for ListAspectTypes {
3553 fn request_options(&mut self) -> &mut crate::RequestOptions {
3554 &mut self.0.options
3555 }
3556 }
3557
3558 #[derive(Clone, Debug)]
3575 pub struct GetAspectType(RequestBuilder<crate::model::GetAspectTypeRequest>);
3576
3577 impl GetAspectType {
3578 pub(crate) fn new(
3579 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3580 ) -> Self {
3581 Self(RequestBuilder::new(stub))
3582 }
3583
3584 pub fn with_request<V: Into<crate::model::GetAspectTypeRequest>>(mut self, v: V) -> Self {
3586 self.0.request = v.into();
3587 self
3588 }
3589
3590 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3592 self.0.options = v.into();
3593 self
3594 }
3595
3596 pub async fn send(self) -> Result<crate::model::AspectType> {
3598 (*self.0.stub)
3599 .get_aspect_type(self.0.request, self.0.options)
3600 .await
3601 .map(crate::Response::into_body)
3602 }
3603
3604 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3608 self.0.request.name = v.into();
3609 self
3610 }
3611 }
3612
3613 #[doc(hidden)]
3614 impl crate::RequestBuilder for GetAspectType {
3615 fn request_options(&mut self) -> &mut crate::RequestOptions {
3616 &mut self.0.options
3617 }
3618 }
3619
3620 #[derive(Clone, Debug)]
3638 pub struct CreateEntryGroup(RequestBuilder<crate::model::CreateEntryGroupRequest>);
3639
3640 impl CreateEntryGroup {
3641 pub(crate) fn new(
3642 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3643 ) -> Self {
3644 Self(RequestBuilder::new(stub))
3645 }
3646
3647 pub fn with_request<V: Into<crate::model::CreateEntryGroupRequest>>(
3649 mut self,
3650 v: V,
3651 ) -> Self {
3652 self.0.request = v.into();
3653 self
3654 }
3655
3656 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3658 self.0.options = v.into();
3659 self
3660 }
3661
3662 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3669 (*self.0.stub)
3670 .create_entry_group(self.0.request, self.0.options)
3671 .await
3672 .map(crate::Response::into_body)
3673 }
3674
3675 pub fn poller(
3677 self,
3678 ) -> impl google_cloud_lro::Poller<crate::model::EntryGroup, crate::model::OperationMetadata>
3679 {
3680 type Operation = google_cloud_lro::internal::Operation<
3681 crate::model::EntryGroup,
3682 crate::model::OperationMetadata,
3683 >;
3684 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3685 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3686 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3687 if let Some(ref mut details) = poller_options.tracing {
3688 details.method_name = "google_cloud_dataplex_v1::client::CatalogService::create_entry_group::until_done";
3689 }
3690
3691 let stub = self.0.stub.clone();
3692 let mut options = self.0.options.clone();
3693 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3694 let query = move |name| {
3695 let stub = stub.clone();
3696 let options = options.clone();
3697 async {
3698 let op = GetOperation::new(stub)
3699 .set_name(name)
3700 .with_options(options)
3701 .send()
3702 .await?;
3703 Ok(Operation::new(op))
3704 }
3705 };
3706
3707 let start = move || async {
3708 let op = self.send().await?;
3709 Ok(Operation::new(op))
3710 };
3711
3712 use google_cloud_lro::internal::PollerExt;
3713 {
3714 google_cloud_lro::internal::new_poller(
3715 polling_error_policy,
3716 polling_backoff_policy,
3717 start,
3718 query,
3719 )
3720 }
3721 .with_options(poller_options)
3722 }
3723
3724 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3728 self.0.request.parent = v.into();
3729 self
3730 }
3731
3732 pub fn set_entry_group_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3736 self.0.request.entry_group_id = v.into();
3737 self
3738 }
3739
3740 pub fn set_entry_group<T>(mut self, v: T) -> Self
3744 where
3745 T: std::convert::Into<crate::model::EntryGroup>,
3746 {
3747 self.0.request.entry_group = std::option::Option::Some(v.into());
3748 self
3749 }
3750
3751 pub fn set_or_clear_entry_group<T>(mut self, v: std::option::Option<T>) -> Self
3755 where
3756 T: std::convert::Into<crate::model::EntryGroup>,
3757 {
3758 self.0.request.entry_group = v.map(|x| x.into());
3759 self
3760 }
3761
3762 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3764 self.0.request.validate_only = v.into();
3765 self
3766 }
3767 }
3768
3769 #[doc(hidden)]
3770 impl crate::RequestBuilder for CreateEntryGroup {
3771 fn request_options(&mut self) -> &mut crate::RequestOptions {
3772 &mut self.0.options
3773 }
3774 }
3775
3776 #[derive(Clone, Debug)]
3794 pub struct UpdateEntryGroup(RequestBuilder<crate::model::UpdateEntryGroupRequest>);
3795
3796 impl UpdateEntryGroup {
3797 pub(crate) fn new(
3798 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3799 ) -> Self {
3800 Self(RequestBuilder::new(stub))
3801 }
3802
3803 pub fn with_request<V: Into<crate::model::UpdateEntryGroupRequest>>(
3805 mut self,
3806 v: V,
3807 ) -> Self {
3808 self.0.request = v.into();
3809 self
3810 }
3811
3812 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3814 self.0.options = v.into();
3815 self
3816 }
3817
3818 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3825 (*self.0.stub)
3826 .update_entry_group(self.0.request, self.0.options)
3827 .await
3828 .map(crate::Response::into_body)
3829 }
3830
3831 pub fn poller(
3833 self,
3834 ) -> impl google_cloud_lro::Poller<crate::model::EntryGroup, crate::model::OperationMetadata>
3835 {
3836 type Operation = google_cloud_lro::internal::Operation<
3837 crate::model::EntryGroup,
3838 crate::model::OperationMetadata,
3839 >;
3840 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3841 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3842 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3843 if let Some(ref mut details) = poller_options.tracing {
3844 details.method_name = "google_cloud_dataplex_v1::client::CatalogService::update_entry_group::until_done";
3845 }
3846
3847 let stub = self.0.stub.clone();
3848 let mut options = self.0.options.clone();
3849 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3850 let query = move |name| {
3851 let stub = stub.clone();
3852 let options = options.clone();
3853 async {
3854 let op = GetOperation::new(stub)
3855 .set_name(name)
3856 .with_options(options)
3857 .send()
3858 .await?;
3859 Ok(Operation::new(op))
3860 }
3861 };
3862
3863 let start = move || async {
3864 let op = self.send().await?;
3865 Ok(Operation::new(op))
3866 };
3867
3868 use google_cloud_lro::internal::PollerExt;
3869 {
3870 google_cloud_lro::internal::new_poller(
3871 polling_error_policy,
3872 polling_backoff_policy,
3873 start,
3874 query,
3875 )
3876 }
3877 .with_options(poller_options)
3878 }
3879
3880 pub fn set_entry_group<T>(mut self, v: T) -> Self
3884 where
3885 T: std::convert::Into<crate::model::EntryGroup>,
3886 {
3887 self.0.request.entry_group = std::option::Option::Some(v.into());
3888 self
3889 }
3890
3891 pub fn set_or_clear_entry_group<T>(mut self, v: std::option::Option<T>) -> Self
3895 where
3896 T: std::convert::Into<crate::model::EntryGroup>,
3897 {
3898 self.0.request.entry_group = v.map(|x| x.into());
3899 self
3900 }
3901
3902 pub fn set_update_mask<T>(mut self, v: T) -> Self
3906 where
3907 T: std::convert::Into<wkt::FieldMask>,
3908 {
3909 self.0.request.update_mask = std::option::Option::Some(v.into());
3910 self
3911 }
3912
3913 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3917 where
3918 T: std::convert::Into<wkt::FieldMask>,
3919 {
3920 self.0.request.update_mask = v.map(|x| x.into());
3921 self
3922 }
3923
3924 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3926 self.0.request.validate_only = v.into();
3927 self
3928 }
3929 }
3930
3931 #[doc(hidden)]
3932 impl crate::RequestBuilder for UpdateEntryGroup {
3933 fn request_options(&mut self) -> &mut crate::RequestOptions {
3934 &mut self.0.options
3935 }
3936 }
3937
3938 #[derive(Clone, Debug)]
3956 pub struct DeleteEntryGroup(RequestBuilder<crate::model::DeleteEntryGroupRequest>);
3957
3958 impl DeleteEntryGroup {
3959 pub(crate) fn new(
3960 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3961 ) -> Self {
3962 Self(RequestBuilder::new(stub))
3963 }
3964
3965 pub fn with_request<V: Into<crate::model::DeleteEntryGroupRequest>>(
3967 mut self,
3968 v: V,
3969 ) -> Self {
3970 self.0.request = v.into();
3971 self
3972 }
3973
3974 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3976 self.0.options = v.into();
3977 self
3978 }
3979
3980 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3987 (*self.0.stub)
3988 .delete_entry_group(self.0.request, self.0.options)
3989 .await
3990 .map(crate::Response::into_body)
3991 }
3992
3993 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
3995 type Operation =
3996 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3997 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3998 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3999 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4000 if let Some(ref mut details) = poller_options.tracing {
4001 details.method_name = "google_cloud_dataplex_v1::client::CatalogService::delete_entry_group::until_done";
4002 }
4003
4004 let stub = self.0.stub.clone();
4005 let mut options = self.0.options.clone();
4006 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4007 let query = move |name| {
4008 let stub = stub.clone();
4009 let options = options.clone();
4010 async {
4011 let op = GetOperation::new(stub)
4012 .set_name(name)
4013 .with_options(options)
4014 .send()
4015 .await?;
4016 Ok(Operation::new(op))
4017 }
4018 };
4019
4020 let start = move || async {
4021 let op = self.send().await?;
4022 Ok(Operation::new(op))
4023 };
4024
4025 use google_cloud_lro::internal::PollerExt;
4026 {
4027 google_cloud_lro::internal::new_unit_response_poller(
4028 polling_error_policy,
4029 polling_backoff_policy,
4030 start,
4031 query,
4032 )
4033 }
4034 .with_options(poller_options)
4035 }
4036
4037 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4041 self.0.request.name = v.into();
4042 self
4043 }
4044
4045 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
4047 self.0.request.etag = v.into();
4048 self
4049 }
4050 }
4051
4052 #[doc(hidden)]
4053 impl crate::RequestBuilder for DeleteEntryGroup {
4054 fn request_options(&mut self) -> &mut crate::RequestOptions {
4055 &mut self.0.options
4056 }
4057 }
4058
4059 #[derive(Clone, Debug)]
4080 pub struct ListEntryGroups(RequestBuilder<crate::model::ListEntryGroupsRequest>);
4081
4082 impl ListEntryGroups {
4083 pub(crate) fn new(
4084 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4085 ) -> Self {
4086 Self(RequestBuilder::new(stub))
4087 }
4088
4089 pub fn with_request<V: Into<crate::model::ListEntryGroupsRequest>>(mut self, v: V) -> Self {
4091 self.0.request = v.into();
4092 self
4093 }
4094
4095 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4097 self.0.options = v.into();
4098 self
4099 }
4100
4101 pub async fn send(self) -> Result<crate::model::ListEntryGroupsResponse> {
4103 (*self.0.stub)
4104 .list_entry_groups(self.0.request, self.0.options)
4105 .await
4106 .map(crate::Response::into_body)
4107 }
4108
4109 pub fn by_page(
4111 self,
4112 ) -> impl google_cloud_gax::paginator::Paginator<
4113 crate::model::ListEntryGroupsResponse,
4114 crate::Error,
4115 > {
4116 use std::clone::Clone;
4117 let token = self.0.request.page_token.clone();
4118 let execute = move |token: String| {
4119 let mut builder = self.clone();
4120 builder.0.request = builder.0.request.set_page_token(token);
4121 builder.send()
4122 };
4123 google_cloud_gax::paginator::internal::new_paginator(token, execute)
4124 }
4125
4126 pub fn by_item(
4128 self,
4129 ) -> impl google_cloud_gax::paginator::ItemPaginator<
4130 crate::model::ListEntryGroupsResponse,
4131 crate::Error,
4132 > {
4133 use google_cloud_gax::paginator::Paginator;
4134 self.by_page().items()
4135 }
4136
4137 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4141 self.0.request.parent = v.into();
4142 self
4143 }
4144
4145 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4147 self.0.request.page_size = v.into();
4148 self
4149 }
4150
4151 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4153 self.0.request.page_token = v.into();
4154 self
4155 }
4156
4157 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4159 self.0.request.filter = v.into();
4160 self
4161 }
4162
4163 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
4165 self.0.request.order_by = v.into();
4166 self
4167 }
4168 }
4169
4170 #[doc(hidden)]
4171 impl crate::RequestBuilder for ListEntryGroups {
4172 fn request_options(&mut self) -> &mut crate::RequestOptions {
4173 &mut self.0.options
4174 }
4175 }
4176
4177 #[derive(Clone, Debug)]
4194 pub struct GetEntryGroup(RequestBuilder<crate::model::GetEntryGroupRequest>);
4195
4196 impl GetEntryGroup {
4197 pub(crate) fn new(
4198 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4199 ) -> Self {
4200 Self(RequestBuilder::new(stub))
4201 }
4202
4203 pub fn with_request<V: Into<crate::model::GetEntryGroupRequest>>(mut self, v: V) -> Self {
4205 self.0.request = v.into();
4206 self
4207 }
4208
4209 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4211 self.0.options = v.into();
4212 self
4213 }
4214
4215 pub async fn send(self) -> Result<crate::model::EntryGroup> {
4217 (*self.0.stub)
4218 .get_entry_group(self.0.request, self.0.options)
4219 .await
4220 .map(crate::Response::into_body)
4221 }
4222
4223 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4227 self.0.request.name = v.into();
4228 self
4229 }
4230 }
4231
4232 #[doc(hidden)]
4233 impl crate::RequestBuilder for GetEntryGroup {
4234 fn request_options(&mut self) -> &mut crate::RequestOptions {
4235 &mut self.0.options
4236 }
4237 }
4238
4239 #[derive(Clone, Debug)]
4256 pub struct CreateEntry(RequestBuilder<crate::model::CreateEntryRequest>);
4257
4258 impl CreateEntry {
4259 pub(crate) fn new(
4260 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4261 ) -> Self {
4262 Self(RequestBuilder::new(stub))
4263 }
4264
4265 pub fn with_request<V: Into<crate::model::CreateEntryRequest>>(mut self, v: V) -> Self {
4267 self.0.request = v.into();
4268 self
4269 }
4270
4271 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4273 self.0.options = v.into();
4274 self
4275 }
4276
4277 pub async fn send(self) -> Result<crate::model::Entry> {
4279 (*self.0.stub)
4280 .create_entry(self.0.request, self.0.options)
4281 .await
4282 .map(crate::Response::into_body)
4283 }
4284
4285 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4289 self.0.request.parent = v.into();
4290 self
4291 }
4292
4293 pub fn set_entry_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4297 self.0.request.entry_id = v.into();
4298 self
4299 }
4300
4301 pub fn set_entry<T>(mut self, v: T) -> Self
4305 where
4306 T: std::convert::Into<crate::model::Entry>,
4307 {
4308 self.0.request.entry = std::option::Option::Some(v.into());
4309 self
4310 }
4311
4312 pub fn set_or_clear_entry<T>(mut self, v: std::option::Option<T>) -> Self
4316 where
4317 T: std::convert::Into<crate::model::Entry>,
4318 {
4319 self.0.request.entry = v.map(|x| x.into());
4320 self
4321 }
4322 }
4323
4324 #[doc(hidden)]
4325 impl crate::RequestBuilder for CreateEntry {
4326 fn request_options(&mut self) -> &mut crate::RequestOptions {
4327 &mut self.0.options
4328 }
4329 }
4330
4331 #[derive(Clone, Debug)]
4348 pub struct UpdateEntry(RequestBuilder<crate::model::UpdateEntryRequest>);
4349
4350 impl UpdateEntry {
4351 pub(crate) fn new(
4352 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4353 ) -> Self {
4354 Self(RequestBuilder::new(stub))
4355 }
4356
4357 pub fn with_request<V: Into<crate::model::UpdateEntryRequest>>(mut self, v: V) -> Self {
4359 self.0.request = v.into();
4360 self
4361 }
4362
4363 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4365 self.0.options = v.into();
4366 self
4367 }
4368
4369 pub async fn send(self) -> Result<crate::model::Entry> {
4371 (*self.0.stub)
4372 .update_entry(self.0.request, self.0.options)
4373 .await
4374 .map(crate::Response::into_body)
4375 }
4376
4377 pub fn set_entry<T>(mut self, v: T) -> Self
4381 where
4382 T: std::convert::Into<crate::model::Entry>,
4383 {
4384 self.0.request.entry = std::option::Option::Some(v.into());
4385 self
4386 }
4387
4388 pub fn set_or_clear_entry<T>(mut self, v: std::option::Option<T>) -> Self
4392 where
4393 T: std::convert::Into<crate::model::Entry>,
4394 {
4395 self.0.request.entry = v.map(|x| x.into());
4396 self
4397 }
4398
4399 pub fn set_update_mask<T>(mut self, v: T) -> Self
4401 where
4402 T: std::convert::Into<wkt::FieldMask>,
4403 {
4404 self.0.request.update_mask = std::option::Option::Some(v.into());
4405 self
4406 }
4407
4408 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4410 where
4411 T: std::convert::Into<wkt::FieldMask>,
4412 {
4413 self.0.request.update_mask = v.map(|x| x.into());
4414 self
4415 }
4416
4417 pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
4419 self.0.request.allow_missing = v.into();
4420 self
4421 }
4422
4423 pub fn set_delete_missing_aspects<T: Into<bool>>(mut self, v: T) -> Self {
4425 self.0.request.delete_missing_aspects = v.into();
4426 self
4427 }
4428
4429 pub fn set_aspect_keys<T, V>(mut self, v: T) -> Self
4431 where
4432 T: std::iter::IntoIterator<Item = V>,
4433 V: std::convert::Into<std::string::String>,
4434 {
4435 use std::iter::Iterator;
4436 self.0.request.aspect_keys = v.into_iter().map(|i| i.into()).collect();
4437 self
4438 }
4439 }
4440
4441 #[doc(hidden)]
4442 impl crate::RequestBuilder for UpdateEntry {
4443 fn request_options(&mut self) -> &mut crate::RequestOptions {
4444 &mut self.0.options
4445 }
4446 }
4447
4448 #[derive(Clone, Debug)]
4465 pub struct DeleteEntry(RequestBuilder<crate::model::DeleteEntryRequest>);
4466
4467 impl DeleteEntry {
4468 pub(crate) fn new(
4469 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4470 ) -> Self {
4471 Self(RequestBuilder::new(stub))
4472 }
4473
4474 pub fn with_request<V: Into<crate::model::DeleteEntryRequest>>(mut self, v: V) -> Self {
4476 self.0.request = v.into();
4477 self
4478 }
4479
4480 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4482 self.0.options = v.into();
4483 self
4484 }
4485
4486 pub async fn send(self) -> Result<crate::model::Entry> {
4488 (*self.0.stub)
4489 .delete_entry(self.0.request, self.0.options)
4490 .await
4491 .map(crate::Response::into_body)
4492 }
4493
4494 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4498 self.0.request.name = v.into();
4499 self
4500 }
4501 }
4502
4503 #[doc(hidden)]
4504 impl crate::RequestBuilder for DeleteEntry {
4505 fn request_options(&mut self) -> &mut crate::RequestOptions {
4506 &mut self.0.options
4507 }
4508 }
4509
4510 #[derive(Clone, Debug)]
4531 pub struct ListEntries(RequestBuilder<crate::model::ListEntriesRequest>);
4532
4533 impl ListEntries {
4534 pub(crate) fn new(
4535 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4536 ) -> Self {
4537 Self(RequestBuilder::new(stub))
4538 }
4539
4540 pub fn with_request<V: Into<crate::model::ListEntriesRequest>>(mut self, v: V) -> Self {
4542 self.0.request = v.into();
4543 self
4544 }
4545
4546 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4548 self.0.options = v.into();
4549 self
4550 }
4551
4552 pub async fn send(self) -> Result<crate::model::ListEntriesResponse> {
4554 (*self.0.stub)
4555 .list_entries(self.0.request, self.0.options)
4556 .await
4557 .map(crate::Response::into_body)
4558 }
4559
4560 pub fn by_page(
4562 self,
4563 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListEntriesResponse, crate::Error>
4564 {
4565 use std::clone::Clone;
4566 let token = self.0.request.page_token.clone();
4567 let execute = move |token: String| {
4568 let mut builder = self.clone();
4569 builder.0.request = builder.0.request.set_page_token(token);
4570 builder.send()
4571 };
4572 google_cloud_gax::paginator::internal::new_paginator(token, execute)
4573 }
4574
4575 pub fn by_item(
4577 self,
4578 ) -> impl google_cloud_gax::paginator::ItemPaginator<
4579 crate::model::ListEntriesResponse,
4580 crate::Error,
4581 > {
4582 use google_cloud_gax::paginator::Paginator;
4583 self.by_page().items()
4584 }
4585
4586 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4590 self.0.request.parent = v.into();
4591 self
4592 }
4593
4594 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4596 self.0.request.page_size = v.into();
4597 self
4598 }
4599
4600 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4602 self.0.request.page_token = v.into();
4603 self
4604 }
4605
4606 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4608 self.0.request.filter = v.into();
4609 self
4610 }
4611 }
4612
4613 #[doc(hidden)]
4614 impl crate::RequestBuilder for ListEntries {
4615 fn request_options(&mut self) -> &mut crate::RequestOptions {
4616 &mut self.0.options
4617 }
4618 }
4619
4620 #[derive(Clone, Debug)]
4637 pub struct GetEntry(RequestBuilder<crate::model::GetEntryRequest>);
4638
4639 impl GetEntry {
4640 pub(crate) fn new(
4641 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4642 ) -> Self {
4643 Self(RequestBuilder::new(stub))
4644 }
4645
4646 pub fn with_request<V: Into<crate::model::GetEntryRequest>>(mut self, v: V) -> Self {
4648 self.0.request = v.into();
4649 self
4650 }
4651
4652 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4654 self.0.options = v.into();
4655 self
4656 }
4657
4658 pub async fn send(self) -> Result<crate::model::Entry> {
4660 (*self.0.stub)
4661 .get_entry(self.0.request, self.0.options)
4662 .await
4663 .map(crate::Response::into_body)
4664 }
4665
4666 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4670 self.0.request.name = v.into();
4671 self
4672 }
4673
4674 pub fn set_view<T: Into<crate::model::EntryView>>(mut self, v: T) -> Self {
4676 self.0.request.view = v.into();
4677 self
4678 }
4679
4680 pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
4682 where
4683 T: std::iter::IntoIterator<Item = V>,
4684 V: std::convert::Into<std::string::String>,
4685 {
4686 use std::iter::Iterator;
4687 self.0.request.aspect_types = v.into_iter().map(|i| i.into()).collect();
4688 self
4689 }
4690
4691 pub fn set_paths<T, V>(mut self, v: T) -> Self
4693 where
4694 T: std::iter::IntoIterator<Item = V>,
4695 V: std::convert::Into<std::string::String>,
4696 {
4697 use std::iter::Iterator;
4698 self.0.request.paths = v.into_iter().map(|i| i.into()).collect();
4699 self
4700 }
4701 }
4702
4703 #[doc(hidden)]
4704 impl crate::RequestBuilder for GetEntry {
4705 fn request_options(&mut self) -> &mut crate::RequestOptions {
4706 &mut self.0.options
4707 }
4708 }
4709
4710 #[derive(Clone, Debug)]
4727 pub struct LookupEntry(RequestBuilder<crate::model::LookupEntryRequest>);
4728
4729 impl LookupEntry {
4730 pub(crate) fn new(
4731 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4732 ) -> Self {
4733 Self(RequestBuilder::new(stub))
4734 }
4735
4736 pub fn with_request<V: Into<crate::model::LookupEntryRequest>>(mut self, v: V) -> Self {
4738 self.0.request = v.into();
4739 self
4740 }
4741
4742 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4744 self.0.options = v.into();
4745 self
4746 }
4747
4748 pub async fn send(self) -> Result<crate::model::Entry> {
4750 (*self.0.stub)
4751 .lookup_entry(self.0.request, self.0.options)
4752 .await
4753 .map(crate::Response::into_body)
4754 }
4755
4756 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4760 self.0.request.name = v.into();
4761 self
4762 }
4763
4764 pub fn set_view<T: Into<crate::model::EntryView>>(mut self, v: T) -> Self {
4766 self.0.request.view = v.into();
4767 self
4768 }
4769
4770 pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
4772 where
4773 T: std::iter::IntoIterator<Item = V>,
4774 V: std::convert::Into<std::string::String>,
4775 {
4776 use std::iter::Iterator;
4777 self.0.request.aspect_types = v.into_iter().map(|i| i.into()).collect();
4778 self
4779 }
4780
4781 pub fn set_paths<T, V>(mut self, v: T) -> Self
4783 where
4784 T: std::iter::IntoIterator<Item = V>,
4785 V: std::convert::Into<std::string::String>,
4786 {
4787 use std::iter::Iterator;
4788 self.0.request.paths = v.into_iter().map(|i| i.into()).collect();
4789 self
4790 }
4791
4792 pub fn set_entry<T: Into<std::string::String>>(mut self, v: T) -> Self {
4796 self.0.request.entry = v.into();
4797 self
4798 }
4799 }
4800
4801 #[doc(hidden)]
4802 impl crate::RequestBuilder for LookupEntry {
4803 fn request_options(&mut self) -> &mut crate::RequestOptions {
4804 &mut self.0.options
4805 }
4806 }
4807
4808 #[derive(Clone, Debug)]
4825 pub struct ModifyEntry(RequestBuilder<crate::model::ModifyEntryRequest>);
4826
4827 impl ModifyEntry {
4828 pub(crate) fn new(
4829 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4830 ) -> Self {
4831 Self(RequestBuilder::new(stub))
4832 }
4833
4834 pub fn with_request<V: Into<crate::model::ModifyEntryRequest>>(mut self, v: V) -> Self {
4836 self.0.request = v.into();
4837 self
4838 }
4839
4840 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4842 self.0.options = v.into();
4843 self
4844 }
4845
4846 pub async fn send(self) -> Result<crate::model::Entry> {
4848 (*self.0.stub)
4849 .modify_entry(self.0.request, self.0.options)
4850 .await
4851 .map(crate::Response::into_body)
4852 }
4853
4854 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4858 self.0.request.name = v.into();
4859 self
4860 }
4861
4862 pub fn set_entry<T>(mut self, v: T) -> Self
4866 where
4867 T: std::convert::Into<crate::model::Entry>,
4868 {
4869 self.0.request.entry = std::option::Option::Some(v.into());
4870 self
4871 }
4872
4873 pub fn set_or_clear_entry<T>(mut self, v: std::option::Option<T>) -> Self
4877 where
4878 T: std::convert::Into<crate::model::Entry>,
4879 {
4880 self.0.request.entry = v.map(|x| x.into());
4881 self
4882 }
4883
4884 pub fn set_update_mask<T>(mut self, v: T) -> Self
4886 where
4887 T: std::convert::Into<wkt::FieldMask>,
4888 {
4889 self.0.request.update_mask = std::option::Option::Some(v.into());
4890 self
4891 }
4892
4893 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4895 where
4896 T: std::convert::Into<wkt::FieldMask>,
4897 {
4898 self.0.request.update_mask = v.map(|x| x.into());
4899 self
4900 }
4901
4902 pub fn set_delete_missing_aspects<T: Into<bool>>(mut self, v: T) -> Self {
4904 self.0.request.delete_missing_aspects = v.into();
4905 self
4906 }
4907
4908 pub fn set_aspect_keys<T, V>(mut self, v: T) -> Self
4910 where
4911 T: std::iter::IntoIterator<Item = V>,
4912 V: std::convert::Into<std::string::String>,
4913 {
4914 use std::iter::Iterator;
4915 self.0.request.aspect_keys = v.into_iter().map(|i| i.into()).collect();
4916 self
4917 }
4918 }
4919
4920 #[doc(hidden)]
4921 impl crate::RequestBuilder for ModifyEntry {
4922 fn request_options(&mut self) -> &mut crate::RequestOptions {
4923 &mut self.0.options
4924 }
4925 }
4926
4927 #[derive(Clone, Debug)]
4948 pub struct SearchEntries(RequestBuilder<crate::model::SearchEntriesRequest>);
4949
4950 impl SearchEntries {
4951 pub(crate) fn new(
4952 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4953 ) -> Self {
4954 Self(RequestBuilder::new(stub))
4955 }
4956
4957 pub fn with_request<V: Into<crate::model::SearchEntriesRequest>>(mut self, v: V) -> Self {
4959 self.0.request = v.into();
4960 self
4961 }
4962
4963 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4965 self.0.options = v.into();
4966 self
4967 }
4968
4969 pub async fn send(self) -> Result<crate::model::SearchEntriesResponse> {
4971 (*self.0.stub)
4972 .search_entries(self.0.request, self.0.options)
4973 .await
4974 .map(crate::Response::into_body)
4975 }
4976
4977 pub fn by_page(
4979 self,
4980 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::SearchEntriesResponse, crate::Error>
4981 {
4982 use std::clone::Clone;
4983 let token = self.0.request.page_token.clone();
4984 let execute = move |token: String| {
4985 let mut builder = self.clone();
4986 builder.0.request = builder.0.request.set_page_token(token);
4987 builder.send()
4988 };
4989 google_cloud_gax::paginator::internal::new_paginator(token, execute)
4990 }
4991
4992 pub fn by_item(
4994 self,
4995 ) -> impl google_cloud_gax::paginator::ItemPaginator<
4996 crate::model::SearchEntriesResponse,
4997 crate::Error,
4998 > {
4999 use google_cloud_gax::paginator::Paginator;
5000 self.by_page().items()
5001 }
5002
5003 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5007 self.0.request.name = v.into();
5008 self
5009 }
5010
5011 pub fn set_query<T: Into<std::string::String>>(mut self, v: T) -> Self {
5015 self.0.request.query = v.into();
5016 self
5017 }
5018
5019 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5021 self.0.request.page_size = v.into();
5022 self
5023 }
5024
5025 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5027 self.0.request.page_token = v.into();
5028 self
5029 }
5030
5031 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
5033 self.0.request.order_by = v.into();
5034 self
5035 }
5036
5037 pub fn set_scope<T: Into<std::string::String>>(mut self, v: T) -> Self {
5039 self.0.request.scope = v.into();
5040 self
5041 }
5042
5043 pub fn set_semantic_search<T: Into<bool>>(mut self, v: T) -> Self {
5045 self.0.request.semantic_search = v.into();
5046 self
5047 }
5048 }
5049
5050 #[doc(hidden)]
5051 impl crate::RequestBuilder for SearchEntries {
5052 fn request_options(&mut self) -> &mut crate::RequestOptions {
5053 &mut self.0.options
5054 }
5055 }
5056
5057 #[derive(Clone, Debug)]
5075 pub struct CreateMetadataJob(RequestBuilder<crate::model::CreateMetadataJobRequest>);
5076
5077 impl CreateMetadataJob {
5078 pub(crate) fn new(
5079 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5080 ) -> Self {
5081 Self(RequestBuilder::new(stub))
5082 }
5083
5084 pub fn with_request<V: Into<crate::model::CreateMetadataJobRequest>>(
5086 mut self,
5087 v: V,
5088 ) -> Self {
5089 self.0.request = v.into();
5090 self
5091 }
5092
5093 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5095 self.0.options = v.into();
5096 self
5097 }
5098
5099 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5106 (*self.0.stub)
5107 .create_metadata_job(self.0.request, self.0.options)
5108 .await
5109 .map(crate::Response::into_body)
5110 }
5111
5112 pub fn poller(
5114 self,
5115 ) -> impl google_cloud_lro::Poller<crate::model::MetadataJob, crate::model::OperationMetadata>
5116 {
5117 type Operation = google_cloud_lro::internal::Operation<
5118 crate::model::MetadataJob,
5119 crate::model::OperationMetadata,
5120 >;
5121 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5122 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5123 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5124 if let Some(ref mut details) = poller_options.tracing {
5125 details.method_name = "google_cloud_dataplex_v1::client::CatalogService::create_metadata_job::until_done";
5126 }
5127
5128 let stub = self.0.stub.clone();
5129 let mut options = self.0.options.clone();
5130 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5131 let query = move |name| {
5132 let stub = stub.clone();
5133 let options = options.clone();
5134 async {
5135 let op = GetOperation::new(stub)
5136 .set_name(name)
5137 .with_options(options)
5138 .send()
5139 .await?;
5140 Ok(Operation::new(op))
5141 }
5142 };
5143
5144 let start = move || async {
5145 let op = self.send().await?;
5146 Ok(Operation::new(op))
5147 };
5148
5149 use google_cloud_lro::internal::PollerExt;
5150 {
5151 google_cloud_lro::internal::new_poller(
5152 polling_error_policy,
5153 polling_backoff_policy,
5154 start,
5155 query,
5156 )
5157 }
5158 .with_options(poller_options)
5159 }
5160
5161 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5165 self.0.request.parent = v.into();
5166 self
5167 }
5168
5169 pub fn set_metadata_job<T>(mut self, v: T) -> Self
5173 where
5174 T: std::convert::Into<crate::model::MetadataJob>,
5175 {
5176 self.0.request.metadata_job = std::option::Option::Some(v.into());
5177 self
5178 }
5179
5180 pub fn set_or_clear_metadata_job<T>(mut self, v: std::option::Option<T>) -> Self
5184 where
5185 T: std::convert::Into<crate::model::MetadataJob>,
5186 {
5187 self.0.request.metadata_job = v.map(|x| x.into());
5188 self
5189 }
5190
5191 pub fn set_metadata_job_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5193 self.0.request.metadata_job_id = v.into();
5194 self
5195 }
5196
5197 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
5199 self.0.request.validate_only = v.into();
5200 self
5201 }
5202 }
5203
5204 #[doc(hidden)]
5205 impl crate::RequestBuilder for CreateMetadataJob {
5206 fn request_options(&mut self) -> &mut crate::RequestOptions {
5207 &mut self.0.options
5208 }
5209 }
5210
5211 #[derive(Clone, Debug)]
5228 pub struct GetMetadataJob(RequestBuilder<crate::model::GetMetadataJobRequest>);
5229
5230 impl GetMetadataJob {
5231 pub(crate) fn new(
5232 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5233 ) -> Self {
5234 Self(RequestBuilder::new(stub))
5235 }
5236
5237 pub fn with_request<V: Into<crate::model::GetMetadataJobRequest>>(mut self, v: V) -> Self {
5239 self.0.request = v.into();
5240 self
5241 }
5242
5243 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5245 self.0.options = v.into();
5246 self
5247 }
5248
5249 pub async fn send(self) -> Result<crate::model::MetadataJob> {
5251 (*self.0.stub)
5252 .get_metadata_job(self.0.request, self.0.options)
5253 .await
5254 .map(crate::Response::into_body)
5255 }
5256
5257 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5261 self.0.request.name = v.into();
5262 self
5263 }
5264 }
5265
5266 #[doc(hidden)]
5267 impl crate::RequestBuilder for GetMetadataJob {
5268 fn request_options(&mut self) -> &mut crate::RequestOptions {
5269 &mut self.0.options
5270 }
5271 }
5272
5273 #[derive(Clone, Debug)]
5294 pub struct ListMetadataJobs(RequestBuilder<crate::model::ListMetadataJobsRequest>);
5295
5296 impl ListMetadataJobs {
5297 pub(crate) fn new(
5298 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5299 ) -> Self {
5300 Self(RequestBuilder::new(stub))
5301 }
5302
5303 pub fn with_request<V: Into<crate::model::ListMetadataJobsRequest>>(
5305 mut self,
5306 v: V,
5307 ) -> Self {
5308 self.0.request = v.into();
5309 self
5310 }
5311
5312 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5314 self.0.options = v.into();
5315 self
5316 }
5317
5318 pub async fn send(self) -> Result<crate::model::ListMetadataJobsResponse> {
5320 (*self.0.stub)
5321 .list_metadata_jobs(self.0.request, self.0.options)
5322 .await
5323 .map(crate::Response::into_body)
5324 }
5325
5326 pub fn by_page(
5328 self,
5329 ) -> impl google_cloud_gax::paginator::Paginator<
5330 crate::model::ListMetadataJobsResponse,
5331 crate::Error,
5332 > {
5333 use std::clone::Clone;
5334 let token = self.0.request.page_token.clone();
5335 let execute = move |token: String| {
5336 let mut builder = self.clone();
5337 builder.0.request = builder.0.request.set_page_token(token);
5338 builder.send()
5339 };
5340 google_cloud_gax::paginator::internal::new_paginator(token, execute)
5341 }
5342
5343 pub fn by_item(
5345 self,
5346 ) -> impl google_cloud_gax::paginator::ItemPaginator<
5347 crate::model::ListMetadataJobsResponse,
5348 crate::Error,
5349 > {
5350 use google_cloud_gax::paginator::Paginator;
5351 self.by_page().items()
5352 }
5353
5354 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5358 self.0.request.parent = v.into();
5359 self
5360 }
5361
5362 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5364 self.0.request.page_size = v.into();
5365 self
5366 }
5367
5368 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5370 self.0.request.page_token = v.into();
5371 self
5372 }
5373
5374 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5376 self.0.request.filter = v.into();
5377 self
5378 }
5379
5380 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
5382 self.0.request.order_by = v.into();
5383 self
5384 }
5385 }
5386
5387 #[doc(hidden)]
5388 impl crate::RequestBuilder for ListMetadataJobs {
5389 fn request_options(&mut self) -> &mut crate::RequestOptions {
5390 &mut self.0.options
5391 }
5392 }
5393
5394 #[derive(Clone, Debug)]
5411 pub struct CancelMetadataJob(RequestBuilder<crate::model::CancelMetadataJobRequest>);
5412
5413 impl CancelMetadataJob {
5414 pub(crate) fn new(
5415 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5416 ) -> Self {
5417 Self(RequestBuilder::new(stub))
5418 }
5419
5420 pub fn with_request<V: Into<crate::model::CancelMetadataJobRequest>>(
5422 mut self,
5423 v: V,
5424 ) -> Self {
5425 self.0.request = v.into();
5426 self
5427 }
5428
5429 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5431 self.0.options = v.into();
5432 self
5433 }
5434
5435 pub async fn send(self) -> Result<()> {
5437 (*self.0.stub)
5438 .cancel_metadata_job(self.0.request, self.0.options)
5439 .await
5440 .map(crate::Response::into_body)
5441 }
5442
5443 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5447 self.0.request.name = v.into();
5448 self
5449 }
5450 }
5451
5452 #[doc(hidden)]
5453 impl crate::RequestBuilder for CancelMetadataJob {
5454 fn request_options(&mut self) -> &mut crate::RequestOptions {
5455 &mut self.0.options
5456 }
5457 }
5458
5459 #[derive(Clone, Debug)]
5476 pub struct CreateEntryLink(RequestBuilder<crate::model::CreateEntryLinkRequest>);
5477
5478 impl CreateEntryLink {
5479 pub(crate) fn new(
5480 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5481 ) -> Self {
5482 Self(RequestBuilder::new(stub))
5483 }
5484
5485 pub fn with_request<V: Into<crate::model::CreateEntryLinkRequest>>(mut self, v: V) -> Self {
5487 self.0.request = v.into();
5488 self
5489 }
5490
5491 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5493 self.0.options = v.into();
5494 self
5495 }
5496
5497 pub async fn send(self) -> Result<crate::model::EntryLink> {
5499 (*self.0.stub)
5500 .create_entry_link(self.0.request, self.0.options)
5501 .await
5502 .map(crate::Response::into_body)
5503 }
5504
5505 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5509 self.0.request.parent = v.into();
5510 self
5511 }
5512
5513 pub fn set_entry_link_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5517 self.0.request.entry_link_id = v.into();
5518 self
5519 }
5520
5521 pub fn set_entry_link<T>(mut self, v: T) -> Self
5525 where
5526 T: std::convert::Into<crate::model::EntryLink>,
5527 {
5528 self.0.request.entry_link = std::option::Option::Some(v.into());
5529 self
5530 }
5531
5532 pub fn set_or_clear_entry_link<T>(mut self, v: std::option::Option<T>) -> Self
5536 where
5537 T: std::convert::Into<crate::model::EntryLink>,
5538 {
5539 self.0.request.entry_link = v.map(|x| x.into());
5540 self
5541 }
5542 }
5543
5544 #[doc(hidden)]
5545 impl crate::RequestBuilder for CreateEntryLink {
5546 fn request_options(&mut self) -> &mut crate::RequestOptions {
5547 &mut self.0.options
5548 }
5549 }
5550
5551 #[derive(Clone, Debug)]
5568 pub struct UpdateEntryLink(RequestBuilder<crate::model::UpdateEntryLinkRequest>);
5569
5570 impl UpdateEntryLink {
5571 pub(crate) fn new(
5572 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5573 ) -> Self {
5574 Self(RequestBuilder::new(stub))
5575 }
5576
5577 pub fn with_request<V: Into<crate::model::UpdateEntryLinkRequest>>(mut self, v: V) -> Self {
5579 self.0.request = v.into();
5580 self
5581 }
5582
5583 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5585 self.0.options = v.into();
5586 self
5587 }
5588
5589 pub async fn send(self) -> Result<crate::model::EntryLink> {
5591 (*self.0.stub)
5592 .update_entry_link(self.0.request, self.0.options)
5593 .await
5594 .map(crate::Response::into_body)
5595 }
5596
5597 pub fn set_entry_link<T>(mut self, v: T) -> Self
5601 where
5602 T: std::convert::Into<crate::model::EntryLink>,
5603 {
5604 self.0.request.entry_link = std::option::Option::Some(v.into());
5605 self
5606 }
5607
5608 pub fn set_or_clear_entry_link<T>(mut self, v: std::option::Option<T>) -> Self
5612 where
5613 T: std::convert::Into<crate::model::EntryLink>,
5614 {
5615 self.0.request.entry_link = v.map(|x| x.into());
5616 self
5617 }
5618
5619 pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
5621 self.0.request.allow_missing = v.into();
5622 self
5623 }
5624
5625 pub fn set_aspect_keys<T, V>(mut self, v: T) -> Self
5627 where
5628 T: std::iter::IntoIterator<Item = V>,
5629 V: std::convert::Into<std::string::String>,
5630 {
5631 use std::iter::Iterator;
5632 self.0.request.aspect_keys = v.into_iter().map(|i| i.into()).collect();
5633 self
5634 }
5635 }
5636
5637 #[doc(hidden)]
5638 impl crate::RequestBuilder for UpdateEntryLink {
5639 fn request_options(&mut self) -> &mut crate::RequestOptions {
5640 &mut self.0.options
5641 }
5642 }
5643
5644 #[derive(Clone, Debug)]
5661 pub struct DeleteEntryLink(RequestBuilder<crate::model::DeleteEntryLinkRequest>);
5662
5663 impl DeleteEntryLink {
5664 pub(crate) fn new(
5665 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5666 ) -> Self {
5667 Self(RequestBuilder::new(stub))
5668 }
5669
5670 pub fn with_request<V: Into<crate::model::DeleteEntryLinkRequest>>(mut self, v: V) -> Self {
5672 self.0.request = v.into();
5673 self
5674 }
5675
5676 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5678 self.0.options = v.into();
5679 self
5680 }
5681
5682 pub async fn send(self) -> Result<crate::model::EntryLink> {
5684 (*self.0.stub)
5685 .delete_entry_link(self.0.request, self.0.options)
5686 .await
5687 .map(crate::Response::into_body)
5688 }
5689
5690 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5694 self.0.request.name = v.into();
5695 self
5696 }
5697 }
5698
5699 #[doc(hidden)]
5700 impl crate::RequestBuilder for DeleteEntryLink {
5701 fn request_options(&mut self) -> &mut crate::RequestOptions {
5702 &mut self.0.options
5703 }
5704 }
5705
5706 #[derive(Clone, Debug)]
5727 pub struct LookupEntryLinks(RequestBuilder<crate::model::LookupEntryLinksRequest>);
5728
5729 impl LookupEntryLinks {
5730 pub(crate) fn new(
5731 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5732 ) -> Self {
5733 Self(RequestBuilder::new(stub))
5734 }
5735
5736 pub fn with_request<V: Into<crate::model::LookupEntryLinksRequest>>(
5738 mut self,
5739 v: V,
5740 ) -> Self {
5741 self.0.request = v.into();
5742 self
5743 }
5744
5745 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5747 self.0.options = v.into();
5748 self
5749 }
5750
5751 pub async fn send(self) -> Result<crate::model::LookupEntryLinksResponse> {
5753 (*self.0.stub)
5754 .lookup_entry_links(self.0.request, self.0.options)
5755 .await
5756 .map(crate::Response::into_body)
5757 }
5758
5759 pub fn by_page(
5761 self,
5762 ) -> impl google_cloud_gax::paginator::Paginator<
5763 crate::model::LookupEntryLinksResponse,
5764 crate::Error,
5765 > {
5766 use std::clone::Clone;
5767 let token = self.0.request.page_token.clone();
5768 let execute = move |token: String| {
5769 let mut builder = self.clone();
5770 builder.0.request = builder.0.request.set_page_token(token);
5771 builder.send()
5772 };
5773 google_cloud_gax::paginator::internal::new_paginator(token, execute)
5774 }
5775
5776 pub fn by_item(
5778 self,
5779 ) -> impl google_cloud_gax::paginator::ItemPaginator<
5780 crate::model::LookupEntryLinksResponse,
5781 crate::Error,
5782 > {
5783 use google_cloud_gax::paginator::Paginator;
5784 self.by_page().items()
5785 }
5786
5787 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5791 self.0.request.name = v.into();
5792 self
5793 }
5794
5795 pub fn set_entry<T: Into<std::string::String>>(mut self, v: T) -> Self {
5799 self.0.request.entry = v.into();
5800 self
5801 }
5802
5803 pub fn set_entry_mode<T: Into<crate::model::lookup_entry_links_request::EntryMode>>(
5805 mut self,
5806 v: T,
5807 ) -> Self {
5808 self.0.request.entry_mode = v.into();
5809 self
5810 }
5811
5812 pub fn set_entry_link_types<T, V>(mut self, v: T) -> Self
5814 where
5815 T: std::iter::IntoIterator<Item = V>,
5816 V: std::convert::Into<std::string::String>,
5817 {
5818 use std::iter::Iterator;
5819 self.0.request.entry_link_types = v.into_iter().map(|i| i.into()).collect();
5820 self
5821 }
5822
5823 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5825 self.0.request.page_size = v.into();
5826 self
5827 }
5828
5829 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5831 self.0.request.page_token = v.into();
5832 self
5833 }
5834 }
5835
5836 #[doc(hidden)]
5837 impl crate::RequestBuilder for LookupEntryLinks {
5838 fn request_options(&mut self) -> &mut crate::RequestOptions {
5839 &mut self.0.options
5840 }
5841 }
5842
5843 #[derive(Clone, Debug)]
5860 pub struct LookupContext(RequestBuilder<crate::model::LookupContextRequest>);
5861
5862 impl LookupContext {
5863 pub(crate) fn new(
5864 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5865 ) -> Self {
5866 Self(RequestBuilder::new(stub))
5867 }
5868
5869 pub fn with_request<V: Into<crate::model::LookupContextRequest>>(mut self, v: V) -> Self {
5871 self.0.request = v.into();
5872 self
5873 }
5874
5875 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5877 self.0.options = v.into();
5878 self
5879 }
5880
5881 pub async fn send(self) -> Result<crate::model::LookupContextResponse> {
5883 (*self.0.stub)
5884 .lookup_context(self.0.request, self.0.options)
5885 .await
5886 .map(crate::Response::into_body)
5887 }
5888
5889 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5893 self.0.request.name = v.into();
5894 self
5895 }
5896
5897 pub fn set_resources<T, V>(mut self, v: T) -> Self
5901 where
5902 T: std::iter::IntoIterator<Item = V>,
5903 V: std::convert::Into<std::string::String>,
5904 {
5905 use std::iter::Iterator;
5906 self.0.request.resources = v.into_iter().map(|i| i.into()).collect();
5907 self
5908 }
5909
5910 pub fn set_context<T: Into<std::string::String>>(mut self, v: T) -> Self {
5912 self.0.request.context = v.into();
5913 self
5914 }
5915
5916 pub fn set_options<T, K, V>(mut self, v: T) -> Self
5918 where
5919 T: std::iter::IntoIterator<Item = (K, V)>,
5920 K: std::convert::Into<std::string::String>,
5921 V: std::convert::Into<std::string::String>,
5922 {
5923 self.0.request.options = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
5924 self
5925 }
5926 }
5927
5928 #[doc(hidden)]
5929 impl crate::RequestBuilder for LookupContext {
5930 fn request_options(&mut self) -> &mut crate::RequestOptions {
5931 &mut self.0.options
5932 }
5933 }
5934
5935 #[derive(Clone, Debug)]
5952 pub struct GetEntryLink(RequestBuilder<crate::model::GetEntryLinkRequest>);
5953
5954 impl GetEntryLink {
5955 pub(crate) fn new(
5956 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5957 ) -> Self {
5958 Self(RequestBuilder::new(stub))
5959 }
5960
5961 pub fn with_request<V: Into<crate::model::GetEntryLinkRequest>>(mut self, v: V) -> Self {
5963 self.0.request = v.into();
5964 self
5965 }
5966
5967 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5969 self.0.options = v.into();
5970 self
5971 }
5972
5973 pub async fn send(self) -> Result<crate::model::EntryLink> {
5975 (*self.0.stub)
5976 .get_entry_link(self.0.request, self.0.options)
5977 .await
5978 .map(crate::Response::into_body)
5979 }
5980
5981 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5985 self.0.request.name = v.into();
5986 self
5987 }
5988 }
5989
5990 #[doc(hidden)]
5991 impl crate::RequestBuilder for GetEntryLink {
5992 fn request_options(&mut self) -> &mut crate::RequestOptions {
5993 &mut self.0.options
5994 }
5995 }
5996
5997 #[derive(Clone, Debug)]
6015 pub struct CreateMetadataFeed(RequestBuilder<crate::model::CreateMetadataFeedRequest>);
6016
6017 impl CreateMetadataFeed {
6018 pub(crate) fn new(
6019 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6020 ) -> Self {
6021 Self(RequestBuilder::new(stub))
6022 }
6023
6024 pub fn with_request<V: Into<crate::model::CreateMetadataFeedRequest>>(
6026 mut self,
6027 v: V,
6028 ) -> Self {
6029 self.0.request = v.into();
6030 self
6031 }
6032
6033 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6035 self.0.options = v.into();
6036 self
6037 }
6038
6039 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6046 (*self.0.stub)
6047 .create_metadata_feed(self.0.request, self.0.options)
6048 .await
6049 .map(crate::Response::into_body)
6050 }
6051
6052 pub fn poller(
6054 self,
6055 ) -> impl google_cloud_lro::Poller<crate::model::MetadataFeed, crate::model::OperationMetadata>
6056 {
6057 type Operation = google_cloud_lro::internal::Operation<
6058 crate::model::MetadataFeed,
6059 crate::model::OperationMetadata,
6060 >;
6061 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6062 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6063 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
6064 if let Some(ref mut details) = poller_options.tracing {
6065 details.method_name = "google_cloud_dataplex_v1::client::CatalogService::create_metadata_feed::until_done";
6066 }
6067
6068 let stub = self.0.stub.clone();
6069 let mut options = self.0.options.clone();
6070 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6071 let query = move |name| {
6072 let stub = stub.clone();
6073 let options = options.clone();
6074 async {
6075 let op = GetOperation::new(stub)
6076 .set_name(name)
6077 .with_options(options)
6078 .send()
6079 .await?;
6080 Ok(Operation::new(op))
6081 }
6082 };
6083
6084 let start = move || async {
6085 let op = self.send().await?;
6086 Ok(Operation::new(op))
6087 };
6088
6089 use google_cloud_lro::internal::PollerExt;
6090 {
6091 google_cloud_lro::internal::new_poller(
6092 polling_error_policy,
6093 polling_backoff_policy,
6094 start,
6095 query,
6096 )
6097 }
6098 .with_options(poller_options)
6099 }
6100
6101 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6105 self.0.request.parent = v.into();
6106 self
6107 }
6108
6109 pub fn set_metadata_feed<T>(mut self, v: T) -> Self
6113 where
6114 T: std::convert::Into<crate::model::MetadataFeed>,
6115 {
6116 self.0.request.metadata_feed = std::option::Option::Some(v.into());
6117 self
6118 }
6119
6120 pub fn set_or_clear_metadata_feed<T>(mut self, v: std::option::Option<T>) -> Self
6124 where
6125 T: std::convert::Into<crate::model::MetadataFeed>,
6126 {
6127 self.0.request.metadata_feed = v.map(|x| x.into());
6128 self
6129 }
6130
6131 pub fn set_metadata_feed_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6133 self.0.request.metadata_feed_id = v.into();
6134 self
6135 }
6136
6137 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
6139 self.0.request.validate_only = v.into();
6140 self
6141 }
6142 }
6143
6144 #[doc(hidden)]
6145 impl crate::RequestBuilder for CreateMetadataFeed {
6146 fn request_options(&mut self) -> &mut crate::RequestOptions {
6147 &mut self.0.options
6148 }
6149 }
6150
6151 #[derive(Clone, Debug)]
6168 pub struct GetMetadataFeed(RequestBuilder<crate::model::GetMetadataFeedRequest>);
6169
6170 impl GetMetadataFeed {
6171 pub(crate) fn new(
6172 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6173 ) -> Self {
6174 Self(RequestBuilder::new(stub))
6175 }
6176
6177 pub fn with_request<V: Into<crate::model::GetMetadataFeedRequest>>(mut self, v: V) -> Self {
6179 self.0.request = v.into();
6180 self
6181 }
6182
6183 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6185 self.0.options = v.into();
6186 self
6187 }
6188
6189 pub async fn send(self) -> Result<crate::model::MetadataFeed> {
6191 (*self.0.stub)
6192 .get_metadata_feed(self.0.request, self.0.options)
6193 .await
6194 .map(crate::Response::into_body)
6195 }
6196
6197 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6201 self.0.request.name = v.into();
6202 self
6203 }
6204 }
6205
6206 #[doc(hidden)]
6207 impl crate::RequestBuilder for GetMetadataFeed {
6208 fn request_options(&mut self) -> &mut crate::RequestOptions {
6209 &mut self.0.options
6210 }
6211 }
6212
6213 #[derive(Clone, Debug)]
6234 pub struct ListMetadataFeeds(RequestBuilder<crate::model::ListMetadataFeedsRequest>);
6235
6236 impl ListMetadataFeeds {
6237 pub(crate) fn new(
6238 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6239 ) -> Self {
6240 Self(RequestBuilder::new(stub))
6241 }
6242
6243 pub fn with_request<V: Into<crate::model::ListMetadataFeedsRequest>>(
6245 mut self,
6246 v: V,
6247 ) -> Self {
6248 self.0.request = v.into();
6249 self
6250 }
6251
6252 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6254 self.0.options = v.into();
6255 self
6256 }
6257
6258 pub async fn send(self) -> Result<crate::model::ListMetadataFeedsResponse> {
6260 (*self.0.stub)
6261 .list_metadata_feeds(self.0.request, self.0.options)
6262 .await
6263 .map(crate::Response::into_body)
6264 }
6265
6266 pub fn by_page(
6268 self,
6269 ) -> impl google_cloud_gax::paginator::Paginator<
6270 crate::model::ListMetadataFeedsResponse,
6271 crate::Error,
6272 > {
6273 use std::clone::Clone;
6274 let token = self.0.request.page_token.clone();
6275 let execute = move |token: String| {
6276 let mut builder = self.clone();
6277 builder.0.request = builder.0.request.set_page_token(token);
6278 builder.send()
6279 };
6280 google_cloud_gax::paginator::internal::new_paginator(token, execute)
6281 }
6282
6283 pub fn by_item(
6285 self,
6286 ) -> impl google_cloud_gax::paginator::ItemPaginator<
6287 crate::model::ListMetadataFeedsResponse,
6288 crate::Error,
6289 > {
6290 use google_cloud_gax::paginator::Paginator;
6291 self.by_page().items()
6292 }
6293
6294 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6298 self.0.request.parent = v.into();
6299 self
6300 }
6301
6302 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6304 self.0.request.page_size = v.into();
6305 self
6306 }
6307
6308 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6310 self.0.request.page_token = v.into();
6311 self
6312 }
6313
6314 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6316 self.0.request.filter = v.into();
6317 self
6318 }
6319
6320 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
6322 self.0.request.order_by = v.into();
6323 self
6324 }
6325 }
6326
6327 #[doc(hidden)]
6328 impl crate::RequestBuilder for ListMetadataFeeds {
6329 fn request_options(&mut self) -> &mut crate::RequestOptions {
6330 &mut self.0.options
6331 }
6332 }
6333
6334 #[derive(Clone, Debug)]
6352 pub struct DeleteMetadataFeed(RequestBuilder<crate::model::DeleteMetadataFeedRequest>);
6353
6354 impl DeleteMetadataFeed {
6355 pub(crate) fn new(
6356 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6357 ) -> Self {
6358 Self(RequestBuilder::new(stub))
6359 }
6360
6361 pub fn with_request<V: Into<crate::model::DeleteMetadataFeedRequest>>(
6363 mut self,
6364 v: V,
6365 ) -> Self {
6366 self.0.request = v.into();
6367 self
6368 }
6369
6370 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6372 self.0.options = v.into();
6373 self
6374 }
6375
6376 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6383 (*self.0.stub)
6384 .delete_metadata_feed(self.0.request, self.0.options)
6385 .await
6386 .map(crate::Response::into_body)
6387 }
6388
6389 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
6391 type Operation =
6392 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
6393 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6394 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6395 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
6396 if let Some(ref mut details) = poller_options.tracing {
6397 details.method_name = "google_cloud_dataplex_v1::client::CatalogService::delete_metadata_feed::until_done";
6398 }
6399
6400 let stub = self.0.stub.clone();
6401 let mut options = self.0.options.clone();
6402 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6403 let query = move |name| {
6404 let stub = stub.clone();
6405 let options = options.clone();
6406 async {
6407 let op = GetOperation::new(stub)
6408 .set_name(name)
6409 .with_options(options)
6410 .send()
6411 .await?;
6412 Ok(Operation::new(op))
6413 }
6414 };
6415
6416 let start = move || async {
6417 let op = self.send().await?;
6418 Ok(Operation::new(op))
6419 };
6420
6421 use google_cloud_lro::internal::PollerExt;
6422 {
6423 google_cloud_lro::internal::new_unit_response_poller(
6424 polling_error_policy,
6425 polling_backoff_policy,
6426 start,
6427 query,
6428 )
6429 }
6430 .with_options(poller_options)
6431 }
6432
6433 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6437 self.0.request.name = v.into();
6438 self
6439 }
6440 }
6441
6442 #[doc(hidden)]
6443 impl crate::RequestBuilder for DeleteMetadataFeed {
6444 fn request_options(&mut self) -> &mut crate::RequestOptions {
6445 &mut self.0.options
6446 }
6447 }
6448
6449 #[derive(Clone, Debug)]
6467 pub struct UpdateMetadataFeed(RequestBuilder<crate::model::UpdateMetadataFeedRequest>);
6468
6469 impl UpdateMetadataFeed {
6470 pub(crate) fn new(
6471 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6472 ) -> Self {
6473 Self(RequestBuilder::new(stub))
6474 }
6475
6476 pub fn with_request<V: Into<crate::model::UpdateMetadataFeedRequest>>(
6478 mut self,
6479 v: V,
6480 ) -> Self {
6481 self.0.request = v.into();
6482 self
6483 }
6484
6485 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6487 self.0.options = v.into();
6488 self
6489 }
6490
6491 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6498 (*self.0.stub)
6499 .update_metadata_feed(self.0.request, self.0.options)
6500 .await
6501 .map(crate::Response::into_body)
6502 }
6503
6504 pub fn poller(
6506 self,
6507 ) -> impl google_cloud_lro::Poller<crate::model::MetadataFeed, crate::model::OperationMetadata>
6508 {
6509 type Operation = google_cloud_lro::internal::Operation<
6510 crate::model::MetadataFeed,
6511 crate::model::OperationMetadata,
6512 >;
6513 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6514 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6515 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
6516 if let Some(ref mut details) = poller_options.tracing {
6517 details.method_name = "google_cloud_dataplex_v1::client::CatalogService::update_metadata_feed::until_done";
6518 }
6519
6520 let stub = self.0.stub.clone();
6521 let mut options = self.0.options.clone();
6522 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6523 let query = move |name| {
6524 let stub = stub.clone();
6525 let options = options.clone();
6526 async {
6527 let op = GetOperation::new(stub)
6528 .set_name(name)
6529 .with_options(options)
6530 .send()
6531 .await?;
6532 Ok(Operation::new(op))
6533 }
6534 };
6535
6536 let start = move || async {
6537 let op = self.send().await?;
6538 Ok(Operation::new(op))
6539 };
6540
6541 use google_cloud_lro::internal::PollerExt;
6542 {
6543 google_cloud_lro::internal::new_poller(
6544 polling_error_policy,
6545 polling_backoff_policy,
6546 start,
6547 query,
6548 )
6549 }
6550 .with_options(poller_options)
6551 }
6552
6553 pub fn set_metadata_feed<T>(mut self, v: T) -> Self
6557 where
6558 T: std::convert::Into<crate::model::MetadataFeed>,
6559 {
6560 self.0.request.metadata_feed = std::option::Option::Some(v.into());
6561 self
6562 }
6563
6564 pub fn set_or_clear_metadata_feed<T>(mut self, v: std::option::Option<T>) -> Self
6568 where
6569 T: std::convert::Into<crate::model::MetadataFeed>,
6570 {
6571 self.0.request.metadata_feed = v.map(|x| x.into());
6572 self
6573 }
6574
6575 pub fn set_update_mask<T>(mut self, v: T) -> Self
6577 where
6578 T: std::convert::Into<wkt::FieldMask>,
6579 {
6580 self.0.request.update_mask = std::option::Option::Some(v.into());
6581 self
6582 }
6583
6584 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6586 where
6587 T: std::convert::Into<wkt::FieldMask>,
6588 {
6589 self.0.request.update_mask = v.map(|x| x.into());
6590 self
6591 }
6592
6593 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
6595 self.0.request.validate_only = v.into();
6596 self
6597 }
6598 }
6599
6600 #[doc(hidden)]
6601 impl crate::RequestBuilder for UpdateMetadataFeed {
6602 fn request_options(&mut self) -> &mut crate::RequestOptions {
6603 &mut self.0.options
6604 }
6605 }
6606
6607 #[derive(Clone, Debug)]
6628 pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
6629
6630 impl ListLocations {
6631 pub(crate) fn new(
6632 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6633 ) -> Self {
6634 Self(RequestBuilder::new(stub))
6635 }
6636
6637 pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
6639 mut self,
6640 v: V,
6641 ) -> Self {
6642 self.0.request = v.into();
6643 self
6644 }
6645
6646 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6648 self.0.options = v.into();
6649 self
6650 }
6651
6652 pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
6654 (*self.0.stub)
6655 .list_locations(self.0.request, self.0.options)
6656 .await
6657 .map(crate::Response::into_body)
6658 }
6659
6660 pub fn by_page(
6662 self,
6663 ) -> impl google_cloud_gax::paginator::Paginator<
6664 google_cloud_location::model::ListLocationsResponse,
6665 crate::Error,
6666 > {
6667 use std::clone::Clone;
6668 let token = self.0.request.page_token.clone();
6669 let execute = move |token: String| {
6670 let mut builder = self.clone();
6671 builder.0.request = builder.0.request.set_page_token(token);
6672 builder.send()
6673 };
6674 google_cloud_gax::paginator::internal::new_paginator(token, execute)
6675 }
6676
6677 pub fn by_item(
6679 self,
6680 ) -> impl google_cloud_gax::paginator::ItemPaginator<
6681 google_cloud_location::model::ListLocationsResponse,
6682 crate::Error,
6683 > {
6684 use google_cloud_gax::paginator::Paginator;
6685 self.by_page().items()
6686 }
6687
6688 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6690 self.0.request.name = v.into();
6691 self
6692 }
6693
6694 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6696 self.0.request.filter = v.into();
6697 self
6698 }
6699
6700 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6702 self.0.request.page_size = v.into();
6703 self
6704 }
6705
6706 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6708 self.0.request.page_token = v.into();
6709 self
6710 }
6711 }
6712
6713 #[doc(hidden)]
6714 impl crate::RequestBuilder for ListLocations {
6715 fn request_options(&mut self) -> &mut crate::RequestOptions {
6716 &mut self.0.options
6717 }
6718 }
6719
6720 #[derive(Clone, Debug)]
6737 pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
6738
6739 impl GetLocation {
6740 pub(crate) fn new(
6741 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6742 ) -> Self {
6743 Self(RequestBuilder::new(stub))
6744 }
6745
6746 pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
6748 mut self,
6749 v: V,
6750 ) -> Self {
6751 self.0.request = v.into();
6752 self
6753 }
6754
6755 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6757 self.0.options = v.into();
6758 self
6759 }
6760
6761 pub async fn send(self) -> Result<google_cloud_location::model::Location> {
6763 (*self.0.stub)
6764 .get_location(self.0.request, self.0.options)
6765 .await
6766 .map(crate::Response::into_body)
6767 }
6768
6769 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6771 self.0.request.name = v.into();
6772 self
6773 }
6774 }
6775
6776 #[doc(hidden)]
6777 impl crate::RequestBuilder for GetLocation {
6778 fn request_options(&mut self) -> &mut crate::RequestOptions {
6779 &mut self.0.options
6780 }
6781 }
6782
6783 #[derive(Clone, Debug)]
6800 pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
6801
6802 impl SetIamPolicy {
6803 pub(crate) fn new(
6804 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6805 ) -> Self {
6806 Self(RequestBuilder::new(stub))
6807 }
6808
6809 pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
6811 mut self,
6812 v: V,
6813 ) -> Self {
6814 self.0.request = v.into();
6815 self
6816 }
6817
6818 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6820 self.0.options = v.into();
6821 self
6822 }
6823
6824 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
6826 (*self.0.stub)
6827 .set_iam_policy(self.0.request, self.0.options)
6828 .await
6829 .map(crate::Response::into_body)
6830 }
6831
6832 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
6836 self.0.request.resource = v.into();
6837 self
6838 }
6839
6840 pub fn set_policy<T>(mut self, v: T) -> Self
6844 where
6845 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
6846 {
6847 self.0.request.policy = std::option::Option::Some(v.into());
6848 self
6849 }
6850
6851 pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
6855 where
6856 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
6857 {
6858 self.0.request.policy = v.map(|x| x.into());
6859 self
6860 }
6861
6862 pub fn set_update_mask<T>(mut self, v: T) -> Self
6864 where
6865 T: std::convert::Into<wkt::FieldMask>,
6866 {
6867 self.0.request.update_mask = std::option::Option::Some(v.into());
6868 self
6869 }
6870
6871 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6873 where
6874 T: std::convert::Into<wkt::FieldMask>,
6875 {
6876 self.0.request.update_mask = v.map(|x| x.into());
6877 self
6878 }
6879 }
6880
6881 #[doc(hidden)]
6882 impl crate::RequestBuilder for SetIamPolicy {
6883 fn request_options(&mut self) -> &mut crate::RequestOptions {
6884 &mut self.0.options
6885 }
6886 }
6887
6888 #[derive(Clone, Debug)]
6905 pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
6906
6907 impl GetIamPolicy {
6908 pub(crate) fn new(
6909 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6910 ) -> Self {
6911 Self(RequestBuilder::new(stub))
6912 }
6913
6914 pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
6916 mut self,
6917 v: V,
6918 ) -> Self {
6919 self.0.request = v.into();
6920 self
6921 }
6922
6923 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6925 self.0.options = v.into();
6926 self
6927 }
6928
6929 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
6931 (*self.0.stub)
6932 .get_iam_policy(self.0.request, self.0.options)
6933 .await
6934 .map(crate::Response::into_body)
6935 }
6936
6937 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
6941 self.0.request.resource = v.into();
6942 self
6943 }
6944
6945 pub fn set_options<T>(mut self, v: T) -> Self
6947 where
6948 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
6949 {
6950 self.0.request.options = std::option::Option::Some(v.into());
6951 self
6952 }
6953
6954 pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
6956 where
6957 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
6958 {
6959 self.0.request.options = v.map(|x| x.into());
6960 self
6961 }
6962 }
6963
6964 #[doc(hidden)]
6965 impl crate::RequestBuilder for GetIamPolicy {
6966 fn request_options(&mut self) -> &mut crate::RequestOptions {
6967 &mut self.0.options
6968 }
6969 }
6970
6971 #[derive(Clone, Debug)]
6988 pub struct TestIamPermissions(
6989 RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
6990 );
6991
6992 impl TestIamPermissions {
6993 pub(crate) fn new(
6994 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6995 ) -> Self {
6996 Self(RequestBuilder::new(stub))
6997 }
6998
6999 pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
7001 mut self,
7002 v: V,
7003 ) -> Self {
7004 self.0.request = v.into();
7005 self
7006 }
7007
7008 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7010 self.0.options = v.into();
7011 self
7012 }
7013
7014 pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
7016 (*self.0.stub)
7017 .test_iam_permissions(self.0.request, self.0.options)
7018 .await
7019 .map(crate::Response::into_body)
7020 }
7021
7022 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
7026 self.0.request.resource = v.into();
7027 self
7028 }
7029
7030 pub fn set_permissions<T, V>(mut self, v: T) -> Self
7034 where
7035 T: std::iter::IntoIterator<Item = V>,
7036 V: std::convert::Into<std::string::String>,
7037 {
7038 use std::iter::Iterator;
7039 self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
7040 self
7041 }
7042 }
7043
7044 #[doc(hidden)]
7045 impl crate::RequestBuilder for TestIamPermissions {
7046 fn request_options(&mut self) -> &mut crate::RequestOptions {
7047 &mut self.0.options
7048 }
7049 }
7050
7051 #[derive(Clone, Debug)]
7072 pub struct ListOperations(
7073 RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
7074 );
7075
7076 impl ListOperations {
7077 pub(crate) fn new(
7078 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
7079 ) -> Self {
7080 Self(RequestBuilder::new(stub))
7081 }
7082
7083 pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
7085 mut self,
7086 v: V,
7087 ) -> Self {
7088 self.0.request = v.into();
7089 self
7090 }
7091
7092 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7094 self.0.options = v.into();
7095 self
7096 }
7097
7098 pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
7100 (*self.0.stub)
7101 .list_operations(self.0.request, self.0.options)
7102 .await
7103 .map(crate::Response::into_body)
7104 }
7105
7106 pub fn by_page(
7108 self,
7109 ) -> impl google_cloud_gax::paginator::Paginator<
7110 google_cloud_longrunning::model::ListOperationsResponse,
7111 crate::Error,
7112 > {
7113 use std::clone::Clone;
7114 let token = self.0.request.page_token.clone();
7115 let execute = move |token: String| {
7116 let mut builder = self.clone();
7117 builder.0.request = builder.0.request.set_page_token(token);
7118 builder.send()
7119 };
7120 google_cloud_gax::paginator::internal::new_paginator(token, execute)
7121 }
7122
7123 pub fn by_item(
7125 self,
7126 ) -> impl google_cloud_gax::paginator::ItemPaginator<
7127 google_cloud_longrunning::model::ListOperationsResponse,
7128 crate::Error,
7129 > {
7130 use google_cloud_gax::paginator::Paginator;
7131 self.by_page().items()
7132 }
7133
7134 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7136 self.0.request.name = v.into();
7137 self
7138 }
7139
7140 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7142 self.0.request.filter = v.into();
7143 self
7144 }
7145
7146 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7148 self.0.request.page_size = v.into();
7149 self
7150 }
7151
7152 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7154 self.0.request.page_token = v.into();
7155 self
7156 }
7157
7158 pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
7160 self.0.request.return_partial_success = v.into();
7161 self
7162 }
7163 }
7164
7165 #[doc(hidden)]
7166 impl crate::RequestBuilder for ListOperations {
7167 fn request_options(&mut self) -> &mut crate::RequestOptions {
7168 &mut self.0.options
7169 }
7170 }
7171
7172 #[derive(Clone, Debug)]
7189 pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
7190
7191 impl GetOperation {
7192 pub(crate) fn new(
7193 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
7194 ) -> Self {
7195 Self(RequestBuilder::new(stub))
7196 }
7197
7198 pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
7200 mut self,
7201 v: V,
7202 ) -> Self {
7203 self.0.request = v.into();
7204 self
7205 }
7206
7207 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7209 self.0.options = v.into();
7210 self
7211 }
7212
7213 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7215 (*self.0.stub)
7216 .get_operation(self.0.request, self.0.options)
7217 .await
7218 .map(crate::Response::into_body)
7219 }
7220
7221 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7223 self.0.request.name = v.into();
7224 self
7225 }
7226 }
7227
7228 #[doc(hidden)]
7229 impl crate::RequestBuilder for GetOperation {
7230 fn request_options(&mut self) -> &mut crate::RequestOptions {
7231 &mut self.0.options
7232 }
7233 }
7234
7235 #[derive(Clone, Debug)]
7252 pub struct DeleteOperation(
7253 RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
7254 );
7255
7256 impl DeleteOperation {
7257 pub(crate) fn new(
7258 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
7259 ) -> Self {
7260 Self(RequestBuilder::new(stub))
7261 }
7262
7263 pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
7265 mut self,
7266 v: V,
7267 ) -> Self {
7268 self.0.request = v.into();
7269 self
7270 }
7271
7272 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7274 self.0.options = v.into();
7275 self
7276 }
7277
7278 pub async fn send(self) -> Result<()> {
7280 (*self.0.stub)
7281 .delete_operation(self.0.request, self.0.options)
7282 .await
7283 .map(crate::Response::into_body)
7284 }
7285
7286 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7288 self.0.request.name = v.into();
7289 self
7290 }
7291 }
7292
7293 #[doc(hidden)]
7294 impl crate::RequestBuilder for DeleteOperation {
7295 fn request_options(&mut self) -> &mut crate::RequestOptions {
7296 &mut self.0.options
7297 }
7298 }
7299
7300 #[derive(Clone, Debug)]
7317 pub struct CancelOperation(
7318 RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
7319 );
7320
7321 impl CancelOperation {
7322 pub(crate) fn new(
7323 stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
7324 ) -> Self {
7325 Self(RequestBuilder::new(stub))
7326 }
7327
7328 pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
7330 mut self,
7331 v: V,
7332 ) -> Self {
7333 self.0.request = v.into();
7334 self
7335 }
7336
7337 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7339 self.0.options = v.into();
7340 self
7341 }
7342
7343 pub async fn send(self) -> Result<()> {
7345 (*self.0.stub)
7346 .cancel_operation(self.0.request, self.0.options)
7347 .await
7348 .map(crate::Response::into_body)
7349 }
7350
7351 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7353 self.0.request.name = v.into();
7354 self
7355 }
7356 }
7357
7358 #[doc(hidden)]
7359 impl crate::RequestBuilder for CancelOperation {
7360 fn request_options(&mut self) -> &mut crate::RequestOptions {
7361 &mut self.0.options
7362 }
7363 }
7364}
7365
7366pub mod cmek_service {
7368 use crate::Result;
7369
7370 pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
7384
7385 pub(crate) mod client {
7386 use super::super::super::client::CmekService;
7387 pub struct Factory;
7388 impl crate::ClientFactory for Factory {
7389 type Client = CmekService;
7390 type Credentials = gaxi::options::Credentials;
7391 async fn build(
7392 self,
7393 config: gaxi::options::ClientConfig,
7394 ) -> crate::ClientBuilderResult<Self::Client> {
7395 Self::Client::new(config).await
7396 }
7397 }
7398 }
7399
7400 #[derive(Clone, Debug)]
7402 pub(crate) struct RequestBuilder<R: std::default::Default> {
7403 stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7404 request: R,
7405 options: crate::RequestOptions,
7406 }
7407
7408 impl<R> RequestBuilder<R>
7409 where
7410 R: std::default::Default,
7411 {
7412 pub(crate) fn new(
7413 stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7414 ) -> Self {
7415 Self {
7416 stub,
7417 request: R::default(),
7418 options: crate::RequestOptions::default(),
7419 }
7420 }
7421 }
7422
7423 #[derive(Clone, Debug)]
7441 pub struct CreateEncryptionConfig(RequestBuilder<crate::model::CreateEncryptionConfigRequest>);
7442
7443 impl CreateEncryptionConfig {
7444 pub(crate) fn new(
7445 stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7446 ) -> Self {
7447 Self(RequestBuilder::new(stub))
7448 }
7449
7450 pub fn with_request<V: Into<crate::model::CreateEncryptionConfigRequest>>(
7452 mut self,
7453 v: V,
7454 ) -> Self {
7455 self.0.request = v.into();
7456 self
7457 }
7458
7459 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7461 self.0.options = v.into();
7462 self
7463 }
7464
7465 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7472 (*self.0.stub)
7473 .create_encryption_config(self.0.request, self.0.options)
7474 .await
7475 .map(crate::Response::into_body)
7476 }
7477
7478 pub fn poller(
7480 self,
7481 ) -> impl google_cloud_lro::Poller<crate::model::EncryptionConfig, crate::model::OperationMetadata>
7482 {
7483 type Operation = google_cloud_lro::internal::Operation<
7484 crate::model::EncryptionConfig,
7485 crate::model::OperationMetadata,
7486 >;
7487 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7488 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7489 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
7490 if let Some(ref mut details) = poller_options.tracing {
7491 details.method_name = "google_cloud_dataplex_v1::client::CmekService::create_encryption_config::until_done";
7492 }
7493
7494 let stub = self.0.stub.clone();
7495 let mut options = self.0.options.clone();
7496 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7497 let query = move |name| {
7498 let stub = stub.clone();
7499 let options = options.clone();
7500 async {
7501 let op = GetOperation::new(stub)
7502 .set_name(name)
7503 .with_options(options)
7504 .send()
7505 .await?;
7506 Ok(Operation::new(op))
7507 }
7508 };
7509
7510 let start = move || async {
7511 let op = self.send().await?;
7512 Ok(Operation::new(op))
7513 };
7514
7515 use google_cloud_lro::internal::PollerExt;
7516 {
7517 google_cloud_lro::internal::new_poller(
7518 polling_error_policy,
7519 polling_backoff_policy,
7520 start,
7521 query,
7522 )
7523 }
7524 .with_options(poller_options)
7525 }
7526
7527 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7531 self.0.request.parent = v.into();
7532 self
7533 }
7534
7535 pub fn set_encryption_config_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
7539 self.0.request.encryption_config_id = v.into();
7540 self
7541 }
7542
7543 pub fn set_encryption_config<T>(mut self, v: T) -> Self
7547 where
7548 T: std::convert::Into<crate::model::EncryptionConfig>,
7549 {
7550 self.0.request.encryption_config = std::option::Option::Some(v.into());
7551 self
7552 }
7553
7554 pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
7558 where
7559 T: std::convert::Into<crate::model::EncryptionConfig>,
7560 {
7561 self.0.request.encryption_config = v.map(|x| x.into());
7562 self
7563 }
7564 }
7565
7566 #[doc(hidden)]
7567 impl crate::RequestBuilder for CreateEncryptionConfig {
7568 fn request_options(&mut self) -> &mut crate::RequestOptions {
7569 &mut self.0.options
7570 }
7571 }
7572
7573 #[derive(Clone, Debug)]
7591 pub struct UpdateEncryptionConfig(RequestBuilder<crate::model::UpdateEncryptionConfigRequest>);
7592
7593 impl UpdateEncryptionConfig {
7594 pub(crate) fn new(
7595 stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7596 ) -> Self {
7597 Self(RequestBuilder::new(stub))
7598 }
7599
7600 pub fn with_request<V: Into<crate::model::UpdateEncryptionConfigRequest>>(
7602 mut self,
7603 v: V,
7604 ) -> Self {
7605 self.0.request = v.into();
7606 self
7607 }
7608
7609 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7611 self.0.options = v.into();
7612 self
7613 }
7614
7615 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7622 (*self.0.stub)
7623 .update_encryption_config(self.0.request, self.0.options)
7624 .await
7625 .map(crate::Response::into_body)
7626 }
7627
7628 pub fn poller(
7630 self,
7631 ) -> impl google_cloud_lro::Poller<crate::model::EncryptionConfig, crate::model::OperationMetadata>
7632 {
7633 type Operation = google_cloud_lro::internal::Operation<
7634 crate::model::EncryptionConfig,
7635 crate::model::OperationMetadata,
7636 >;
7637 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7638 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7639 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
7640 if let Some(ref mut details) = poller_options.tracing {
7641 details.method_name = "google_cloud_dataplex_v1::client::CmekService::update_encryption_config::until_done";
7642 }
7643
7644 let stub = self.0.stub.clone();
7645 let mut options = self.0.options.clone();
7646 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7647 let query = move |name| {
7648 let stub = stub.clone();
7649 let options = options.clone();
7650 async {
7651 let op = GetOperation::new(stub)
7652 .set_name(name)
7653 .with_options(options)
7654 .send()
7655 .await?;
7656 Ok(Operation::new(op))
7657 }
7658 };
7659
7660 let start = move || async {
7661 let op = self.send().await?;
7662 Ok(Operation::new(op))
7663 };
7664
7665 use google_cloud_lro::internal::PollerExt;
7666 {
7667 google_cloud_lro::internal::new_poller(
7668 polling_error_policy,
7669 polling_backoff_policy,
7670 start,
7671 query,
7672 )
7673 }
7674 .with_options(poller_options)
7675 }
7676
7677 pub fn set_encryption_config<T>(mut self, v: T) -> Self
7681 where
7682 T: std::convert::Into<crate::model::EncryptionConfig>,
7683 {
7684 self.0.request.encryption_config = std::option::Option::Some(v.into());
7685 self
7686 }
7687
7688 pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
7692 where
7693 T: std::convert::Into<crate::model::EncryptionConfig>,
7694 {
7695 self.0.request.encryption_config = v.map(|x| x.into());
7696 self
7697 }
7698
7699 pub fn set_update_mask<T>(mut self, v: T) -> Self
7701 where
7702 T: std::convert::Into<wkt::FieldMask>,
7703 {
7704 self.0.request.update_mask = std::option::Option::Some(v.into());
7705 self
7706 }
7707
7708 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7710 where
7711 T: std::convert::Into<wkt::FieldMask>,
7712 {
7713 self.0.request.update_mask = v.map(|x| x.into());
7714 self
7715 }
7716 }
7717
7718 #[doc(hidden)]
7719 impl crate::RequestBuilder for UpdateEncryptionConfig {
7720 fn request_options(&mut self) -> &mut crate::RequestOptions {
7721 &mut self.0.options
7722 }
7723 }
7724
7725 #[derive(Clone, Debug)]
7743 pub struct DeleteEncryptionConfig(RequestBuilder<crate::model::DeleteEncryptionConfigRequest>);
7744
7745 impl DeleteEncryptionConfig {
7746 pub(crate) fn new(
7747 stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7748 ) -> Self {
7749 Self(RequestBuilder::new(stub))
7750 }
7751
7752 pub fn with_request<V: Into<crate::model::DeleteEncryptionConfigRequest>>(
7754 mut self,
7755 v: V,
7756 ) -> Self {
7757 self.0.request = v.into();
7758 self
7759 }
7760
7761 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7763 self.0.options = v.into();
7764 self
7765 }
7766
7767 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
7774 (*self.0.stub)
7775 .delete_encryption_config(self.0.request, self.0.options)
7776 .await
7777 .map(crate::Response::into_body)
7778 }
7779
7780 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
7782 type Operation =
7783 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
7784 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
7785 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
7786 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
7787 if let Some(ref mut details) = poller_options.tracing {
7788 details.method_name = "google_cloud_dataplex_v1::client::CmekService::delete_encryption_config::until_done";
7789 }
7790
7791 let stub = self.0.stub.clone();
7792 let mut options = self.0.options.clone();
7793 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
7794 let query = move |name| {
7795 let stub = stub.clone();
7796 let options = options.clone();
7797 async {
7798 let op = GetOperation::new(stub)
7799 .set_name(name)
7800 .with_options(options)
7801 .send()
7802 .await?;
7803 Ok(Operation::new(op))
7804 }
7805 };
7806
7807 let start = move || async {
7808 let op = self.send().await?;
7809 Ok(Operation::new(op))
7810 };
7811
7812 use google_cloud_lro::internal::PollerExt;
7813 {
7814 google_cloud_lro::internal::new_unit_response_poller(
7815 polling_error_policy,
7816 polling_backoff_policy,
7817 start,
7818 query,
7819 )
7820 }
7821 .with_options(poller_options)
7822 }
7823
7824 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7828 self.0.request.name = v.into();
7829 self
7830 }
7831
7832 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
7834 self.0.request.etag = v.into();
7835 self
7836 }
7837 }
7838
7839 #[doc(hidden)]
7840 impl crate::RequestBuilder for DeleteEncryptionConfig {
7841 fn request_options(&mut self) -> &mut crate::RequestOptions {
7842 &mut self.0.options
7843 }
7844 }
7845
7846 #[derive(Clone, Debug)]
7867 pub struct ListEncryptionConfigs(RequestBuilder<crate::model::ListEncryptionConfigsRequest>);
7868
7869 impl ListEncryptionConfigs {
7870 pub(crate) fn new(
7871 stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7872 ) -> Self {
7873 Self(RequestBuilder::new(stub))
7874 }
7875
7876 pub fn with_request<V: Into<crate::model::ListEncryptionConfigsRequest>>(
7878 mut self,
7879 v: V,
7880 ) -> Self {
7881 self.0.request = v.into();
7882 self
7883 }
7884
7885 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
7887 self.0.options = v.into();
7888 self
7889 }
7890
7891 pub async fn send(self) -> Result<crate::model::ListEncryptionConfigsResponse> {
7893 (*self.0.stub)
7894 .list_encryption_configs(self.0.request, self.0.options)
7895 .await
7896 .map(crate::Response::into_body)
7897 }
7898
7899 pub fn by_page(
7901 self,
7902 ) -> impl google_cloud_gax::paginator::Paginator<
7903 crate::model::ListEncryptionConfigsResponse,
7904 crate::Error,
7905 > {
7906 use std::clone::Clone;
7907 let token = self.0.request.page_token.clone();
7908 let execute = move |token: String| {
7909 let mut builder = self.clone();
7910 builder.0.request = builder.0.request.set_page_token(token);
7911 builder.send()
7912 };
7913 google_cloud_gax::paginator::internal::new_paginator(token, execute)
7914 }
7915
7916 pub fn by_item(
7918 self,
7919 ) -> impl google_cloud_gax::paginator::ItemPaginator<
7920 crate::model::ListEncryptionConfigsResponse,
7921 crate::Error,
7922 > {
7923 use google_cloud_gax::paginator::Paginator;
7924 self.by_page().items()
7925 }
7926
7927 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7931 self.0.request.parent = v.into();
7932 self
7933 }
7934
7935 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7937 self.0.request.page_size = v.into();
7938 self
7939 }
7940
7941 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7943 self.0.request.page_token = v.into();
7944 self
7945 }
7946
7947 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7949 self.0.request.filter = v.into();
7950 self
7951 }
7952
7953 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
7955 self.0.request.order_by = v.into();
7956 self
7957 }
7958 }
7959
7960 #[doc(hidden)]
7961 impl crate::RequestBuilder for ListEncryptionConfigs {
7962 fn request_options(&mut self) -> &mut crate::RequestOptions {
7963 &mut self.0.options
7964 }
7965 }
7966
7967 #[derive(Clone, Debug)]
7984 pub struct GetEncryptionConfig(RequestBuilder<crate::model::GetEncryptionConfigRequest>);
7985
7986 impl GetEncryptionConfig {
7987 pub(crate) fn new(
7988 stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7989 ) -> Self {
7990 Self(RequestBuilder::new(stub))
7991 }
7992
7993 pub fn with_request<V: Into<crate::model::GetEncryptionConfigRequest>>(
7995 mut self,
7996 v: V,
7997 ) -> Self {
7998 self.0.request = v.into();
7999 self
8000 }
8001
8002 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8004 self.0.options = v.into();
8005 self
8006 }
8007
8008 pub async fn send(self) -> Result<crate::model::EncryptionConfig> {
8010 (*self.0.stub)
8011 .get_encryption_config(self.0.request, self.0.options)
8012 .await
8013 .map(crate::Response::into_body)
8014 }
8015
8016 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8020 self.0.request.name = v.into();
8021 self
8022 }
8023 }
8024
8025 #[doc(hidden)]
8026 impl crate::RequestBuilder for GetEncryptionConfig {
8027 fn request_options(&mut self) -> &mut crate::RequestOptions {
8028 &mut self.0.options
8029 }
8030 }
8031
8032 #[derive(Clone, Debug)]
8053 pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
8054
8055 impl ListLocations {
8056 pub(crate) fn new(
8057 stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8058 ) -> Self {
8059 Self(RequestBuilder::new(stub))
8060 }
8061
8062 pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
8064 mut self,
8065 v: V,
8066 ) -> Self {
8067 self.0.request = v.into();
8068 self
8069 }
8070
8071 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8073 self.0.options = v.into();
8074 self
8075 }
8076
8077 pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
8079 (*self.0.stub)
8080 .list_locations(self.0.request, self.0.options)
8081 .await
8082 .map(crate::Response::into_body)
8083 }
8084
8085 pub fn by_page(
8087 self,
8088 ) -> impl google_cloud_gax::paginator::Paginator<
8089 google_cloud_location::model::ListLocationsResponse,
8090 crate::Error,
8091 > {
8092 use std::clone::Clone;
8093 let token = self.0.request.page_token.clone();
8094 let execute = move |token: String| {
8095 let mut builder = self.clone();
8096 builder.0.request = builder.0.request.set_page_token(token);
8097 builder.send()
8098 };
8099 google_cloud_gax::paginator::internal::new_paginator(token, execute)
8100 }
8101
8102 pub fn by_item(
8104 self,
8105 ) -> impl google_cloud_gax::paginator::ItemPaginator<
8106 google_cloud_location::model::ListLocationsResponse,
8107 crate::Error,
8108 > {
8109 use google_cloud_gax::paginator::Paginator;
8110 self.by_page().items()
8111 }
8112
8113 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8115 self.0.request.name = v.into();
8116 self
8117 }
8118
8119 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8121 self.0.request.filter = v.into();
8122 self
8123 }
8124
8125 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8127 self.0.request.page_size = v.into();
8128 self
8129 }
8130
8131 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8133 self.0.request.page_token = v.into();
8134 self
8135 }
8136 }
8137
8138 #[doc(hidden)]
8139 impl crate::RequestBuilder for ListLocations {
8140 fn request_options(&mut self) -> &mut crate::RequestOptions {
8141 &mut self.0.options
8142 }
8143 }
8144
8145 #[derive(Clone, Debug)]
8162 pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
8163
8164 impl GetLocation {
8165 pub(crate) fn new(
8166 stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8167 ) -> Self {
8168 Self(RequestBuilder::new(stub))
8169 }
8170
8171 pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
8173 mut self,
8174 v: V,
8175 ) -> Self {
8176 self.0.request = v.into();
8177 self
8178 }
8179
8180 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8182 self.0.options = v.into();
8183 self
8184 }
8185
8186 pub async fn send(self) -> Result<google_cloud_location::model::Location> {
8188 (*self.0.stub)
8189 .get_location(self.0.request, self.0.options)
8190 .await
8191 .map(crate::Response::into_body)
8192 }
8193
8194 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8196 self.0.request.name = v.into();
8197 self
8198 }
8199 }
8200
8201 #[doc(hidden)]
8202 impl crate::RequestBuilder for GetLocation {
8203 fn request_options(&mut self) -> &mut crate::RequestOptions {
8204 &mut self.0.options
8205 }
8206 }
8207
8208 #[derive(Clone, Debug)]
8225 pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
8226
8227 impl SetIamPolicy {
8228 pub(crate) fn new(
8229 stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8230 ) -> Self {
8231 Self(RequestBuilder::new(stub))
8232 }
8233
8234 pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
8236 mut self,
8237 v: V,
8238 ) -> Self {
8239 self.0.request = v.into();
8240 self
8241 }
8242
8243 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8245 self.0.options = v.into();
8246 self
8247 }
8248
8249 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
8251 (*self.0.stub)
8252 .set_iam_policy(self.0.request, self.0.options)
8253 .await
8254 .map(crate::Response::into_body)
8255 }
8256
8257 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8261 self.0.request.resource = v.into();
8262 self
8263 }
8264
8265 pub fn set_policy<T>(mut self, v: T) -> Self
8269 where
8270 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
8271 {
8272 self.0.request.policy = std::option::Option::Some(v.into());
8273 self
8274 }
8275
8276 pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
8280 where
8281 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
8282 {
8283 self.0.request.policy = v.map(|x| x.into());
8284 self
8285 }
8286
8287 pub fn set_update_mask<T>(mut self, v: T) -> Self
8289 where
8290 T: std::convert::Into<wkt::FieldMask>,
8291 {
8292 self.0.request.update_mask = std::option::Option::Some(v.into());
8293 self
8294 }
8295
8296 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8298 where
8299 T: std::convert::Into<wkt::FieldMask>,
8300 {
8301 self.0.request.update_mask = v.map(|x| x.into());
8302 self
8303 }
8304 }
8305
8306 #[doc(hidden)]
8307 impl crate::RequestBuilder for SetIamPolicy {
8308 fn request_options(&mut self) -> &mut crate::RequestOptions {
8309 &mut self.0.options
8310 }
8311 }
8312
8313 #[derive(Clone, Debug)]
8330 pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
8331
8332 impl GetIamPolicy {
8333 pub(crate) fn new(
8334 stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8335 ) -> Self {
8336 Self(RequestBuilder::new(stub))
8337 }
8338
8339 pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
8341 mut self,
8342 v: V,
8343 ) -> Self {
8344 self.0.request = v.into();
8345 self
8346 }
8347
8348 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8350 self.0.options = v.into();
8351 self
8352 }
8353
8354 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
8356 (*self.0.stub)
8357 .get_iam_policy(self.0.request, self.0.options)
8358 .await
8359 .map(crate::Response::into_body)
8360 }
8361
8362 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8366 self.0.request.resource = v.into();
8367 self
8368 }
8369
8370 pub fn set_options<T>(mut self, v: T) -> Self
8372 where
8373 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
8374 {
8375 self.0.request.options = std::option::Option::Some(v.into());
8376 self
8377 }
8378
8379 pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
8381 where
8382 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
8383 {
8384 self.0.request.options = v.map(|x| x.into());
8385 self
8386 }
8387 }
8388
8389 #[doc(hidden)]
8390 impl crate::RequestBuilder for GetIamPolicy {
8391 fn request_options(&mut self) -> &mut crate::RequestOptions {
8392 &mut self.0.options
8393 }
8394 }
8395
8396 #[derive(Clone, Debug)]
8413 pub struct TestIamPermissions(
8414 RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
8415 );
8416
8417 impl TestIamPermissions {
8418 pub(crate) fn new(
8419 stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8420 ) -> Self {
8421 Self(RequestBuilder::new(stub))
8422 }
8423
8424 pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
8426 mut self,
8427 v: V,
8428 ) -> Self {
8429 self.0.request = v.into();
8430 self
8431 }
8432
8433 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8435 self.0.options = v.into();
8436 self
8437 }
8438
8439 pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
8441 (*self.0.stub)
8442 .test_iam_permissions(self.0.request, self.0.options)
8443 .await
8444 .map(crate::Response::into_body)
8445 }
8446
8447 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8451 self.0.request.resource = v.into();
8452 self
8453 }
8454
8455 pub fn set_permissions<T, V>(mut self, v: T) -> Self
8459 where
8460 T: std::iter::IntoIterator<Item = V>,
8461 V: std::convert::Into<std::string::String>,
8462 {
8463 use std::iter::Iterator;
8464 self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
8465 self
8466 }
8467 }
8468
8469 #[doc(hidden)]
8470 impl crate::RequestBuilder for TestIamPermissions {
8471 fn request_options(&mut self) -> &mut crate::RequestOptions {
8472 &mut self.0.options
8473 }
8474 }
8475
8476 #[derive(Clone, Debug)]
8497 pub struct ListOperations(
8498 RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
8499 );
8500
8501 impl ListOperations {
8502 pub(crate) fn new(
8503 stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8504 ) -> Self {
8505 Self(RequestBuilder::new(stub))
8506 }
8507
8508 pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
8510 mut self,
8511 v: V,
8512 ) -> Self {
8513 self.0.request = v.into();
8514 self
8515 }
8516
8517 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8519 self.0.options = v.into();
8520 self
8521 }
8522
8523 pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
8525 (*self.0.stub)
8526 .list_operations(self.0.request, self.0.options)
8527 .await
8528 .map(crate::Response::into_body)
8529 }
8530
8531 pub fn by_page(
8533 self,
8534 ) -> impl google_cloud_gax::paginator::Paginator<
8535 google_cloud_longrunning::model::ListOperationsResponse,
8536 crate::Error,
8537 > {
8538 use std::clone::Clone;
8539 let token = self.0.request.page_token.clone();
8540 let execute = move |token: String| {
8541 let mut builder = self.clone();
8542 builder.0.request = builder.0.request.set_page_token(token);
8543 builder.send()
8544 };
8545 google_cloud_gax::paginator::internal::new_paginator(token, execute)
8546 }
8547
8548 pub fn by_item(
8550 self,
8551 ) -> impl google_cloud_gax::paginator::ItemPaginator<
8552 google_cloud_longrunning::model::ListOperationsResponse,
8553 crate::Error,
8554 > {
8555 use google_cloud_gax::paginator::Paginator;
8556 self.by_page().items()
8557 }
8558
8559 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8561 self.0.request.name = v.into();
8562 self
8563 }
8564
8565 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8567 self.0.request.filter = v.into();
8568 self
8569 }
8570
8571 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8573 self.0.request.page_size = v.into();
8574 self
8575 }
8576
8577 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8579 self.0.request.page_token = v.into();
8580 self
8581 }
8582
8583 pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
8585 self.0.request.return_partial_success = v.into();
8586 self
8587 }
8588 }
8589
8590 #[doc(hidden)]
8591 impl crate::RequestBuilder for ListOperations {
8592 fn request_options(&mut self) -> &mut crate::RequestOptions {
8593 &mut self.0.options
8594 }
8595 }
8596
8597 #[derive(Clone, Debug)]
8614 pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
8615
8616 impl GetOperation {
8617 pub(crate) fn new(
8618 stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8619 ) -> Self {
8620 Self(RequestBuilder::new(stub))
8621 }
8622
8623 pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
8625 mut self,
8626 v: V,
8627 ) -> Self {
8628 self.0.request = v.into();
8629 self
8630 }
8631
8632 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8634 self.0.options = v.into();
8635 self
8636 }
8637
8638 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
8640 (*self.0.stub)
8641 .get_operation(self.0.request, self.0.options)
8642 .await
8643 .map(crate::Response::into_body)
8644 }
8645
8646 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8648 self.0.request.name = v.into();
8649 self
8650 }
8651 }
8652
8653 #[doc(hidden)]
8654 impl crate::RequestBuilder for GetOperation {
8655 fn request_options(&mut self) -> &mut crate::RequestOptions {
8656 &mut self.0.options
8657 }
8658 }
8659
8660 #[derive(Clone, Debug)]
8677 pub struct DeleteOperation(
8678 RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
8679 );
8680
8681 impl DeleteOperation {
8682 pub(crate) fn new(
8683 stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8684 ) -> Self {
8685 Self(RequestBuilder::new(stub))
8686 }
8687
8688 pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
8690 mut self,
8691 v: V,
8692 ) -> Self {
8693 self.0.request = v.into();
8694 self
8695 }
8696
8697 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8699 self.0.options = v.into();
8700 self
8701 }
8702
8703 pub async fn send(self) -> Result<()> {
8705 (*self.0.stub)
8706 .delete_operation(self.0.request, self.0.options)
8707 .await
8708 .map(crate::Response::into_body)
8709 }
8710
8711 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8713 self.0.request.name = v.into();
8714 self
8715 }
8716 }
8717
8718 #[doc(hidden)]
8719 impl crate::RequestBuilder for DeleteOperation {
8720 fn request_options(&mut self) -> &mut crate::RequestOptions {
8721 &mut self.0.options
8722 }
8723 }
8724
8725 #[derive(Clone, Debug)]
8742 pub struct CancelOperation(
8743 RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
8744 );
8745
8746 impl CancelOperation {
8747 pub(crate) fn new(
8748 stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
8749 ) -> Self {
8750 Self(RequestBuilder::new(stub))
8751 }
8752
8753 pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
8755 mut self,
8756 v: V,
8757 ) -> Self {
8758 self.0.request = v.into();
8759 self
8760 }
8761
8762 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8764 self.0.options = v.into();
8765 self
8766 }
8767
8768 pub async fn send(self) -> Result<()> {
8770 (*self.0.stub)
8771 .cancel_operation(self.0.request, self.0.options)
8772 .await
8773 .map(crate::Response::into_body)
8774 }
8775
8776 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8778 self.0.request.name = v.into();
8779 self
8780 }
8781 }
8782
8783 #[doc(hidden)]
8784 impl crate::RequestBuilder for CancelOperation {
8785 fn request_options(&mut self) -> &mut crate::RequestOptions {
8786 &mut self.0.options
8787 }
8788 }
8789}
8790
8791pub mod content_service {
8793 use crate::Result;
8794
8795 pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
8809
8810 pub(crate) mod client {
8811 use super::super::super::client::ContentService;
8812 pub struct Factory;
8813 impl crate::ClientFactory for Factory {
8814 type Client = ContentService;
8815 type Credentials = gaxi::options::Credentials;
8816 async fn build(
8817 self,
8818 config: gaxi::options::ClientConfig,
8819 ) -> crate::ClientBuilderResult<Self::Client> {
8820 Self::Client::new(config).await
8821 }
8822 }
8823 }
8824
8825 #[derive(Clone, Debug)]
8827 pub(crate) struct RequestBuilder<R: std::default::Default> {
8828 stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8829 request: R,
8830 options: crate::RequestOptions,
8831 }
8832
8833 impl<R> RequestBuilder<R>
8834 where
8835 R: std::default::Default,
8836 {
8837 pub(crate) fn new(
8838 stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8839 ) -> Self {
8840 Self {
8841 stub,
8842 request: R::default(),
8843 options: crate::RequestOptions::default(),
8844 }
8845 }
8846 }
8847
8848 #[derive(Clone, Debug)]
8869 pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
8870
8871 impl ListLocations {
8872 pub(crate) fn new(
8873 stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8874 ) -> Self {
8875 Self(RequestBuilder::new(stub))
8876 }
8877
8878 pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
8880 mut self,
8881 v: V,
8882 ) -> Self {
8883 self.0.request = v.into();
8884 self
8885 }
8886
8887 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8889 self.0.options = v.into();
8890 self
8891 }
8892
8893 pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
8895 (*self.0.stub)
8896 .list_locations(self.0.request, self.0.options)
8897 .await
8898 .map(crate::Response::into_body)
8899 }
8900
8901 pub fn by_page(
8903 self,
8904 ) -> impl google_cloud_gax::paginator::Paginator<
8905 google_cloud_location::model::ListLocationsResponse,
8906 crate::Error,
8907 > {
8908 use std::clone::Clone;
8909 let token = self.0.request.page_token.clone();
8910 let execute = move |token: String| {
8911 let mut builder = self.clone();
8912 builder.0.request = builder.0.request.set_page_token(token);
8913 builder.send()
8914 };
8915 google_cloud_gax::paginator::internal::new_paginator(token, execute)
8916 }
8917
8918 pub fn by_item(
8920 self,
8921 ) -> impl google_cloud_gax::paginator::ItemPaginator<
8922 google_cloud_location::model::ListLocationsResponse,
8923 crate::Error,
8924 > {
8925 use google_cloud_gax::paginator::Paginator;
8926 self.by_page().items()
8927 }
8928
8929 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8931 self.0.request.name = v.into();
8932 self
8933 }
8934
8935 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8937 self.0.request.filter = v.into();
8938 self
8939 }
8940
8941 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8943 self.0.request.page_size = v.into();
8944 self
8945 }
8946
8947 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8949 self.0.request.page_token = v.into();
8950 self
8951 }
8952 }
8953
8954 #[doc(hidden)]
8955 impl crate::RequestBuilder for ListLocations {
8956 fn request_options(&mut self) -> &mut crate::RequestOptions {
8957 &mut self.0.options
8958 }
8959 }
8960
8961 #[derive(Clone, Debug)]
8978 pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
8979
8980 impl GetLocation {
8981 pub(crate) fn new(
8982 stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8983 ) -> Self {
8984 Self(RequestBuilder::new(stub))
8985 }
8986
8987 pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
8989 mut self,
8990 v: V,
8991 ) -> Self {
8992 self.0.request = v.into();
8993 self
8994 }
8995
8996 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
8998 self.0.options = v.into();
8999 self
9000 }
9001
9002 pub async fn send(self) -> Result<google_cloud_location::model::Location> {
9004 (*self.0.stub)
9005 .get_location(self.0.request, self.0.options)
9006 .await
9007 .map(crate::Response::into_body)
9008 }
9009
9010 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9012 self.0.request.name = v.into();
9013 self
9014 }
9015 }
9016
9017 #[doc(hidden)]
9018 impl crate::RequestBuilder for GetLocation {
9019 fn request_options(&mut self) -> &mut crate::RequestOptions {
9020 &mut self.0.options
9021 }
9022 }
9023
9024 #[derive(Clone, Debug)]
9041 pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
9042
9043 impl SetIamPolicy {
9044 pub(crate) fn new(
9045 stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
9046 ) -> Self {
9047 Self(RequestBuilder::new(stub))
9048 }
9049
9050 pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
9052 mut self,
9053 v: V,
9054 ) -> Self {
9055 self.0.request = v.into();
9056 self
9057 }
9058
9059 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9061 self.0.options = v.into();
9062 self
9063 }
9064
9065 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
9067 (*self.0.stub)
9068 .set_iam_policy(self.0.request, self.0.options)
9069 .await
9070 .map(crate::Response::into_body)
9071 }
9072
9073 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
9077 self.0.request.resource = v.into();
9078 self
9079 }
9080
9081 pub fn set_policy<T>(mut self, v: T) -> Self
9085 where
9086 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
9087 {
9088 self.0.request.policy = std::option::Option::Some(v.into());
9089 self
9090 }
9091
9092 pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
9096 where
9097 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
9098 {
9099 self.0.request.policy = v.map(|x| x.into());
9100 self
9101 }
9102
9103 pub fn set_update_mask<T>(mut self, v: T) -> Self
9105 where
9106 T: std::convert::Into<wkt::FieldMask>,
9107 {
9108 self.0.request.update_mask = std::option::Option::Some(v.into());
9109 self
9110 }
9111
9112 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
9114 where
9115 T: std::convert::Into<wkt::FieldMask>,
9116 {
9117 self.0.request.update_mask = v.map(|x| x.into());
9118 self
9119 }
9120 }
9121
9122 #[doc(hidden)]
9123 impl crate::RequestBuilder for SetIamPolicy {
9124 fn request_options(&mut self) -> &mut crate::RequestOptions {
9125 &mut self.0.options
9126 }
9127 }
9128
9129 #[derive(Clone, Debug)]
9146 pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
9147
9148 impl GetIamPolicy {
9149 pub(crate) fn new(
9150 stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
9151 ) -> Self {
9152 Self(RequestBuilder::new(stub))
9153 }
9154
9155 pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
9157 mut self,
9158 v: V,
9159 ) -> Self {
9160 self.0.request = v.into();
9161 self
9162 }
9163
9164 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9166 self.0.options = v.into();
9167 self
9168 }
9169
9170 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
9172 (*self.0.stub)
9173 .get_iam_policy(self.0.request, self.0.options)
9174 .await
9175 .map(crate::Response::into_body)
9176 }
9177
9178 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
9182 self.0.request.resource = v.into();
9183 self
9184 }
9185
9186 pub fn set_options<T>(mut self, v: T) -> Self
9188 where
9189 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
9190 {
9191 self.0.request.options = std::option::Option::Some(v.into());
9192 self
9193 }
9194
9195 pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
9197 where
9198 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
9199 {
9200 self.0.request.options = v.map(|x| x.into());
9201 self
9202 }
9203 }
9204
9205 #[doc(hidden)]
9206 impl crate::RequestBuilder for GetIamPolicy {
9207 fn request_options(&mut self) -> &mut crate::RequestOptions {
9208 &mut self.0.options
9209 }
9210 }
9211
9212 #[derive(Clone, Debug)]
9229 pub struct TestIamPermissions(
9230 RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
9231 );
9232
9233 impl TestIamPermissions {
9234 pub(crate) fn new(
9235 stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
9236 ) -> Self {
9237 Self(RequestBuilder::new(stub))
9238 }
9239
9240 pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
9242 mut self,
9243 v: V,
9244 ) -> Self {
9245 self.0.request = v.into();
9246 self
9247 }
9248
9249 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9251 self.0.options = v.into();
9252 self
9253 }
9254
9255 pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
9257 (*self.0.stub)
9258 .test_iam_permissions(self.0.request, self.0.options)
9259 .await
9260 .map(crate::Response::into_body)
9261 }
9262
9263 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
9267 self.0.request.resource = v.into();
9268 self
9269 }
9270
9271 pub fn set_permissions<T, V>(mut self, v: T) -> Self
9275 where
9276 T: std::iter::IntoIterator<Item = V>,
9277 V: std::convert::Into<std::string::String>,
9278 {
9279 use std::iter::Iterator;
9280 self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
9281 self
9282 }
9283 }
9284
9285 #[doc(hidden)]
9286 impl crate::RequestBuilder for TestIamPermissions {
9287 fn request_options(&mut self) -> &mut crate::RequestOptions {
9288 &mut self.0.options
9289 }
9290 }
9291
9292 #[derive(Clone, Debug)]
9313 pub struct ListOperations(
9314 RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
9315 );
9316
9317 impl ListOperations {
9318 pub(crate) fn new(
9319 stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
9320 ) -> Self {
9321 Self(RequestBuilder::new(stub))
9322 }
9323
9324 pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
9326 mut self,
9327 v: V,
9328 ) -> Self {
9329 self.0.request = v.into();
9330 self
9331 }
9332
9333 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9335 self.0.options = v.into();
9336 self
9337 }
9338
9339 pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
9341 (*self.0.stub)
9342 .list_operations(self.0.request, self.0.options)
9343 .await
9344 .map(crate::Response::into_body)
9345 }
9346
9347 pub fn by_page(
9349 self,
9350 ) -> impl google_cloud_gax::paginator::Paginator<
9351 google_cloud_longrunning::model::ListOperationsResponse,
9352 crate::Error,
9353 > {
9354 use std::clone::Clone;
9355 let token = self.0.request.page_token.clone();
9356 let execute = move |token: String| {
9357 let mut builder = self.clone();
9358 builder.0.request = builder.0.request.set_page_token(token);
9359 builder.send()
9360 };
9361 google_cloud_gax::paginator::internal::new_paginator(token, execute)
9362 }
9363
9364 pub fn by_item(
9366 self,
9367 ) -> impl google_cloud_gax::paginator::ItemPaginator<
9368 google_cloud_longrunning::model::ListOperationsResponse,
9369 crate::Error,
9370 > {
9371 use google_cloud_gax::paginator::Paginator;
9372 self.by_page().items()
9373 }
9374
9375 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9377 self.0.request.name = v.into();
9378 self
9379 }
9380
9381 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
9383 self.0.request.filter = v.into();
9384 self
9385 }
9386
9387 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
9389 self.0.request.page_size = v.into();
9390 self
9391 }
9392
9393 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
9395 self.0.request.page_token = v.into();
9396 self
9397 }
9398
9399 pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
9401 self.0.request.return_partial_success = v.into();
9402 self
9403 }
9404 }
9405
9406 #[doc(hidden)]
9407 impl crate::RequestBuilder for ListOperations {
9408 fn request_options(&mut self) -> &mut crate::RequestOptions {
9409 &mut self.0.options
9410 }
9411 }
9412
9413 #[derive(Clone, Debug)]
9430 pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
9431
9432 impl GetOperation {
9433 pub(crate) fn new(
9434 stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
9435 ) -> Self {
9436 Self(RequestBuilder::new(stub))
9437 }
9438
9439 pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
9441 mut self,
9442 v: V,
9443 ) -> Self {
9444 self.0.request = v.into();
9445 self
9446 }
9447
9448 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9450 self.0.options = v.into();
9451 self
9452 }
9453
9454 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
9456 (*self.0.stub)
9457 .get_operation(self.0.request, self.0.options)
9458 .await
9459 .map(crate::Response::into_body)
9460 }
9461
9462 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9464 self.0.request.name = v.into();
9465 self
9466 }
9467 }
9468
9469 #[doc(hidden)]
9470 impl crate::RequestBuilder for GetOperation {
9471 fn request_options(&mut self) -> &mut crate::RequestOptions {
9472 &mut self.0.options
9473 }
9474 }
9475
9476 #[derive(Clone, Debug)]
9493 pub struct DeleteOperation(
9494 RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
9495 );
9496
9497 impl DeleteOperation {
9498 pub(crate) fn new(
9499 stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
9500 ) -> Self {
9501 Self(RequestBuilder::new(stub))
9502 }
9503
9504 pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
9506 mut self,
9507 v: V,
9508 ) -> Self {
9509 self.0.request = v.into();
9510 self
9511 }
9512
9513 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9515 self.0.options = v.into();
9516 self
9517 }
9518
9519 pub async fn send(self) -> Result<()> {
9521 (*self.0.stub)
9522 .delete_operation(self.0.request, self.0.options)
9523 .await
9524 .map(crate::Response::into_body)
9525 }
9526
9527 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9529 self.0.request.name = v.into();
9530 self
9531 }
9532 }
9533
9534 #[doc(hidden)]
9535 impl crate::RequestBuilder for DeleteOperation {
9536 fn request_options(&mut self) -> &mut crate::RequestOptions {
9537 &mut self.0.options
9538 }
9539 }
9540
9541 #[derive(Clone, Debug)]
9558 pub struct CancelOperation(
9559 RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
9560 );
9561
9562 impl CancelOperation {
9563 pub(crate) fn new(
9564 stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
9565 ) -> Self {
9566 Self(RequestBuilder::new(stub))
9567 }
9568
9569 pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
9571 mut self,
9572 v: V,
9573 ) -> Self {
9574 self.0.request = v.into();
9575 self
9576 }
9577
9578 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9580 self.0.options = v.into();
9581 self
9582 }
9583
9584 pub async fn send(self) -> Result<()> {
9586 (*self.0.stub)
9587 .cancel_operation(self.0.request, self.0.options)
9588 .await
9589 .map(crate::Response::into_body)
9590 }
9591
9592 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9594 self.0.request.name = v.into();
9595 self
9596 }
9597 }
9598
9599 #[doc(hidden)]
9600 impl crate::RequestBuilder for CancelOperation {
9601 fn request_options(&mut self) -> &mut crate::RequestOptions {
9602 &mut self.0.options
9603 }
9604 }
9605}
9606
9607pub mod data_product_service {
9609 use crate::Result;
9610
9611 pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
9625
9626 pub(crate) mod client {
9627 use super::super::super::client::DataProductService;
9628 pub struct Factory;
9629 impl crate::ClientFactory for Factory {
9630 type Client = DataProductService;
9631 type Credentials = gaxi::options::Credentials;
9632 async fn build(
9633 self,
9634 config: gaxi::options::ClientConfig,
9635 ) -> crate::ClientBuilderResult<Self::Client> {
9636 Self::Client::new(config).await
9637 }
9638 }
9639 }
9640
9641 #[derive(Clone, Debug)]
9643 pub(crate) struct RequestBuilder<R: std::default::Default> {
9644 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
9645 request: R,
9646 options: crate::RequestOptions,
9647 }
9648
9649 impl<R> RequestBuilder<R>
9650 where
9651 R: std::default::Default,
9652 {
9653 pub(crate) fn new(
9654 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
9655 ) -> Self {
9656 Self {
9657 stub,
9658 request: R::default(),
9659 options: crate::RequestOptions::default(),
9660 }
9661 }
9662 }
9663
9664 #[derive(Clone, Debug)]
9682 pub struct CreateDataProduct(RequestBuilder<crate::model::CreateDataProductRequest>);
9683
9684 impl CreateDataProduct {
9685 pub(crate) fn new(
9686 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
9687 ) -> Self {
9688 Self(RequestBuilder::new(stub))
9689 }
9690
9691 pub fn with_request<V: Into<crate::model::CreateDataProductRequest>>(
9693 mut self,
9694 v: V,
9695 ) -> Self {
9696 self.0.request = v.into();
9697 self
9698 }
9699
9700 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9702 self.0.options = v.into();
9703 self
9704 }
9705
9706 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
9713 (*self.0.stub)
9714 .create_data_product(self.0.request, self.0.options)
9715 .await
9716 .map(crate::Response::into_body)
9717 }
9718
9719 pub fn poller(
9721 self,
9722 ) -> impl google_cloud_lro::Poller<crate::model::DataProduct, crate::model::OperationMetadata>
9723 {
9724 type Operation = google_cloud_lro::internal::Operation<
9725 crate::model::DataProduct,
9726 crate::model::OperationMetadata,
9727 >;
9728 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
9729 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
9730 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
9731 if let Some(ref mut details) = poller_options.tracing {
9732 details.method_name = "google_cloud_dataplex_v1::client::DataProductService::create_data_product::until_done";
9733 }
9734
9735 let stub = self.0.stub.clone();
9736 let mut options = self.0.options.clone();
9737 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
9738 let query = move |name| {
9739 let stub = stub.clone();
9740 let options = options.clone();
9741 async {
9742 let op = GetOperation::new(stub)
9743 .set_name(name)
9744 .with_options(options)
9745 .send()
9746 .await?;
9747 Ok(Operation::new(op))
9748 }
9749 };
9750
9751 let start = move || async {
9752 let op = self.send().await?;
9753 Ok(Operation::new(op))
9754 };
9755
9756 use google_cloud_lro::internal::PollerExt;
9757 {
9758 google_cloud_lro::internal::new_poller(
9759 polling_error_policy,
9760 polling_backoff_policy,
9761 start,
9762 query,
9763 )
9764 }
9765 .with_options(poller_options)
9766 }
9767
9768 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
9772 self.0.request.parent = v.into();
9773 self
9774 }
9775
9776 pub fn set_data_product_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
9778 self.0.request.data_product_id = v.into();
9779 self
9780 }
9781
9782 pub fn set_data_product<T>(mut self, v: T) -> Self
9786 where
9787 T: std::convert::Into<crate::model::DataProduct>,
9788 {
9789 self.0.request.data_product = std::option::Option::Some(v.into());
9790 self
9791 }
9792
9793 pub fn set_or_clear_data_product<T>(mut self, v: std::option::Option<T>) -> Self
9797 where
9798 T: std::convert::Into<crate::model::DataProduct>,
9799 {
9800 self.0.request.data_product = v.map(|x| x.into());
9801 self
9802 }
9803
9804 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
9806 self.0.request.validate_only = v.into();
9807 self
9808 }
9809 }
9810
9811 #[doc(hidden)]
9812 impl crate::RequestBuilder for CreateDataProduct {
9813 fn request_options(&mut self) -> &mut crate::RequestOptions {
9814 &mut self.0.options
9815 }
9816 }
9817
9818 #[derive(Clone, Debug)]
9836 pub struct DeleteDataProduct(RequestBuilder<crate::model::DeleteDataProductRequest>);
9837
9838 impl DeleteDataProduct {
9839 pub(crate) fn new(
9840 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
9841 ) -> Self {
9842 Self(RequestBuilder::new(stub))
9843 }
9844
9845 pub fn with_request<V: Into<crate::model::DeleteDataProductRequest>>(
9847 mut self,
9848 v: V,
9849 ) -> Self {
9850 self.0.request = v.into();
9851 self
9852 }
9853
9854 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9856 self.0.options = v.into();
9857 self
9858 }
9859
9860 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
9867 (*self.0.stub)
9868 .delete_data_product(self.0.request, self.0.options)
9869 .await
9870 .map(crate::Response::into_body)
9871 }
9872
9873 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
9875 type Operation =
9876 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
9877 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
9878 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
9879 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
9880 if let Some(ref mut details) = poller_options.tracing {
9881 details.method_name = "google_cloud_dataplex_v1::client::DataProductService::delete_data_product::until_done";
9882 }
9883
9884 let stub = self.0.stub.clone();
9885 let mut options = self.0.options.clone();
9886 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
9887 let query = move |name| {
9888 let stub = stub.clone();
9889 let options = options.clone();
9890 async {
9891 let op = GetOperation::new(stub)
9892 .set_name(name)
9893 .with_options(options)
9894 .send()
9895 .await?;
9896 Ok(Operation::new(op))
9897 }
9898 };
9899
9900 let start = move || async {
9901 let op = self.send().await?;
9902 Ok(Operation::new(op))
9903 };
9904
9905 use google_cloud_lro::internal::PollerExt;
9906 {
9907 google_cloud_lro::internal::new_unit_response_poller(
9908 polling_error_policy,
9909 polling_backoff_policy,
9910 start,
9911 query,
9912 )
9913 }
9914 .with_options(poller_options)
9915 }
9916
9917 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9921 self.0.request.name = v.into();
9922 self
9923 }
9924
9925 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
9927 self.0.request.etag = v.into();
9928 self
9929 }
9930
9931 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
9933 self.0.request.validate_only = v.into();
9934 self
9935 }
9936 }
9937
9938 #[doc(hidden)]
9939 impl crate::RequestBuilder for DeleteDataProduct {
9940 fn request_options(&mut self) -> &mut crate::RequestOptions {
9941 &mut self.0.options
9942 }
9943 }
9944
9945 #[derive(Clone, Debug)]
9962 pub struct GetDataProduct(RequestBuilder<crate::model::GetDataProductRequest>);
9963
9964 impl GetDataProduct {
9965 pub(crate) fn new(
9966 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
9967 ) -> Self {
9968 Self(RequestBuilder::new(stub))
9969 }
9970
9971 pub fn with_request<V: Into<crate::model::GetDataProductRequest>>(mut self, v: V) -> Self {
9973 self.0.request = v.into();
9974 self
9975 }
9976
9977 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
9979 self.0.options = v.into();
9980 self
9981 }
9982
9983 pub async fn send(self) -> Result<crate::model::DataProduct> {
9985 (*self.0.stub)
9986 .get_data_product(self.0.request, self.0.options)
9987 .await
9988 .map(crate::Response::into_body)
9989 }
9990
9991 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9995 self.0.request.name = v.into();
9996 self
9997 }
9998 }
9999
10000 #[doc(hidden)]
10001 impl crate::RequestBuilder for GetDataProduct {
10002 fn request_options(&mut self) -> &mut crate::RequestOptions {
10003 &mut self.0.options
10004 }
10005 }
10006
10007 #[derive(Clone, Debug)]
10028 pub struct ListDataProducts(RequestBuilder<crate::model::ListDataProductsRequest>);
10029
10030 impl ListDataProducts {
10031 pub(crate) fn new(
10032 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10033 ) -> Self {
10034 Self(RequestBuilder::new(stub))
10035 }
10036
10037 pub fn with_request<V: Into<crate::model::ListDataProductsRequest>>(
10039 mut self,
10040 v: V,
10041 ) -> Self {
10042 self.0.request = v.into();
10043 self
10044 }
10045
10046 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10048 self.0.options = v.into();
10049 self
10050 }
10051
10052 pub async fn send(self) -> Result<crate::model::ListDataProductsResponse> {
10054 (*self.0.stub)
10055 .list_data_products(self.0.request, self.0.options)
10056 .await
10057 .map(crate::Response::into_body)
10058 }
10059
10060 pub fn by_page(
10062 self,
10063 ) -> impl google_cloud_gax::paginator::Paginator<
10064 crate::model::ListDataProductsResponse,
10065 crate::Error,
10066 > {
10067 use std::clone::Clone;
10068 let token = self.0.request.page_token.clone();
10069 let execute = move |token: String| {
10070 let mut builder = self.clone();
10071 builder.0.request = builder.0.request.set_page_token(token);
10072 builder.send()
10073 };
10074 google_cloud_gax::paginator::internal::new_paginator(token, execute)
10075 }
10076
10077 pub fn by_item(
10079 self,
10080 ) -> impl google_cloud_gax::paginator::ItemPaginator<
10081 crate::model::ListDataProductsResponse,
10082 crate::Error,
10083 > {
10084 use google_cloud_gax::paginator::Paginator;
10085 self.by_page().items()
10086 }
10087
10088 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
10092 self.0.request.parent = v.into();
10093 self
10094 }
10095
10096 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
10098 self.0.request.filter = v.into();
10099 self
10100 }
10101
10102 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
10104 self.0.request.page_size = v.into();
10105 self
10106 }
10107
10108 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
10110 self.0.request.page_token = v.into();
10111 self
10112 }
10113
10114 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
10116 self.0.request.order_by = v.into();
10117 self
10118 }
10119 }
10120
10121 #[doc(hidden)]
10122 impl crate::RequestBuilder for ListDataProducts {
10123 fn request_options(&mut self) -> &mut crate::RequestOptions {
10124 &mut self.0.options
10125 }
10126 }
10127
10128 #[derive(Clone, Debug)]
10146 pub struct UpdateDataProduct(RequestBuilder<crate::model::UpdateDataProductRequest>);
10147
10148 impl UpdateDataProduct {
10149 pub(crate) fn new(
10150 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10151 ) -> Self {
10152 Self(RequestBuilder::new(stub))
10153 }
10154
10155 pub fn with_request<V: Into<crate::model::UpdateDataProductRequest>>(
10157 mut self,
10158 v: V,
10159 ) -> Self {
10160 self.0.request = v.into();
10161 self
10162 }
10163
10164 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10166 self.0.options = v.into();
10167 self
10168 }
10169
10170 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
10177 (*self.0.stub)
10178 .update_data_product(self.0.request, self.0.options)
10179 .await
10180 .map(crate::Response::into_body)
10181 }
10182
10183 pub fn poller(
10185 self,
10186 ) -> impl google_cloud_lro::Poller<crate::model::DataProduct, crate::model::OperationMetadata>
10187 {
10188 type Operation = google_cloud_lro::internal::Operation<
10189 crate::model::DataProduct,
10190 crate::model::OperationMetadata,
10191 >;
10192 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
10193 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
10194 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
10195 if let Some(ref mut details) = poller_options.tracing {
10196 details.method_name = "google_cloud_dataplex_v1::client::DataProductService::update_data_product::until_done";
10197 }
10198
10199 let stub = self.0.stub.clone();
10200 let mut options = self.0.options.clone();
10201 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
10202 let query = move |name| {
10203 let stub = stub.clone();
10204 let options = options.clone();
10205 async {
10206 let op = GetOperation::new(stub)
10207 .set_name(name)
10208 .with_options(options)
10209 .send()
10210 .await?;
10211 Ok(Operation::new(op))
10212 }
10213 };
10214
10215 let start = move || async {
10216 let op = self.send().await?;
10217 Ok(Operation::new(op))
10218 };
10219
10220 use google_cloud_lro::internal::PollerExt;
10221 {
10222 google_cloud_lro::internal::new_poller(
10223 polling_error_policy,
10224 polling_backoff_policy,
10225 start,
10226 query,
10227 )
10228 }
10229 .with_options(poller_options)
10230 }
10231
10232 pub fn set_data_product<T>(mut self, v: T) -> Self
10236 where
10237 T: std::convert::Into<crate::model::DataProduct>,
10238 {
10239 self.0.request.data_product = std::option::Option::Some(v.into());
10240 self
10241 }
10242
10243 pub fn set_or_clear_data_product<T>(mut self, v: std::option::Option<T>) -> Self
10247 where
10248 T: std::convert::Into<crate::model::DataProduct>,
10249 {
10250 self.0.request.data_product = v.map(|x| x.into());
10251 self
10252 }
10253
10254 pub fn set_update_mask<T>(mut self, v: T) -> Self
10256 where
10257 T: std::convert::Into<wkt::FieldMask>,
10258 {
10259 self.0.request.update_mask = std::option::Option::Some(v.into());
10260 self
10261 }
10262
10263 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
10265 where
10266 T: std::convert::Into<wkt::FieldMask>,
10267 {
10268 self.0.request.update_mask = v.map(|x| x.into());
10269 self
10270 }
10271
10272 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
10274 self.0.request.validate_only = v.into();
10275 self
10276 }
10277 }
10278
10279 #[doc(hidden)]
10280 impl crate::RequestBuilder for UpdateDataProduct {
10281 fn request_options(&mut self) -> &mut crate::RequestOptions {
10282 &mut self.0.options
10283 }
10284 }
10285
10286 #[derive(Clone, Debug)]
10303 pub struct RequestDataProductAccess(
10304 RequestBuilder<crate::model::RequestDataProductAccessRequest>,
10305 );
10306
10307 impl RequestDataProductAccess {
10308 pub(crate) fn new(
10309 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10310 ) -> Self {
10311 Self(RequestBuilder::new(stub))
10312 }
10313
10314 pub fn with_request<V: Into<crate::model::RequestDataProductAccessRequest>>(
10316 mut self,
10317 v: V,
10318 ) -> Self {
10319 self.0.request = v.into();
10320 self
10321 }
10322
10323 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10325 self.0.options = v.into();
10326 self
10327 }
10328
10329 pub async fn send(self) -> Result<crate::model::RequestDataProductAccessResponse> {
10331 (*self.0.stub)
10332 .request_data_product_access(self.0.request, self.0.options)
10333 .await
10334 .map(crate::Response::into_body)
10335 }
10336
10337 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
10341 self.0.request.parent = v.into();
10342 self
10343 }
10344
10345 pub fn set_change_request<T>(mut self, v: T) -> Self
10349 where
10350 T: std::convert::Into<crate::model::ChangeRequest>,
10351 {
10352 self.0.request.change_request = std::option::Option::Some(v.into());
10353 self
10354 }
10355
10356 pub fn set_or_clear_change_request<T>(mut self, v: std::option::Option<T>) -> Self
10360 where
10361 T: std::convert::Into<crate::model::ChangeRequest>,
10362 {
10363 self.0.request.change_request = v.map(|x| x.into());
10364 self
10365 }
10366
10367 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
10369 self.0.request.validate_only = v.into();
10370 self
10371 }
10372 }
10373
10374 #[doc(hidden)]
10375 impl crate::RequestBuilder for RequestDataProductAccess {
10376 fn request_options(&mut self) -> &mut crate::RequestOptions {
10377 &mut self.0.options
10378 }
10379 }
10380
10381 #[derive(Clone, Debug)]
10399 pub struct CreateDataAsset(RequestBuilder<crate::model::CreateDataAssetRequest>);
10400
10401 impl CreateDataAsset {
10402 pub(crate) fn new(
10403 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10404 ) -> Self {
10405 Self(RequestBuilder::new(stub))
10406 }
10407
10408 pub fn with_request<V: Into<crate::model::CreateDataAssetRequest>>(mut self, v: V) -> Self {
10410 self.0.request = v.into();
10411 self
10412 }
10413
10414 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10416 self.0.options = v.into();
10417 self
10418 }
10419
10420 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
10427 (*self.0.stub)
10428 .create_data_asset(self.0.request, self.0.options)
10429 .await
10430 .map(crate::Response::into_body)
10431 }
10432
10433 pub fn poller(
10435 self,
10436 ) -> impl google_cloud_lro::Poller<crate::model::DataAsset, crate::model::OperationMetadata>
10437 {
10438 type Operation = google_cloud_lro::internal::Operation<
10439 crate::model::DataAsset,
10440 crate::model::OperationMetadata,
10441 >;
10442 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
10443 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
10444 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
10445 if let Some(ref mut details) = poller_options.tracing {
10446 details.method_name = "google_cloud_dataplex_v1::client::DataProductService::create_data_asset::until_done";
10447 }
10448
10449 let stub = self.0.stub.clone();
10450 let mut options = self.0.options.clone();
10451 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
10452 let query = move |name| {
10453 let stub = stub.clone();
10454 let options = options.clone();
10455 async {
10456 let op = GetOperation::new(stub)
10457 .set_name(name)
10458 .with_options(options)
10459 .send()
10460 .await?;
10461 Ok(Operation::new(op))
10462 }
10463 };
10464
10465 let start = move || async {
10466 let op = self.send().await?;
10467 Ok(Operation::new(op))
10468 };
10469
10470 use google_cloud_lro::internal::PollerExt;
10471 {
10472 google_cloud_lro::internal::new_poller(
10473 polling_error_policy,
10474 polling_backoff_policy,
10475 start,
10476 query,
10477 )
10478 }
10479 .with_options(poller_options)
10480 }
10481
10482 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
10486 self.0.request.parent = v.into();
10487 self
10488 }
10489
10490 pub fn set_data_asset_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
10492 self.0.request.data_asset_id = v.into();
10493 self
10494 }
10495
10496 pub fn set_data_asset<T>(mut self, v: T) -> Self
10500 where
10501 T: std::convert::Into<crate::model::DataAsset>,
10502 {
10503 self.0.request.data_asset = std::option::Option::Some(v.into());
10504 self
10505 }
10506
10507 pub fn set_or_clear_data_asset<T>(mut self, v: std::option::Option<T>) -> Self
10511 where
10512 T: std::convert::Into<crate::model::DataAsset>,
10513 {
10514 self.0.request.data_asset = v.map(|x| x.into());
10515 self
10516 }
10517
10518 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
10520 self.0.request.validate_only = v.into();
10521 self
10522 }
10523 }
10524
10525 #[doc(hidden)]
10526 impl crate::RequestBuilder for CreateDataAsset {
10527 fn request_options(&mut self) -> &mut crate::RequestOptions {
10528 &mut self.0.options
10529 }
10530 }
10531
10532 #[derive(Clone, Debug)]
10550 pub struct UpdateDataAsset(RequestBuilder<crate::model::UpdateDataAssetRequest>);
10551
10552 impl UpdateDataAsset {
10553 pub(crate) fn new(
10554 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10555 ) -> Self {
10556 Self(RequestBuilder::new(stub))
10557 }
10558
10559 pub fn with_request<V: Into<crate::model::UpdateDataAssetRequest>>(mut self, v: V) -> Self {
10561 self.0.request = v.into();
10562 self
10563 }
10564
10565 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10567 self.0.options = v.into();
10568 self
10569 }
10570
10571 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
10578 (*self.0.stub)
10579 .update_data_asset(self.0.request, self.0.options)
10580 .await
10581 .map(crate::Response::into_body)
10582 }
10583
10584 pub fn poller(
10586 self,
10587 ) -> impl google_cloud_lro::Poller<crate::model::DataAsset, crate::model::OperationMetadata>
10588 {
10589 type Operation = google_cloud_lro::internal::Operation<
10590 crate::model::DataAsset,
10591 crate::model::OperationMetadata,
10592 >;
10593 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
10594 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
10595 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
10596 if let Some(ref mut details) = poller_options.tracing {
10597 details.method_name = "google_cloud_dataplex_v1::client::DataProductService::update_data_asset::until_done";
10598 }
10599
10600 let stub = self.0.stub.clone();
10601 let mut options = self.0.options.clone();
10602 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
10603 let query = move |name| {
10604 let stub = stub.clone();
10605 let options = options.clone();
10606 async {
10607 let op = GetOperation::new(stub)
10608 .set_name(name)
10609 .with_options(options)
10610 .send()
10611 .await?;
10612 Ok(Operation::new(op))
10613 }
10614 };
10615
10616 let start = move || async {
10617 let op = self.send().await?;
10618 Ok(Operation::new(op))
10619 };
10620
10621 use google_cloud_lro::internal::PollerExt;
10622 {
10623 google_cloud_lro::internal::new_poller(
10624 polling_error_policy,
10625 polling_backoff_policy,
10626 start,
10627 query,
10628 )
10629 }
10630 .with_options(poller_options)
10631 }
10632
10633 pub fn set_data_asset<T>(mut self, v: T) -> Self
10637 where
10638 T: std::convert::Into<crate::model::DataAsset>,
10639 {
10640 self.0.request.data_asset = std::option::Option::Some(v.into());
10641 self
10642 }
10643
10644 pub fn set_or_clear_data_asset<T>(mut self, v: std::option::Option<T>) -> Self
10648 where
10649 T: std::convert::Into<crate::model::DataAsset>,
10650 {
10651 self.0.request.data_asset = v.map(|x| x.into());
10652 self
10653 }
10654
10655 pub fn set_update_mask<T>(mut self, v: T) -> Self
10657 where
10658 T: std::convert::Into<wkt::FieldMask>,
10659 {
10660 self.0.request.update_mask = std::option::Option::Some(v.into());
10661 self
10662 }
10663
10664 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
10666 where
10667 T: std::convert::Into<wkt::FieldMask>,
10668 {
10669 self.0.request.update_mask = v.map(|x| x.into());
10670 self
10671 }
10672
10673 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
10675 self.0.request.validate_only = v.into();
10676 self
10677 }
10678 }
10679
10680 #[doc(hidden)]
10681 impl crate::RequestBuilder for UpdateDataAsset {
10682 fn request_options(&mut self) -> &mut crate::RequestOptions {
10683 &mut self.0.options
10684 }
10685 }
10686
10687 #[derive(Clone, Debug)]
10705 pub struct DeleteDataAsset(RequestBuilder<crate::model::DeleteDataAssetRequest>);
10706
10707 impl DeleteDataAsset {
10708 pub(crate) fn new(
10709 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10710 ) -> Self {
10711 Self(RequestBuilder::new(stub))
10712 }
10713
10714 pub fn with_request<V: Into<crate::model::DeleteDataAssetRequest>>(mut self, v: V) -> Self {
10716 self.0.request = v.into();
10717 self
10718 }
10719
10720 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10722 self.0.options = v.into();
10723 self
10724 }
10725
10726 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
10733 (*self.0.stub)
10734 .delete_data_asset(self.0.request, self.0.options)
10735 .await
10736 .map(crate::Response::into_body)
10737 }
10738
10739 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
10741 type Operation =
10742 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
10743 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
10744 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
10745 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
10746 if let Some(ref mut details) = poller_options.tracing {
10747 details.method_name = "google_cloud_dataplex_v1::client::DataProductService::delete_data_asset::until_done";
10748 }
10749
10750 let stub = self.0.stub.clone();
10751 let mut options = self.0.options.clone();
10752 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
10753 let query = move |name| {
10754 let stub = stub.clone();
10755 let options = options.clone();
10756 async {
10757 let op = GetOperation::new(stub)
10758 .set_name(name)
10759 .with_options(options)
10760 .send()
10761 .await?;
10762 Ok(Operation::new(op))
10763 }
10764 };
10765
10766 let start = move || async {
10767 let op = self.send().await?;
10768 Ok(Operation::new(op))
10769 };
10770
10771 use google_cloud_lro::internal::PollerExt;
10772 {
10773 google_cloud_lro::internal::new_unit_response_poller(
10774 polling_error_policy,
10775 polling_backoff_policy,
10776 start,
10777 query,
10778 )
10779 }
10780 .with_options(poller_options)
10781 }
10782
10783 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10787 self.0.request.name = v.into();
10788 self
10789 }
10790
10791 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
10793 self.0.request.etag = v.into();
10794 self
10795 }
10796
10797 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
10799 self.0.request.validate_only = v.into();
10800 self
10801 }
10802 }
10803
10804 #[doc(hidden)]
10805 impl crate::RequestBuilder for DeleteDataAsset {
10806 fn request_options(&mut self) -> &mut crate::RequestOptions {
10807 &mut self.0.options
10808 }
10809 }
10810
10811 #[derive(Clone, Debug)]
10828 pub struct GetDataAsset(RequestBuilder<crate::model::GetDataAssetRequest>);
10829
10830 impl GetDataAsset {
10831 pub(crate) fn new(
10832 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10833 ) -> Self {
10834 Self(RequestBuilder::new(stub))
10835 }
10836
10837 pub fn with_request<V: Into<crate::model::GetDataAssetRequest>>(mut self, v: V) -> Self {
10839 self.0.request = v.into();
10840 self
10841 }
10842
10843 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10845 self.0.options = v.into();
10846 self
10847 }
10848
10849 pub async fn send(self) -> Result<crate::model::DataAsset> {
10851 (*self.0.stub)
10852 .get_data_asset(self.0.request, self.0.options)
10853 .await
10854 .map(crate::Response::into_body)
10855 }
10856
10857 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10861 self.0.request.name = v.into();
10862 self
10863 }
10864 }
10865
10866 #[doc(hidden)]
10867 impl crate::RequestBuilder for GetDataAsset {
10868 fn request_options(&mut self) -> &mut crate::RequestOptions {
10869 &mut self.0.options
10870 }
10871 }
10872
10873 #[derive(Clone, Debug)]
10894 pub struct ListDataAssets(RequestBuilder<crate::model::ListDataAssetsRequest>);
10895
10896 impl ListDataAssets {
10897 pub(crate) fn new(
10898 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
10899 ) -> Self {
10900 Self(RequestBuilder::new(stub))
10901 }
10902
10903 pub fn with_request<V: Into<crate::model::ListDataAssetsRequest>>(mut self, v: V) -> Self {
10905 self.0.request = v.into();
10906 self
10907 }
10908
10909 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
10911 self.0.options = v.into();
10912 self
10913 }
10914
10915 pub async fn send(self) -> Result<crate::model::ListDataAssetsResponse> {
10917 (*self.0.stub)
10918 .list_data_assets(self.0.request, self.0.options)
10919 .await
10920 .map(crate::Response::into_body)
10921 }
10922
10923 pub fn by_page(
10925 self,
10926 ) -> impl google_cloud_gax::paginator::Paginator<
10927 crate::model::ListDataAssetsResponse,
10928 crate::Error,
10929 > {
10930 use std::clone::Clone;
10931 let token = self.0.request.page_token.clone();
10932 let execute = move |token: String| {
10933 let mut builder = self.clone();
10934 builder.0.request = builder.0.request.set_page_token(token);
10935 builder.send()
10936 };
10937 google_cloud_gax::paginator::internal::new_paginator(token, execute)
10938 }
10939
10940 pub fn by_item(
10942 self,
10943 ) -> impl google_cloud_gax::paginator::ItemPaginator<
10944 crate::model::ListDataAssetsResponse,
10945 crate::Error,
10946 > {
10947 use google_cloud_gax::paginator::Paginator;
10948 self.by_page().items()
10949 }
10950
10951 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
10955 self.0.request.parent = v.into();
10956 self
10957 }
10958
10959 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
10961 self.0.request.filter = v.into();
10962 self
10963 }
10964
10965 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
10967 self.0.request.order_by = v.into();
10968 self
10969 }
10970
10971 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
10973 self.0.request.page_size = v.into();
10974 self
10975 }
10976
10977 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
10979 self.0.request.page_token = v.into();
10980 self
10981 }
10982 }
10983
10984 #[doc(hidden)]
10985 impl crate::RequestBuilder for ListDataAssets {
10986 fn request_options(&mut self) -> &mut crate::RequestOptions {
10987 &mut self.0.options
10988 }
10989 }
10990
10991 #[derive(Clone, Debug)]
11012 pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
11013
11014 impl ListLocations {
11015 pub(crate) fn new(
11016 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
11017 ) -> Self {
11018 Self(RequestBuilder::new(stub))
11019 }
11020
11021 pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
11023 mut self,
11024 v: V,
11025 ) -> Self {
11026 self.0.request = v.into();
11027 self
11028 }
11029
11030 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11032 self.0.options = v.into();
11033 self
11034 }
11035
11036 pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
11038 (*self.0.stub)
11039 .list_locations(self.0.request, self.0.options)
11040 .await
11041 .map(crate::Response::into_body)
11042 }
11043
11044 pub fn by_page(
11046 self,
11047 ) -> impl google_cloud_gax::paginator::Paginator<
11048 google_cloud_location::model::ListLocationsResponse,
11049 crate::Error,
11050 > {
11051 use std::clone::Clone;
11052 let token = self.0.request.page_token.clone();
11053 let execute = move |token: String| {
11054 let mut builder = self.clone();
11055 builder.0.request = builder.0.request.set_page_token(token);
11056 builder.send()
11057 };
11058 google_cloud_gax::paginator::internal::new_paginator(token, execute)
11059 }
11060
11061 pub fn by_item(
11063 self,
11064 ) -> impl google_cloud_gax::paginator::ItemPaginator<
11065 google_cloud_location::model::ListLocationsResponse,
11066 crate::Error,
11067 > {
11068 use google_cloud_gax::paginator::Paginator;
11069 self.by_page().items()
11070 }
11071
11072 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11074 self.0.request.name = v.into();
11075 self
11076 }
11077
11078 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
11080 self.0.request.filter = v.into();
11081 self
11082 }
11083
11084 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
11086 self.0.request.page_size = v.into();
11087 self
11088 }
11089
11090 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
11092 self.0.request.page_token = v.into();
11093 self
11094 }
11095 }
11096
11097 #[doc(hidden)]
11098 impl crate::RequestBuilder for ListLocations {
11099 fn request_options(&mut self) -> &mut crate::RequestOptions {
11100 &mut self.0.options
11101 }
11102 }
11103
11104 #[derive(Clone, Debug)]
11121 pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
11122
11123 impl GetLocation {
11124 pub(crate) fn new(
11125 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
11126 ) -> Self {
11127 Self(RequestBuilder::new(stub))
11128 }
11129
11130 pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
11132 mut self,
11133 v: V,
11134 ) -> Self {
11135 self.0.request = v.into();
11136 self
11137 }
11138
11139 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11141 self.0.options = v.into();
11142 self
11143 }
11144
11145 pub async fn send(self) -> Result<google_cloud_location::model::Location> {
11147 (*self.0.stub)
11148 .get_location(self.0.request, self.0.options)
11149 .await
11150 .map(crate::Response::into_body)
11151 }
11152
11153 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11155 self.0.request.name = v.into();
11156 self
11157 }
11158 }
11159
11160 #[doc(hidden)]
11161 impl crate::RequestBuilder for GetLocation {
11162 fn request_options(&mut self) -> &mut crate::RequestOptions {
11163 &mut self.0.options
11164 }
11165 }
11166
11167 #[derive(Clone, Debug)]
11184 pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
11185
11186 impl SetIamPolicy {
11187 pub(crate) fn new(
11188 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
11189 ) -> Self {
11190 Self(RequestBuilder::new(stub))
11191 }
11192
11193 pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
11195 mut self,
11196 v: V,
11197 ) -> Self {
11198 self.0.request = v.into();
11199 self
11200 }
11201
11202 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11204 self.0.options = v.into();
11205 self
11206 }
11207
11208 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
11210 (*self.0.stub)
11211 .set_iam_policy(self.0.request, self.0.options)
11212 .await
11213 .map(crate::Response::into_body)
11214 }
11215
11216 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
11220 self.0.request.resource = v.into();
11221 self
11222 }
11223
11224 pub fn set_policy<T>(mut self, v: T) -> Self
11228 where
11229 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
11230 {
11231 self.0.request.policy = std::option::Option::Some(v.into());
11232 self
11233 }
11234
11235 pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
11239 where
11240 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
11241 {
11242 self.0.request.policy = v.map(|x| x.into());
11243 self
11244 }
11245
11246 pub fn set_update_mask<T>(mut self, v: T) -> Self
11248 where
11249 T: std::convert::Into<wkt::FieldMask>,
11250 {
11251 self.0.request.update_mask = std::option::Option::Some(v.into());
11252 self
11253 }
11254
11255 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
11257 where
11258 T: std::convert::Into<wkt::FieldMask>,
11259 {
11260 self.0.request.update_mask = v.map(|x| x.into());
11261 self
11262 }
11263 }
11264
11265 #[doc(hidden)]
11266 impl crate::RequestBuilder for SetIamPolicy {
11267 fn request_options(&mut self) -> &mut crate::RequestOptions {
11268 &mut self.0.options
11269 }
11270 }
11271
11272 #[derive(Clone, Debug)]
11289 pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
11290
11291 impl GetIamPolicy {
11292 pub(crate) fn new(
11293 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
11294 ) -> Self {
11295 Self(RequestBuilder::new(stub))
11296 }
11297
11298 pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
11300 mut self,
11301 v: V,
11302 ) -> Self {
11303 self.0.request = v.into();
11304 self
11305 }
11306
11307 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11309 self.0.options = v.into();
11310 self
11311 }
11312
11313 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
11315 (*self.0.stub)
11316 .get_iam_policy(self.0.request, self.0.options)
11317 .await
11318 .map(crate::Response::into_body)
11319 }
11320
11321 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
11325 self.0.request.resource = v.into();
11326 self
11327 }
11328
11329 pub fn set_options<T>(mut self, v: T) -> Self
11331 where
11332 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
11333 {
11334 self.0.request.options = std::option::Option::Some(v.into());
11335 self
11336 }
11337
11338 pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
11340 where
11341 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
11342 {
11343 self.0.request.options = v.map(|x| x.into());
11344 self
11345 }
11346 }
11347
11348 #[doc(hidden)]
11349 impl crate::RequestBuilder for GetIamPolicy {
11350 fn request_options(&mut self) -> &mut crate::RequestOptions {
11351 &mut self.0.options
11352 }
11353 }
11354
11355 #[derive(Clone, Debug)]
11372 pub struct TestIamPermissions(
11373 RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
11374 );
11375
11376 impl TestIamPermissions {
11377 pub(crate) fn new(
11378 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
11379 ) -> Self {
11380 Self(RequestBuilder::new(stub))
11381 }
11382
11383 pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
11385 mut self,
11386 v: V,
11387 ) -> Self {
11388 self.0.request = v.into();
11389 self
11390 }
11391
11392 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11394 self.0.options = v.into();
11395 self
11396 }
11397
11398 pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
11400 (*self.0.stub)
11401 .test_iam_permissions(self.0.request, self.0.options)
11402 .await
11403 .map(crate::Response::into_body)
11404 }
11405
11406 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
11410 self.0.request.resource = v.into();
11411 self
11412 }
11413
11414 pub fn set_permissions<T, V>(mut self, v: T) -> Self
11418 where
11419 T: std::iter::IntoIterator<Item = V>,
11420 V: std::convert::Into<std::string::String>,
11421 {
11422 use std::iter::Iterator;
11423 self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
11424 self
11425 }
11426 }
11427
11428 #[doc(hidden)]
11429 impl crate::RequestBuilder for TestIamPermissions {
11430 fn request_options(&mut self) -> &mut crate::RequestOptions {
11431 &mut self.0.options
11432 }
11433 }
11434
11435 #[derive(Clone, Debug)]
11456 pub struct ListOperations(
11457 RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
11458 );
11459
11460 impl ListOperations {
11461 pub(crate) fn new(
11462 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
11463 ) -> Self {
11464 Self(RequestBuilder::new(stub))
11465 }
11466
11467 pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
11469 mut self,
11470 v: V,
11471 ) -> Self {
11472 self.0.request = v.into();
11473 self
11474 }
11475
11476 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11478 self.0.options = v.into();
11479 self
11480 }
11481
11482 pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
11484 (*self.0.stub)
11485 .list_operations(self.0.request, self.0.options)
11486 .await
11487 .map(crate::Response::into_body)
11488 }
11489
11490 pub fn by_page(
11492 self,
11493 ) -> impl google_cloud_gax::paginator::Paginator<
11494 google_cloud_longrunning::model::ListOperationsResponse,
11495 crate::Error,
11496 > {
11497 use std::clone::Clone;
11498 let token = self.0.request.page_token.clone();
11499 let execute = move |token: String| {
11500 let mut builder = self.clone();
11501 builder.0.request = builder.0.request.set_page_token(token);
11502 builder.send()
11503 };
11504 google_cloud_gax::paginator::internal::new_paginator(token, execute)
11505 }
11506
11507 pub fn by_item(
11509 self,
11510 ) -> impl google_cloud_gax::paginator::ItemPaginator<
11511 google_cloud_longrunning::model::ListOperationsResponse,
11512 crate::Error,
11513 > {
11514 use google_cloud_gax::paginator::Paginator;
11515 self.by_page().items()
11516 }
11517
11518 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11520 self.0.request.name = v.into();
11521 self
11522 }
11523
11524 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
11526 self.0.request.filter = v.into();
11527 self
11528 }
11529
11530 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
11532 self.0.request.page_size = v.into();
11533 self
11534 }
11535
11536 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
11538 self.0.request.page_token = v.into();
11539 self
11540 }
11541
11542 pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
11544 self.0.request.return_partial_success = v.into();
11545 self
11546 }
11547 }
11548
11549 #[doc(hidden)]
11550 impl crate::RequestBuilder for ListOperations {
11551 fn request_options(&mut self) -> &mut crate::RequestOptions {
11552 &mut self.0.options
11553 }
11554 }
11555
11556 #[derive(Clone, Debug)]
11573 pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
11574
11575 impl GetOperation {
11576 pub(crate) fn new(
11577 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
11578 ) -> Self {
11579 Self(RequestBuilder::new(stub))
11580 }
11581
11582 pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
11584 mut self,
11585 v: V,
11586 ) -> Self {
11587 self.0.request = v.into();
11588 self
11589 }
11590
11591 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11593 self.0.options = v.into();
11594 self
11595 }
11596
11597 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
11599 (*self.0.stub)
11600 .get_operation(self.0.request, self.0.options)
11601 .await
11602 .map(crate::Response::into_body)
11603 }
11604
11605 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11607 self.0.request.name = v.into();
11608 self
11609 }
11610 }
11611
11612 #[doc(hidden)]
11613 impl crate::RequestBuilder for GetOperation {
11614 fn request_options(&mut self) -> &mut crate::RequestOptions {
11615 &mut self.0.options
11616 }
11617 }
11618
11619 #[derive(Clone, Debug)]
11636 pub struct DeleteOperation(
11637 RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
11638 );
11639
11640 impl DeleteOperation {
11641 pub(crate) fn new(
11642 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
11643 ) -> Self {
11644 Self(RequestBuilder::new(stub))
11645 }
11646
11647 pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
11649 mut self,
11650 v: V,
11651 ) -> Self {
11652 self.0.request = v.into();
11653 self
11654 }
11655
11656 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11658 self.0.options = v.into();
11659 self
11660 }
11661
11662 pub async fn send(self) -> Result<()> {
11664 (*self.0.stub)
11665 .delete_operation(self.0.request, self.0.options)
11666 .await
11667 .map(crate::Response::into_body)
11668 }
11669
11670 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11672 self.0.request.name = v.into();
11673 self
11674 }
11675 }
11676
11677 #[doc(hidden)]
11678 impl crate::RequestBuilder for DeleteOperation {
11679 fn request_options(&mut self) -> &mut crate::RequestOptions {
11680 &mut self.0.options
11681 }
11682 }
11683
11684 #[derive(Clone, Debug)]
11701 pub struct CancelOperation(
11702 RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
11703 );
11704
11705 impl CancelOperation {
11706 pub(crate) fn new(
11707 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataProductService>,
11708 ) -> Self {
11709 Self(RequestBuilder::new(stub))
11710 }
11711
11712 pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
11714 mut self,
11715 v: V,
11716 ) -> Self {
11717 self.0.request = v.into();
11718 self
11719 }
11720
11721 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11723 self.0.options = v.into();
11724 self
11725 }
11726
11727 pub async fn send(self) -> Result<()> {
11729 (*self.0.stub)
11730 .cancel_operation(self.0.request, self.0.options)
11731 .await
11732 .map(crate::Response::into_body)
11733 }
11734
11735 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11737 self.0.request.name = v.into();
11738 self
11739 }
11740 }
11741
11742 #[doc(hidden)]
11743 impl crate::RequestBuilder for CancelOperation {
11744 fn request_options(&mut self) -> &mut crate::RequestOptions {
11745 &mut self.0.options
11746 }
11747 }
11748}
11749
11750pub mod data_taxonomy_service {
11752 use crate::Result;
11753
11754 pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
11768
11769 pub(crate) mod client {
11770 use super::super::super::client::DataTaxonomyService;
11771 pub struct Factory;
11772 impl crate::ClientFactory for Factory {
11773 type Client = DataTaxonomyService;
11774 type Credentials = gaxi::options::Credentials;
11775 async fn build(
11776 self,
11777 config: gaxi::options::ClientConfig,
11778 ) -> crate::ClientBuilderResult<Self::Client> {
11779 Self::Client::new(config).await
11780 }
11781 }
11782 }
11783
11784 #[derive(Clone, Debug)]
11786 pub(crate) struct RequestBuilder<R: std::default::Default> {
11787 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11788 request: R,
11789 options: crate::RequestOptions,
11790 }
11791
11792 impl<R> RequestBuilder<R>
11793 where
11794 R: std::default::Default,
11795 {
11796 pub(crate) fn new(
11797 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11798 ) -> Self {
11799 Self {
11800 stub,
11801 request: R::default(),
11802 options: crate::RequestOptions::default(),
11803 }
11804 }
11805 }
11806
11807 #[derive(Clone, Debug)]
11825 pub struct CreateDataTaxonomy(RequestBuilder<crate::model::CreateDataTaxonomyRequest>);
11826
11827 impl CreateDataTaxonomy {
11828 pub(crate) fn new(
11829 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11830 ) -> Self {
11831 Self(RequestBuilder::new(stub))
11832 }
11833
11834 pub fn with_request<V: Into<crate::model::CreateDataTaxonomyRequest>>(
11836 mut self,
11837 v: V,
11838 ) -> Self {
11839 self.0.request = v.into();
11840 self
11841 }
11842
11843 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
11845 self.0.options = v.into();
11846 self
11847 }
11848
11849 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
11856 (*self.0.stub)
11857 .create_data_taxonomy(self.0.request, self.0.options)
11858 .await
11859 .map(crate::Response::into_body)
11860 }
11861
11862 pub fn poller(
11864 self,
11865 ) -> impl google_cloud_lro::Poller<crate::model::DataTaxonomy, crate::model::OperationMetadata>
11866 {
11867 type Operation = google_cloud_lro::internal::Operation<
11868 crate::model::DataTaxonomy,
11869 crate::model::OperationMetadata,
11870 >;
11871 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
11872 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
11873 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
11874 if let Some(ref mut details) = poller_options.tracing {
11875 details.method_name = "google_cloud_dataplex_v1::client::DataTaxonomyService::create_data_taxonomy::until_done";
11876 }
11877
11878 let stub = self.0.stub.clone();
11879 let mut options = self.0.options.clone();
11880 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
11881 let query = move |name| {
11882 let stub = stub.clone();
11883 let options = options.clone();
11884 async {
11885 let op = GetOperation::new(stub)
11886 .set_name(name)
11887 .with_options(options)
11888 .send()
11889 .await?;
11890 Ok(Operation::new(op))
11891 }
11892 };
11893
11894 let start = move || async {
11895 let op = self.send().await?;
11896 Ok(Operation::new(op))
11897 };
11898
11899 use google_cloud_lro::internal::PollerExt;
11900 {
11901 google_cloud_lro::internal::new_poller(
11902 polling_error_policy,
11903 polling_backoff_policy,
11904 start,
11905 query,
11906 )
11907 }
11908 .with_options(poller_options)
11909 }
11910
11911 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
11915 self.0.request.parent = v.into();
11916 self
11917 }
11918
11919 pub fn set_data_taxonomy_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
11923 self.0.request.data_taxonomy_id = v.into();
11924 self
11925 }
11926
11927 pub fn set_data_taxonomy<T>(mut self, v: T) -> Self
11931 where
11932 T: std::convert::Into<crate::model::DataTaxonomy>,
11933 {
11934 self.0.request.data_taxonomy = std::option::Option::Some(v.into());
11935 self
11936 }
11937
11938 pub fn set_or_clear_data_taxonomy<T>(mut self, v: std::option::Option<T>) -> Self
11942 where
11943 T: std::convert::Into<crate::model::DataTaxonomy>,
11944 {
11945 self.0.request.data_taxonomy = v.map(|x| x.into());
11946 self
11947 }
11948
11949 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
11951 self.0.request.validate_only = v.into();
11952 self
11953 }
11954 }
11955
11956 #[doc(hidden)]
11957 impl crate::RequestBuilder for CreateDataTaxonomy {
11958 fn request_options(&mut self) -> &mut crate::RequestOptions {
11959 &mut self.0.options
11960 }
11961 }
11962
11963 #[derive(Clone, Debug)]
11981 pub struct UpdateDataTaxonomy(RequestBuilder<crate::model::UpdateDataTaxonomyRequest>);
11982
11983 impl UpdateDataTaxonomy {
11984 pub(crate) fn new(
11985 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11986 ) -> Self {
11987 Self(RequestBuilder::new(stub))
11988 }
11989
11990 pub fn with_request<V: Into<crate::model::UpdateDataTaxonomyRequest>>(
11992 mut self,
11993 v: V,
11994 ) -> Self {
11995 self.0.request = v.into();
11996 self
11997 }
11998
11999 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12001 self.0.options = v.into();
12002 self
12003 }
12004
12005 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
12012 (*self.0.stub)
12013 .update_data_taxonomy(self.0.request, self.0.options)
12014 .await
12015 .map(crate::Response::into_body)
12016 }
12017
12018 pub fn poller(
12020 self,
12021 ) -> impl google_cloud_lro::Poller<crate::model::DataTaxonomy, crate::model::OperationMetadata>
12022 {
12023 type Operation = google_cloud_lro::internal::Operation<
12024 crate::model::DataTaxonomy,
12025 crate::model::OperationMetadata,
12026 >;
12027 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
12028 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
12029 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
12030 if let Some(ref mut details) = poller_options.tracing {
12031 details.method_name = "google_cloud_dataplex_v1::client::DataTaxonomyService::update_data_taxonomy::until_done";
12032 }
12033
12034 let stub = self.0.stub.clone();
12035 let mut options = self.0.options.clone();
12036 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
12037 let query = move |name| {
12038 let stub = stub.clone();
12039 let options = options.clone();
12040 async {
12041 let op = GetOperation::new(stub)
12042 .set_name(name)
12043 .with_options(options)
12044 .send()
12045 .await?;
12046 Ok(Operation::new(op))
12047 }
12048 };
12049
12050 let start = move || async {
12051 let op = self.send().await?;
12052 Ok(Operation::new(op))
12053 };
12054
12055 use google_cloud_lro::internal::PollerExt;
12056 {
12057 google_cloud_lro::internal::new_poller(
12058 polling_error_policy,
12059 polling_backoff_policy,
12060 start,
12061 query,
12062 )
12063 }
12064 .with_options(poller_options)
12065 }
12066
12067 pub fn set_update_mask<T>(mut self, v: T) -> Self
12071 where
12072 T: std::convert::Into<wkt::FieldMask>,
12073 {
12074 self.0.request.update_mask = std::option::Option::Some(v.into());
12075 self
12076 }
12077
12078 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
12082 where
12083 T: std::convert::Into<wkt::FieldMask>,
12084 {
12085 self.0.request.update_mask = v.map(|x| x.into());
12086 self
12087 }
12088
12089 pub fn set_data_taxonomy<T>(mut self, v: T) -> Self
12093 where
12094 T: std::convert::Into<crate::model::DataTaxonomy>,
12095 {
12096 self.0.request.data_taxonomy = std::option::Option::Some(v.into());
12097 self
12098 }
12099
12100 pub fn set_or_clear_data_taxonomy<T>(mut self, v: std::option::Option<T>) -> Self
12104 where
12105 T: std::convert::Into<crate::model::DataTaxonomy>,
12106 {
12107 self.0.request.data_taxonomy = v.map(|x| x.into());
12108 self
12109 }
12110
12111 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
12113 self.0.request.validate_only = v.into();
12114 self
12115 }
12116 }
12117
12118 #[doc(hidden)]
12119 impl crate::RequestBuilder for UpdateDataTaxonomy {
12120 fn request_options(&mut self) -> &mut crate::RequestOptions {
12121 &mut self.0.options
12122 }
12123 }
12124
12125 #[derive(Clone, Debug)]
12143 pub struct DeleteDataTaxonomy(RequestBuilder<crate::model::DeleteDataTaxonomyRequest>);
12144
12145 impl DeleteDataTaxonomy {
12146 pub(crate) fn new(
12147 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12148 ) -> Self {
12149 Self(RequestBuilder::new(stub))
12150 }
12151
12152 pub fn with_request<V: Into<crate::model::DeleteDataTaxonomyRequest>>(
12154 mut self,
12155 v: V,
12156 ) -> Self {
12157 self.0.request = v.into();
12158 self
12159 }
12160
12161 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12163 self.0.options = v.into();
12164 self
12165 }
12166
12167 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
12174 (*self.0.stub)
12175 .delete_data_taxonomy(self.0.request, self.0.options)
12176 .await
12177 .map(crate::Response::into_body)
12178 }
12179
12180 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
12182 type Operation =
12183 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
12184 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
12185 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
12186 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
12187 if let Some(ref mut details) = poller_options.tracing {
12188 details.method_name = "google_cloud_dataplex_v1::client::DataTaxonomyService::delete_data_taxonomy::until_done";
12189 }
12190
12191 let stub = self.0.stub.clone();
12192 let mut options = self.0.options.clone();
12193 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
12194 let query = move |name| {
12195 let stub = stub.clone();
12196 let options = options.clone();
12197 async {
12198 let op = GetOperation::new(stub)
12199 .set_name(name)
12200 .with_options(options)
12201 .send()
12202 .await?;
12203 Ok(Operation::new(op))
12204 }
12205 };
12206
12207 let start = move || async {
12208 let op = self.send().await?;
12209 Ok(Operation::new(op))
12210 };
12211
12212 use google_cloud_lro::internal::PollerExt;
12213 {
12214 google_cloud_lro::internal::new_unit_response_poller(
12215 polling_error_policy,
12216 polling_backoff_policy,
12217 start,
12218 query,
12219 )
12220 }
12221 .with_options(poller_options)
12222 }
12223
12224 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12228 self.0.request.name = v.into();
12229 self
12230 }
12231
12232 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
12234 self.0.request.etag = v.into();
12235 self
12236 }
12237 }
12238
12239 #[doc(hidden)]
12240 impl crate::RequestBuilder for DeleteDataTaxonomy {
12241 fn request_options(&mut self) -> &mut crate::RequestOptions {
12242 &mut self.0.options
12243 }
12244 }
12245
12246 #[derive(Clone, Debug)]
12267 pub struct ListDataTaxonomies(RequestBuilder<crate::model::ListDataTaxonomiesRequest>);
12268
12269 impl ListDataTaxonomies {
12270 pub(crate) fn new(
12271 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12272 ) -> Self {
12273 Self(RequestBuilder::new(stub))
12274 }
12275
12276 pub fn with_request<V: Into<crate::model::ListDataTaxonomiesRequest>>(
12278 mut self,
12279 v: V,
12280 ) -> Self {
12281 self.0.request = v.into();
12282 self
12283 }
12284
12285 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12287 self.0.options = v.into();
12288 self
12289 }
12290
12291 pub async fn send(self) -> Result<crate::model::ListDataTaxonomiesResponse> {
12293 (*self.0.stub)
12294 .list_data_taxonomies(self.0.request, self.0.options)
12295 .await
12296 .map(crate::Response::into_body)
12297 }
12298
12299 pub fn by_page(
12301 self,
12302 ) -> impl google_cloud_gax::paginator::Paginator<
12303 crate::model::ListDataTaxonomiesResponse,
12304 crate::Error,
12305 > {
12306 use std::clone::Clone;
12307 let token = self.0.request.page_token.clone();
12308 let execute = move |token: String| {
12309 let mut builder = self.clone();
12310 builder.0.request = builder.0.request.set_page_token(token);
12311 builder.send()
12312 };
12313 google_cloud_gax::paginator::internal::new_paginator(token, execute)
12314 }
12315
12316 pub fn by_item(
12318 self,
12319 ) -> impl google_cloud_gax::paginator::ItemPaginator<
12320 crate::model::ListDataTaxonomiesResponse,
12321 crate::Error,
12322 > {
12323 use google_cloud_gax::paginator::Paginator;
12324 self.by_page().items()
12325 }
12326
12327 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
12331 self.0.request.parent = v.into();
12332 self
12333 }
12334
12335 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
12337 self.0.request.page_size = v.into();
12338 self
12339 }
12340
12341 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
12343 self.0.request.page_token = v.into();
12344 self
12345 }
12346
12347 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
12349 self.0.request.filter = v.into();
12350 self
12351 }
12352
12353 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
12355 self.0.request.order_by = v.into();
12356 self
12357 }
12358 }
12359
12360 #[doc(hidden)]
12361 impl crate::RequestBuilder for ListDataTaxonomies {
12362 fn request_options(&mut self) -> &mut crate::RequestOptions {
12363 &mut self.0.options
12364 }
12365 }
12366
12367 #[derive(Clone, Debug)]
12384 pub struct GetDataTaxonomy(RequestBuilder<crate::model::GetDataTaxonomyRequest>);
12385
12386 impl GetDataTaxonomy {
12387 pub(crate) fn new(
12388 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12389 ) -> Self {
12390 Self(RequestBuilder::new(stub))
12391 }
12392
12393 pub fn with_request<V: Into<crate::model::GetDataTaxonomyRequest>>(mut self, v: V) -> Self {
12395 self.0.request = v.into();
12396 self
12397 }
12398
12399 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12401 self.0.options = v.into();
12402 self
12403 }
12404
12405 pub async fn send(self) -> Result<crate::model::DataTaxonomy> {
12407 (*self.0.stub)
12408 .get_data_taxonomy(self.0.request, self.0.options)
12409 .await
12410 .map(crate::Response::into_body)
12411 }
12412
12413 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12417 self.0.request.name = v.into();
12418 self
12419 }
12420 }
12421
12422 #[doc(hidden)]
12423 impl crate::RequestBuilder for GetDataTaxonomy {
12424 fn request_options(&mut self) -> &mut crate::RequestOptions {
12425 &mut self.0.options
12426 }
12427 }
12428
12429 #[derive(Clone, Debug)]
12447 pub struct CreateDataAttributeBinding(
12448 RequestBuilder<crate::model::CreateDataAttributeBindingRequest>,
12449 );
12450
12451 impl CreateDataAttributeBinding {
12452 pub(crate) fn new(
12453 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12454 ) -> Self {
12455 Self(RequestBuilder::new(stub))
12456 }
12457
12458 pub fn with_request<V: Into<crate::model::CreateDataAttributeBindingRequest>>(
12460 mut self,
12461 v: V,
12462 ) -> Self {
12463 self.0.request = v.into();
12464 self
12465 }
12466
12467 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12469 self.0.options = v.into();
12470 self
12471 }
12472
12473 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
12480 (*self.0.stub)
12481 .create_data_attribute_binding(self.0.request, self.0.options)
12482 .await
12483 .map(crate::Response::into_body)
12484 }
12485
12486 pub fn poller(
12488 self,
12489 ) -> impl google_cloud_lro::Poller<
12490 crate::model::DataAttributeBinding,
12491 crate::model::OperationMetadata,
12492 > {
12493 type Operation = google_cloud_lro::internal::Operation<
12494 crate::model::DataAttributeBinding,
12495 crate::model::OperationMetadata,
12496 >;
12497 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
12498 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
12499 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
12500 if let Some(ref mut details) = poller_options.tracing {
12501 details.method_name = "google_cloud_dataplex_v1::client::DataTaxonomyService::create_data_attribute_binding::until_done";
12502 }
12503
12504 let stub = self.0.stub.clone();
12505 let mut options = self.0.options.clone();
12506 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
12507 let query = move |name| {
12508 let stub = stub.clone();
12509 let options = options.clone();
12510 async {
12511 let op = GetOperation::new(stub)
12512 .set_name(name)
12513 .with_options(options)
12514 .send()
12515 .await?;
12516 Ok(Operation::new(op))
12517 }
12518 };
12519
12520 let start = move || async {
12521 let op = self.send().await?;
12522 Ok(Operation::new(op))
12523 };
12524
12525 use google_cloud_lro::internal::PollerExt;
12526 {
12527 google_cloud_lro::internal::new_poller(
12528 polling_error_policy,
12529 polling_backoff_policy,
12530 start,
12531 query,
12532 )
12533 }
12534 .with_options(poller_options)
12535 }
12536
12537 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
12541 self.0.request.parent = v.into();
12542 self
12543 }
12544
12545 pub fn set_data_attribute_binding_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
12549 self.0.request.data_attribute_binding_id = v.into();
12550 self
12551 }
12552
12553 pub fn set_data_attribute_binding<T>(mut self, v: T) -> Self
12557 where
12558 T: std::convert::Into<crate::model::DataAttributeBinding>,
12559 {
12560 self.0.request.data_attribute_binding = std::option::Option::Some(v.into());
12561 self
12562 }
12563
12564 pub fn set_or_clear_data_attribute_binding<T>(mut self, v: std::option::Option<T>) -> Self
12568 where
12569 T: std::convert::Into<crate::model::DataAttributeBinding>,
12570 {
12571 self.0.request.data_attribute_binding = v.map(|x| x.into());
12572 self
12573 }
12574
12575 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
12577 self.0.request.validate_only = v.into();
12578 self
12579 }
12580 }
12581
12582 #[doc(hidden)]
12583 impl crate::RequestBuilder for CreateDataAttributeBinding {
12584 fn request_options(&mut self) -> &mut crate::RequestOptions {
12585 &mut self.0.options
12586 }
12587 }
12588
12589 #[derive(Clone, Debug)]
12607 pub struct UpdateDataAttributeBinding(
12608 RequestBuilder<crate::model::UpdateDataAttributeBindingRequest>,
12609 );
12610
12611 impl UpdateDataAttributeBinding {
12612 pub(crate) fn new(
12613 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12614 ) -> Self {
12615 Self(RequestBuilder::new(stub))
12616 }
12617
12618 pub fn with_request<V: Into<crate::model::UpdateDataAttributeBindingRequest>>(
12620 mut self,
12621 v: V,
12622 ) -> Self {
12623 self.0.request = v.into();
12624 self
12625 }
12626
12627 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12629 self.0.options = v.into();
12630 self
12631 }
12632
12633 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
12640 (*self.0.stub)
12641 .update_data_attribute_binding(self.0.request, self.0.options)
12642 .await
12643 .map(crate::Response::into_body)
12644 }
12645
12646 pub fn poller(
12648 self,
12649 ) -> impl google_cloud_lro::Poller<
12650 crate::model::DataAttributeBinding,
12651 crate::model::OperationMetadata,
12652 > {
12653 type Operation = google_cloud_lro::internal::Operation<
12654 crate::model::DataAttributeBinding,
12655 crate::model::OperationMetadata,
12656 >;
12657 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
12658 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
12659 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
12660 if let Some(ref mut details) = poller_options.tracing {
12661 details.method_name = "google_cloud_dataplex_v1::client::DataTaxonomyService::update_data_attribute_binding::until_done";
12662 }
12663
12664 let stub = self.0.stub.clone();
12665 let mut options = self.0.options.clone();
12666 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
12667 let query = move |name| {
12668 let stub = stub.clone();
12669 let options = options.clone();
12670 async {
12671 let op = GetOperation::new(stub)
12672 .set_name(name)
12673 .with_options(options)
12674 .send()
12675 .await?;
12676 Ok(Operation::new(op))
12677 }
12678 };
12679
12680 let start = move || async {
12681 let op = self.send().await?;
12682 Ok(Operation::new(op))
12683 };
12684
12685 use google_cloud_lro::internal::PollerExt;
12686 {
12687 google_cloud_lro::internal::new_poller(
12688 polling_error_policy,
12689 polling_backoff_policy,
12690 start,
12691 query,
12692 )
12693 }
12694 .with_options(poller_options)
12695 }
12696
12697 pub fn set_update_mask<T>(mut self, v: T) -> Self
12701 where
12702 T: std::convert::Into<wkt::FieldMask>,
12703 {
12704 self.0.request.update_mask = std::option::Option::Some(v.into());
12705 self
12706 }
12707
12708 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
12712 where
12713 T: std::convert::Into<wkt::FieldMask>,
12714 {
12715 self.0.request.update_mask = v.map(|x| x.into());
12716 self
12717 }
12718
12719 pub fn set_data_attribute_binding<T>(mut self, v: T) -> Self
12723 where
12724 T: std::convert::Into<crate::model::DataAttributeBinding>,
12725 {
12726 self.0.request.data_attribute_binding = std::option::Option::Some(v.into());
12727 self
12728 }
12729
12730 pub fn set_or_clear_data_attribute_binding<T>(mut self, v: std::option::Option<T>) -> Self
12734 where
12735 T: std::convert::Into<crate::model::DataAttributeBinding>,
12736 {
12737 self.0.request.data_attribute_binding = v.map(|x| x.into());
12738 self
12739 }
12740
12741 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
12743 self.0.request.validate_only = v.into();
12744 self
12745 }
12746 }
12747
12748 #[doc(hidden)]
12749 impl crate::RequestBuilder for UpdateDataAttributeBinding {
12750 fn request_options(&mut self) -> &mut crate::RequestOptions {
12751 &mut self.0.options
12752 }
12753 }
12754
12755 #[derive(Clone, Debug)]
12773 pub struct DeleteDataAttributeBinding(
12774 RequestBuilder<crate::model::DeleteDataAttributeBindingRequest>,
12775 );
12776
12777 impl DeleteDataAttributeBinding {
12778 pub(crate) fn new(
12779 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12780 ) -> Self {
12781 Self(RequestBuilder::new(stub))
12782 }
12783
12784 pub fn with_request<V: Into<crate::model::DeleteDataAttributeBindingRequest>>(
12786 mut self,
12787 v: V,
12788 ) -> Self {
12789 self.0.request = v.into();
12790 self
12791 }
12792
12793 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12795 self.0.options = v.into();
12796 self
12797 }
12798
12799 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
12806 (*self.0.stub)
12807 .delete_data_attribute_binding(self.0.request, self.0.options)
12808 .await
12809 .map(crate::Response::into_body)
12810 }
12811
12812 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
12814 type Operation =
12815 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
12816 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
12817 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
12818 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
12819 if let Some(ref mut details) = poller_options.tracing {
12820 details.method_name = "google_cloud_dataplex_v1::client::DataTaxonomyService::delete_data_attribute_binding::until_done";
12821 }
12822
12823 let stub = self.0.stub.clone();
12824 let mut options = self.0.options.clone();
12825 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
12826 let query = move |name| {
12827 let stub = stub.clone();
12828 let options = options.clone();
12829 async {
12830 let op = GetOperation::new(stub)
12831 .set_name(name)
12832 .with_options(options)
12833 .send()
12834 .await?;
12835 Ok(Operation::new(op))
12836 }
12837 };
12838
12839 let start = move || async {
12840 let op = self.send().await?;
12841 Ok(Operation::new(op))
12842 };
12843
12844 use google_cloud_lro::internal::PollerExt;
12845 {
12846 google_cloud_lro::internal::new_unit_response_poller(
12847 polling_error_policy,
12848 polling_backoff_policy,
12849 start,
12850 query,
12851 )
12852 }
12853 .with_options(poller_options)
12854 }
12855
12856 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12860 self.0.request.name = v.into();
12861 self
12862 }
12863
12864 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
12868 self.0.request.etag = v.into();
12869 self
12870 }
12871 }
12872
12873 #[doc(hidden)]
12874 impl crate::RequestBuilder for DeleteDataAttributeBinding {
12875 fn request_options(&mut self) -> &mut crate::RequestOptions {
12876 &mut self.0.options
12877 }
12878 }
12879
12880 #[derive(Clone, Debug)]
12901 pub struct ListDataAttributeBindings(
12902 RequestBuilder<crate::model::ListDataAttributeBindingsRequest>,
12903 );
12904
12905 impl ListDataAttributeBindings {
12906 pub(crate) fn new(
12907 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
12908 ) -> Self {
12909 Self(RequestBuilder::new(stub))
12910 }
12911
12912 pub fn with_request<V: Into<crate::model::ListDataAttributeBindingsRequest>>(
12914 mut self,
12915 v: V,
12916 ) -> Self {
12917 self.0.request = v.into();
12918 self
12919 }
12920
12921 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
12923 self.0.options = v.into();
12924 self
12925 }
12926
12927 pub async fn send(self) -> Result<crate::model::ListDataAttributeBindingsResponse> {
12929 (*self.0.stub)
12930 .list_data_attribute_bindings(self.0.request, self.0.options)
12931 .await
12932 .map(crate::Response::into_body)
12933 }
12934
12935 pub fn by_page(
12937 self,
12938 ) -> impl google_cloud_gax::paginator::Paginator<
12939 crate::model::ListDataAttributeBindingsResponse,
12940 crate::Error,
12941 > {
12942 use std::clone::Clone;
12943 let token = self.0.request.page_token.clone();
12944 let execute = move |token: String| {
12945 let mut builder = self.clone();
12946 builder.0.request = builder.0.request.set_page_token(token);
12947 builder.send()
12948 };
12949 google_cloud_gax::paginator::internal::new_paginator(token, execute)
12950 }
12951
12952 pub fn by_item(
12954 self,
12955 ) -> impl google_cloud_gax::paginator::ItemPaginator<
12956 crate::model::ListDataAttributeBindingsResponse,
12957 crate::Error,
12958 > {
12959 use google_cloud_gax::paginator::Paginator;
12960 self.by_page().items()
12961 }
12962
12963 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
12967 self.0.request.parent = v.into();
12968 self
12969 }
12970
12971 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
12973 self.0.request.page_size = v.into();
12974 self
12975 }
12976
12977 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
12979 self.0.request.page_token = v.into();
12980 self
12981 }
12982
12983 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
12985 self.0.request.filter = v.into();
12986 self
12987 }
12988
12989 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
12991 self.0.request.order_by = v.into();
12992 self
12993 }
12994 }
12995
12996 #[doc(hidden)]
12997 impl crate::RequestBuilder for ListDataAttributeBindings {
12998 fn request_options(&mut self) -> &mut crate::RequestOptions {
12999 &mut self.0.options
13000 }
13001 }
13002
13003 #[derive(Clone, Debug)]
13020 pub struct GetDataAttributeBinding(
13021 RequestBuilder<crate::model::GetDataAttributeBindingRequest>,
13022 );
13023
13024 impl GetDataAttributeBinding {
13025 pub(crate) fn new(
13026 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13027 ) -> Self {
13028 Self(RequestBuilder::new(stub))
13029 }
13030
13031 pub fn with_request<V: Into<crate::model::GetDataAttributeBindingRequest>>(
13033 mut self,
13034 v: V,
13035 ) -> Self {
13036 self.0.request = v.into();
13037 self
13038 }
13039
13040 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13042 self.0.options = v.into();
13043 self
13044 }
13045
13046 pub async fn send(self) -> Result<crate::model::DataAttributeBinding> {
13048 (*self.0.stub)
13049 .get_data_attribute_binding(self.0.request, self.0.options)
13050 .await
13051 .map(crate::Response::into_body)
13052 }
13053
13054 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13058 self.0.request.name = v.into();
13059 self
13060 }
13061 }
13062
13063 #[doc(hidden)]
13064 impl crate::RequestBuilder for GetDataAttributeBinding {
13065 fn request_options(&mut self) -> &mut crate::RequestOptions {
13066 &mut self.0.options
13067 }
13068 }
13069
13070 #[derive(Clone, Debug)]
13088 pub struct CreateDataAttribute(RequestBuilder<crate::model::CreateDataAttributeRequest>);
13089
13090 impl CreateDataAttribute {
13091 pub(crate) fn new(
13092 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13093 ) -> Self {
13094 Self(RequestBuilder::new(stub))
13095 }
13096
13097 pub fn with_request<V: Into<crate::model::CreateDataAttributeRequest>>(
13099 mut self,
13100 v: V,
13101 ) -> Self {
13102 self.0.request = v.into();
13103 self
13104 }
13105
13106 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13108 self.0.options = v.into();
13109 self
13110 }
13111
13112 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
13119 (*self.0.stub)
13120 .create_data_attribute(self.0.request, self.0.options)
13121 .await
13122 .map(crate::Response::into_body)
13123 }
13124
13125 pub fn poller(
13127 self,
13128 ) -> impl google_cloud_lro::Poller<crate::model::DataAttribute, crate::model::OperationMetadata>
13129 {
13130 type Operation = google_cloud_lro::internal::Operation<
13131 crate::model::DataAttribute,
13132 crate::model::OperationMetadata,
13133 >;
13134 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
13135 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
13136 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
13137 if let Some(ref mut details) = poller_options.tracing {
13138 details.method_name = "google_cloud_dataplex_v1::client::DataTaxonomyService::create_data_attribute::until_done";
13139 }
13140
13141 let stub = self.0.stub.clone();
13142 let mut options = self.0.options.clone();
13143 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
13144 let query = move |name| {
13145 let stub = stub.clone();
13146 let options = options.clone();
13147 async {
13148 let op = GetOperation::new(stub)
13149 .set_name(name)
13150 .with_options(options)
13151 .send()
13152 .await?;
13153 Ok(Operation::new(op))
13154 }
13155 };
13156
13157 let start = move || async {
13158 let op = self.send().await?;
13159 Ok(Operation::new(op))
13160 };
13161
13162 use google_cloud_lro::internal::PollerExt;
13163 {
13164 google_cloud_lro::internal::new_poller(
13165 polling_error_policy,
13166 polling_backoff_policy,
13167 start,
13168 query,
13169 )
13170 }
13171 .with_options(poller_options)
13172 }
13173
13174 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
13178 self.0.request.parent = v.into();
13179 self
13180 }
13181
13182 pub fn set_data_attribute_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
13186 self.0.request.data_attribute_id = v.into();
13187 self
13188 }
13189
13190 pub fn set_data_attribute<T>(mut self, v: T) -> Self
13194 where
13195 T: std::convert::Into<crate::model::DataAttribute>,
13196 {
13197 self.0.request.data_attribute = std::option::Option::Some(v.into());
13198 self
13199 }
13200
13201 pub fn set_or_clear_data_attribute<T>(mut self, v: std::option::Option<T>) -> Self
13205 where
13206 T: std::convert::Into<crate::model::DataAttribute>,
13207 {
13208 self.0.request.data_attribute = v.map(|x| x.into());
13209 self
13210 }
13211
13212 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
13214 self.0.request.validate_only = v.into();
13215 self
13216 }
13217 }
13218
13219 #[doc(hidden)]
13220 impl crate::RequestBuilder for CreateDataAttribute {
13221 fn request_options(&mut self) -> &mut crate::RequestOptions {
13222 &mut self.0.options
13223 }
13224 }
13225
13226 #[derive(Clone, Debug)]
13244 pub struct UpdateDataAttribute(RequestBuilder<crate::model::UpdateDataAttributeRequest>);
13245
13246 impl UpdateDataAttribute {
13247 pub(crate) fn new(
13248 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13249 ) -> Self {
13250 Self(RequestBuilder::new(stub))
13251 }
13252
13253 pub fn with_request<V: Into<crate::model::UpdateDataAttributeRequest>>(
13255 mut self,
13256 v: V,
13257 ) -> Self {
13258 self.0.request = v.into();
13259 self
13260 }
13261
13262 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13264 self.0.options = v.into();
13265 self
13266 }
13267
13268 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
13275 (*self.0.stub)
13276 .update_data_attribute(self.0.request, self.0.options)
13277 .await
13278 .map(crate::Response::into_body)
13279 }
13280
13281 pub fn poller(
13283 self,
13284 ) -> impl google_cloud_lro::Poller<crate::model::DataAttribute, crate::model::OperationMetadata>
13285 {
13286 type Operation = google_cloud_lro::internal::Operation<
13287 crate::model::DataAttribute,
13288 crate::model::OperationMetadata,
13289 >;
13290 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
13291 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
13292 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
13293 if let Some(ref mut details) = poller_options.tracing {
13294 details.method_name = "google_cloud_dataplex_v1::client::DataTaxonomyService::update_data_attribute::until_done";
13295 }
13296
13297 let stub = self.0.stub.clone();
13298 let mut options = self.0.options.clone();
13299 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
13300 let query = move |name| {
13301 let stub = stub.clone();
13302 let options = options.clone();
13303 async {
13304 let op = GetOperation::new(stub)
13305 .set_name(name)
13306 .with_options(options)
13307 .send()
13308 .await?;
13309 Ok(Operation::new(op))
13310 }
13311 };
13312
13313 let start = move || async {
13314 let op = self.send().await?;
13315 Ok(Operation::new(op))
13316 };
13317
13318 use google_cloud_lro::internal::PollerExt;
13319 {
13320 google_cloud_lro::internal::new_poller(
13321 polling_error_policy,
13322 polling_backoff_policy,
13323 start,
13324 query,
13325 )
13326 }
13327 .with_options(poller_options)
13328 }
13329
13330 pub fn set_update_mask<T>(mut self, v: T) -> Self
13334 where
13335 T: std::convert::Into<wkt::FieldMask>,
13336 {
13337 self.0.request.update_mask = std::option::Option::Some(v.into());
13338 self
13339 }
13340
13341 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
13345 where
13346 T: std::convert::Into<wkt::FieldMask>,
13347 {
13348 self.0.request.update_mask = v.map(|x| x.into());
13349 self
13350 }
13351
13352 pub fn set_data_attribute<T>(mut self, v: T) -> Self
13356 where
13357 T: std::convert::Into<crate::model::DataAttribute>,
13358 {
13359 self.0.request.data_attribute = std::option::Option::Some(v.into());
13360 self
13361 }
13362
13363 pub fn set_or_clear_data_attribute<T>(mut self, v: std::option::Option<T>) -> Self
13367 where
13368 T: std::convert::Into<crate::model::DataAttribute>,
13369 {
13370 self.0.request.data_attribute = v.map(|x| x.into());
13371 self
13372 }
13373
13374 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
13376 self.0.request.validate_only = v.into();
13377 self
13378 }
13379 }
13380
13381 #[doc(hidden)]
13382 impl crate::RequestBuilder for UpdateDataAttribute {
13383 fn request_options(&mut self) -> &mut crate::RequestOptions {
13384 &mut self.0.options
13385 }
13386 }
13387
13388 #[derive(Clone, Debug)]
13406 pub struct DeleteDataAttribute(RequestBuilder<crate::model::DeleteDataAttributeRequest>);
13407
13408 impl DeleteDataAttribute {
13409 pub(crate) fn new(
13410 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13411 ) -> Self {
13412 Self(RequestBuilder::new(stub))
13413 }
13414
13415 pub fn with_request<V: Into<crate::model::DeleteDataAttributeRequest>>(
13417 mut self,
13418 v: V,
13419 ) -> Self {
13420 self.0.request = v.into();
13421 self
13422 }
13423
13424 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13426 self.0.options = v.into();
13427 self
13428 }
13429
13430 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
13437 (*self.0.stub)
13438 .delete_data_attribute(self.0.request, self.0.options)
13439 .await
13440 .map(crate::Response::into_body)
13441 }
13442
13443 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
13445 type Operation =
13446 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
13447 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
13448 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
13449 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
13450 if let Some(ref mut details) = poller_options.tracing {
13451 details.method_name = "google_cloud_dataplex_v1::client::DataTaxonomyService::delete_data_attribute::until_done";
13452 }
13453
13454 let stub = self.0.stub.clone();
13455 let mut options = self.0.options.clone();
13456 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
13457 let query = move |name| {
13458 let stub = stub.clone();
13459 let options = options.clone();
13460 async {
13461 let op = GetOperation::new(stub)
13462 .set_name(name)
13463 .with_options(options)
13464 .send()
13465 .await?;
13466 Ok(Operation::new(op))
13467 }
13468 };
13469
13470 let start = move || async {
13471 let op = self.send().await?;
13472 Ok(Operation::new(op))
13473 };
13474
13475 use google_cloud_lro::internal::PollerExt;
13476 {
13477 google_cloud_lro::internal::new_unit_response_poller(
13478 polling_error_policy,
13479 polling_backoff_policy,
13480 start,
13481 query,
13482 )
13483 }
13484 .with_options(poller_options)
13485 }
13486
13487 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13491 self.0.request.name = v.into();
13492 self
13493 }
13494
13495 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
13497 self.0.request.etag = v.into();
13498 self
13499 }
13500 }
13501
13502 #[doc(hidden)]
13503 impl crate::RequestBuilder for DeleteDataAttribute {
13504 fn request_options(&mut self) -> &mut crate::RequestOptions {
13505 &mut self.0.options
13506 }
13507 }
13508
13509 #[derive(Clone, Debug)]
13530 pub struct ListDataAttributes(RequestBuilder<crate::model::ListDataAttributesRequest>);
13531
13532 impl ListDataAttributes {
13533 pub(crate) fn new(
13534 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13535 ) -> Self {
13536 Self(RequestBuilder::new(stub))
13537 }
13538
13539 pub fn with_request<V: Into<crate::model::ListDataAttributesRequest>>(
13541 mut self,
13542 v: V,
13543 ) -> Self {
13544 self.0.request = v.into();
13545 self
13546 }
13547
13548 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13550 self.0.options = v.into();
13551 self
13552 }
13553
13554 pub async fn send(self) -> Result<crate::model::ListDataAttributesResponse> {
13556 (*self.0.stub)
13557 .list_data_attributes(self.0.request, self.0.options)
13558 .await
13559 .map(crate::Response::into_body)
13560 }
13561
13562 pub fn by_page(
13564 self,
13565 ) -> impl google_cloud_gax::paginator::Paginator<
13566 crate::model::ListDataAttributesResponse,
13567 crate::Error,
13568 > {
13569 use std::clone::Clone;
13570 let token = self.0.request.page_token.clone();
13571 let execute = move |token: String| {
13572 let mut builder = self.clone();
13573 builder.0.request = builder.0.request.set_page_token(token);
13574 builder.send()
13575 };
13576 google_cloud_gax::paginator::internal::new_paginator(token, execute)
13577 }
13578
13579 pub fn by_item(
13581 self,
13582 ) -> impl google_cloud_gax::paginator::ItemPaginator<
13583 crate::model::ListDataAttributesResponse,
13584 crate::Error,
13585 > {
13586 use google_cloud_gax::paginator::Paginator;
13587 self.by_page().items()
13588 }
13589
13590 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
13594 self.0.request.parent = v.into();
13595 self
13596 }
13597
13598 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
13600 self.0.request.page_size = v.into();
13601 self
13602 }
13603
13604 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
13606 self.0.request.page_token = v.into();
13607 self
13608 }
13609
13610 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
13612 self.0.request.filter = v.into();
13613 self
13614 }
13615
13616 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
13618 self.0.request.order_by = v.into();
13619 self
13620 }
13621 }
13622
13623 #[doc(hidden)]
13624 impl crate::RequestBuilder for ListDataAttributes {
13625 fn request_options(&mut self) -> &mut crate::RequestOptions {
13626 &mut self.0.options
13627 }
13628 }
13629
13630 #[derive(Clone, Debug)]
13647 pub struct GetDataAttribute(RequestBuilder<crate::model::GetDataAttributeRequest>);
13648
13649 impl GetDataAttribute {
13650 pub(crate) fn new(
13651 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13652 ) -> Self {
13653 Self(RequestBuilder::new(stub))
13654 }
13655
13656 pub fn with_request<V: Into<crate::model::GetDataAttributeRequest>>(
13658 mut self,
13659 v: V,
13660 ) -> Self {
13661 self.0.request = v.into();
13662 self
13663 }
13664
13665 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13667 self.0.options = v.into();
13668 self
13669 }
13670
13671 pub async fn send(self) -> Result<crate::model::DataAttribute> {
13673 (*self.0.stub)
13674 .get_data_attribute(self.0.request, self.0.options)
13675 .await
13676 .map(crate::Response::into_body)
13677 }
13678
13679 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13683 self.0.request.name = v.into();
13684 self
13685 }
13686 }
13687
13688 #[doc(hidden)]
13689 impl crate::RequestBuilder for GetDataAttribute {
13690 fn request_options(&mut self) -> &mut crate::RequestOptions {
13691 &mut self.0.options
13692 }
13693 }
13694
13695 #[derive(Clone, Debug)]
13716 pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
13717
13718 impl ListLocations {
13719 pub(crate) fn new(
13720 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13721 ) -> Self {
13722 Self(RequestBuilder::new(stub))
13723 }
13724
13725 pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
13727 mut self,
13728 v: V,
13729 ) -> Self {
13730 self.0.request = v.into();
13731 self
13732 }
13733
13734 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13736 self.0.options = v.into();
13737 self
13738 }
13739
13740 pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
13742 (*self.0.stub)
13743 .list_locations(self.0.request, self.0.options)
13744 .await
13745 .map(crate::Response::into_body)
13746 }
13747
13748 pub fn by_page(
13750 self,
13751 ) -> impl google_cloud_gax::paginator::Paginator<
13752 google_cloud_location::model::ListLocationsResponse,
13753 crate::Error,
13754 > {
13755 use std::clone::Clone;
13756 let token = self.0.request.page_token.clone();
13757 let execute = move |token: String| {
13758 let mut builder = self.clone();
13759 builder.0.request = builder.0.request.set_page_token(token);
13760 builder.send()
13761 };
13762 google_cloud_gax::paginator::internal::new_paginator(token, execute)
13763 }
13764
13765 pub fn by_item(
13767 self,
13768 ) -> impl google_cloud_gax::paginator::ItemPaginator<
13769 google_cloud_location::model::ListLocationsResponse,
13770 crate::Error,
13771 > {
13772 use google_cloud_gax::paginator::Paginator;
13773 self.by_page().items()
13774 }
13775
13776 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13778 self.0.request.name = v.into();
13779 self
13780 }
13781
13782 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
13784 self.0.request.filter = v.into();
13785 self
13786 }
13787
13788 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
13790 self.0.request.page_size = v.into();
13791 self
13792 }
13793
13794 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
13796 self.0.request.page_token = v.into();
13797 self
13798 }
13799 }
13800
13801 #[doc(hidden)]
13802 impl crate::RequestBuilder for ListLocations {
13803 fn request_options(&mut self) -> &mut crate::RequestOptions {
13804 &mut self.0.options
13805 }
13806 }
13807
13808 #[derive(Clone, Debug)]
13825 pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
13826
13827 impl GetLocation {
13828 pub(crate) fn new(
13829 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13830 ) -> Self {
13831 Self(RequestBuilder::new(stub))
13832 }
13833
13834 pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
13836 mut self,
13837 v: V,
13838 ) -> Self {
13839 self.0.request = v.into();
13840 self
13841 }
13842
13843 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13845 self.0.options = v.into();
13846 self
13847 }
13848
13849 pub async fn send(self) -> Result<google_cloud_location::model::Location> {
13851 (*self.0.stub)
13852 .get_location(self.0.request, self.0.options)
13853 .await
13854 .map(crate::Response::into_body)
13855 }
13856
13857 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13859 self.0.request.name = v.into();
13860 self
13861 }
13862 }
13863
13864 #[doc(hidden)]
13865 impl crate::RequestBuilder for GetLocation {
13866 fn request_options(&mut self) -> &mut crate::RequestOptions {
13867 &mut self.0.options
13868 }
13869 }
13870
13871 #[derive(Clone, Debug)]
13888 pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
13889
13890 impl SetIamPolicy {
13891 pub(crate) fn new(
13892 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13893 ) -> Self {
13894 Self(RequestBuilder::new(stub))
13895 }
13896
13897 pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
13899 mut self,
13900 v: V,
13901 ) -> Self {
13902 self.0.request = v.into();
13903 self
13904 }
13905
13906 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
13908 self.0.options = v.into();
13909 self
13910 }
13911
13912 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
13914 (*self.0.stub)
13915 .set_iam_policy(self.0.request, self.0.options)
13916 .await
13917 .map(crate::Response::into_body)
13918 }
13919
13920 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
13924 self.0.request.resource = v.into();
13925 self
13926 }
13927
13928 pub fn set_policy<T>(mut self, v: T) -> Self
13932 where
13933 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
13934 {
13935 self.0.request.policy = std::option::Option::Some(v.into());
13936 self
13937 }
13938
13939 pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
13943 where
13944 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
13945 {
13946 self.0.request.policy = v.map(|x| x.into());
13947 self
13948 }
13949
13950 pub fn set_update_mask<T>(mut self, v: T) -> Self
13952 where
13953 T: std::convert::Into<wkt::FieldMask>,
13954 {
13955 self.0.request.update_mask = std::option::Option::Some(v.into());
13956 self
13957 }
13958
13959 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
13961 where
13962 T: std::convert::Into<wkt::FieldMask>,
13963 {
13964 self.0.request.update_mask = v.map(|x| x.into());
13965 self
13966 }
13967 }
13968
13969 #[doc(hidden)]
13970 impl crate::RequestBuilder for SetIamPolicy {
13971 fn request_options(&mut self) -> &mut crate::RequestOptions {
13972 &mut self.0.options
13973 }
13974 }
13975
13976 #[derive(Clone, Debug)]
13993 pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
13994
13995 impl GetIamPolicy {
13996 pub(crate) fn new(
13997 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
13998 ) -> Self {
13999 Self(RequestBuilder::new(stub))
14000 }
14001
14002 pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
14004 mut self,
14005 v: V,
14006 ) -> Self {
14007 self.0.request = v.into();
14008 self
14009 }
14010
14011 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14013 self.0.options = v.into();
14014 self
14015 }
14016
14017 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
14019 (*self.0.stub)
14020 .get_iam_policy(self.0.request, self.0.options)
14021 .await
14022 .map(crate::Response::into_body)
14023 }
14024
14025 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
14029 self.0.request.resource = v.into();
14030 self
14031 }
14032
14033 pub fn set_options<T>(mut self, v: T) -> Self
14035 where
14036 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
14037 {
14038 self.0.request.options = std::option::Option::Some(v.into());
14039 self
14040 }
14041
14042 pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
14044 where
14045 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
14046 {
14047 self.0.request.options = v.map(|x| x.into());
14048 self
14049 }
14050 }
14051
14052 #[doc(hidden)]
14053 impl crate::RequestBuilder for GetIamPolicy {
14054 fn request_options(&mut self) -> &mut crate::RequestOptions {
14055 &mut self.0.options
14056 }
14057 }
14058
14059 #[derive(Clone, Debug)]
14076 pub struct TestIamPermissions(
14077 RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
14078 );
14079
14080 impl TestIamPermissions {
14081 pub(crate) fn new(
14082 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
14083 ) -> Self {
14084 Self(RequestBuilder::new(stub))
14085 }
14086
14087 pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
14089 mut self,
14090 v: V,
14091 ) -> Self {
14092 self.0.request = v.into();
14093 self
14094 }
14095
14096 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14098 self.0.options = v.into();
14099 self
14100 }
14101
14102 pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
14104 (*self.0.stub)
14105 .test_iam_permissions(self.0.request, self.0.options)
14106 .await
14107 .map(crate::Response::into_body)
14108 }
14109
14110 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
14114 self.0.request.resource = v.into();
14115 self
14116 }
14117
14118 pub fn set_permissions<T, V>(mut self, v: T) -> Self
14122 where
14123 T: std::iter::IntoIterator<Item = V>,
14124 V: std::convert::Into<std::string::String>,
14125 {
14126 use std::iter::Iterator;
14127 self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
14128 self
14129 }
14130 }
14131
14132 #[doc(hidden)]
14133 impl crate::RequestBuilder for TestIamPermissions {
14134 fn request_options(&mut self) -> &mut crate::RequestOptions {
14135 &mut self.0.options
14136 }
14137 }
14138
14139 #[derive(Clone, Debug)]
14160 pub struct ListOperations(
14161 RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
14162 );
14163
14164 impl ListOperations {
14165 pub(crate) fn new(
14166 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
14167 ) -> Self {
14168 Self(RequestBuilder::new(stub))
14169 }
14170
14171 pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
14173 mut self,
14174 v: V,
14175 ) -> Self {
14176 self.0.request = v.into();
14177 self
14178 }
14179
14180 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14182 self.0.options = v.into();
14183 self
14184 }
14185
14186 pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
14188 (*self.0.stub)
14189 .list_operations(self.0.request, self.0.options)
14190 .await
14191 .map(crate::Response::into_body)
14192 }
14193
14194 pub fn by_page(
14196 self,
14197 ) -> impl google_cloud_gax::paginator::Paginator<
14198 google_cloud_longrunning::model::ListOperationsResponse,
14199 crate::Error,
14200 > {
14201 use std::clone::Clone;
14202 let token = self.0.request.page_token.clone();
14203 let execute = move |token: String| {
14204 let mut builder = self.clone();
14205 builder.0.request = builder.0.request.set_page_token(token);
14206 builder.send()
14207 };
14208 google_cloud_gax::paginator::internal::new_paginator(token, execute)
14209 }
14210
14211 pub fn by_item(
14213 self,
14214 ) -> impl google_cloud_gax::paginator::ItemPaginator<
14215 google_cloud_longrunning::model::ListOperationsResponse,
14216 crate::Error,
14217 > {
14218 use google_cloud_gax::paginator::Paginator;
14219 self.by_page().items()
14220 }
14221
14222 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14224 self.0.request.name = v.into();
14225 self
14226 }
14227
14228 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
14230 self.0.request.filter = v.into();
14231 self
14232 }
14233
14234 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
14236 self.0.request.page_size = v.into();
14237 self
14238 }
14239
14240 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
14242 self.0.request.page_token = v.into();
14243 self
14244 }
14245
14246 pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
14248 self.0.request.return_partial_success = v.into();
14249 self
14250 }
14251 }
14252
14253 #[doc(hidden)]
14254 impl crate::RequestBuilder for ListOperations {
14255 fn request_options(&mut self) -> &mut crate::RequestOptions {
14256 &mut self.0.options
14257 }
14258 }
14259
14260 #[derive(Clone, Debug)]
14277 pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
14278
14279 impl GetOperation {
14280 pub(crate) fn new(
14281 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
14282 ) -> Self {
14283 Self(RequestBuilder::new(stub))
14284 }
14285
14286 pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
14288 mut self,
14289 v: V,
14290 ) -> Self {
14291 self.0.request = v.into();
14292 self
14293 }
14294
14295 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14297 self.0.options = v.into();
14298 self
14299 }
14300
14301 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
14303 (*self.0.stub)
14304 .get_operation(self.0.request, self.0.options)
14305 .await
14306 .map(crate::Response::into_body)
14307 }
14308
14309 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14311 self.0.request.name = v.into();
14312 self
14313 }
14314 }
14315
14316 #[doc(hidden)]
14317 impl crate::RequestBuilder for GetOperation {
14318 fn request_options(&mut self) -> &mut crate::RequestOptions {
14319 &mut self.0.options
14320 }
14321 }
14322
14323 #[derive(Clone, Debug)]
14340 pub struct DeleteOperation(
14341 RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
14342 );
14343
14344 impl DeleteOperation {
14345 pub(crate) fn new(
14346 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
14347 ) -> Self {
14348 Self(RequestBuilder::new(stub))
14349 }
14350
14351 pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
14353 mut self,
14354 v: V,
14355 ) -> Self {
14356 self.0.request = v.into();
14357 self
14358 }
14359
14360 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14362 self.0.options = v.into();
14363 self
14364 }
14365
14366 pub async fn send(self) -> Result<()> {
14368 (*self.0.stub)
14369 .delete_operation(self.0.request, self.0.options)
14370 .await
14371 .map(crate::Response::into_body)
14372 }
14373
14374 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14376 self.0.request.name = v.into();
14377 self
14378 }
14379 }
14380
14381 #[doc(hidden)]
14382 impl crate::RequestBuilder for DeleteOperation {
14383 fn request_options(&mut self) -> &mut crate::RequestOptions {
14384 &mut self.0.options
14385 }
14386 }
14387
14388 #[derive(Clone, Debug)]
14405 pub struct CancelOperation(
14406 RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
14407 );
14408
14409 impl CancelOperation {
14410 pub(crate) fn new(
14411 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
14412 ) -> Self {
14413 Self(RequestBuilder::new(stub))
14414 }
14415
14416 pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
14418 mut self,
14419 v: V,
14420 ) -> Self {
14421 self.0.request = v.into();
14422 self
14423 }
14424
14425 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14427 self.0.options = v.into();
14428 self
14429 }
14430
14431 pub async fn send(self) -> Result<()> {
14433 (*self.0.stub)
14434 .cancel_operation(self.0.request, self.0.options)
14435 .await
14436 .map(crate::Response::into_body)
14437 }
14438
14439 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14441 self.0.request.name = v.into();
14442 self
14443 }
14444 }
14445
14446 #[doc(hidden)]
14447 impl crate::RequestBuilder for CancelOperation {
14448 fn request_options(&mut self) -> &mut crate::RequestOptions {
14449 &mut self.0.options
14450 }
14451 }
14452}
14453
14454pub mod data_scan_service {
14456 use crate::Result;
14457
14458 pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
14472
14473 pub(crate) mod client {
14474 use super::super::super::client::DataScanService;
14475 pub struct Factory;
14476 impl crate::ClientFactory for Factory {
14477 type Client = DataScanService;
14478 type Credentials = gaxi::options::Credentials;
14479 async fn build(
14480 self,
14481 config: gaxi::options::ClientConfig,
14482 ) -> crate::ClientBuilderResult<Self::Client> {
14483 Self::Client::new(config).await
14484 }
14485 }
14486 }
14487
14488 #[derive(Clone, Debug)]
14490 pub(crate) struct RequestBuilder<R: std::default::Default> {
14491 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14492 request: R,
14493 options: crate::RequestOptions,
14494 }
14495
14496 impl<R> RequestBuilder<R>
14497 where
14498 R: std::default::Default,
14499 {
14500 pub(crate) fn new(
14501 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14502 ) -> Self {
14503 Self {
14504 stub,
14505 request: R::default(),
14506 options: crate::RequestOptions::default(),
14507 }
14508 }
14509 }
14510
14511 #[derive(Clone, Debug)]
14529 pub struct CreateDataScan(RequestBuilder<crate::model::CreateDataScanRequest>);
14530
14531 impl CreateDataScan {
14532 pub(crate) fn new(
14533 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14534 ) -> Self {
14535 Self(RequestBuilder::new(stub))
14536 }
14537
14538 pub fn with_request<V: Into<crate::model::CreateDataScanRequest>>(mut self, v: V) -> Self {
14540 self.0.request = v.into();
14541 self
14542 }
14543
14544 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14546 self.0.options = v.into();
14547 self
14548 }
14549
14550 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
14557 (*self.0.stub)
14558 .create_data_scan(self.0.request, self.0.options)
14559 .await
14560 .map(crate::Response::into_body)
14561 }
14562
14563 pub fn poller(
14565 self,
14566 ) -> impl google_cloud_lro::Poller<crate::model::DataScan, crate::model::OperationMetadata>
14567 {
14568 type Operation = google_cloud_lro::internal::Operation<
14569 crate::model::DataScan,
14570 crate::model::OperationMetadata,
14571 >;
14572 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
14573 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
14574 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
14575 if let Some(ref mut details) = poller_options.tracing {
14576 details.method_name = "google_cloud_dataplex_v1::client::DataScanService::create_data_scan::until_done";
14577 }
14578
14579 let stub = self.0.stub.clone();
14580 let mut options = self.0.options.clone();
14581 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
14582 let query = move |name| {
14583 let stub = stub.clone();
14584 let options = options.clone();
14585 async {
14586 let op = GetOperation::new(stub)
14587 .set_name(name)
14588 .with_options(options)
14589 .send()
14590 .await?;
14591 Ok(Operation::new(op))
14592 }
14593 };
14594
14595 let start = move || async {
14596 let op = self.send().await?;
14597 Ok(Operation::new(op))
14598 };
14599
14600 use google_cloud_lro::internal::PollerExt;
14601 {
14602 google_cloud_lro::internal::new_poller(
14603 polling_error_policy,
14604 polling_backoff_policy,
14605 start,
14606 query,
14607 )
14608 }
14609 .with_options(poller_options)
14610 }
14611
14612 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
14616 self.0.request.parent = v.into();
14617 self
14618 }
14619
14620 pub fn set_data_scan<T>(mut self, v: T) -> Self
14624 where
14625 T: std::convert::Into<crate::model::DataScan>,
14626 {
14627 self.0.request.data_scan = std::option::Option::Some(v.into());
14628 self
14629 }
14630
14631 pub fn set_or_clear_data_scan<T>(mut self, v: std::option::Option<T>) -> Self
14635 where
14636 T: std::convert::Into<crate::model::DataScan>,
14637 {
14638 self.0.request.data_scan = v.map(|x| x.into());
14639 self
14640 }
14641
14642 pub fn set_data_scan_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
14644 self.0.request.data_scan_id = v.into();
14645 self
14646 }
14647
14648 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
14650 self.0.request.validate_only = v.into();
14651 self
14652 }
14653 }
14654
14655 #[doc(hidden)]
14656 impl crate::RequestBuilder for CreateDataScan {
14657 fn request_options(&mut self) -> &mut crate::RequestOptions {
14658 &mut self.0.options
14659 }
14660 }
14661
14662 #[derive(Clone, Debug)]
14680 pub struct UpdateDataScan(RequestBuilder<crate::model::UpdateDataScanRequest>);
14681
14682 impl UpdateDataScan {
14683 pub(crate) fn new(
14684 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14685 ) -> Self {
14686 Self(RequestBuilder::new(stub))
14687 }
14688
14689 pub fn with_request<V: Into<crate::model::UpdateDataScanRequest>>(mut self, v: V) -> Self {
14691 self.0.request = v.into();
14692 self
14693 }
14694
14695 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14697 self.0.options = v.into();
14698 self
14699 }
14700
14701 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
14708 (*self.0.stub)
14709 .update_data_scan(self.0.request, self.0.options)
14710 .await
14711 .map(crate::Response::into_body)
14712 }
14713
14714 pub fn poller(
14716 self,
14717 ) -> impl google_cloud_lro::Poller<crate::model::DataScan, crate::model::OperationMetadata>
14718 {
14719 type Operation = google_cloud_lro::internal::Operation<
14720 crate::model::DataScan,
14721 crate::model::OperationMetadata,
14722 >;
14723 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
14724 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
14725 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
14726 if let Some(ref mut details) = poller_options.tracing {
14727 details.method_name = "google_cloud_dataplex_v1::client::DataScanService::update_data_scan::until_done";
14728 }
14729
14730 let stub = self.0.stub.clone();
14731 let mut options = self.0.options.clone();
14732 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
14733 let query = move |name| {
14734 let stub = stub.clone();
14735 let options = options.clone();
14736 async {
14737 let op = GetOperation::new(stub)
14738 .set_name(name)
14739 .with_options(options)
14740 .send()
14741 .await?;
14742 Ok(Operation::new(op))
14743 }
14744 };
14745
14746 let start = move || async {
14747 let op = self.send().await?;
14748 Ok(Operation::new(op))
14749 };
14750
14751 use google_cloud_lro::internal::PollerExt;
14752 {
14753 google_cloud_lro::internal::new_poller(
14754 polling_error_policy,
14755 polling_backoff_policy,
14756 start,
14757 query,
14758 )
14759 }
14760 .with_options(poller_options)
14761 }
14762
14763 pub fn set_data_scan<T>(mut self, v: T) -> Self
14767 where
14768 T: std::convert::Into<crate::model::DataScan>,
14769 {
14770 self.0.request.data_scan = std::option::Option::Some(v.into());
14771 self
14772 }
14773
14774 pub fn set_or_clear_data_scan<T>(mut self, v: std::option::Option<T>) -> Self
14778 where
14779 T: std::convert::Into<crate::model::DataScan>,
14780 {
14781 self.0.request.data_scan = v.map(|x| x.into());
14782 self
14783 }
14784
14785 pub fn set_update_mask<T>(mut self, v: T) -> Self
14787 where
14788 T: std::convert::Into<wkt::FieldMask>,
14789 {
14790 self.0.request.update_mask = std::option::Option::Some(v.into());
14791 self
14792 }
14793
14794 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
14796 where
14797 T: std::convert::Into<wkt::FieldMask>,
14798 {
14799 self.0.request.update_mask = v.map(|x| x.into());
14800 self
14801 }
14802
14803 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
14805 self.0.request.validate_only = v.into();
14806 self
14807 }
14808 }
14809
14810 #[doc(hidden)]
14811 impl crate::RequestBuilder for UpdateDataScan {
14812 fn request_options(&mut self) -> &mut crate::RequestOptions {
14813 &mut self.0.options
14814 }
14815 }
14816
14817 #[derive(Clone, Debug)]
14835 pub struct DeleteDataScan(RequestBuilder<crate::model::DeleteDataScanRequest>);
14836
14837 impl DeleteDataScan {
14838 pub(crate) fn new(
14839 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14840 ) -> Self {
14841 Self(RequestBuilder::new(stub))
14842 }
14843
14844 pub fn with_request<V: Into<crate::model::DeleteDataScanRequest>>(mut self, v: V) -> Self {
14846 self.0.request = v.into();
14847 self
14848 }
14849
14850 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14852 self.0.options = v.into();
14853 self
14854 }
14855
14856 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
14863 (*self.0.stub)
14864 .delete_data_scan(self.0.request, self.0.options)
14865 .await
14866 .map(crate::Response::into_body)
14867 }
14868
14869 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
14871 type Operation =
14872 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
14873 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
14874 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
14875 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
14876 if let Some(ref mut details) = poller_options.tracing {
14877 details.method_name = "google_cloud_dataplex_v1::client::DataScanService::delete_data_scan::until_done";
14878 }
14879
14880 let stub = self.0.stub.clone();
14881 let mut options = self.0.options.clone();
14882 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
14883 let query = move |name| {
14884 let stub = stub.clone();
14885 let options = options.clone();
14886 async {
14887 let op = GetOperation::new(stub)
14888 .set_name(name)
14889 .with_options(options)
14890 .send()
14891 .await?;
14892 Ok(Operation::new(op))
14893 }
14894 };
14895
14896 let start = move || async {
14897 let op = self.send().await?;
14898 Ok(Operation::new(op))
14899 };
14900
14901 use google_cloud_lro::internal::PollerExt;
14902 {
14903 google_cloud_lro::internal::new_unit_response_poller(
14904 polling_error_policy,
14905 polling_backoff_policy,
14906 start,
14907 query,
14908 )
14909 }
14910 .with_options(poller_options)
14911 }
14912
14913 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14917 self.0.request.name = v.into();
14918 self
14919 }
14920
14921 pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
14923 self.0.request.force = v.into();
14924 self
14925 }
14926 }
14927
14928 #[doc(hidden)]
14929 impl crate::RequestBuilder for DeleteDataScan {
14930 fn request_options(&mut self) -> &mut crate::RequestOptions {
14931 &mut self.0.options
14932 }
14933 }
14934
14935 #[derive(Clone, Debug)]
14952 pub struct GetDataScan(RequestBuilder<crate::model::GetDataScanRequest>);
14953
14954 impl GetDataScan {
14955 pub(crate) fn new(
14956 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
14957 ) -> Self {
14958 Self(RequestBuilder::new(stub))
14959 }
14960
14961 pub fn with_request<V: Into<crate::model::GetDataScanRequest>>(mut self, v: V) -> Self {
14963 self.0.request = v.into();
14964 self
14965 }
14966
14967 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
14969 self.0.options = v.into();
14970 self
14971 }
14972
14973 pub async fn send(self) -> Result<crate::model::DataScan> {
14975 (*self.0.stub)
14976 .get_data_scan(self.0.request, self.0.options)
14977 .await
14978 .map(crate::Response::into_body)
14979 }
14980
14981 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14985 self.0.request.name = v.into();
14986 self
14987 }
14988
14989 pub fn set_view<T: Into<crate::model::get_data_scan_request::DataScanView>>(
14991 mut self,
14992 v: T,
14993 ) -> Self {
14994 self.0.request.view = v.into();
14995 self
14996 }
14997 }
14998
14999 #[doc(hidden)]
15000 impl crate::RequestBuilder for GetDataScan {
15001 fn request_options(&mut self) -> &mut crate::RequestOptions {
15002 &mut self.0.options
15003 }
15004 }
15005
15006 #[derive(Clone, Debug)]
15027 pub struct ListDataScans(RequestBuilder<crate::model::ListDataScansRequest>);
15028
15029 impl ListDataScans {
15030 pub(crate) fn new(
15031 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15032 ) -> Self {
15033 Self(RequestBuilder::new(stub))
15034 }
15035
15036 pub fn with_request<V: Into<crate::model::ListDataScansRequest>>(mut self, v: V) -> Self {
15038 self.0.request = v.into();
15039 self
15040 }
15041
15042 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15044 self.0.options = v.into();
15045 self
15046 }
15047
15048 pub async fn send(self) -> Result<crate::model::ListDataScansResponse> {
15050 (*self.0.stub)
15051 .list_data_scans(self.0.request, self.0.options)
15052 .await
15053 .map(crate::Response::into_body)
15054 }
15055
15056 pub fn by_page(
15058 self,
15059 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListDataScansResponse, crate::Error>
15060 {
15061 use std::clone::Clone;
15062 let token = self.0.request.page_token.clone();
15063 let execute = move |token: String| {
15064 let mut builder = self.clone();
15065 builder.0.request = builder.0.request.set_page_token(token);
15066 builder.send()
15067 };
15068 google_cloud_gax::paginator::internal::new_paginator(token, execute)
15069 }
15070
15071 pub fn by_item(
15073 self,
15074 ) -> impl google_cloud_gax::paginator::ItemPaginator<
15075 crate::model::ListDataScansResponse,
15076 crate::Error,
15077 > {
15078 use google_cloud_gax::paginator::Paginator;
15079 self.by_page().items()
15080 }
15081
15082 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
15086 self.0.request.parent = v.into();
15087 self
15088 }
15089
15090 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
15092 self.0.request.page_size = v.into();
15093 self
15094 }
15095
15096 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
15098 self.0.request.page_token = v.into();
15099 self
15100 }
15101
15102 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
15104 self.0.request.filter = v.into();
15105 self
15106 }
15107
15108 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
15110 self.0.request.order_by = v.into();
15111 self
15112 }
15113 }
15114
15115 #[doc(hidden)]
15116 impl crate::RequestBuilder for ListDataScans {
15117 fn request_options(&mut self) -> &mut crate::RequestOptions {
15118 &mut self.0.options
15119 }
15120 }
15121
15122 #[derive(Clone, Debug)]
15139 pub struct RunDataScan(RequestBuilder<crate::model::RunDataScanRequest>);
15140
15141 impl RunDataScan {
15142 pub(crate) fn new(
15143 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15144 ) -> Self {
15145 Self(RequestBuilder::new(stub))
15146 }
15147
15148 pub fn with_request<V: Into<crate::model::RunDataScanRequest>>(mut self, v: V) -> Self {
15150 self.0.request = v.into();
15151 self
15152 }
15153
15154 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15156 self.0.options = v.into();
15157 self
15158 }
15159
15160 pub async fn send(self) -> Result<crate::model::RunDataScanResponse> {
15162 (*self.0.stub)
15163 .run_data_scan(self.0.request, self.0.options)
15164 .await
15165 .map(crate::Response::into_body)
15166 }
15167
15168 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15172 self.0.request.name = v.into();
15173 self
15174 }
15175 }
15176
15177 #[doc(hidden)]
15178 impl crate::RequestBuilder for RunDataScan {
15179 fn request_options(&mut self) -> &mut crate::RequestOptions {
15180 &mut self.0.options
15181 }
15182 }
15183
15184 #[derive(Clone, Debug)]
15201 pub struct GetDataScanJob(RequestBuilder<crate::model::GetDataScanJobRequest>);
15202
15203 impl GetDataScanJob {
15204 pub(crate) fn new(
15205 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15206 ) -> Self {
15207 Self(RequestBuilder::new(stub))
15208 }
15209
15210 pub fn with_request<V: Into<crate::model::GetDataScanJobRequest>>(mut self, v: V) -> Self {
15212 self.0.request = v.into();
15213 self
15214 }
15215
15216 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15218 self.0.options = v.into();
15219 self
15220 }
15221
15222 pub async fn send(self) -> Result<crate::model::DataScanJob> {
15224 (*self.0.stub)
15225 .get_data_scan_job(self.0.request, self.0.options)
15226 .await
15227 .map(crate::Response::into_body)
15228 }
15229
15230 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15234 self.0.request.name = v.into();
15235 self
15236 }
15237
15238 pub fn set_view<T: Into<crate::model::get_data_scan_job_request::DataScanJobView>>(
15240 mut self,
15241 v: T,
15242 ) -> Self {
15243 self.0.request.view = v.into();
15244 self
15245 }
15246 }
15247
15248 #[doc(hidden)]
15249 impl crate::RequestBuilder for GetDataScanJob {
15250 fn request_options(&mut self) -> &mut crate::RequestOptions {
15251 &mut self.0.options
15252 }
15253 }
15254
15255 #[derive(Clone, Debug)]
15276 pub struct ListDataScanJobs(RequestBuilder<crate::model::ListDataScanJobsRequest>);
15277
15278 impl ListDataScanJobs {
15279 pub(crate) fn new(
15280 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15281 ) -> Self {
15282 Self(RequestBuilder::new(stub))
15283 }
15284
15285 pub fn with_request<V: Into<crate::model::ListDataScanJobsRequest>>(
15287 mut self,
15288 v: V,
15289 ) -> Self {
15290 self.0.request = v.into();
15291 self
15292 }
15293
15294 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15296 self.0.options = v.into();
15297 self
15298 }
15299
15300 pub async fn send(self) -> Result<crate::model::ListDataScanJobsResponse> {
15302 (*self.0.stub)
15303 .list_data_scan_jobs(self.0.request, self.0.options)
15304 .await
15305 .map(crate::Response::into_body)
15306 }
15307
15308 pub fn by_page(
15310 self,
15311 ) -> impl google_cloud_gax::paginator::Paginator<
15312 crate::model::ListDataScanJobsResponse,
15313 crate::Error,
15314 > {
15315 use std::clone::Clone;
15316 let token = self.0.request.page_token.clone();
15317 let execute = move |token: String| {
15318 let mut builder = self.clone();
15319 builder.0.request = builder.0.request.set_page_token(token);
15320 builder.send()
15321 };
15322 google_cloud_gax::paginator::internal::new_paginator(token, execute)
15323 }
15324
15325 pub fn by_item(
15327 self,
15328 ) -> impl google_cloud_gax::paginator::ItemPaginator<
15329 crate::model::ListDataScanJobsResponse,
15330 crate::Error,
15331 > {
15332 use google_cloud_gax::paginator::Paginator;
15333 self.by_page().items()
15334 }
15335
15336 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
15340 self.0.request.parent = v.into();
15341 self
15342 }
15343
15344 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
15346 self.0.request.page_size = v.into();
15347 self
15348 }
15349
15350 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
15352 self.0.request.page_token = v.into();
15353 self
15354 }
15355
15356 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
15358 self.0.request.filter = v.into();
15359 self
15360 }
15361 }
15362
15363 #[doc(hidden)]
15364 impl crate::RequestBuilder for ListDataScanJobs {
15365 fn request_options(&mut self) -> &mut crate::RequestOptions {
15366 &mut self.0.options
15367 }
15368 }
15369
15370 #[derive(Clone, Debug)]
15387 pub struct CancelDataScanJob(RequestBuilder<crate::model::CancelDataScanJobRequest>);
15388
15389 impl CancelDataScanJob {
15390 pub(crate) fn new(
15391 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15392 ) -> Self {
15393 Self(RequestBuilder::new(stub))
15394 }
15395
15396 pub fn with_request<V: Into<crate::model::CancelDataScanJobRequest>>(
15398 mut self,
15399 v: V,
15400 ) -> Self {
15401 self.0.request = v.into();
15402 self
15403 }
15404
15405 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15407 self.0.options = v.into();
15408 self
15409 }
15410
15411 pub async fn send(self) -> Result<crate::model::CancelDataScanJobResponse> {
15413 (*self.0.stub)
15414 .cancel_data_scan_job(self.0.request, self.0.options)
15415 .await
15416 .map(crate::Response::into_body)
15417 }
15418
15419 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15423 self.0.request.name = v.into();
15424 self
15425 }
15426 }
15427
15428 #[doc(hidden)]
15429 impl crate::RequestBuilder for CancelDataScanJob {
15430 fn request_options(&mut self) -> &mut crate::RequestOptions {
15431 &mut self.0.options
15432 }
15433 }
15434
15435 #[derive(Clone, Debug)]
15452 pub struct GenerateDataQualityRules(
15453 RequestBuilder<crate::model::GenerateDataQualityRulesRequest>,
15454 );
15455
15456 impl GenerateDataQualityRules {
15457 pub(crate) fn new(
15458 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15459 ) -> Self {
15460 Self(RequestBuilder::new(stub))
15461 }
15462
15463 pub fn with_request<V: Into<crate::model::GenerateDataQualityRulesRequest>>(
15465 mut self,
15466 v: V,
15467 ) -> Self {
15468 self.0.request = v.into();
15469 self
15470 }
15471
15472 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15474 self.0.options = v.into();
15475 self
15476 }
15477
15478 pub async fn send(self) -> Result<crate::model::GenerateDataQualityRulesResponse> {
15480 (*self.0.stub)
15481 .generate_data_quality_rules(self.0.request, self.0.options)
15482 .await
15483 .map(crate::Response::into_body)
15484 }
15485
15486 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15490 self.0.request.name = v.into();
15491 self
15492 }
15493 }
15494
15495 #[doc(hidden)]
15496 impl crate::RequestBuilder for GenerateDataQualityRules {
15497 fn request_options(&mut self) -> &mut crate::RequestOptions {
15498 &mut self.0.options
15499 }
15500 }
15501
15502 #[derive(Clone, Debug)]
15523 pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
15524
15525 impl ListLocations {
15526 pub(crate) fn new(
15527 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15528 ) -> Self {
15529 Self(RequestBuilder::new(stub))
15530 }
15531
15532 pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
15534 mut self,
15535 v: V,
15536 ) -> Self {
15537 self.0.request = v.into();
15538 self
15539 }
15540
15541 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15543 self.0.options = v.into();
15544 self
15545 }
15546
15547 pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
15549 (*self.0.stub)
15550 .list_locations(self.0.request, self.0.options)
15551 .await
15552 .map(crate::Response::into_body)
15553 }
15554
15555 pub fn by_page(
15557 self,
15558 ) -> impl google_cloud_gax::paginator::Paginator<
15559 google_cloud_location::model::ListLocationsResponse,
15560 crate::Error,
15561 > {
15562 use std::clone::Clone;
15563 let token = self.0.request.page_token.clone();
15564 let execute = move |token: String| {
15565 let mut builder = self.clone();
15566 builder.0.request = builder.0.request.set_page_token(token);
15567 builder.send()
15568 };
15569 google_cloud_gax::paginator::internal::new_paginator(token, execute)
15570 }
15571
15572 pub fn by_item(
15574 self,
15575 ) -> impl google_cloud_gax::paginator::ItemPaginator<
15576 google_cloud_location::model::ListLocationsResponse,
15577 crate::Error,
15578 > {
15579 use google_cloud_gax::paginator::Paginator;
15580 self.by_page().items()
15581 }
15582
15583 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15585 self.0.request.name = v.into();
15586 self
15587 }
15588
15589 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
15591 self.0.request.filter = v.into();
15592 self
15593 }
15594
15595 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
15597 self.0.request.page_size = v.into();
15598 self
15599 }
15600
15601 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
15603 self.0.request.page_token = v.into();
15604 self
15605 }
15606 }
15607
15608 #[doc(hidden)]
15609 impl crate::RequestBuilder for ListLocations {
15610 fn request_options(&mut self) -> &mut crate::RequestOptions {
15611 &mut self.0.options
15612 }
15613 }
15614
15615 #[derive(Clone, Debug)]
15632 pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
15633
15634 impl GetLocation {
15635 pub(crate) fn new(
15636 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15637 ) -> Self {
15638 Self(RequestBuilder::new(stub))
15639 }
15640
15641 pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
15643 mut self,
15644 v: V,
15645 ) -> Self {
15646 self.0.request = v.into();
15647 self
15648 }
15649
15650 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15652 self.0.options = v.into();
15653 self
15654 }
15655
15656 pub async fn send(self) -> Result<google_cloud_location::model::Location> {
15658 (*self.0.stub)
15659 .get_location(self.0.request, self.0.options)
15660 .await
15661 .map(crate::Response::into_body)
15662 }
15663
15664 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15666 self.0.request.name = v.into();
15667 self
15668 }
15669 }
15670
15671 #[doc(hidden)]
15672 impl crate::RequestBuilder for GetLocation {
15673 fn request_options(&mut self) -> &mut crate::RequestOptions {
15674 &mut self.0.options
15675 }
15676 }
15677
15678 #[derive(Clone, Debug)]
15695 pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
15696
15697 impl SetIamPolicy {
15698 pub(crate) fn new(
15699 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15700 ) -> Self {
15701 Self(RequestBuilder::new(stub))
15702 }
15703
15704 pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
15706 mut self,
15707 v: V,
15708 ) -> Self {
15709 self.0.request = v.into();
15710 self
15711 }
15712
15713 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15715 self.0.options = v.into();
15716 self
15717 }
15718
15719 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
15721 (*self.0.stub)
15722 .set_iam_policy(self.0.request, self.0.options)
15723 .await
15724 .map(crate::Response::into_body)
15725 }
15726
15727 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
15731 self.0.request.resource = v.into();
15732 self
15733 }
15734
15735 pub fn set_policy<T>(mut self, v: T) -> Self
15739 where
15740 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
15741 {
15742 self.0.request.policy = std::option::Option::Some(v.into());
15743 self
15744 }
15745
15746 pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
15750 where
15751 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
15752 {
15753 self.0.request.policy = v.map(|x| x.into());
15754 self
15755 }
15756
15757 pub fn set_update_mask<T>(mut self, v: T) -> Self
15759 where
15760 T: std::convert::Into<wkt::FieldMask>,
15761 {
15762 self.0.request.update_mask = std::option::Option::Some(v.into());
15763 self
15764 }
15765
15766 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
15768 where
15769 T: std::convert::Into<wkt::FieldMask>,
15770 {
15771 self.0.request.update_mask = v.map(|x| x.into());
15772 self
15773 }
15774 }
15775
15776 #[doc(hidden)]
15777 impl crate::RequestBuilder for SetIamPolicy {
15778 fn request_options(&mut self) -> &mut crate::RequestOptions {
15779 &mut self.0.options
15780 }
15781 }
15782
15783 #[derive(Clone, Debug)]
15800 pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
15801
15802 impl GetIamPolicy {
15803 pub(crate) fn new(
15804 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15805 ) -> Self {
15806 Self(RequestBuilder::new(stub))
15807 }
15808
15809 pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
15811 mut self,
15812 v: V,
15813 ) -> Self {
15814 self.0.request = v.into();
15815 self
15816 }
15817
15818 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15820 self.0.options = v.into();
15821 self
15822 }
15823
15824 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
15826 (*self.0.stub)
15827 .get_iam_policy(self.0.request, self.0.options)
15828 .await
15829 .map(crate::Response::into_body)
15830 }
15831
15832 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
15836 self.0.request.resource = v.into();
15837 self
15838 }
15839
15840 pub fn set_options<T>(mut self, v: T) -> Self
15842 where
15843 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
15844 {
15845 self.0.request.options = std::option::Option::Some(v.into());
15846 self
15847 }
15848
15849 pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
15851 where
15852 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
15853 {
15854 self.0.request.options = v.map(|x| x.into());
15855 self
15856 }
15857 }
15858
15859 #[doc(hidden)]
15860 impl crate::RequestBuilder for GetIamPolicy {
15861 fn request_options(&mut self) -> &mut crate::RequestOptions {
15862 &mut self.0.options
15863 }
15864 }
15865
15866 #[derive(Clone, Debug)]
15883 pub struct TestIamPermissions(
15884 RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
15885 );
15886
15887 impl TestIamPermissions {
15888 pub(crate) fn new(
15889 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15890 ) -> Self {
15891 Self(RequestBuilder::new(stub))
15892 }
15893
15894 pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
15896 mut self,
15897 v: V,
15898 ) -> Self {
15899 self.0.request = v.into();
15900 self
15901 }
15902
15903 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15905 self.0.options = v.into();
15906 self
15907 }
15908
15909 pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
15911 (*self.0.stub)
15912 .test_iam_permissions(self.0.request, self.0.options)
15913 .await
15914 .map(crate::Response::into_body)
15915 }
15916
15917 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
15921 self.0.request.resource = v.into();
15922 self
15923 }
15924
15925 pub fn set_permissions<T, V>(mut self, v: T) -> Self
15929 where
15930 T: std::iter::IntoIterator<Item = V>,
15931 V: std::convert::Into<std::string::String>,
15932 {
15933 use std::iter::Iterator;
15934 self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
15935 self
15936 }
15937 }
15938
15939 #[doc(hidden)]
15940 impl crate::RequestBuilder for TestIamPermissions {
15941 fn request_options(&mut self) -> &mut crate::RequestOptions {
15942 &mut self.0.options
15943 }
15944 }
15945
15946 #[derive(Clone, Debug)]
15967 pub struct ListOperations(
15968 RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
15969 );
15970
15971 impl ListOperations {
15972 pub(crate) fn new(
15973 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
15974 ) -> Self {
15975 Self(RequestBuilder::new(stub))
15976 }
15977
15978 pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
15980 mut self,
15981 v: V,
15982 ) -> Self {
15983 self.0.request = v.into();
15984 self
15985 }
15986
15987 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
15989 self.0.options = v.into();
15990 self
15991 }
15992
15993 pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
15995 (*self.0.stub)
15996 .list_operations(self.0.request, self.0.options)
15997 .await
15998 .map(crate::Response::into_body)
15999 }
16000
16001 pub fn by_page(
16003 self,
16004 ) -> impl google_cloud_gax::paginator::Paginator<
16005 google_cloud_longrunning::model::ListOperationsResponse,
16006 crate::Error,
16007 > {
16008 use std::clone::Clone;
16009 let token = self.0.request.page_token.clone();
16010 let execute = move |token: String| {
16011 let mut builder = self.clone();
16012 builder.0.request = builder.0.request.set_page_token(token);
16013 builder.send()
16014 };
16015 google_cloud_gax::paginator::internal::new_paginator(token, execute)
16016 }
16017
16018 pub fn by_item(
16020 self,
16021 ) -> impl google_cloud_gax::paginator::ItemPaginator<
16022 google_cloud_longrunning::model::ListOperationsResponse,
16023 crate::Error,
16024 > {
16025 use google_cloud_gax::paginator::Paginator;
16026 self.by_page().items()
16027 }
16028
16029 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16031 self.0.request.name = v.into();
16032 self
16033 }
16034
16035 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
16037 self.0.request.filter = v.into();
16038 self
16039 }
16040
16041 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
16043 self.0.request.page_size = v.into();
16044 self
16045 }
16046
16047 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
16049 self.0.request.page_token = v.into();
16050 self
16051 }
16052
16053 pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
16055 self.0.request.return_partial_success = v.into();
16056 self
16057 }
16058 }
16059
16060 #[doc(hidden)]
16061 impl crate::RequestBuilder for ListOperations {
16062 fn request_options(&mut self) -> &mut crate::RequestOptions {
16063 &mut self.0.options
16064 }
16065 }
16066
16067 #[derive(Clone, Debug)]
16084 pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
16085
16086 impl GetOperation {
16087 pub(crate) fn new(
16088 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
16089 ) -> Self {
16090 Self(RequestBuilder::new(stub))
16091 }
16092
16093 pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
16095 mut self,
16096 v: V,
16097 ) -> Self {
16098 self.0.request = v.into();
16099 self
16100 }
16101
16102 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16104 self.0.options = v.into();
16105 self
16106 }
16107
16108 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
16110 (*self.0.stub)
16111 .get_operation(self.0.request, self.0.options)
16112 .await
16113 .map(crate::Response::into_body)
16114 }
16115
16116 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16118 self.0.request.name = v.into();
16119 self
16120 }
16121 }
16122
16123 #[doc(hidden)]
16124 impl crate::RequestBuilder for GetOperation {
16125 fn request_options(&mut self) -> &mut crate::RequestOptions {
16126 &mut self.0.options
16127 }
16128 }
16129
16130 #[derive(Clone, Debug)]
16147 pub struct DeleteOperation(
16148 RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
16149 );
16150
16151 impl DeleteOperation {
16152 pub(crate) fn new(
16153 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
16154 ) -> Self {
16155 Self(RequestBuilder::new(stub))
16156 }
16157
16158 pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
16160 mut self,
16161 v: V,
16162 ) -> Self {
16163 self.0.request = v.into();
16164 self
16165 }
16166
16167 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16169 self.0.options = v.into();
16170 self
16171 }
16172
16173 pub async fn send(self) -> Result<()> {
16175 (*self.0.stub)
16176 .delete_operation(self.0.request, self.0.options)
16177 .await
16178 .map(crate::Response::into_body)
16179 }
16180
16181 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16183 self.0.request.name = v.into();
16184 self
16185 }
16186 }
16187
16188 #[doc(hidden)]
16189 impl crate::RequestBuilder for DeleteOperation {
16190 fn request_options(&mut self) -> &mut crate::RequestOptions {
16191 &mut self.0.options
16192 }
16193 }
16194
16195 #[derive(Clone, Debug)]
16212 pub struct CancelOperation(
16213 RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
16214 );
16215
16216 impl CancelOperation {
16217 pub(crate) fn new(
16218 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
16219 ) -> Self {
16220 Self(RequestBuilder::new(stub))
16221 }
16222
16223 pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
16225 mut self,
16226 v: V,
16227 ) -> Self {
16228 self.0.request = v.into();
16229 self
16230 }
16231
16232 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16234 self.0.options = v.into();
16235 self
16236 }
16237
16238 pub async fn send(self) -> Result<()> {
16240 (*self.0.stub)
16241 .cancel_operation(self.0.request, self.0.options)
16242 .await
16243 .map(crate::Response::into_body)
16244 }
16245
16246 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16248 self.0.request.name = v.into();
16249 self
16250 }
16251 }
16252
16253 #[doc(hidden)]
16254 impl crate::RequestBuilder for CancelOperation {
16255 fn request_options(&mut self) -> &mut crate::RequestOptions {
16256 &mut self.0.options
16257 }
16258 }
16259}
16260
16261pub mod metadata_service {
16263 use crate::Result;
16264
16265 pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
16279
16280 pub(crate) mod client {
16281 use super::super::super::client::MetadataService;
16282 pub struct Factory;
16283 impl crate::ClientFactory for Factory {
16284 type Client = MetadataService;
16285 type Credentials = gaxi::options::Credentials;
16286 async fn build(
16287 self,
16288 config: gaxi::options::ClientConfig,
16289 ) -> crate::ClientBuilderResult<Self::Client> {
16290 Self::Client::new(config).await
16291 }
16292 }
16293 }
16294
16295 #[derive(Clone, Debug)]
16297 pub(crate) struct RequestBuilder<R: std::default::Default> {
16298 stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16299 request: R,
16300 options: crate::RequestOptions,
16301 }
16302
16303 impl<R> RequestBuilder<R>
16304 where
16305 R: std::default::Default,
16306 {
16307 pub(crate) fn new(
16308 stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16309 ) -> Self {
16310 Self {
16311 stub,
16312 request: R::default(),
16313 options: crate::RequestOptions::default(),
16314 }
16315 }
16316 }
16317
16318 #[derive(Clone, Debug)]
16335 pub struct CreateEntity(RequestBuilder<crate::model::CreateEntityRequest>);
16336
16337 impl CreateEntity {
16338 pub(crate) fn new(
16339 stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16340 ) -> Self {
16341 Self(RequestBuilder::new(stub))
16342 }
16343
16344 pub fn with_request<V: Into<crate::model::CreateEntityRequest>>(mut self, v: V) -> Self {
16346 self.0.request = v.into();
16347 self
16348 }
16349
16350 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16352 self.0.options = v.into();
16353 self
16354 }
16355
16356 pub async fn send(self) -> Result<crate::model::Entity> {
16358 (*self.0.stub)
16359 .create_entity(self.0.request, self.0.options)
16360 .await
16361 .map(crate::Response::into_body)
16362 }
16363
16364 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
16368 self.0.request.parent = v.into();
16369 self
16370 }
16371
16372 pub fn set_entity<T>(mut self, v: T) -> Self
16376 where
16377 T: std::convert::Into<crate::model::Entity>,
16378 {
16379 self.0.request.entity = std::option::Option::Some(v.into());
16380 self
16381 }
16382
16383 pub fn set_or_clear_entity<T>(mut self, v: std::option::Option<T>) -> Self
16387 where
16388 T: std::convert::Into<crate::model::Entity>,
16389 {
16390 self.0.request.entity = v.map(|x| x.into());
16391 self
16392 }
16393
16394 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
16396 self.0.request.validate_only = v.into();
16397 self
16398 }
16399 }
16400
16401 #[doc(hidden)]
16402 impl crate::RequestBuilder for CreateEntity {
16403 fn request_options(&mut self) -> &mut crate::RequestOptions {
16404 &mut self.0.options
16405 }
16406 }
16407
16408 #[derive(Clone, Debug)]
16425 pub struct UpdateEntity(RequestBuilder<crate::model::UpdateEntityRequest>);
16426
16427 impl UpdateEntity {
16428 pub(crate) fn new(
16429 stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16430 ) -> Self {
16431 Self(RequestBuilder::new(stub))
16432 }
16433
16434 pub fn with_request<V: Into<crate::model::UpdateEntityRequest>>(mut self, v: V) -> Self {
16436 self.0.request = v.into();
16437 self
16438 }
16439
16440 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16442 self.0.options = v.into();
16443 self
16444 }
16445
16446 pub async fn send(self) -> Result<crate::model::Entity> {
16448 (*self.0.stub)
16449 .update_entity(self.0.request, self.0.options)
16450 .await
16451 .map(crate::Response::into_body)
16452 }
16453
16454 pub fn set_entity<T>(mut self, v: T) -> Self
16458 where
16459 T: std::convert::Into<crate::model::Entity>,
16460 {
16461 self.0.request.entity = std::option::Option::Some(v.into());
16462 self
16463 }
16464
16465 pub fn set_or_clear_entity<T>(mut self, v: std::option::Option<T>) -> Self
16469 where
16470 T: std::convert::Into<crate::model::Entity>,
16471 {
16472 self.0.request.entity = v.map(|x| x.into());
16473 self
16474 }
16475
16476 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
16478 self.0.request.validate_only = v.into();
16479 self
16480 }
16481 }
16482
16483 #[doc(hidden)]
16484 impl crate::RequestBuilder for UpdateEntity {
16485 fn request_options(&mut self) -> &mut crate::RequestOptions {
16486 &mut self.0.options
16487 }
16488 }
16489
16490 #[derive(Clone, Debug)]
16507 pub struct DeleteEntity(RequestBuilder<crate::model::DeleteEntityRequest>);
16508
16509 impl DeleteEntity {
16510 pub(crate) fn new(
16511 stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16512 ) -> Self {
16513 Self(RequestBuilder::new(stub))
16514 }
16515
16516 pub fn with_request<V: Into<crate::model::DeleteEntityRequest>>(mut self, v: V) -> Self {
16518 self.0.request = v.into();
16519 self
16520 }
16521
16522 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16524 self.0.options = v.into();
16525 self
16526 }
16527
16528 pub async fn send(self) -> Result<()> {
16530 (*self.0.stub)
16531 .delete_entity(self.0.request, self.0.options)
16532 .await
16533 .map(crate::Response::into_body)
16534 }
16535
16536 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16540 self.0.request.name = v.into();
16541 self
16542 }
16543
16544 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
16548 self.0.request.etag = v.into();
16549 self
16550 }
16551 }
16552
16553 #[doc(hidden)]
16554 impl crate::RequestBuilder for DeleteEntity {
16555 fn request_options(&mut self) -> &mut crate::RequestOptions {
16556 &mut self.0.options
16557 }
16558 }
16559
16560 #[derive(Clone, Debug)]
16577 pub struct GetEntity(RequestBuilder<crate::model::GetEntityRequest>);
16578
16579 impl GetEntity {
16580 pub(crate) fn new(
16581 stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16582 ) -> Self {
16583 Self(RequestBuilder::new(stub))
16584 }
16585
16586 pub fn with_request<V: Into<crate::model::GetEntityRequest>>(mut self, v: V) -> Self {
16588 self.0.request = v.into();
16589 self
16590 }
16591
16592 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16594 self.0.options = v.into();
16595 self
16596 }
16597
16598 pub async fn send(self) -> Result<crate::model::Entity> {
16600 (*self.0.stub)
16601 .get_entity(self.0.request, self.0.options)
16602 .await
16603 .map(crate::Response::into_body)
16604 }
16605
16606 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16610 self.0.request.name = v.into();
16611 self
16612 }
16613
16614 pub fn set_view<T: Into<crate::model::get_entity_request::EntityView>>(
16616 mut self,
16617 v: T,
16618 ) -> Self {
16619 self.0.request.view = v.into();
16620 self
16621 }
16622 }
16623
16624 #[doc(hidden)]
16625 impl crate::RequestBuilder for GetEntity {
16626 fn request_options(&mut self) -> &mut crate::RequestOptions {
16627 &mut self.0.options
16628 }
16629 }
16630
16631 #[derive(Clone, Debug)]
16652 pub struct ListEntities(RequestBuilder<crate::model::ListEntitiesRequest>);
16653
16654 impl ListEntities {
16655 pub(crate) fn new(
16656 stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16657 ) -> Self {
16658 Self(RequestBuilder::new(stub))
16659 }
16660
16661 pub fn with_request<V: Into<crate::model::ListEntitiesRequest>>(mut self, v: V) -> Self {
16663 self.0.request = v.into();
16664 self
16665 }
16666
16667 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16669 self.0.options = v.into();
16670 self
16671 }
16672
16673 pub async fn send(self) -> Result<crate::model::ListEntitiesResponse> {
16675 (*self.0.stub)
16676 .list_entities(self.0.request, self.0.options)
16677 .await
16678 .map(crate::Response::into_body)
16679 }
16680
16681 pub fn by_page(
16683 self,
16684 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListEntitiesResponse, crate::Error>
16685 {
16686 use std::clone::Clone;
16687 let token = self.0.request.page_token.clone();
16688 let execute = move |token: String| {
16689 let mut builder = self.clone();
16690 builder.0.request = builder.0.request.set_page_token(token);
16691 builder.send()
16692 };
16693 google_cloud_gax::paginator::internal::new_paginator(token, execute)
16694 }
16695
16696 pub fn by_item(
16698 self,
16699 ) -> impl google_cloud_gax::paginator::ItemPaginator<
16700 crate::model::ListEntitiesResponse,
16701 crate::Error,
16702 > {
16703 use google_cloud_gax::paginator::Paginator;
16704 self.by_page().items()
16705 }
16706
16707 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
16711 self.0.request.parent = v.into();
16712 self
16713 }
16714
16715 pub fn set_view<T: Into<crate::model::list_entities_request::EntityView>>(
16719 mut self,
16720 v: T,
16721 ) -> Self {
16722 self.0.request.view = v.into();
16723 self
16724 }
16725
16726 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
16728 self.0.request.page_size = v.into();
16729 self
16730 }
16731
16732 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
16734 self.0.request.page_token = v.into();
16735 self
16736 }
16737
16738 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
16740 self.0.request.filter = v.into();
16741 self
16742 }
16743 }
16744
16745 #[doc(hidden)]
16746 impl crate::RequestBuilder for ListEntities {
16747 fn request_options(&mut self) -> &mut crate::RequestOptions {
16748 &mut self.0.options
16749 }
16750 }
16751
16752 #[derive(Clone, Debug)]
16769 pub struct CreatePartition(RequestBuilder<crate::model::CreatePartitionRequest>);
16770
16771 impl CreatePartition {
16772 pub(crate) fn new(
16773 stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16774 ) -> Self {
16775 Self(RequestBuilder::new(stub))
16776 }
16777
16778 pub fn with_request<V: Into<crate::model::CreatePartitionRequest>>(mut self, v: V) -> Self {
16780 self.0.request = v.into();
16781 self
16782 }
16783
16784 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16786 self.0.options = v.into();
16787 self
16788 }
16789
16790 pub async fn send(self) -> Result<crate::model::Partition> {
16792 (*self.0.stub)
16793 .create_partition(self.0.request, self.0.options)
16794 .await
16795 .map(crate::Response::into_body)
16796 }
16797
16798 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
16802 self.0.request.parent = v.into();
16803 self
16804 }
16805
16806 pub fn set_partition<T>(mut self, v: T) -> Self
16810 where
16811 T: std::convert::Into<crate::model::Partition>,
16812 {
16813 self.0.request.partition = std::option::Option::Some(v.into());
16814 self
16815 }
16816
16817 pub fn set_or_clear_partition<T>(mut self, v: std::option::Option<T>) -> Self
16821 where
16822 T: std::convert::Into<crate::model::Partition>,
16823 {
16824 self.0.request.partition = v.map(|x| x.into());
16825 self
16826 }
16827
16828 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
16830 self.0.request.validate_only = v.into();
16831 self
16832 }
16833 }
16834
16835 #[doc(hidden)]
16836 impl crate::RequestBuilder for CreatePartition {
16837 fn request_options(&mut self) -> &mut crate::RequestOptions {
16838 &mut self.0.options
16839 }
16840 }
16841
16842 #[derive(Clone, Debug)]
16859 pub struct DeletePartition(RequestBuilder<crate::model::DeletePartitionRequest>);
16860
16861 impl DeletePartition {
16862 pub(crate) fn new(
16863 stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16864 ) -> Self {
16865 Self(RequestBuilder::new(stub))
16866 }
16867
16868 pub fn with_request<V: Into<crate::model::DeletePartitionRequest>>(mut self, v: V) -> Self {
16870 self.0.request = v.into();
16871 self
16872 }
16873
16874 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16876 self.0.options = v.into();
16877 self
16878 }
16879
16880 pub async fn send(self) -> Result<()> {
16882 (*self.0.stub)
16883 .delete_partition(self.0.request, self.0.options)
16884 .await
16885 .map(crate::Response::into_body)
16886 }
16887
16888 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16892 self.0.request.name = v.into();
16893 self
16894 }
16895
16896 #[deprecated]
16898 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
16899 self.0.request.etag = v.into();
16900 self
16901 }
16902 }
16903
16904 #[doc(hidden)]
16905 impl crate::RequestBuilder for DeletePartition {
16906 fn request_options(&mut self) -> &mut crate::RequestOptions {
16907 &mut self.0.options
16908 }
16909 }
16910
16911 #[derive(Clone, Debug)]
16928 pub struct GetPartition(RequestBuilder<crate::model::GetPartitionRequest>);
16929
16930 impl GetPartition {
16931 pub(crate) fn new(
16932 stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16933 ) -> Self {
16934 Self(RequestBuilder::new(stub))
16935 }
16936
16937 pub fn with_request<V: Into<crate::model::GetPartitionRequest>>(mut self, v: V) -> Self {
16939 self.0.request = v.into();
16940 self
16941 }
16942
16943 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
16945 self.0.options = v.into();
16946 self
16947 }
16948
16949 pub async fn send(self) -> Result<crate::model::Partition> {
16951 (*self.0.stub)
16952 .get_partition(self.0.request, self.0.options)
16953 .await
16954 .map(crate::Response::into_body)
16955 }
16956
16957 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16961 self.0.request.name = v.into();
16962 self
16963 }
16964 }
16965
16966 #[doc(hidden)]
16967 impl crate::RequestBuilder for GetPartition {
16968 fn request_options(&mut self) -> &mut crate::RequestOptions {
16969 &mut self.0.options
16970 }
16971 }
16972
16973 #[derive(Clone, Debug)]
16994 pub struct ListPartitions(RequestBuilder<crate::model::ListPartitionsRequest>);
16995
16996 impl ListPartitions {
16997 pub(crate) fn new(
16998 stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
16999 ) -> Self {
17000 Self(RequestBuilder::new(stub))
17001 }
17002
17003 pub fn with_request<V: Into<crate::model::ListPartitionsRequest>>(mut self, v: V) -> Self {
17005 self.0.request = v.into();
17006 self
17007 }
17008
17009 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17011 self.0.options = v.into();
17012 self
17013 }
17014
17015 pub async fn send(self) -> Result<crate::model::ListPartitionsResponse> {
17017 (*self.0.stub)
17018 .list_partitions(self.0.request, self.0.options)
17019 .await
17020 .map(crate::Response::into_body)
17021 }
17022
17023 pub fn by_page(
17025 self,
17026 ) -> impl google_cloud_gax::paginator::Paginator<
17027 crate::model::ListPartitionsResponse,
17028 crate::Error,
17029 > {
17030 use std::clone::Clone;
17031 let token = self.0.request.page_token.clone();
17032 let execute = move |token: String| {
17033 let mut builder = self.clone();
17034 builder.0.request = builder.0.request.set_page_token(token);
17035 builder.send()
17036 };
17037 google_cloud_gax::paginator::internal::new_paginator(token, execute)
17038 }
17039
17040 pub fn by_item(
17042 self,
17043 ) -> impl google_cloud_gax::paginator::ItemPaginator<
17044 crate::model::ListPartitionsResponse,
17045 crate::Error,
17046 > {
17047 use google_cloud_gax::paginator::Paginator;
17048 self.by_page().items()
17049 }
17050
17051 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
17055 self.0.request.parent = v.into();
17056 self
17057 }
17058
17059 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
17061 self.0.request.page_size = v.into();
17062 self
17063 }
17064
17065 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
17067 self.0.request.page_token = v.into();
17068 self
17069 }
17070
17071 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
17073 self.0.request.filter = v.into();
17074 self
17075 }
17076 }
17077
17078 #[doc(hidden)]
17079 impl crate::RequestBuilder for ListPartitions {
17080 fn request_options(&mut self) -> &mut crate::RequestOptions {
17081 &mut self.0.options
17082 }
17083 }
17084
17085 #[derive(Clone, Debug)]
17106 pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
17107
17108 impl ListLocations {
17109 pub(crate) fn new(
17110 stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
17111 ) -> Self {
17112 Self(RequestBuilder::new(stub))
17113 }
17114
17115 pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
17117 mut self,
17118 v: V,
17119 ) -> Self {
17120 self.0.request = v.into();
17121 self
17122 }
17123
17124 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17126 self.0.options = v.into();
17127 self
17128 }
17129
17130 pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
17132 (*self.0.stub)
17133 .list_locations(self.0.request, self.0.options)
17134 .await
17135 .map(crate::Response::into_body)
17136 }
17137
17138 pub fn by_page(
17140 self,
17141 ) -> impl google_cloud_gax::paginator::Paginator<
17142 google_cloud_location::model::ListLocationsResponse,
17143 crate::Error,
17144 > {
17145 use std::clone::Clone;
17146 let token = self.0.request.page_token.clone();
17147 let execute = move |token: String| {
17148 let mut builder = self.clone();
17149 builder.0.request = builder.0.request.set_page_token(token);
17150 builder.send()
17151 };
17152 google_cloud_gax::paginator::internal::new_paginator(token, execute)
17153 }
17154
17155 pub fn by_item(
17157 self,
17158 ) -> impl google_cloud_gax::paginator::ItemPaginator<
17159 google_cloud_location::model::ListLocationsResponse,
17160 crate::Error,
17161 > {
17162 use google_cloud_gax::paginator::Paginator;
17163 self.by_page().items()
17164 }
17165
17166 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17168 self.0.request.name = v.into();
17169 self
17170 }
17171
17172 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
17174 self.0.request.filter = v.into();
17175 self
17176 }
17177
17178 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
17180 self.0.request.page_size = v.into();
17181 self
17182 }
17183
17184 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
17186 self.0.request.page_token = v.into();
17187 self
17188 }
17189 }
17190
17191 #[doc(hidden)]
17192 impl crate::RequestBuilder for ListLocations {
17193 fn request_options(&mut self) -> &mut crate::RequestOptions {
17194 &mut self.0.options
17195 }
17196 }
17197
17198 #[derive(Clone, Debug)]
17215 pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
17216
17217 impl GetLocation {
17218 pub(crate) fn new(
17219 stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
17220 ) -> Self {
17221 Self(RequestBuilder::new(stub))
17222 }
17223
17224 pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
17226 mut self,
17227 v: V,
17228 ) -> Self {
17229 self.0.request = v.into();
17230 self
17231 }
17232
17233 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17235 self.0.options = v.into();
17236 self
17237 }
17238
17239 pub async fn send(self) -> Result<google_cloud_location::model::Location> {
17241 (*self.0.stub)
17242 .get_location(self.0.request, self.0.options)
17243 .await
17244 .map(crate::Response::into_body)
17245 }
17246
17247 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17249 self.0.request.name = v.into();
17250 self
17251 }
17252 }
17253
17254 #[doc(hidden)]
17255 impl crate::RequestBuilder for GetLocation {
17256 fn request_options(&mut self) -> &mut crate::RequestOptions {
17257 &mut self.0.options
17258 }
17259 }
17260
17261 #[derive(Clone, Debug)]
17278 pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
17279
17280 impl SetIamPolicy {
17281 pub(crate) fn new(
17282 stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
17283 ) -> Self {
17284 Self(RequestBuilder::new(stub))
17285 }
17286
17287 pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
17289 mut self,
17290 v: V,
17291 ) -> Self {
17292 self.0.request = v.into();
17293 self
17294 }
17295
17296 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17298 self.0.options = v.into();
17299 self
17300 }
17301
17302 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
17304 (*self.0.stub)
17305 .set_iam_policy(self.0.request, self.0.options)
17306 .await
17307 .map(crate::Response::into_body)
17308 }
17309
17310 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
17314 self.0.request.resource = v.into();
17315 self
17316 }
17317
17318 pub fn set_policy<T>(mut self, v: T) -> Self
17322 where
17323 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
17324 {
17325 self.0.request.policy = std::option::Option::Some(v.into());
17326 self
17327 }
17328
17329 pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
17333 where
17334 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
17335 {
17336 self.0.request.policy = v.map(|x| x.into());
17337 self
17338 }
17339
17340 pub fn set_update_mask<T>(mut self, v: T) -> Self
17342 where
17343 T: std::convert::Into<wkt::FieldMask>,
17344 {
17345 self.0.request.update_mask = std::option::Option::Some(v.into());
17346 self
17347 }
17348
17349 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
17351 where
17352 T: std::convert::Into<wkt::FieldMask>,
17353 {
17354 self.0.request.update_mask = v.map(|x| x.into());
17355 self
17356 }
17357 }
17358
17359 #[doc(hidden)]
17360 impl crate::RequestBuilder for SetIamPolicy {
17361 fn request_options(&mut self) -> &mut crate::RequestOptions {
17362 &mut self.0.options
17363 }
17364 }
17365
17366 #[derive(Clone, Debug)]
17383 pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
17384
17385 impl GetIamPolicy {
17386 pub(crate) fn new(
17387 stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
17388 ) -> Self {
17389 Self(RequestBuilder::new(stub))
17390 }
17391
17392 pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
17394 mut self,
17395 v: V,
17396 ) -> Self {
17397 self.0.request = v.into();
17398 self
17399 }
17400
17401 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17403 self.0.options = v.into();
17404 self
17405 }
17406
17407 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
17409 (*self.0.stub)
17410 .get_iam_policy(self.0.request, self.0.options)
17411 .await
17412 .map(crate::Response::into_body)
17413 }
17414
17415 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
17419 self.0.request.resource = v.into();
17420 self
17421 }
17422
17423 pub fn set_options<T>(mut self, v: T) -> Self
17425 where
17426 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
17427 {
17428 self.0.request.options = std::option::Option::Some(v.into());
17429 self
17430 }
17431
17432 pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
17434 where
17435 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
17436 {
17437 self.0.request.options = v.map(|x| x.into());
17438 self
17439 }
17440 }
17441
17442 #[doc(hidden)]
17443 impl crate::RequestBuilder for GetIamPolicy {
17444 fn request_options(&mut self) -> &mut crate::RequestOptions {
17445 &mut self.0.options
17446 }
17447 }
17448
17449 #[derive(Clone, Debug)]
17466 pub struct TestIamPermissions(
17467 RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
17468 );
17469
17470 impl TestIamPermissions {
17471 pub(crate) fn new(
17472 stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
17473 ) -> Self {
17474 Self(RequestBuilder::new(stub))
17475 }
17476
17477 pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
17479 mut self,
17480 v: V,
17481 ) -> Self {
17482 self.0.request = v.into();
17483 self
17484 }
17485
17486 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17488 self.0.options = v.into();
17489 self
17490 }
17491
17492 pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
17494 (*self.0.stub)
17495 .test_iam_permissions(self.0.request, self.0.options)
17496 .await
17497 .map(crate::Response::into_body)
17498 }
17499
17500 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
17504 self.0.request.resource = v.into();
17505 self
17506 }
17507
17508 pub fn set_permissions<T, V>(mut self, v: T) -> Self
17512 where
17513 T: std::iter::IntoIterator<Item = V>,
17514 V: std::convert::Into<std::string::String>,
17515 {
17516 use std::iter::Iterator;
17517 self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
17518 self
17519 }
17520 }
17521
17522 #[doc(hidden)]
17523 impl crate::RequestBuilder for TestIamPermissions {
17524 fn request_options(&mut self) -> &mut crate::RequestOptions {
17525 &mut self.0.options
17526 }
17527 }
17528
17529 #[derive(Clone, Debug)]
17550 pub struct ListOperations(
17551 RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
17552 );
17553
17554 impl ListOperations {
17555 pub(crate) fn new(
17556 stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
17557 ) -> Self {
17558 Self(RequestBuilder::new(stub))
17559 }
17560
17561 pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
17563 mut self,
17564 v: V,
17565 ) -> Self {
17566 self.0.request = v.into();
17567 self
17568 }
17569
17570 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17572 self.0.options = v.into();
17573 self
17574 }
17575
17576 pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
17578 (*self.0.stub)
17579 .list_operations(self.0.request, self.0.options)
17580 .await
17581 .map(crate::Response::into_body)
17582 }
17583
17584 pub fn by_page(
17586 self,
17587 ) -> impl google_cloud_gax::paginator::Paginator<
17588 google_cloud_longrunning::model::ListOperationsResponse,
17589 crate::Error,
17590 > {
17591 use std::clone::Clone;
17592 let token = self.0.request.page_token.clone();
17593 let execute = move |token: String| {
17594 let mut builder = self.clone();
17595 builder.0.request = builder.0.request.set_page_token(token);
17596 builder.send()
17597 };
17598 google_cloud_gax::paginator::internal::new_paginator(token, execute)
17599 }
17600
17601 pub fn by_item(
17603 self,
17604 ) -> impl google_cloud_gax::paginator::ItemPaginator<
17605 google_cloud_longrunning::model::ListOperationsResponse,
17606 crate::Error,
17607 > {
17608 use google_cloud_gax::paginator::Paginator;
17609 self.by_page().items()
17610 }
17611
17612 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17614 self.0.request.name = v.into();
17615 self
17616 }
17617
17618 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
17620 self.0.request.filter = v.into();
17621 self
17622 }
17623
17624 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
17626 self.0.request.page_size = v.into();
17627 self
17628 }
17629
17630 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
17632 self.0.request.page_token = v.into();
17633 self
17634 }
17635
17636 pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
17638 self.0.request.return_partial_success = v.into();
17639 self
17640 }
17641 }
17642
17643 #[doc(hidden)]
17644 impl crate::RequestBuilder for ListOperations {
17645 fn request_options(&mut self) -> &mut crate::RequestOptions {
17646 &mut self.0.options
17647 }
17648 }
17649
17650 #[derive(Clone, Debug)]
17667 pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
17668
17669 impl GetOperation {
17670 pub(crate) fn new(
17671 stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
17672 ) -> Self {
17673 Self(RequestBuilder::new(stub))
17674 }
17675
17676 pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
17678 mut self,
17679 v: V,
17680 ) -> Self {
17681 self.0.request = v.into();
17682 self
17683 }
17684
17685 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17687 self.0.options = v.into();
17688 self
17689 }
17690
17691 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
17693 (*self.0.stub)
17694 .get_operation(self.0.request, self.0.options)
17695 .await
17696 .map(crate::Response::into_body)
17697 }
17698
17699 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17701 self.0.request.name = v.into();
17702 self
17703 }
17704 }
17705
17706 #[doc(hidden)]
17707 impl crate::RequestBuilder for GetOperation {
17708 fn request_options(&mut self) -> &mut crate::RequestOptions {
17709 &mut self.0.options
17710 }
17711 }
17712
17713 #[derive(Clone, Debug)]
17730 pub struct DeleteOperation(
17731 RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
17732 );
17733
17734 impl DeleteOperation {
17735 pub(crate) fn new(
17736 stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
17737 ) -> Self {
17738 Self(RequestBuilder::new(stub))
17739 }
17740
17741 pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
17743 mut self,
17744 v: V,
17745 ) -> Self {
17746 self.0.request = v.into();
17747 self
17748 }
17749
17750 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17752 self.0.options = v.into();
17753 self
17754 }
17755
17756 pub async fn send(self) -> Result<()> {
17758 (*self.0.stub)
17759 .delete_operation(self.0.request, self.0.options)
17760 .await
17761 .map(crate::Response::into_body)
17762 }
17763
17764 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17766 self.0.request.name = v.into();
17767 self
17768 }
17769 }
17770
17771 #[doc(hidden)]
17772 impl crate::RequestBuilder for DeleteOperation {
17773 fn request_options(&mut self) -> &mut crate::RequestOptions {
17774 &mut self.0.options
17775 }
17776 }
17777
17778 #[derive(Clone, Debug)]
17795 pub struct CancelOperation(
17796 RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
17797 );
17798
17799 impl CancelOperation {
17800 pub(crate) fn new(
17801 stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
17802 ) -> Self {
17803 Self(RequestBuilder::new(stub))
17804 }
17805
17806 pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
17808 mut self,
17809 v: V,
17810 ) -> Self {
17811 self.0.request = v.into();
17812 self
17813 }
17814
17815 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17817 self.0.options = v.into();
17818 self
17819 }
17820
17821 pub async fn send(self) -> Result<()> {
17823 (*self.0.stub)
17824 .cancel_operation(self.0.request, self.0.options)
17825 .await
17826 .map(crate::Response::into_body)
17827 }
17828
17829 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17831 self.0.request.name = v.into();
17832 self
17833 }
17834 }
17835
17836 #[doc(hidden)]
17837 impl crate::RequestBuilder for CancelOperation {
17838 fn request_options(&mut self) -> &mut crate::RequestOptions {
17839 &mut self.0.options
17840 }
17841 }
17842}
17843
17844pub mod dataplex_service {
17846 use crate::Result;
17847
17848 pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
17862
17863 pub(crate) mod client {
17864 use super::super::super::client::DataplexService;
17865 pub struct Factory;
17866 impl crate::ClientFactory for Factory {
17867 type Client = DataplexService;
17868 type Credentials = gaxi::options::Credentials;
17869 async fn build(
17870 self,
17871 config: gaxi::options::ClientConfig,
17872 ) -> crate::ClientBuilderResult<Self::Client> {
17873 Self::Client::new(config).await
17874 }
17875 }
17876 }
17877
17878 #[derive(Clone, Debug)]
17880 pub(crate) struct RequestBuilder<R: std::default::Default> {
17881 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17882 request: R,
17883 options: crate::RequestOptions,
17884 }
17885
17886 impl<R> RequestBuilder<R>
17887 where
17888 R: std::default::Default,
17889 {
17890 pub(crate) fn new(
17891 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17892 ) -> Self {
17893 Self {
17894 stub,
17895 request: R::default(),
17896 options: crate::RequestOptions::default(),
17897 }
17898 }
17899 }
17900
17901 #[derive(Clone, Debug)]
17919 pub struct CreateLake(RequestBuilder<crate::model::CreateLakeRequest>);
17920
17921 impl CreateLake {
17922 pub(crate) fn new(
17923 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17924 ) -> Self {
17925 Self(RequestBuilder::new(stub))
17926 }
17927
17928 pub fn with_request<V: Into<crate::model::CreateLakeRequest>>(mut self, v: V) -> Self {
17930 self.0.request = v.into();
17931 self
17932 }
17933
17934 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
17936 self.0.options = v.into();
17937 self
17938 }
17939
17940 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
17947 (*self.0.stub)
17948 .create_lake(self.0.request, self.0.options)
17949 .await
17950 .map(crate::Response::into_body)
17951 }
17952
17953 pub fn poller(
17955 self,
17956 ) -> impl google_cloud_lro::Poller<crate::model::Lake, crate::model::OperationMetadata>
17957 {
17958 type Operation = google_cloud_lro::internal::Operation<
17959 crate::model::Lake,
17960 crate::model::OperationMetadata,
17961 >;
17962 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
17963 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
17964 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
17965 if let Some(ref mut details) = poller_options.tracing {
17966 details.method_name =
17967 "google_cloud_dataplex_v1::client::DataplexService::create_lake::until_done";
17968 }
17969
17970 let stub = self.0.stub.clone();
17971 let mut options = self.0.options.clone();
17972 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
17973 let query = move |name| {
17974 let stub = stub.clone();
17975 let options = options.clone();
17976 async {
17977 let op = GetOperation::new(stub)
17978 .set_name(name)
17979 .with_options(options)
17980 .send()
17981 .await?;
17982 Ok(Operation::new(op))
17983 }
17984 };
17985
17986 let start = move || async {
17987 let op = self.send().await?;
17988 Ok(Operation::new(op))
17989 };
17990
17991 use google_cloud_lro::internal::PollerExt;
17992 {
17993 google_cloud_lro::internal::new_poller(
17994 polling_error_policy,
17995 polling_backoff_policy,
17996 start,
17997 query,
17998 )
17999 }
18000 .with_options(poller_options)
18001 }
18002
18003 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
18007 self.0.request.parent = v.into();
18008 self
18009 }
18010
18011 pub fn set_lake_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
18015 self.0.request.lake_id = v.into();
18016 self
18017 }
18018
18019 pub fn set_lake<T>(mut self, v: T) -> Self
18023 where
18024 T: std::convert::Into<crate::model::Lake>,
18025 {
18026 self.0.request.lake = std::option::Option::Some(v.into());
18027 self
18028 }
18029
18030 pub fn set_or_clear_lake<T>(mut self, v: std::option::Option<T>) -> Self
18034 where
18035 T: std::convert::Into<crate::model::Lake>,
18036 {
18037 self.0.request.lake = v.map(|x| x.into());
18038 self
18039 }
18040
18041 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
18043 self.0.request.validate_only = v.into();
18044 self
18045 }
18046 }
18047
18048 #[doc(hidden)]
18049 impl crate::RequestBuilder for CreateLake {
18050 fn request_options(&mut self) -> &mut crate::RequestOptions {
18051 &mut self.0.options
18052 }
18053 }
18054
18055 #[derive(Clone, Debug)]
18073 pub struct UpdateLake(RequestBuilder<crate::model::UpdateLakeRequest>);
18074
18075 impl UpdateLake {
18076 pub(crate) fn new(
18077 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18078 ) -> Self {
18079 Self(RequestBuilder::new(stub))
18080 }
18081
18082 pub fn with_request<V: Into<crate::model::UpdateLakeRequest>>(mut self, v: V) -> Self {
18084 self.0.request = v.into();
18085 self
18086 }
18087
18088 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18090 self.0.options = v.into();
18091 self
18092 }
18093
18094 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
18101 (*self.0.stub)
18102 .update_lake(self.0.request, self.0.options)
18103 .await
18104 .map(crate::Response::into_body)
18105 }
18106
18107 pub fn poller(
18109 self,
18110 ) -> impl google_cloud_lro::Poller<crate::model::Lake, crate::model::OperationMetadata>
18111 {
18112 type Operation = google_cloud_lro::internal::Operation<
18113 crate::model::Lake,
18114 crate::model::OperationMetadata,
18115 >;
18116 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
18117 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
18118 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
18119 if let Some(ref mut details) = poller_options.tracing {
18120 details.method_name =
18121 "google_cloud_dataplex_v1::client::DataplexService::update_lake::until_done";
18122 }
18123
18124 let stub = self.0.stub.clone();
18125 let mut options = self.0.options.clone();
18126 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
18127 let query = move |name| {
18128 let stub = stub.clone();
18129 let options = options.clone();
18130 async {
18131 let op = GetOperation::new(stub)
18132 .set_name(name)
18133 .with_options(options)
18134 .send()
18135 .await?;
18136 Ok(Operation::new(op))
18137 }
18138 };
18139
18140 let start = move || async {
18141 let op = self.send().await?;
18142 Ok(Operation::new(op))
18143 };
18144
18145 use google_cloud_lro::internal::PollerExt;
18146 {
18147 google_cloud_lro::internal::new_poller(
18148 polling_error_policy,
18149 polling_backoff_policy,
18150 start,
18151 query,
18152 )
18153 }
18154 .with_options(poller_options)
18155 }
18156
18157 pub fn set_update_mask<T>(mut self, v: T) -> Self
18161 where
18162 T: std::convert::Into<wkt::FieldMask>,
18163 {
18164 self.0.request.update_mask = std::option::Option::Some(v.into());
18165 self
18166 }
18167
18168 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
18172 where
18173 T: std::convert::Into<wkt::FieldMask>,
18174 {
18175 self.0.request.update_mask = v.map(|x| x.into());
18176 self
18177 }
18178
18179 pub fn set_lake<T>(mut self, v: T) -> Self
18183 where
18184 T: std::convert::Into<crate::model::Lake>,
18185 {
18186 self.0.request.lake = std::option::Option::Some(v.into());
18187 self
18188 }
18189
18190 pub fn set_or_clear_lake<T>(mut self, v: std::option::Option<T>) -> Self
18194 where
18195 T: std::convert::Into<crate::model::Lake>,
18196 {
18197 self.0.request.lake = v.map(|x| x.into());
18198 self
18199 }
18200
18201 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
18203 self.0.request.validate_only = v.into();
18204 self
18205 }
18206 }
18207
18208 #[doc(hidden)]
18209 impl crate::RequestBuilder for UpdateLake {
18210 fn request_options(&mut self) -> &mut crate::RequestOptions {
18211 &mut self.0.options
18212 }
18213 }
18214
18215 #[derive(Clone, Debug)]
18233 pub struct DeleteLake(RequestBuilder<crate::model::DeleteLakeRequest>);
18234
18235 impl DeleteLake {
18236 pub(crate) fn new(
18237 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18238 ) -> Self {
18239 Self(RequestBuilder::new(stub))
18240 }
18241
18242 pub fn with_request<V: Into<crate::model::DeleteLakeRequest>>(mut self, v: V) -> Self {
18244 self.0.request = v.into();
18245 self
18246 }
18247
18248 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18250 self.0.options = v.into();
18251 self
18252 }
18253
18254 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
18261 (*self.0.stub)
18262 .delete_lake(self.0.request, self.0.options)
18263 .await
18264 .map(crate::Response::into_body)
18265 }
18266
18267 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
18269 type Operation =
18270 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
18271 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
18272 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
18273 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
18274 if let Some(ref mut details) = poller_options.tracing {
18275 details.method_name =
18276 "google_cloud_dataplex_v1::client::DataplexService::delete_lake::until_done";
18277 }
18278
18279 let stub = self.0.stub.clone();
18280 let mut options = self.0.options.clone();
18281 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
18282 let query = move |name| {
18283 let stub = stub.clone();
18284 let options = options.clone();
18285 async {
18286 let op = GetOperation::new(stub)
18287 .set_name(name)
18288 .with_options(options)
18289 .send()
18290 .await?;
18291 Ok(Operation::new(op))
18292 }
18293 };
18294
18295 let start = move || async {
18296 let op = self.send().await?;
18297 Ok(Operation::new(op))
18298 };
18299
18300 use google_cloud_lro::internal::PollerExt;
18301 {
18302 google_cloud_lro::internal::new_unit_response_poller(
18303 polling_error_policy,
18304 polling_backoff_policy,
18305 start,
18306 query,
18307 )
18308 }
18309 .with_options(poller_options)
18310 }
18311
18312 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
18316 self.0.request.name = v.into();
18317 self
18318 }
18319 }
18320
18321 #[doc(hidden)]
18322 impl crate::RequestBuilder for DeleteLake {
18323 fn request_options(&mut self) -> &mut crate::RequestOptions {
18324 &mut self.0.options
18325 }
18326 }
18327
18328 #[derive(Clone, Debug)]
18349 pub struct ListLakes(RequestBuilder<crate::model::ListLakesRequest>);
18350
18351 impl ListLakes {
18352 pub(crate) fn new(
18353 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18354 ) -> Self {
18355 Self(RequestBuilder::new(stub))
18356 }
18357
18358 pub fn with_request<V: Into<crate::model::ListLakesRequest>>(mut self, v: V) -> Self {
18360 self.0.request = v.into();
18361 self
18362 }
18363
18364 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18366 self.0.options = v.into();
18367 self
18368 }
18369
18370 pub async fn send(self) -> Result<crate::model::ListLakesResponse> {
18372 (*self.0.stub)
18373 .list_lakes(self.0.request, self.0.options)
18374 .await
18375 .map(crate::Response::into_body)
18376 }
18377
18378 pub fn by_page(
18380 self,
18381 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListLakesResponse, crate::Error>
18382 {
18383 use std::clone::Clone;
18384 let token = self.0.request.page_token.clone();
18385 let execute = move |token: String| {
18386 let mut builder = self.clone();
18387 builder.0.request = builder.0.request.set_page_token(token);
18388 builder.send()
18389 };
18390 google_cloud_gax::paginator::internal::new_paginator(token, execute)
18391 }
18392
18393 pub fn by_item(
18395 self,
18396 ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::ListLakesResponse, crate::Error>
18397 {
18398 use google_cloud_gax::paginator::Paginator;
18399 self.by_page().items()
18400 }
18401
18402 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
18406 self.0.request.parent = v.into();
18407 self
18408 }
18409
18410 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
18412 self.0.request.page_size = v.into();
18413 self
18414 }
18415
18416 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
18418 self.0.request.page_token = v.into();
18419 self
18420 }
18421
18422 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
18424 self.0.request.filter = v.into();
18425 self
18426 }
18427
18428 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
18430 self.0.request.order_by = v.into();
18431 self
18432 }
18433 }
18434
18435 #[doc(hidden)]
18436 impl crate::RequestBuilder for ListLakes {
18437 fn request_options(&mut self) -> &mut crate::RequestOptions {
18438 &mut self.0.options
18439 }
18440 }
18441
18442 #[derive(Clone, Debug)]
18459 pub struct GetLake(RequestBuilder<crate::model::GetLakeRequest>);
18460
18461 impl GetLake {
18462 pub(crate) fn new(
18463 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18464 ) -> Self {
18465 Self(RequestBuilder::new(stub))
18466 }
18467
18468 pub fn with_request<V: Into<crate::model::GetLakeRequest>>(mut self, v: V) -> Self {
18470 self.0.request = v.into();
18471 self
18472 }
18473
18474 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18476 self.0.options = v.into();
18477 self
18478 }
18479
18480 pub async fn send(self) -> Result<crate::model::Lake> {
18482 (*self.0.stub)
18483 .get_lake(self.0.request, self.0.options)
18484 .await
18485 .map(crate::Response::into_body)
18486 }
18487
18488 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
18492 self.0.request.name = v.into();
18493 self
18494 }
18495 }
18496
18497 #[doc(hidden)]
18498 impl crate::RequestBuilder for GetLake {
18499 fn request_options(&mut self) -> &mut crate::RequestOptions {
18500 &mut self.0.options
18501 }
18502 }
18503
18504 #[derive(Clone, Debug)]
18525 pub struct ListLakeActions(RequestBuilder<crate::model::ListLakeActionsRequest>);
18526
18527 impl ListLakeActions {
18528 pub(crate) fn new(
18529 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18530 ) -> Self {
18531 Self(RequestBuilder::new(stub))
18532 }
18533
18534 pub fn with_request<V: Into<crate::model::ListLakeActionsRequest>>(mut self, v: V) -> Self {
18536 self.0.request = v.into();
18537 self
18538 }
18539
18540 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18542 self.0.options = v.into();
18543 self
18544 }
18545
18546 pub async fn send(self) -> Result<crate::model::ListActionsResponse> {
18548 (*self.0.stub)
18549 .list_lake_actions(self.0.request, self.0.options)
18550 .await
18551 .map(crate::Response::into_body)
18552 }
18553
18554 pub fn by_page(
18556 self,
18557 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListActionsResponse, crate::Error>
18558 {
18559 use std::clone::Clone;
18560 let token = self.0.request.page_token.clone();
18561 let execute = move |token: String| {
18562 let mut builder = self.clone();
18563 builder.0.request = builder.0.request.set_page_token(token);
18564 builder.send()
18565 };
18566 google_cloud_gax::paginator::internal::new_paginator(token, execute)
18567 }
18568
18569 pub fn by_item(
18571 self,
18572 ) -> impl google_cloud_gax::paginator::ItemPaginator<
18573 crate::model::ListActionsResponse,
18574 crate::Error,
18575 > {
18576 use google_cloud_gax::paginator::Paginator;
18577 self.by_page().items()
18578 }
18579
18580 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
18584 self.0.request.parent = v.into();
18585 self
18586 }
18587
18588 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
18590 self.0.request.page_size = v.into();
18591 self
18592 }
18593
18594 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
18596 self.0.request.page_token = v.into();
18597 self
18598 }
18599 }
18600
18601 #[doc(hidden)]
18602 impl crate::RequestBuilder for ListLakeActions {
18603 fn request_options(&mut self) -> &mut crate::RequestOptions {
18604 &mut self.0.options
18605 }
18606 }
18607
18608 #[derive(Clone, Debug)]
18626 pub struct CreateZone(RequestBuilder<crate::model::CreateZoneRequest>);
18627
18628 impl CreateZone {
18629 pub(crate) fn new(
18630 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18631 ) -> Self {
18632 Self(RequestBuilder::new(stub))
18633 }
18634
18635 pub fn with_request<V: Into<crate::model::CreateZoneRequest>>(mut self, v: V) -> Self {
18637 self.0.request = v.into();
18638 self
18639 }
18640
18641 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18643 self.0.options = v.into();
18644 self
18645 }
18646
18647 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
18654 (*self.0.stub)
18655 .create_zone(self.0.request, self.0.options)
18656 .await
18657 .map(crate::Response::into_body)
18658 }
18659
18660 pub fn poller(
18662 self,
18663 ) -> impl google_cloud_lro::Poller<crate::model::Zone, crate::model::OperationMetadata>
18664 {
18665 type Operation = google_cloud_lro::internal::Operation<
18666 crate::model::Zone,
18667 crate::model::OperationMetadata,
18668 >;
18669 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
18670 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
18671 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
18672 if let Some(ref mut details) = poller_options.tracing {
18673 details.method_name =
18674 "google_cloud_dataplex_v1::client::DataplexService::create_zone::until_done";
18675 }
18676
18677 let stub = self.0.stub.clone();
18678 let mut options = self.0.options.clone();
18679 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
18680 let query = move |name| {
18681 let stub = stub.clone();
18682 let options = options.clone();
18683 async {
18684 let op = GetOperation::new(stub)
18685 .set_name(name)
18686 .with_options(options)
18687 .send()
18688 .await?;
18689 Ok(Operation::new(op))
18690 }
18691 };
18692
18693 let start = move || async {
18694 let op = self.send().await?;
18695 Ok(Operation::new(op))
18696 };
18697
18698 use google_cloud_lro::internal::PollerExt;
18699 {
18700 google_cloud_lro::internal::new_poller(
18701 polling_error_policy,
18702 polling_backoff_policy,
18703 start,
18704 query,
18705 )
18706 }
18707 .with_options(poller_options)
18708 }
18709
18710 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
18714 self.0.request.parent = v.into();
18715 self
18716 }
18717
18718 pub fn set_zone_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
18722 self.0.request.zone_id = v.into();
18723 self
18724 }
18725
18726 pub fn set_zone<T>(mut self, v: T) -> Self
18730 where
18731 T: std::convert::Into<crate::model::Zone>,
18732 {
18733 self.0.request.zone = std::option::Option::Some(v.into());
18734 self
18735 }
18736
18737 pub fn set_or_clear_zone<T>(mut self, v: std::option::Option<T>) -> Self
18741 where
18742 T: std::convert::Into<crate::model::Zone>,
18743 {
18744 self.0.request.zone = v.map(|x| x.into());
18745 self
18746 }
18747
18748 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
18750 self.0.request.validate_only = v.into();
18751 self
18752 }
18753 }
18754
18755 #[doc(hidden)]
18756 impl crate::RequestBuilder for CreateZone {
18757 fn request_options(&mut self) -> &mut crate::RequestOptions {
18758 &mut self.0.options
18759 }
18760 }
18761
18762 #[derive(Clone, Debug)]
18780 pub struct UpdateZone(RequestBuilder<crate::model::UpdateZoneRequest>);
18781
18782 impl UpdateZone {
18783 pub(crate) fn new(
18784 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18785 ) -> Self {
18786 Self(RequestBuilder::new(stub))
18787 }
18788
18789 pub fn with_request<V: Into<crate::model::UpdateZoneRequest>>(mut self, v: V) -> Self {
18791 self.0.request = v.into();
18792 self
18793 }
18794
18795 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18797 self.0.options = v.into();
18798 self
18799 }
18800
18801 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
18808 (*self.0.stub)
18809 .update_zone(self.0.request, self.0.options)
18810 .await
18811 .map(crate::Response::into_body)
18812 }
18813
18814 pub fn poller(
18816 self,
18817 ) -> impl google_cloud_lro::Poller<crate::model::Zone, crate::model::OperationMetadata>
18818 {
18819 type Operation = google_cloud_lro::internal::Operation<
18820 crate::model::Zone,
18821 crate::model::OperationMetadata,
18822 >;
18823 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
18824 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
18825 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
18826 if let Some(ref mut details) = poller_options.tracing {
18827 details.method_name =
18828 "google_cloud_dataplex_v1::client::DataplexService::update_zone::until_done";
18829 }
18830
18831 let stub = self.0.stub.clone();
18832 let mut options = self.0.options.clone();
18833 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
18834 let query = move |name| {
18835 let stub = stub.clone();
18836 let options = options.clone();
18837 async {
18838 let op = GetOperation::new(stub)
18839 .set_name(name)
18840 .with_options(options)
18841 .send()
18842 .await?;
18843 Ok(Operation::new(op))
18844 }
18845 };
18846
18847 let start = move || async {
18848 let op = self.send().await?;
18849 Ok(Operation::new(op))
18850 };
18851
18852 use google_cloud_lro::internal::PollerExt;
18853 {
18854 google_cloud_lro::internal::new_poller(
18855 polling_error_policy,
18856 polling_backoff_policy,
18857 start,
18858 query,
18859 )
18860 }
18861 .with_options(poller_options)
18862 }
18863
18864 pub fn set_update_mask<T>(mut self, v: T) -> Self
18868 where
18869 T: std::convert::Into<wkt::FieldMask>,
18870 {
18871 self.0.request.update_mask = std::option::Option::Some(v.into());
18872 self
18873 }
18874
18875 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
18879 where
18880 T: std::convert::Into<wkt::FieldMask>,
18881 {
18882 self.0.request.update_mask = v.map(|x| x.into());
18883 self
18884 }
18885
18886 pub fn set_zone<T>(mut self, v: T) -> Self
18890 where
18891 T: std::convert::Into<crate::model::Zone>,
18892 {
18893 self.0.request.zone = std::option::Option::Some(v.into());
18894 self
18895 }
18896
18897 pub fn set_or_clear_zone<T>(mut self, v: std::option::Option<T>) -> Self
18901 where
18902 T: std::convert::Into<crate::model::Zone>,
18903 {
18904 self.0.request.zone = v.map(|x| x.into());
18905 self
18906 }
18907
18908 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
18910 self.0.request.validate_only = v.into();
18911 self
18912 }
18913 }
18914
18915 #[doc(hidden)]
18916 impl crate::RequestBuilder for UpdateZone {
18917 fn request_options(&mut self) -> &mut crate::RequestOptions {
18918 &mut self.0.options
18919 }
18920 }
18921
18922 #[derive(Clone, Debug)]
18940 pub struct DeleteZone(RequestBuilder<crate::model::DeleteZoneRequest>);
18941
18942 impl DeleteZone {
18943 pub(crate) fn new(
18944 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18945 ) -> Self {
18946 Self(RequestBuilder::new(stub))
18947 }
18948
18949 pub fn with_request<V: Into<crate::model::DeleteZoneRequest>>(mut self, v: V) -> Self {
18951 self.0.request = v.into();
18952 self
18953 }
18954
18955 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
18957 self.0.options = v.into();
18958 self
18959 }
18960
18961 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
18968 (*self.0.stub)
18969 .delete_zone(self.0.request, self.0.options)
18970 .await
18971 .map(crate::Response::into_body)
18972 }
18973
18974 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
18976 type Operation =
18977 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
18978 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
18979 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
18980 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
18981 if let Some(ref mut details) = poller_options.tracing {
18982 details.method_name =
18983 "google_cloud_dataplex_v1::client::DataplexService::delete_zone::until_done";
18984 }
18985
18986 let stub = self.0.stub.clone();
18987 let mut options = self.0.options.clone();
18988 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
18989 let query = move |name| {
18990 let stub = stub.clone();
18991 let options = options.clone();
18992 async {
18993 let op = GetOperation::new(stub)
18994 .set_name(name)
18995 .with_options(options)
18996 .send()
18997 .await?;
18998 Ok(Operation::new(op))
18999 }
19000 };
19001
19002 let start = move || async {
19003 let op = self.send().await?;
19004 Ok(Operation::new(op))
19005 };
19006
19007 use google_cloud_lro::internal::PollerExt;
19008 {
19009 google_cloud_lro::internal::new_unit_response_poller(
19010 polling_error_policy,
19011 polling_backoff_policy,
19012 start,
19013 query,
19014 )
19015 }
19016 .with_options(poller_options)
19017 }
19018
19019 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
19023 self.0.request.name = v.into();
19024 self
19025 }
19026 }
19027
19028 #[doc(hidden)]
19029 impl crate::RequestBuilder for DeleteZone {
19030 fn request_options(&mut self) -> &mut crate::RequestOptions {
19031 &mut self.0.options
19032 }
19033 }
19034
19035 #[derive(Clone, Debug)]
19056 pub struct ListZones(RequestBuilder<crate::model::ListZonesRequest>);
19057
19058 impl ListZones {
19059 pub(crate) fn new(
19060 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19061 ) -> Self {
19062 Self(RequestBuilder::new(stub))
19063 }
19064
19065 pub fn with_request<V: Into<crate::model::ListZonesRequest>>(mut self, v: V) -> Self {
19067 self.0.request = v.into();
19068 self
19069 }
19070
19071 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19073 self.0.options = v.into();
19074 self
19075 }
19076
19077 pub async fn send(self) -> Result<crate::model::ListZonesResponse> {
19079 (*self.0.stub)
19080 .list_zones(self.0.request, self.0.options)
19081 .await
19082 .map(crate::Response::into_body)
19083 }
19084
19085 pub fn by_page(
19087 self,
19088 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListZonesResponse, crate::Error>
19089 {
19090 use std::clone::Clone;
19091 let token = self.0.request.page_token.clone();
19092 let execute = move |token: String| {
19093 let mut builder = self.clone();
19094 builder.0.request = builder.0.request.set_page_token(token);
19095 builder.send()
19096 };
19097 google_cloud_gax::paginator::internal::new_paginator(token, execute)
19098 }
19099
19100 pub fn by_item(
19102 self,
19103 ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::ListZonesResponse, crate::Error>
19104 {
19105 use google_cloud_gax::paginator::Paginator;
19106 self.by_page().items()
19107 }
19108
19109 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
19113 self.0.request.parent = v.into();
19114 self
19115 }
19116
19117 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
19119 self.0.request.page_size = v.into();
19120 self
19121 }
19122
19123 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
19125 self.0.request.page_token = v.into();
19126 self
19127 }
19128
19129 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
19131 self.0.request.filter = v.into();
19132 self
19133 }
19134
19135 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
19137 self.0.request.order_by = v.into();
19138 self
19139 }
19140 }
19141
19142 #[doc(hidden)]
19143 impl crate::RequestBuilder for ListZones {
19144 fn request_options(&mut self) -> &mut crate::RequestOptions {
19145 &mut self.0.options
19146 }
19147 }
19148
19149 #[derive(Clone, Debug)]
19166 pub struct GetZone(RequestBuilder<crate::model::GetZoneRequest>);
19167
19168 impl GetZone {
19169 pub(crate) fn new(
19170 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19171 ) -> Self {
19172 Self(RequestBuilder::new(stub))
19173 }
19174
19175 pub fn with_request<V: Into<crate::model::GetZoneRequest>>(mut self, v: V) -> Self {
19177 self.0.request = v.into();
19178 self
19179 }
19180
19181 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19183 self.0.options = v.into();
19184 self
19185 }
19186
19187 pub async fn send(self) -> Result<crate::model::Zone> {
19189 (*self.0.stub)
19190 .get_zone(self.0.request, self.0.options)
19191 .await
19192 .map(crate::Response::into_body)
19193 }
19194
19195 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
19199 self.0.request.name = v.into();
19200 self
19201 }
19202 }
19203
19204 #[doc(hidden)]
19205 impl crate::RequestBuilder for GetZone {
19206 fn request_options(&mut self) -> &mut crate::RequestOptions {
19207 &mut self.0.options
19208 }
19209 }
19210
19211 #[derive(Clone, Debug)]
19232 pub struct ListZoneActions(RequestBuilder<crate::model::ListZoneActionsRequest>);
19233
19234 impl ListZoneActions {
19235 pub(crate) fn new(
19236 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19237 ) -> Self {
19238 Self(RequestBuilder::new(stub))
19239 }
19240
19241 pub fn with_request<V: Into<crate::model::ListZoneActionsRequest>>(mut self, v: V) -> Self {
19243 self.0.request = v.into();
19244 self
19245 }
19246
19247 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19249 self.0.options = v.into();
19250 self
19251 }
19252
19253 pub async fn send(self) -> Result<crate::model::ListActionsResponse> {
19255 (*self.0.stub)
19256 .list_zone_actions(self.0.request, self.0.options)
19257 .await
19258 .map(crate::Response::into_body)
19259 }
19260
19261 pub fn by_page(
19263 self,
19264 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListActionsResponse, crate::Error>
19265 {
19266 use std::clone::Clone;
19267 let token = self.0.request.page_token.clone();
19268 let execute = move |token: String| {
19269 let mut builder = self.clone();
19270 builder.0.request = builder.0.request.set_page_token(token);
19271 builder.send()
19272 };
19273 google_cloud_gax::paginator::internal::new_paginator(token, execute)
19274 }
19275
19276 pub fn by_item(
19278 self,
19279 ) -> impl google_cloud_gax::paginator::ItemPaginator<
19280 crate::model::ListActionsResponse,
19281 crate::Error,
19282 > {
19283 use google_cloud_gax::paginator::Paginator;
19284 self.by_page().items()
19285 }
19286
19287 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
19291 self.0.request.parent = v.into();
19292 self
19293 }
19294
19295 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
19297 self.0.request.page_size = v.into();
19298 self
19299 }
19300
19301 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
19303 self.0.request.page_token = v.into();
19304 self
19305 }
19306 }
19307
19308 #[doc(hidden)]
19309 impl crate::RequestBuilder for ListZoneActions {
19310 fn request_options(&mut self) -> &mut crate::RequestOptions {
19311 &mut self.0.options
19312 }
19313 }
19314
19315 #[derive(Clone, Debug)]
19333 pub struct CreateAsset(RequestBuilder<crate::model::CreateAssetRequest>);
19334
19335 impl CreateAsset {
19336 pub(crate) fn new(
19337 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19338 ) -> Self {
19339 Self(RequestBuilder::new(stub))
19340 }
19341
19342 pub fn with_request<V: Into<crate::model::CreateAssetRequest>>(mut self, v: V) -> Self {
19344 self.0.request = v.into();
19345 self
19346 }
19347
19348 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19350 self.0.options = v.into();
19351 self
19352 }
19353
19354 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
19361 (*self.0.stub)
19362 .create_asset(self.0.request, self.0.options)
19363 .await
19364 .map(crate::Response::into_body)
19365 }
19366
19367 pub fn poller(
19369 self,
19370 ) -> impl google_cloud_lro::Poller<crate::model::Asset, crate::model::OperationMetadata>
19371 {
19372 type Operation = google_cloud_lro::internal::Operation<
19373 crate::model::Asset,
19374 crate::model::OperationMetadata,
19375 >;
19376 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
19377 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
19378 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
19379 if let Some(ref mut details) = poller_options.tracing {
19380 details.method_name =
19381 "google_cloud_dataplex_v1::client::DataplexService::create_asset::until_done";
19382 }
19383
19384 let stub = self.0.stub.clone();
19385 let mut options = self.0.options.clone();
19386 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
19387 let query = move |name| {
19388 let stub = stub.clone();
19389 let options = options.clone();
19390 async {
19391 let op = GetOperation::new(stub)
19392 .set_name(name)
19393 .with_options(options)
19394 .send()
19395 .await?;
19396 Ok(Operation::new(op))
19397 }
19398 };
19399
19400 let start = move || async {
19401 let op = self.send().await?;
19402 Ok(Operation::new(op))
19403 };
19404
19405 use google_cloud_lro::internal::PollerExt;
19406 {
19407 google_cloud_lro::internal::new_poller(
19408 polling_error_policy,
19409 polling_backoff_policy,
19410 start,
19411 query,
19412 )
19413 }
19414 .with_options(poller_options)
19415 }
19416
19417 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
19421 self.0.request.parent = v.into();
19422 self
19423 }
19424
19425 pub fn set_asset_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
19429 self.0.request.asset_id = v.into();
19430 self
19431 }
19432
19433 pub fn set_asset<T>(mut self, v: T) -> Self
19437 where
19438 T: std::convert::Into<crate::model::Asset>,
19439 {
19440 self.0.request.asset = std::option::Option::Some(v.into());
19441 self
19442 }
19443
19444 pub fn set_or_clear_asset<T>(mut self, v: std::option::Option<T>) -> Self
19448 where
19449 T: std::convert::Into<crate::model::Asset>,
19450 {
19451 self.0.request.asset = v.map(|x| x.into());
19452 self
19453 }
19454
19455 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
19457 self.0.request.validate_only = v.into();
19458 self
19459 }
19460 }
19461
19462 #[doc(hidden)]
19463 impl crate::RequestBuilder for CreateAsset {
19464 fn request_options(&mut self) -> &mut crate::RequestOptions {
19465 &mut self.0.options
19466 }
19467 }
19468
19469 #[derive(Clone, Debug)]
19487 pub struct UpdateAsset(RequestBuilder<crate::model::UpdateAssetRequest>);
19488
19489 impl UpdateAsset {
19490 pub(crate) fn new(
19491 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19492 ) -> Self {
19493 Self(RequestBuilder::new(stub))
19494 }
19495
19496 pub fn with_request<V: Into<crate::model::UpdateAssetRequest>>(mut self, v: V) -> Self {
19498 self.0.request = v.into();
19499 self
19500 }
19501
19502 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19504 self.0.options = v.into();
19505 self
19506 }
19507
19508 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
19515 (*self.0.stub)
19516 .update_asset(self.0.request, self.0.options)
19517 .await
19518 .map(crate::Response::into_body)
19519 }
19520
19521 pub fn poller(
19523 self,
19524 ) -> impl google_cloud_lro::Poller<crate::model::Asset, crate::model::OperationMetadata>
19525 {
19526 type Operation = google_cloud_lro::internal::Operation<
19527 crate::model::Asset,
19528 crate::model::OperationMetadata,
19529 >;
19530 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
19531 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
19532 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
19533 if let Some(ref mut details) = poller_options.tracing {
19534 details.method_name =
19535 "google_cloud_dataplex_v1::client::DataplexService::update_asset::until_done";
19536 }
19537
19538 let stub = self.0.stub.clone();
19539 let mut options = self.0.options.clone();
19540 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
19541 let query = move |name| {
19542 let stub = stub.clone();
19543 let options = options.clone();
19544 async {
19545 let op = GetOperation::new(stub)
19546 .set_name(name)
19547 .with_options(options)
19548 .send()
19549 .await?;
19550 Ok(Operation::new(op))
19551 }
19552 };
19553
19554 let start = move || async {
19555 let op = self.send().await?;
19556 Ok(Operation::new(op))
19557 };
19558
19559 use google_cloud_lro::internal::PollerExt;
19560 {
19561 google_cloud_lro::internal::new_poller(
19562 polling_error_policy,
19563 polling_backoff_policy,
19564 start,
19565 query,
19566 )
19567 }
19568 .with_options(poller_options)
19569 }
19570
19571 pub fn set_update_mask<T>(mut self, v: T) -> Self
19575 where
19576 T: std::convert::Into<wkt::FieldMask>,
19577 {
19578 self.0.request.update_mask = std::option::Option::Some(v.into());
19579 self
19580 }
19581
19582 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
19586 where
19587 T: std::convert::Into<wkt::FieldMask>,
19588 {
19589 self.0.request.update_mask = v.map(|x| x.into());
19590 self
19591 }
19592
19593 pub fn set_asset<T>(mut self, v: T) -> Self
19597 where
19598 T: std::convert::Into<crate::model::Asset>,
19599 {
19600 self.0.request.asset = std::option::Option::Some(v.into());
19601 self
19602 }
19603
19604 pub fn set_or_clear_asset<T>(mut self, v: std::option::Option<T>) -> Self
19608 where
19609 T: std::convert::Into<crate::model::Asset>,
19610 {
19611 self.0.request.asset = v.map(|x| x.into());
19612 self
19613 }
19614
19615 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
19617 self.0.request.validate_only = v.into();
19618 self
19619 }
19620 }
19621
19622 #[doc(hidden)]
19623 impl crate::RequestBuilder for UpdateAsset {
19624 fn request_options(&mut self) -> &mut crate::RequestOptions {
19625 &mut self.0.options
19626 }
19627 }
19628
19629 #[derive(Clone, Debug)]
19647 pub struct DeleteAsset(RequestBuilder<crate::model::DeleteAssetRequest>);
19648
19649 impl DeleteAsset {
19650 pub(crate) fn new(
19651 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19652 ) -> Self {
19653 Self(RequestBuilder::new(stub))
19654 }
19655
19656 pub fn with_request<V: Into<crate::model::DeleteAssetRequest>>(mut self, v: V) -> Self {
19658 self.0.request = v.into();
19659 self
19660 }
19661
19662 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19664 self.0.options = v.into();
19665 self
19666 }
19667
19668 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
19675 (*self.0.stub)
19676 .delete_asset(self.0.request, self.0.options)
19677 .await
19678 .map(crate::Response::into_body)
19679 }
19680
19681 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
19683 type Operation =
19684 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
19685 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
19686 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
19687 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
19688 if let Some(ref mut details) = poller_options.tracing {
19689 details.method_name =
19690 "google_cloud_dataplex_v1::client::DataplexService::delete_asset::until_done";
19691 }
19692
19693 let stub = self.0.stub.clone();
19694 let mut options = self.0.options.clone();
19695 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
19696 let query = move |name| {
19697 let stub = stub.clone();
19698 let options = options.clone();
19699 async {
19700 let op = GetOperation::new(stub)
19701 .set_name(name)
19702 .with_options(options)
19703 .send()
19704 .await?;
19705 Ok(Operation::new(op))
19706 }
19707 };
19708
19709 let start = move || async {
19710 let op = self.send().await?;
19711 Ok(Operation::new(op))
19712 };
19713
19714 use google_cloud_lro::internal::PollerExt;
19715 {
19716 google_cloud_lro::internal::new_unit_response_poller(
19717 polling_error_policy,
19718 polling_backoff_policy,
19719 start,
19720 query,
19721 )
19722 }
19723 .with_options(poller_options)
19724 }
19725
19726 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
19730 self.0.request.name = v.into();
19731 self
19732 }
19733 }
19734
19735 #[doc(hidden)]
19736 impl crate::RequestBuilder for DeleteAsset {
19737 fn request_options(&mut self) -> &mut crate::RequestOptions {
19738 &mut self.0.options
19739 }
19740 }
19741
19742 #[derive(Clone, Debug)]
19763 pub struct ListAssets(RequestBuilder<crate::model::ListAssetsRequest>);
19764
19765 impl ListAssets {
19766 pub(crate) fn new(
19767 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19768 ) -> Self {
19769 Self(RequestBuilder::new(stub))
19770 }
19771
19772 pub fn with_request<V: Into<crate::model::ListAssetsRequest>>(mut self, v: V) -> Self {
19774 self.0.request = v.into();
19775 self
19776 }
19777
19778 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19780 self.0.options = v.into();
19781 self
19782 }
19783
19784 pub async fn send(self) -> Result<crate::model::ListAssetsResponse> {
19786 (*self.0.stub)
19787 .list_assets(self.0.request, self.0.options)
19788 .await
19789 .map(crate::Response::into_body)
19790 }
19791
19792 pub fn by_page(
19794 self,
19795 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListAssetsResponse, crate::Error>
19796 {
19797 use std::clone::Clone;
19798 let token = self.0.request.page_token.clone();
19799 let execute = move |token: String| {
19800 let mut builder = self.clone();
19801 builder.0.request = builder.0.request.set_page_token(token);
19802 builder.send()
19803 };
19804 google_cloud_gax::paginator::internal::new_paginator(token, execute)
19805 }
19806
19807 pub fn by_item(
19809 self,
19810 ) -> impl google_cloud_gax::paginator::ItemPaginator<
19811 crate::model::ListAssetsResponse,
19812 crate::Error,
19813 > {
19814 use google_cloud_gax::paginator::Paginator;
19815 self.by_page().items()
19816 }
19817
19818 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
19822 self.0.request.parent = v.into();
19823 self
19824 }
19825
19826 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
19828 self.0.request.page_size = v.into();
19829 self
19830 }
19831
19832 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
19834 self.0.request.page_token = v.into();
19835 self
19836 }
19837
19838 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
19840 self.0.request.filter = v.into();
19841 self
19842 }
19843
19844 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
19846 self.0.request.order_by = v.into();
19847 self
19848 }
19849 }
19850
19851 #[doc(hidden)]
19852 impl crate::RequestBuilder for ListAssets {
19853 fn request_options(&mut self) -> &mut crate::RequestOptions {
19854 &mut self.0.options
19855 }
19856 }
19857
19858 #[derive(Clone, Debug)]
19875 pub struct GetAsset(RequestBuilder<crate::model::GetAssetRequest>);
19876
19877 impl GetAsset {
19878 pub(crate) fn new(
19879 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19880 ) -> Self {
19881 Self(RequestBuilder::new(stub))
19882 }
19883
19884 pub fn with_request<V: Into<crate::model::GetAssetRequest>>(mut self, v: V) -> Self {
19886 self.0.request = v.into();
19887 self
19888 }
19889
19890 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19892 self.0.options = v.into();
19893 self
19894 }
19895
19896 pub async fn send(self) -> Result<crate::model::Asset> {
19898 (*self.0.stub)
19899 .get_asset(self.0.request, self.0.options)
19900 .await
19901 .map(crate::Response::into_body)
19902 }
19903
19904 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
19908 self.0.request.name = v.into();
19909 self
19910 }
19911 }
19912
19913 #[doc(hidden)]
19914 impl crate::RequestBuilder for GetAsset {
19915 fn request_options(&mut self) -> &mut crate::RequestOptions {
19916 &mut self.0.options
19917 }
19918 }
19919
19920 #[derive(Clone, Debug)]
19941 pub struct ListAssetActions(RequestBuilder<crate::model::ListAssetActionsRequest>);
19942
19943 impl ListAssetActions {
19944 pub(crate) fn new(
19945 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
19946 ) -> Self {
19947 Self(RequestBuilder::new(stub))
19948 }
19949
19950 pub fn with_request<V: Into<crate::model::ListAssetActionsRequest>>(
19952 mut self,
19953 v: V,
19954 ) -> Self {
19955 self.0.request = v.into();
19956 self
19957 }
19958
19959 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
19961 self.0.options = v.into();
19962 self
19963 }
19964
19965 pub async fn send(self) -> Result<crate::model::ListActionsResponse> {
19967 (*self.0.stub)
19968 .list_asset_actions(self.0.request, self.0.options)
19969 .await
19970 .map(crate::Response::into_body)
19971 }
19972
19973 pub fn by_page(
19975 self,
19976 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListActionsResponse, crate::Error>
19977 {
19978 use std::clone::Clone;
19979 let token = self.0.request.page_token.clone();
19980 let execute = move |token: String| {
19981 let mut builder = self.clone();
19982 builder.0.request = builder.0.request.set_page_token(token);
19983 builder.send()
19984 };
19985 google_cloud_gax::paginator::internal::new_paginator(token, execute)
19986 }
19987
19988 pub fn by_item(
19990 self,
19991 ) -> impl google_cloud_gax::paginator::ItemPaginator<
19992 crate::model::ListActionsResponse,
19993 crate::Error,
19994 > {
19995 use google_cloud_gax::paginator::Paginator;
19996 self.by_page().items()
19997 }
19998
19999 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
20003 self.0.request.parent = v.into();
20004 self
20005 }
20006
20007 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
20009 self.0.request.page_size = v.into();
20010 self
20011 }
20012
20013 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
20015 self.0.request.page_token = v.into();
20016 self
20017 }
20018 }
20019
20020 #[doc(hidden)]
20021 impl crate::RequestBuilder for ListAssetActions {
20022 fn request_options(&mut self) -> &mut crate::RequestOptions {
20023 &mut self.0.options
20024 }
20025 }
20026
20027 #[derive(Clone, Debug)]
20045 pub struct CreateTask(RequestBuilder<crate::model::CreateTaskRequest>);
20046
20047 impl CreateTask {
20048 pub(crate) fn new(
20049 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20050 ) -> Self {
20051 Self(RequestBuilder::new(stub))
20052 }
20053
20054 pub fn with_request<V: Into<crate::model::CreateTaskRequest>>(mut self, v: V) -> Self {
20056 self.0.request = v.into();
20057 self
20058 }
20059
20060 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20062 self.0.options = v.into();
20063 self
20064 }
20065
20066 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
20073 (*self.0.stub)
20074 .create_task(self.0.request, self.0.options)
20075 .await
20076 .map(crate::Response::into_body)
20077 }
20078
20079 pub fn poller(
20081 self,
20082 ) -> impl google_cloud_lro::Poller<crate::model::Task, crate::model::OperationMetadata>
20083 {
20084 type Operation = google_cloud_lro::internal::Operation<
20085 crate::model::Task,
20086 crate::model::OperationMetadata,
20087 >;
20088 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
20089 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
20090 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
20091 if let Some(ref mut details) = poller_options.tracing {
20092 details.method_name =
20093 "google_cloud_dataplex_v1::client::DataplexService::create_task::until_done";
20094 }
20095
20096 let stub = self.0.stub.clone();
20097 let mut options = self.0.options.clone();
20098 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
20099 let query = move |name| {
20100 let stub = stub.clone();
20101 let options = options.clone();
20102 async {
20103 let op = GetOperation::new(stub)
20104 .set_name(name)
20105 .with_options(options)
20106 .send()
20107 .await?;
20108 Ok(Operation::new(op))
20109 }
20110 };
20111
20112 let start = move || async {
20113 let op = self.send().await?;
20114 Ok(Operation::new(op))
20115 };
20116
20117 use google_cloud_lro::internal::PollerExt;
20118 {
20119 google_cloud_lro::internal::new_poller(
20120 polling_error_policy,
20121 polling_backoff_policy,
20122 start,
20123 query,
20124 )
20125 }
20126 .with_options(poller_options)
20127 }
20128
20129 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
20133 self.0.request.parent = v.into();
20134 self
20135 }
20136
20137 pub fn set_task_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
20141 self.0.request.task_id = v.into();
20142 self
20143 }
20144
20145 pub fn set_task<T>(mut self, v: T) -> Self
20149 where
20150 T: std::convert::Into<crate::model::Task>,
20151 {
20152 self.0.request.task = std::option::Option::Some(v.into());
20153 self
20154 }
20155
20156 pub fn set_or_clear_task<T>(mut self, v: std::option::Option<T>) -> Self
20160 where
20161 T: std::convert::Into<crate::model::Task>,
20162 {
20163 self.0.request.task = v.map(|x| x.into());
20164 self
20165 }
20166
20167 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
20169 self.0.request.validate_only = v.into();
20170 self
20171 }
20172 }
20173
20174 #[doc(hidden)]
20175 impl crate::RequestBuilder for CreateTask {
20176 fn request_options(&mut self) -> &mut crate::RequestOptions {
20177 &mut self.0.options
20178 }
20179 }
20180
20181 #[derive(Clone, Debug)]
20199 pub struct UpdateTask(RequestBuilder<crate::model::UpdateTaskRequest>);
20200
20201 impl UpdateTask {
20202 pub(crate) fn new(
20203 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20204 ) -> Self {
20205 Self(RequestBuilder::new(stub))
20206 }
20207
20208 pub fn with_request<V: Into<crate::model::UpdateTaskRequest>>(mut self, v: V) -> Self {
20210 self.0.request = v.into();
20211 self
20212 }
20213
20214 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20216 self.0.options = v.into();
20217 self
20218 }
20219
20220 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
20227 (*self.0.stub)
20228 .update_task(self.0.request, self.0.options)
20229 .await
20230 .map(crate::Response::into_body)
20231 }
20232
20233 pub fn poller(
20235 self,
20236 ) -> impl google_cloud_lro::Poller<crate::model::Task, crate::model::OperationMetadata>
20237 {
20238 type Operation = google_cloud_lro::internal::Operation<
20239 crate::model::Task,
20240 crate::model::OperationMetadata,
20241 >;
20242 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
20243 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
20244 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
20245 if let Some(ref mut details) = poller_options.tracing {
20246 details.method_name =
20247 "google_cloud_dataplex_v1::client::DataplexService::update_task::until_done";
20248 }
20249
20250 let stub = self.0.stub.clone();
20251 let mut options = self.0.options.clone();
20252 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
20253 let query = move |name| {
20254 let stub = stub.clone();
20255 let options = options.clone();
20256 async {
20257 let op = GetOperation::new(stub)
20258 .set_name(name)
20259 .with_options(options)
20260 .send()
20261 .await?;
20262 Ok(Operation::new(op))
20263 }
20264 };
20265
20266 let start = move || async {
20267 let op = self.send().await?;
20268 Ok(Operation::new(op))
20269 };
20270
20271 use google_cloud_lro::internal::PollerExt;
20272 {
20273 google_cloud_lro::internal::new_poller(
20274 polling_error_policy,
20275 polling_backoff_policy,
20276 start,
20277 query,
20278 )
20279 }
20280 .with_options(poller_options)
20281 }
20282
20283 pub fn set_update_mask<T>(mut self, v: T) -> Self
20287 where
20288 T: std::convert::Into<wkt::FieldMask>,
20289 {
20290 self.0.request.update_mask = std::option::Option::Some(v.into());
20291 self
20292 }
20293
20294 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
20298 where
20299 T: std::convert::Into<wkt::FieldMask>,
20300 {
20301 self.0.request.update_mask = v.map(|x| x.into());
20302 self
20303 }
20304
20305 pub fn set_task<T>(mut self, v: T) -> Self
20309 where
20310 T: std::convert::Into<crate::model::Task>,
20311 {
20312 self.0.request.task = std::option::Option::Some(v.into());
20313 self
20314 }
20315
20316 pub fn set_or_clear_task<T>(mut self, v: std::option::Option<T>) -> Self
20320 where
20321 T: std::convert::Into<crate::model::Task>,
20322 {
20323 self.0.request.task = v.map(|x| x.into());
20324 self
20325 }
20326
20327 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
20329 self.0.request.validate_only = v.into();
20330 self
20331 }
20332 }
20333
20334 #[doc(hidden)]
20335 impl crate::RequestBuilder for UpdateTask {
20336 fn request_options(&mut self) -> &mut crate::RequestOptions {
20337 &mut self.0.options
20338 }
20339 }
20340
20341 #[derive(Clone, Debug)]
20359 pub struct DeleteTask(RequestBuilder<crate::model::DeleteTaskRequest>);
20360
20361 impl DeleteTask {
20362 pub(crate) fn new(
20363 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20364 ) -> Self {
20365 Self(RequestBuilder::new(stub))
20366 }
20367
20368 pub fn with_request<V: Into<crate::model::DeleteTaskRequest>>(mut self, v: V) -> Self {
20370 self.0.request = v.into();
20371 self
20372 }
20373
20374 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20376 self.0.options = v.into();
20377 self
20378 }
20379
20380 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
20387 (*self.0.stub)
20388 .delete_task(self.0.request, self.0.options)
20389 .await
20390 .map(crate::Response::into_body)
20391 }
20392
20393 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
20395 type Operation =
20396 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
20397 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
20398 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
20399 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
20400 if let Some(ref mut details) = poller_options.tracing {
20401 details.method_name =
20402 "google_cloud_dataplex_v1::client::DataplexService::delete_task::until_done";
20403 }
20404
20405 let stub = self.0.stub.clone();
20406 let mut options = self.0.options.clone();
20407 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
20408 let query = move |name| {
20409 let stub = stub.clone();
20410 let options = options.clone();
20411 async {
20412 let op = GetOperation::new(stub)
20413 .set_name(name)
20414 .with_options(options)
20415 .send()
20416 .await?;
20417 Ok(Operation::new(op))
20418 }
20419 };
20420
20421 let start = move || async {
20422 let op = self.send().await?;
20423 Ok(Operation::new(op))
20424 };
20425
20426 use google_cloud_lro::internal::PollerExt;
20427 {
20428 google_cloud_lro::internal::new_unit_response_poller(
20429 polling_error_policy,
20430 polling_backoff_policy,
20431 start,
20432 query,
20433 )
20434 }
20435 .with_options(poller_options)
20436 }
20437
20438 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20442 self.0.request.name = v.into();
20443 self
20444 }
20445 }
20446
20447 #[doc(hidden)]
20448 impl crate::RequestBuilder for DeleteTask {
20449 fn request_options(&mut self) -> &mut crate::RequestOptions {
20450 &mut self.0.options
20451 }
20452 }
20453
20454 #[derive(Clone, Debug)]
20475 pub struct ListTasks(RequestBuilder<crate::model::ListTasksRequest>);
20476
20477 impl ListTasks {
20478 pub(crate) fn new(
20479 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20480 ) -> Self {
20481 Self(RequestBuilder::new(stub))
20482 }
20483
20484 pub fn with_request<V: Into<crate::model::ListTasksRequest>>(mut self, v: V) -> Self {
20486 self.0.request = v.into();
20487 self
20488 }
20489
20490 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20492 self.0.options = v.into();
20493 self
20494 }
20495
20496 pub async fn send(self) -> Result<crate::model::ListTasksResponse> {
20498 (*self.0.stub)
20499 .list_tasks(self.0.request, self.0.options)
20500 .await
20501 .map(crate::Response::into_body)
20502 }
20503
20504 pub fn by_page(
20506 self,
20507 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListTasksResponse, crate::Error>
20508 {
20509 use std::clone::Clone;
20510 let token = self.0.request.page_token.clone();
20511 let execute = move |token: String| {
20512 let mut builder = self.clone();
20513 builder.0.request = builder.0.request.set_page_token(token);
20514 builder.send()
20515 };
20516 google_cloud_gax::paginator::internal::new_paginator(token, execute)
20517 }
20518
20519 pub fn by_item(
20521 self,
20522 ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::ListTasksResponse, crate::Error>
20523 {
20524 use google_cloud_gax::paginator::Paginator;
20525 self.by_page().items()
20526 }
20527
20528 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
20532 self.0.request.parent = v.into();
20533 self
20534 }
20535
20536 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
20538 self.0.request.page_size = v.into();
20539 self
20540 }
20541
20542 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
20544 self.0.request.page_token = v.into();
20545 self
20546 }
20547
20548 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
20550 self.0.request.filter = v.into();
20551 self
20552 }
20553
20554 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
20556 self.0.request.order_by = v.into();
20557 self
20558 }
20559 }
20560
20561 #[doc(hidden)]
20562 impl crate::RequestBuilder for ListTasks {
20563 fn request_options(&mut self) -> &mut crate::RequestOptions {
20564 &mut self.0.options
20565 }
20566 }
20567
20568 #[derive(Clone, Debug)]
20585 pub struct GetTask(RequestBuilder<crate::model::GetTaskRequest>);
20586
20587 impl GetTask {
20588 pub(crate) fn new(
20589 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20590 ) -> Self {
20591 Self(RequestBuilder::new(stub))
20592 }
20593
20594 pub fn with_request<V: Into<crate::model::GetTaskRequest>>(mut self, v: V) -> Self {
20596 self.0.request = v.into();
20597 self
20598 }
20599
20600 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20602 self.0.options = v.into();
20603 self
20604 }
20605
20606 pub async fn send(self) -> Result<crate::model::Task> {
20608 (*self.0.stub)
20609 .get_task(self.0.request, self.0.options)
20610 .await
20611 .map(crate::Response::into_body)
20612 }
20613
20614 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20618 self.0.request.name = v.into();
20619 self
20620 }
20621 }
20622
20623 #[doc(hidden)]
20624 impl crate::RequestBuilder for GetTask {
20625 fn request_options(&mut self) -> &mut crate::RequestOptions {
20626 &mut self.0.options
20627 }
20628 }
20629
20630 #[derive(Clone, Debug)]
20651 pub struct ListJobs(RequestBuilder<crate::model::ListJobsRequest>);
20652
20653 impl ListJobs {
20654 pub(crate) fn new(
20655 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20656 ) -> Self {
20657 Self(RequestBuilder::new(stub))
20658 }
20659
20660 pub fn with_request<V: Into<crate::model::ListJobsRequest>>(mut self, v: V) -> Self {
20662 self.0.request = v.into();
20663 self
20664 }
20665
20666 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20668 self.0.options = v.into();
20669 self
20670 }
20671
20672 pub async fn send(self) -> Result<crate::model::ListJobsResponse> {
20674 (*self.0.stub)
20675 .list_jobs(self.0.request, self.0.options)
20676 .await
20677 .map(crate::Response::into_body)
20678 }
20679
20680 pub fn by_page(
20682 self,
20683 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListJobsResponse, crate::Error>
20684 {
20685 use std::clone::Clone;
20686 let token = self.0.request.page_token.clone();
20687 let execute = move |token: String| {
20688 let mut builder = self.clone();
20689 builder.0.request = builder.0.request.set_page_token(token);
20690 builder.send()
20691 };
20692 google_cloud_gax::paginator::internal::new_paginator(token, execute)
20693 }
20694
20695 pub fn by_item(
20697 self,
20698 ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::ListJobsResponse, crate::Error>
20699 {
20700 use google_cloud_gax::paginator::Paginator;
20701 self.by_page().items()
20702 }
20703
20704 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
20708 self.0.request.parent = v.into();
20709 self
20710 }
20711
20712 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
20714 self.0.request.page_size = v.into();
20715 self
20716 }
20717
20718 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
20720 self.0.request.page_token = v.into();
20721 self
20722 }
20723 }
20724
20725 #[doc(hidden)]
20726 impl crate::RequestBuilder for ListJobs {
20727 fn request_options(&mut self) -> &mut crate::RequestOptions {
20728 &mut self.0.options
20729 }
20730 }
20731
20732 #[derive(Clone, Debug)]
20749 pub struct RunTask(RequestBuilder<crate::model::RunTaskRequest>);
20750
20751 impl RunTask {
20752 pub(crate) fn new(
20753 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20754 ) -> Self {
20755 Self(RequestBuilder::new(stub))
20756 }
20757
20758 pub fn with_request<V: Into<crate::model::RunTaskRequest>>(mut self, v: V) -> Self {
20760 self.0.request = v.into();
20761 self
20762 }
20763
20764 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20766 self.0.options = v.into();
20767 self
20768 }
20769
20770 pub async fn send(self) -> Result<crate::model::RunTaskResponse> {
20772 (*self.0.stub)
20773 .run_task(self.0.request, self.0.options)
20774 .await
20775 .map(crate::Response::into_body)
20776 }
20777
20778 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20782 self.0.request.name = v.into();
20783 self
20784 }
20785
20786 pub fn set_labels<T, K, V>(mut self, v: T) -> Self
20788 where
20789 T: std::iter::IntoIterator<Item = (K, V)>,
20790 K: std::convert::Into<std::string::String>,
20791 V: std::convert::Into<std::string::String>,
20792 {
20793 self.0.request.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
20794 self
20795 }
20796
20797 pub fn set_args<T, K, V>(mut self, v: T) -> Self
20799 where
20800 T: std::iter::IntoIterator<Item = (K, V)>,
20801 K: std::convert::Into<std::string::String>,
20802 V: std::convert::Into<std::string::String>,
20803 {
20804 self.0.request.args = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
20805 self
20806 }
20807 }
20808
20809 #[doc(hidden)]
20810 impl crate::RequestBuilder for RunTask {
20811 fn request_options(&mut self) -> &mut crate::RequestOptions {
20812 &mut self.0.options
20813 }
20814 }
20815
20816 #[derive(Clone, Debug)]
20833 pub struct GetJob(RequestBuilder<crate::model::GetJobRequest>);
20834
20835 impl GetJob {
20836 pub(crate) fn new(
20837 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20838 ) -> Self {
20839 Self(RequestBuilder::new(stub))
20840 }
20841
20842 pub fn with_request<V: Into<crate::model::GetJobRequest>>(mut self, v: V) -> Self {
20844 self.0.request = v.into();
20845 self
20846 }
20847
20848 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20850 self.0.options = v.into();
20851 self
20852 }
20853
20854 pub async fn send(self) -> Result<crate::model::Job> {
20856 (*self.0.stub)
20857 .get_job(self.0.request, self.0.options)
20858 .await
20859 .map(crate::Response::into_body)
20860 }
20861
20862 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20866 self.0.request.name = v.into();
20867 self
20868 }
20869 }
20870
20871 #[doc(hidden)]
20872 impl crate::RequestBuilder for GetJob {
20873 fn request_options(&mut self) -> &mut crate::RequestOptions {
20874 &mut self.0.options
20875 }
20876 }
20877
20878 #[derive(Clone, Debug)]
20895 pub struct CancelJob(RequestBuilder<crate::model::CancelJobRequest>);
20896
20897 impl CancelJob {
20898 pub(crate) fn new(
20899 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20900 ) -> Self {
20901 Self(RequestBuilder::new(stub))
20902 }
20903
20904 pub fn with_request<V: Into<crate::model::CancelJobRequest>>(mut self, v: V) -> Self {
20906 self.0.request = v.into();
20907 self
20908 }
20909
20910 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20912 self.0.options = v.into();
20913 self
20914 }
20915
20916 pub async fn send(self) -> Result<()> {
20918 (*self.0.stub)
20919 .cancel_job(self.0.request, self.0.options)
20920 .await
20921 .map(crate::Response::into_body)
20922 }
20923
20924 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
20928 self.0.request.name = v.into();
20929 self
20930 }
20931 }
20932
20933 #[doc(hidden)]
20934 impl crate::RequestBuilder for CancelJob {
20935 fn request_options(&mut self) -> &mut crate::RequestOptions {
20936 &mut self.0.options
20937 }
20938 }
20939
20940 #[derive(Clone, Debug)]
20961 pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
20962
20963 impl ListLocations {
20964 pub(crate) fn new(
20965 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
20966 ) -> Self {
20967 Self(RequestBuilder::new(stub))
20968 }
20969
20970 pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
20972 mut self,
20973 v: V,
20974 ) -> Self {
20975 self.0.request = v.into();
20976 self
20977 }
20978
20979 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
20981 self.0.options = v.into();
20982 self
20983 }
20984
20985 pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
20987 (*self.0.stub)
20988 .list_locations(self.0.request, self.0.options)
20989 .await
20990 .map(crate::Response::into_body)
20991 }
20992
20993 pub fn by_page(
20995 self,
20996 ) -> impl google_cloud_gax::paginator::Paginator<
20997 google_cloud_location::model::ListLocationsResponse,
20998 crate::Error,
20999 > {
21000 use std::clone::Clone;
21001 let token = self.0.request.page_token.clone();
21002 let execute = move |token: String| {
21003 let mut builder = self.clone();
21004 builder.0.request = builder.0.request.set_page_token(token);
21005 builder.send()
21006 };
21007 google_cloud_gax::paginator::internal::new_paginator(token, execute)
21008 }
21009
21010 pub fn by_item(
21012 self,
21013 ) -> impl google_cloud_gax::paginator::ItemPaginator<
21014 google_cloud_location::model::ListLocationsResponse,
21015 crate::Error,
21016 > {
21017 use google_cloud_gax::paginator::Paginator;
21018 self.by_page().items()
21019 }
21020
21021 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
21023 self.0.request.name = v.into();
21024 self
21025 }
21026
21027 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
21029 self.0.request.filter = v.into();
21030 self
21031 }
21032
21033 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
21035 self.0.request.page_size = v.into();
21036 self
21037 }
21038
21039 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
21041 self.0.request.page_token = v.into();
21042 self
21043 }
21044 }
21045
21046 #[doc(hidden)]
21047 impl crate::RequestBuilder for ListLocations {
21048 fn request_options(&mut self) -> &mut crate::RequestOptions {
21049 &mut self.0.options
21050 }
21051 }
21052
21053 #[derive(Clone, Debug)]
21070 pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
21071
21072 impl GetLocation {
21073 pub(crate) fn new(
21074 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
21075 ) -> Self {
21076 Self(RequestBuilder::new(stub))
21077 }
21078
21079 pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
21081 mut self,
21082 v: V,
21083 ) -> Self {
21084 self.0.request = v.into();
21085 self
21086 }
21087
21088 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
21090 self.0.options = v.into();
21091 self
21092 }
21093
21094 pub async fn send(self) -> Result<google_cloud_location::model::Location> {
21096 (*self.0.stub)
21097 .get_location(self.0.request, self.0.options)
21098 .await
21099 .map(crate::Response::into_body)
21100 }
21101
21102 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
21104 self.0.request.name = v.into();
21105 self
21106 }
21107 }
21108
21109 #[doc(hidden)]
21110 impl crate::RequestBuilder for GetLocation {
21111 fn request_options(&mut self) -> &mut crate::RequestOptions {
21112 &mut self.0.options
21113 }
21114 }
21115
21116 #[derive(Clone, Debug)]
21133 pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
21134
21135 impl SetIamPolicy {
21136 pub(crate) fn new(
21137 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
21138 ) -> Self {
21139 Self(RequestBuilder::new(stub))
21140 }
21141
21142 pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
21144 mut self,
21145 v: V,
21146 ) -> Self {
21147 self.0.request = v.into();
21148 self
21149 }
21150
21151 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
21153 self.0.options = v.into();
21154 self
21155 }
21156
21157 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
21159 (*self.0.stub)
21160 .set_iam_policy(self.0.request, self.0.options)
21161 .await
21162 .map(crate::Response::into_body)
21163 }
21164
21165 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
21169 self.0.request.resource = v.into();
21170 self
21171 }
21172
21173 pub fn set_policy<T>(mut self, v: T) -> Self
21177 where
21178 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
21179 {
21180 self.0.request.policy = std::option::Option::Some(v.into());
21181 self
21182 }
21183
21184 pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
21188 where
21189 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
21190 {
21191 self.0.request.policy = v.map(|x| x.into());
21192 self
21193 }
21194
21195 pub fn set_update_mask<T>(mut self, v: T) -> Self
21197 where
21198 T: std::convert::Into<wkt::FieldMask>,
21199 {
21200 self.0.request.update_mask = std::option::Option::Some(v.into());
21201 self
21202 }
21203
21204 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
21206 where
21207 T: std::convert::Into<wkt::FieldMask>,
21208 {
21209 self.0.request.update_mask = v.map(|x| x.into());
21210 self
21211 }
21212 }
21213
21214 #[doc(hidden)]
21215 impl crate::RequestBuilder for SetIamPolicy {
21216 fn request_options(&mut self) -> &mut crate::RequestOptions {
21217 &mut self.0.options
21218 }
21219 }
21220
21221 #[derive(Clone, Debug)]
21238 pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
21239
21240 impl GetIamPolicy {
21241 pub(crate) fn new(
21242 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
21243 ) -> Self {
21244 Self(RequestBuilder::new(stub))
21245 }
21246
21247 pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
21249 mut self,
21250 v: V,
21251 ) -> Self {
21252 self.0.request = v.into();
21253 self
21254 }
21255
21256 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
21258 self.0.options = v.into();
21259 self
21260 }
21261
21262 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
21264 (*self.0.stub)
21265 .get_iam_policy(self.0.request, self.0.options)
21266 .await
21267 .map(crate::Response::into_body)
21268 }
21269
21270 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
21274 self.0.request.resource = v.into();
21275 self
21276 }
21277
21278 pub fn set_options<T>(mut self, v: T) -> Self
21280 where
21281 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
21282 {
21283 self.0.request.options = std::option::Option::Some(v.into());
21284 self
21285 }
21286
21287 pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
21289 where
21290 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
21291 {
21292 self.0.request.options = v.map(|x| x.into());
21293 self
21294 }
21295 }
21296
21297 #[doc(hidden)]
21298 impl crate::RequestBuilder for GetIamPolicy {
21299 fn request_options(&mut self) -> &mut crate::RequestOptions {
21300 &mut self.0.options
21301 }
21302 }
21303
21304 #[derive(Clone, Debug)]
21321 pub struct TestIamPermissions(
21322 RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
21323 );
21324
21325 impl TestIamPermissions {
21326 pub(crate) fn new(
21327 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
21328 ) -> Self {
21329 Self(RequestBuilder::new(stub))
21330 }
21331
21332 pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
21334 mut self,
21335 v: V,
21336 ) -> Self {
21337 self.0.request = v.into();
21338 self
21339 }
21340
21341 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
21343 self.0.options = v.into();
21344 self
21345 }
21346
21347 pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
21349 (*self.0.stub)
21350 .test_iam_permissions(self.0.request, self.0.options)
21351 .await
21352 .map(crate::Response::into_body)
21353 }
21354
21355 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
21359 self.0.request.resource = v.into();
21360 self
21361 }
21362
21363 pub fn set_permissions<T, V>(mut self, v: T) -> Self
21367 where
21368 T: std::iter::IntoIterator<Item = V>,
21369 V: std::convert::Into<std::string::String>,
21370 {
21371 use std::iter::Iterator;
21372 self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
21373 self
21374 }
21375 }
21376
21377 #[doc(hidden)]
21378 impl crate::RequestBuilder for TestIamPermissions {
21379 fn request_options(&mut self) -> &mut crate::RequestOptions {
21380 &mut self.0.options
21381 }
21382 }
21383
21384 #[derive(Clone, Debug)]
21405 pub struct ListOperations(
21406 RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
21407 );
21408
21409 impl ListOperations {
21410 pub(crate) fn new(
21411 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
21412 ) -> Self {
21413 Self(RequestBuilder::new(stub))
21414 }
21415
21416 pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
21418 mut self,
21419 v: V,
21420 ) -> Self {
21421 self.0.request = v.into();
21422 self
21423 }
21424
21425 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
21427 self.0.options = v.into();
21428 self
21429 }
21430
21431 pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
21433 (*self.0.stub)
21434 .list_operations(self.0.request, self.0.options)
21435 .await
21436 .map(crate::Response::into_body)
21437 }
21438
21439 pub fn by_page(
21441 self,
21442 ) -> impl google_cloud_gax::paginator::Paginator<
21443 google_cloud_longrunning::model::ListOperationsResponse,
21444 crate::Error,
21445 > {
21446 use std::clone::Clone;
21447 let token = self.0.request.page_token.clone();
21448 let execute = move |token: String| {
21449 let mut builder = self.clone();
21450 builder.0.request = builder.0.request.set_page_token(token);
21451 builder.send()
21452 };
21453 google_cloud_gax::paginator::internal::new_paginator(token, execute)
21454 }
21455
21456 pub fn by_item(
21458 self,
21459 ) -> impl google_cloud_gax::paginator::ItemPaginator<
21460 google_cloud_longrunning::model::ListOperationsResponse,
21461 crate::Error,
21462 > {
21463 use google_cloud_gax::paginator::Paginator;
21464 self.by_page().items()
21465 }
21466
21467 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
21469 self.0.request.name = v.into();
21470 self
21471 }
21472
21473 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
21475 self.0.request.filter = v.into();
21476 self
21477 }
21478
21479 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
21481 self.0.request.page_size = v.into();
21482 self
21483 }
21484
21485 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
21487 self.0.request.page_token = v.into();
21488 self
21489 }
21490
21491 pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
21493 self.0.request.return_partial_success = v.into();
21494 self
21495 }
21496 }
21497
21498 #[doc(hidden)]
21499 impl crate::RequestBuilder for ListOperations {
21500 fn request_options(&mut self) -> &mut crate::RequestOptions {
21501 &mut self.0.options
21502 }
21503 }
21504
21505 #[derive(Clone, Debug)]
21522 pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
21523
21524 impl GetOperation {
21525 pub(crate) fn new(
21526 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
21527 ) -> Self {
21528 Self(RequestBuilder::new(stub))
21529 }
21530
21531 pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
21533 mut self,
21534 v: V,
21535 ) -> Self {
21536 self.0.request = v.into();
21537 self
21538 }
21539
21540 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
21542 self.0.options = v.into();
21543 self
21544 }
21545
21546 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
21548 (*self.0.stub)
21549 .get_operation(self.0.request, self.0.options)
21550 .await
21551 .map(crate::Response::into_body)
21552 }
21553
21554 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
21556 self.0.request.name = v.into();
21557 self
21558 }
21559 }
21560
21561 #[doc(hidden)]
21562 impl crate::RequestBuilder for GetOperation {
21563 fn request_options(&mut self) -> &mut crate::RequestOptions {
21564 &mut self.0.options
21565 }
21566 }
21567
21568 #[derive(Clone, Debug)]
21585 pub struct DeleteOperation(
21586 RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
21587 );
21588
21589 impl DeleteOperation {
21590 pub(crate) fn new(
21591 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
21592 ) -> Self {
21593 Self(RequestBuilder::new(stub))
21594 }
21595
21596 pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
21598 mut self,
21599 v: V,
21600 ) -> Self {
21601 self.0.request = v.into();
21602 self
21603 }
21604
21605 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
21607 self.0.options = v.into();
21608 self
21609 }
21610
21611 pub async fn send(self) -> Result<()> {
21613 (*self.0.stub)
21614 .delete_operation(self.0.request, self.0.options)
21615 .await
21616 .map(crate::Response::into_body)
21617 }
21618
21619 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
21621 self.0.request.name = v.into();
21622 self
21623 }
21624 }
21625
21626 #[doc(hidden)]
21627 impl crate::RequestBuilder for DeleteOperation {
21628 fn request_options(&mut self) -> &mut crate::RequestOptions {
21629 &mut self.0.options
21630 }
21631 }
21632
21633 #[derive(Clone, Debug)]
21650 pub struct CancelOperation(
21651 RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
21652 );
21653
21654 impl CancelOperation {
21655 pub(crate) fn new(
21656 stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
21657 ) -> Self {
21658 Self(RequestBuilder::new(stub))
21659 }
21660
21661 pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
21663 mut self,
21664 v: V,
21665 ) -> Self {
21666 self.0.request = v.into();
21667 self
21668 }
21669
21670 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
21672 self.0.options = v.into();
21673 self
21674 }
21675
21676 pub async fn send(self) -> Result<()> {
21678 (*self.0.stub)
21679 .cancel_operation(self.0.request, self.0.options)
21680 .await
21681 .map(crate::Response::into_body)
21682 }
21683
21684 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
21686 self.0.request.name = v.into();
21687 self
21688 }
21689 }
21690
21691 #[doc(hidden)]
21692 impl crate::RequestBuilder for CancelOperation {
21693 fn request_options(&mut self) -> &mut crate::RequestOptions {
21694 &mut self.0.options
21695 }
21696 }
21697}