1pub mod developer_connect {
18 use crate::Result;
19
20 pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
34
35 pub(crate) mod client {
36 use super::super::super::client::DeveloperConnect;
37 pub struct Factory;
38 impl crate::ClientFactory for Factory {
39 type Client = DeveloperConnect;
40 type Credentials = gaxi::options::Credentials;
41 async fn build(
42 self,
43 config: gaxi::options::ClientConfig,
44 ) -> crate::ClientBuilderResult<Self::Client> {
45 Self::Client::new(config).await
46 }
47 }
48 }
49
50 #[derive(Clone, Debug)]
52 pub(crate) struct RequestBuilder<R: std::default::Default> {
53 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
54 request: R,
55 options: crate::RequestOptions,
56 }
57
58 impl<R> RequestBuilder<R>
59 where
60 R: std::default::Default,
61 {
62 pub(crate) fn new(
63 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
64 ) -> Self {
65 Self {
66 stub,
67 request: R::default(),
68 options: crate::RequestOptions::default(),
69 }
70 }
71 }
72
73 #[derive(Clone, Debug)]
94 pub struct ListConnections(RequestBuilder<crate::model::ListConnectionsRequest>);
95
96 impl ListConnections {
97 pub(crate) fn new(
98 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
99 ) -> Self {
100 Self(RequestBuilder::new(stub))
101 }
102
103 pub fn with_request<V: Into<crate::model::ListConnectionsRequest>>(mut self, v: V) -> Self {
105 self.0.request = v.into();
106 self
107 }
108
109 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
111 self.0.options = v.into();
112 self
113 }
114
115 pub async fn send(self) -> Result<crate::model::ListConnectionsResponse> {
117 (*self.0.stub)
118 .list_connections(self.0.request, self.0.options)
119 .await
120 .map(crate::Response::into_body)
121 }
122
123 pub fn by_page(
125 self,
126 ) -> impl google_cloud_gax::paginator::Paginator<
127 crate::model::ListConnectionsResponse,
128 crate::Error,
129 > {
130 use std::clone::Clone;
131 let token = self.0.request.page_token.clone();
132 let execute = move |token: String| {
133 let mut builder = self.clone();
134 builder.0.request = builder.0.request.set_page_token(token);
135 builder.send()
136 };
137 google_cloud_gax::paginator::internal::new_paginator(token, execute)
138 }
139
140 pub fn by_item(
142 self,
143 ) -> impl google_cloud_gax::paginator::ItemPaginator<
144 crate::model::ListConnectionsResponse,
145 crate::Error,
146 > {
147 use google_cloud_gax::paginator::Paginator;
148 self.by_page().items()
149 }
150
151 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
155 self.0.request.parent = v.into();
156 self
157 }
158
159 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
161 self.0.request.page_size = v.into();
162 self
163 }
164
165 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
167 self.0.request.page_token = v.into();
168 self
169 }
170
171 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
173 self.0.request.filter = v.into();
174 self
175 }
176
177 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
179 self.0.request.order_by = v.into();
180 self
181 }
182 }
183
184 #[doc(hidden)]
185 impl crate::RequestBuilder for ListConnections {
186 fn request_options(&mut self) -> &mut crate::RequestOptions {
187 &mut self.0.options
188 }
189 }
190
191 #[derive(Clone, Debug)]
208 pub struct GetConnection(RequestBuilder<crate::model::GetConnectionRequest>);
209
210 impl GetConnection {
211 pub(crate) fn new(
212 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
213 ) -> Self {
214 Self(RequestBuilder::new(stub))
215 }
216
217 pub fn with_request<V: Into<crate::model::GetConnectionRequest>>(mut self, v: V) -> Self {
219 self.0.request = v.into();
220 self
221 }
222
223 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
225 self.0.options = v.into();
226 self
227 }
228
229 pub async fn send(self) -> Result<crate::model::Connection> {
231 (*self.0.stub)
232 .get_connection(self.0.request, self.0.options)
233 .await
234 .map(crate::Response::into_body)
235 }
236
237 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
241 self.0.request.name = v.into();
242 self
243 }
244 }
245
246 #[doc(hidden)]
247 impl crate::RequestBuilder for GetConnection {
248 fn request_options(&mut self) -> &mut crate::RequestOptions {
249 &mut self.0.options
250 }
251 }
252
253 #[derive(Clone, Debug)]
271 pub struct CreateConnection(RequestBuilder<crate::model::CreateConnectionRequest>);
272
273 impl CreateConnection {
274 pub(crate) fn new(
275 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
276 ) -> Self {
277 Self(RequestBuilder::new(stub))
278 }
279
280 pub fn with_request<V: Into<crate::model::CreateConnectionRequest>>(
282 mut self,
283 v: V,
284 ) -> Self {
285 self.0.request = v.into();
286 self
287 }
288
289 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
291 self.0.options = v.into();
292 self
293 }
294
295 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
302 (*self.0.stub)
303 .create_connection(self.0.request, self.0.options)
304 .await
305 .map(crate::Response::into_body)
306 }
307
308 pub fn poller(
310 self,
311 ) -> impl google_cloud_lro::Poller<crate::model::Connection, crate::model::OperationMetadata>
312 {
313 type Operation = google_cloud_lro::internal::Operation<
314 crate::model::Connection,
315 crate::model::OperationMetadata,
316 >;
317 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
318 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
319
320 let stub = self.0.stub.clone();
321 let mut options = self.0.options.clone();
322 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
323 let query = move |name| {
324 let stub = stub.clone();
325 let options = options.clone();
326 async {
327 let op = GetOperation::new(stub)
328 .set_name(name)
329 .with_options(options)
330 .send()
331 .await?;
332 Ok(Operation::new(op))
333 }
334 };
335
336 let start = move || async {
337 let op = self.send().await?;
338 Ok(Operation::new(op))
339 };
340
341 google_cloud_lro::internal::new_poller(
342 polling_error_policy,
343 polling_backoff_policy,
344 start,
345 query,
346 )
347 }
348
349 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
353 self.0.request.parent = v.into();
354 self
355 }
356
357 pub fn set_connection_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
361 self.0.request.connection_id = v.into();
362 self
363 }
364
365 pub fn set_connection<T>(mut self, v: T) -> Self
369 where
370 T: std::convert::Into<crate::model::Connection>,
371 {
372 self.0.request.connection = std::option::Option::Some(v.into());
373 self
374 }
375
376 pub fn set_or_clear_connection<T>(mut self, v: std::option::Option<T>) -> Self
380 where
381 T: std::convert::Into<crate::model::Connection>,
382 {
383 self.0.request.connection = v.map(|x| x.into());
384 self
385 }
386
387 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
389 self.0.request.request_id = v.into();
390 self
391 }
392
393 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
395 self.0.request.validate_only = v.into();
396 self
397 }
398 }
399
400 #[doc(hidden)]
401 impl crate::RequestBuilder for CreateConnection {
402 fn request_options(&mut self) -> &mut crate::RequestOptions {
403 &mut self.0.options
404 }
405 }
406
407 #[derive(Clone, Debug)]
425 pub struct UpdateConnection(RequestBuilder<crate::model::UpdateConnectionRequest>);
426
427 impl UpdateConnection {
428 pub(crate) fn new(
429 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
430 ) -> Self {
431 Self(RequestBuilder::new(stub))
432 }
433
434 pub fn with_request<V: Into<crate::model::UpdateConnectionRequest>>(
436 mut self,
437 v: V,
438 ) -> Self {
439 self.0.request = v.into();
440 self
441 }
442
443 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
445 self.0.options = v.into();
446 self
447 }
448
449 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
456 (*self.0.stub)
457 .update_connection(self.0.request, self.0.options)
458 .await
459 .map(crate::Response::into_body)
460 }
461
462 pub fn poller(
464 self,
465 ) -> impl google_cloud_lro::Poller<crate::model::Connection, crate::model::OperationMetadata>
466 {
467 type Operation = google_cloud_lro::internal::Operation<
468 crate::model::Connection,
469 crate::model::OperationMetadata,
470 >;
471 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
472 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
473
474 let stub = self.0.stub.clone();
475 let mut options = self.0.options.clone();
476 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
477 let query = move |name| {
478 let stub = stub.clone();
479 let options = options.clone();
480 async {
481 let op = GetOperation::new(stub)
482 .set_name(name)
483 .with_options(options)
484 .send()
485 .await?;
486 Ok(Operation::new(op))
487 }
488 };
489
490 let start = move || async {
491 let op = self.send().await?;
492 Ok(Operation::new(op))
493 };
494
495 google_cloud_lro::internal::new_poller(
496 polling_error_policy,
497 polling_backoff_policy,
498 start,
499 query,
500 )
501 }
502
503 pub fn set_update_mask<T>(mut self, v: T) -> Self
507 where
508 T: std::convert::Into<wkt::FieldMask>,
509 {
510 self.0.request.update_mask = std::option::Option::Some(v.into());
511 self
512 }
513
514 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
518 where
519 T: std::convert::Into<wkt::FieldMask>,
520 {
521 self.0.request.update_mask = v.map(|x| x.into());
522 self
523 }
524
525 pub fn set_connection<T>(mut self, v: T) -> Self
529 where
530 T: std::convert::Into<crate::model::Connection>,
531 {
532 self.0.request.connection = std::option::Option::Some(v.into());
533 self
534 }
535
536 pub fn set_or_clear_connection<T>(mut self, v: std::option::Option<T>) -> Self
540 where
541 T: std::convert::Into<crate::model::Connection>,
542 {
543 self.0.request.connection = v.map(|x| x.into());
544 self
545 }
546
547 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
549 self.0.request.request_id = v.into();
550 self
551 }
552
553 pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
555 self.0.request.allow_missing = v.into();
556 self
557 }
558
559 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
561 self.0.request.validate_only = v.into();
562 self
563 }
564 }
565
566 #[doc(hidden)]
567 impl crate::RequestBuilder for UpdateConnection {
568 fn request_options(&mut self) -> &mut crate::RequestOptions {
569 &mut self.0.options
570 }
571 }
572
573 #[derive(Clone, Debug)]
591 pub struct DeleteConnection(RequestBuilder<crate::model::DeleteConnectionRequest>);
592
593 impl DeleteConnection {
594 pub(crate) fn new(
595 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
596 ) -> Self {
597 Self(RequestBuilder::new(stub))
598 }
599
600 pub fn with_request<V: Into<crate::model::DeleteConnectionRequest>>(
602 mut self,
603 v: V,
604 ) -> Self {
605 self.0.request = v.into();
606 self
607 }
608
609 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
611 self.0.options = v.into();
612 self
613 }
614
615 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
622 (*self.0.stub)
623 .delete_connection(self.0.request, self.0.options)
624 .await
625 .map(crate::Response::into_body)
626 }
627
628 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
630 type Operation =
631 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
632 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
633 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
634
635 let stub = self.0.stub.clone();
636 let mut options = self.0.options.clone();
637 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
638 let query = move |name| {
639 let stub = stub.clone();
640 let options = options.clone();
641 async {
642 let op = GetOperation::new(stub)
643 .set_name(name)
644 .with_options(options)
645 .send()
646 .await?;
647 Ok(Operation::new(op))
648 }
649 };
650
651 let start = move || async {
652 let op = self.send().await?;
653 Ok(Operation::new(op))
654 };
655
656 google_cloud_lro::internal::new_unit_response_poller(
657 polling_error_policy,
658 polling_backoff_policy,
659 start,
660 query,
661 )
662 }
663
664 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
668 self.0.request.name = v.into();
669 self
670 }
671
672 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
674 self.0.request.request_id = v.into();
675 self
676 }
677
678 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
680 self.0.request.validate_only = v.into();
681 self
682 }
683
684 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
686 self.0.request.etag = v.into();
687 self
688 }
689 }
690
691 #[doc(hidden)]
692 impl crate::RequestBuilder for DeleteConnection {
693 fn request_options(&mut self) -> &mut crate::RequestOptions {
694 &mut self.0.options
695 }
696 }
697
698 #[derive(Clone, Debug)]
716 pub struct CreateGitRepositoryLink(
717 RequestBuilder<crate::model::CreateGitRepositoryLinkRequest>,
718 );
719
720 impl CreateGitRepositoryLink {
721 pub(crate) fn new(
722 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
723 ) -> Self {
724 Self(RequestBuilder::new(stub))
725 }
726
727 pub fn with_request<V: Into<crate::model::CreateGitRepositoryLinkRequest>>(
729 mut self,
730 v: V,
731 ) -> Self {
732 self.0.request = v.into();
733 self
734 }
735
736 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
738 self.0.options = v.into();
739 self
740 }
741
742 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
749 (*self.0.stub)
750 .create_git_repository_link(self.0.request, self.0.options)
751 .await
752 .map(crate::Response::into_body)
753 }
754
755 pub fn poller(
757 self,
758 ) -> impl google_cloud_lro::Poller<
759 crate::model::GitRepositoryLink,
760 crate::model::OperationMetadata,
761 > {
762 type Operation = google_cloud_lro::internal::Operation<
763 crate::model::GitRepositoryLink,
764 crate::model::OperationMetadata,
765 >;
766 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
767 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
768
769 let stub = self.0.stub.clone();
770 let mut options = self.0.options.clone();
771 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
772 let query = move |name| {
773 let stub = stub.clone();
774 let options = options.clone();
775 async {
776 let op = GetOperation::new(stub)
777 .set_name(name)
778 .with_options(options)
779 .send()
780 .await?;
781 Ok(Operation::new(op))
782 }
783 };
784
785 let start = move || async {
786 let op = self.send().await?;
787 Ok(Operation::new(op))
788 };
789
790 google_cloud_lro::internal::new_poller(
791 polling_error_policy,
792 polling_backoff_policy,
793 start,
794 query,
795 )
796 }
797
798 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
802 self.0.request.parent = v.into();
803 self
804 }
805
806 pub fn set_git_repository_link<T>(mut self, v: T) -> Self
810 where
811 T: std::convert::Into<crate::model::GitRepositoryLink>,
812 {
813 self.0.request.git_repository_link = std::option::Option::Some(v.into());
814 self
815 }
816
817 pub fn set_or_clear_git_repository_link<T>(mut self, v: std::option::Option<T>) -> Self
821 where
822 T: std::convert::Into<crate::model::GitRepositoryLink>,
823 {
824 self.0.request.git_repository_link = v.map(|x| x.into());
825 self
826 }
827
828 pub fn set_git_repository_link_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
832 self.0.request.git_repository_link_id = v.into();
833 self
834 }
835
836 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
838 self.0.request.request_id = v.into();
839 self
840 }
841
842 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
844 self.0.request.validate_only = v.into();
845 self
846 }
847 }
848
849 #[doc(hidden)]
850 impl crate::RequestBuilder for CreateGitRepositoryLink {
851 fn request_options(&mut self) -> &mut crate::RequestOptions {
852 &mut self.0.options
853 }
854 }
855
856 #[derive(Clone, Debug)]
874 pub struct DeleteGitRepositoryLink(
875 RequestBuilder<crate::model::DeleteGitRepositoryLinkRequest>,
876 );
877
878 impl DeleteGitRepositoryLink {
879 pub(crate) fn new(
880 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
881 ) -> Self {
882 Self(RequestBuilder::new(stub))
883 }
884
885 pub fn with_request<V: Into<crate::model::DeleteGitRepositoryLinkRequest>>(
887 mut self,
888 v: V,
889 ) -> Self {
890 self.0.request = v.into();
891 self
892 }
893
894 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
896 self.0.options = v.into();
897 self
898 }
899
900 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
907 (*self.0.stub)
908 .delete_git_repository_link(self.0.request, self.0.options)
909 .await
910 .map(crate::Response::into_body)
911 }
912
913 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
915 type Operation =
916 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
917 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
918 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
919
920 let stub = self.0.stub.clone();
921 let mut options = self.0.options.clone();
922 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
923 let query = move |name| {
924 let stub = stub.clone();
925 let options = options.clone();
926 async {
927 let op = GetOperation::new(stub)
928 .set_name(name)
929 .with_options(options)
930 .send()
931 .await?;
932 Ok(Operation::new(op))
933 }
934 };
935
936 let start = move || async {
937 let op = self.send().await?;
938 Ok(Operation::new(op))
939 };
940
941 google_cloud_lro::internal::new_unit_response_poller(
942 polling_error_policy,
943 polling_backoff_policy,
944 start,
945 query,
946 )
947 }
948
949 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
953 self.0.request.name = v.into();
954 self
955 }
956
957 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
959 self.0.request.request_id = v.into();
960 self
961 }
962
963 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
965 self.0.request.validate_only = v.into();
966 self
967 }
968
969 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
971 self.0.request.etag = v.into();
972 self
973 }
974 }
975
976 #[doc(hidden)]
977 impl crate::RequestBuilder for DeleteGitRepositoryLink {
978 fn request_options(&mut self) -> &mut crate::RequestOptions {
979 &mut self.0.options
980 }
981 }
982
983 #[derive(Clone, Debug)]
1004 pub struct ListGitRepositoryLinks(RequestBuilder<crate::model::ListGitRepositoryLinksRequest>);
1005
1006 impl ListGitRepositoryLinks {
1007 pub(crate) fn new(
1008 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
1009 ) -> Self {
1010 Self(RequestBuilder::new(stub))
1011 }
1012
1013 pub fn with_request<V: Into<crate::model::ListGitRepositoryLinksRequest>>(
1015 mut self,
1016 v: V,
1017 ) -> Self {
1018 self.0.request = v.into();
1019 self
1020 }
1021
1022 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1024 self.0.options = v.into();
1025 self
1026 }
1027
1028 pub async fn send(self) -> Result<crate::model::ListGitRepositoryLinksResponse> {
1030 (*self.0.stub)
1031 .list_git_repository_links(self.0.request, self.0.options)
1032 .await
1033 .map(crate::Response::into_body)
1034 }
1035
1036 pub fn by_page(
1038 self,
1039 ) -> impl google_cloud_gax::paginator::Paginator<
1040 crate::model::ListGitRepositoryLinksResponse,
1041 crate::Error,
1042 > {
1043 use std::clone::Clone;
1044 let token = self.0.request.page_token.clone();
1045 let execute = move |token: String| {
1046 let mut builder = self.clone();
1047 builder.0.request = builder.0.request.set_page_token(token);
1048 builder.send()
1049 };
1050 google_cloud_gax::paginator::internal::new_paginator(token, execute)
1051 }
1052
1053 pub fn by_item(
1055 self,
1056 ) -> impl google_cloud_gax::paginator::ItemPaginator<
1057 crate::model::ListGitRepositoryLinksResponse,
1058 crate::Error,
1059 > {
1060 use google_cloud_gax::paginator::Paginator;
1061 self.by_page().items()
1062 }
1063
1064 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1068 self.0.request.parent = v.into();
1069 self
1070 }
1071
1072 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1074 self.0.request.page_size = v.into();
1075 self
1076 }
1077
1078 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1080 self.0.request.page_token = v.into();
1081 self
1082 }
1083
1084 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1086 self.0.request.filter = v.into();
1087 self
1088 }
1089
1090 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1092 self.0.request.order_by = v.into();
1093 self
1094 }
1095 }
1096
1097 #[doc(hidden)]
1098 impl crate::RequestBuilder for ListGitRepositoryLinks {
1099 fn request_options(&mut self) -> &mut crate::RequestOptions {
1100 &mut self.0.options
1101 }
1102 }
1103
1104 #[derive(Clone, Debug)]
1121 pub struct GetGitRepositoryLink(RequestBuilder<crate::model::GetGitRepositoryLinkRequest>);
1122
1123 impl GetGitRepositoryLink {
1124 pub(crate) fn new(
1125 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
1126 ) -> Self {
1127 Self(RequestBuilder::new(stub))
1128 }
1129
1130 pub fn with_request<V: Into<crate::model::GetGitRepositoryLinkRequest>>(
1132 mut self,
1133 v: V,
1134 ) -> Self {
1135 self.0.request = v.into();
1136 self
1137 }
1138
1139 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1141 self.0.options = v.into();
1142 self
1143 }
1144
1145 pub async fn send(self) -> Result<crate::model::GitRepositoryLink> {
1147 (*self.0.stub)
1148 .get_git_repository_link(self.0.request, self.0.options)
1149 .await
1150 .map(crate::Response::into_body)
1151 }
1152
1153 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1157 self.0.request.name = v.into();
1158 self
1159 }
1160 }
1161
1162 #[doc(hidden)]
1163 impl crate::RequestBuilder for GetGitRepositoryLink {
1164 fn request_options(&mut self) -> &mut crate::RequestOptions {
1165 &mut self.0.options
1166 }
1167 }
1168
1169 #[derive(Clone, Debug)]
1186 pub struct FetchReadWriteToken(RequestBuilder<crate::model::FetchReadWriteTokenRequest>);
1187
1188 impl FetchReadWriteToken {
1189 pub(crate) fn new(
1190 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
1191 ) -> Self {
1192 Self(RequestBuilder::new(stub))
1193 }
1194
1195 pub fn with_request<V: Into<crate::model::FetchReadWriteTokenRequest>>(
1197 mut self,
1198 v: V,
1199 ) -> Self {
1200 self.0.request = v.into();
1201 self
1202 }
1203
1204 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1206 self.0.options = v.into();
1207 self
1208 }
1209
1210 pub async fn send(self) -> Result<crate::model::FetchReadWriteTokenResponse> {
1212 (*self.0.stub)
1213 .fetch_read_write_token(self.0.request, self.0.options)
1214 .await
1215 .map(crate::Response::into_body)
1216 }
1217
1218 pub fn set_git_repository_link<T: Into<std::string::String>>(mut self, v: T) -> Self {
1222 self.0.request.git_repository_link = v.into();
1223 self
1224 }
1225 }
1226
1227 #[doc(hidden)]
1228 impl crate::RequestBuilder for FetchReadWriteToken {
1229 fn request_options(&mut self) -> &mut crate::RequestOptions {
1230 &mut self.0.options
1231 }
1232 }
1233
1234 #[derive(Clone, Debug)]
1251 pub struct FetchReadToken(RequestBuilder<crate::model::FetchReadTokenRequest>);
1252
1253 impl FetchReadToken {
1254 pub(crate) fn new(
1255 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
1256 ) -> Self {
1257 Self(RequestBuilder::new(stub))
1258 }
1259
1260 pub fn with_request<V: Into<crate::model::FetchReadTokenRequest>>(mut self, v: V) -> Self {
1262 self.0.request = v.into();
1263 self
1264 }
1265
1266 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1268 self.0.options = v.into();
1269 self
1270 }
1271
1272 pub async fn send(self) -> Result<crate::model::FetchReadTokenResponse> {
1274 (*self.0.stub)
1275 .fetch_read_token(self.0.request, self.0.options)
1276 .await
1277 .map(crate::Response::into_body)
1278 }
1279
1280 pub fn set_git_repository_link<T: Into<std::string::String>>(mut self, v: T) -> Self {
1284 self.0.request.git_repository_link = v.into();
1285 self
1286 }
1287 }
1288
1289 #[doc(hidden)]
1290 impl crate::RequestBuilder for FetchReadToken {
1291 fn request_options(&mut self) -> &mut crate::RequestOptions {
1292 &mut self.0.options
1293 }
1294 }
1295
1296 #[derive(Clone, Debug)]
1317 pub struct FetchLinkableGitRepositories(
1318 RequestBuilder<crate::model::FetchLinkableGitRepositoriesRequest>,
1319 );
1320
1321 impl FetchLinkableGitRepositories {
1322 pub(crate) fn new(
1323 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
1324 ) -> Self {
1325 Self(RequestBuilder::new(stub))
1326 }
1327
1328 pub fn with_request<V: Into<crate::model::FetchLinkableGitRepositoriesRequest>>(
1330 mut self,
1331 v: V,
1332 ) -> Self {
1333 self.0.request = v.into();
1334 self
1335 }
1336
1337 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1339 self.0.options = v.into();
1340 self
1341 }
1342
1343 pub async fn send(self) -> Result<crate::model::FetchLinkableGitRepositoriesResponse> {
1345 (*self.0.stub)
1346 .fetch_linkable_git_repositories(self.0.request, self.0.options)
1347 .await
1348 .map(crate::Response::into_body)
1349 }
1350
1351 pub fn by_page(
1353 self,
1354 ) -> impl google_cloud_gax::paginator::Paginator<
1355 crate::model::FetchLinkableGitRepositoriesResponse,
1356 crate::Error,
1357 > {
1358 use std::clone::Clone;
1359 let token = self.0.request.page_token.clone();
1360 let execute = move |token: String| {
1361 let mut builder = self.clone();
1362 builder.0.request = builder.0.request.set_page_token(token);
1363 builder.send()
1364 };
1365 google_cloud_gax::paginator::internal::new_paginator(token, execute)
1366 }
1367
1368 pub fn by_item(
1370 self,
1371 ) -> impl google_cloud_gax::paginator::ItemPaginator<
1372 crate::model::FetchLinkableGitRepositoriesResponse,
1373 crate::Error,
1374 > {
1375 use google_cloud_gax::paginator::Paginator;
1376 self.by_page().items()
1377 }
1378
1379 pub fn set_connection<T: Into<std::string::String>>(mut self, v: T) -> Self {
1383 self.0.request.connection = v.into();
1384 self
1385 }
1386
1387 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1389 self.0.request.page_size = v.into();
1390 self
1391 }
1392
1393 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1395 self.0.request.page_token = v.into();
1396 self
1397 }
1398 }
1399
1400 #[doc(hidden)]
1401 impl crate::RequestBuilder for FetchLinkableGitRepositories {
1402 fn request_options(&mut self) -> &mut crate::RequestOptions {
1403 &mut self.0.options
1404 }
1405 }
1406
1407 #[derive(Clone, Debug)]
1424 pub struct FetchGitHubInstallations(
1425 RequestBuilder<crate::model::FetchGitHubInstallationsRequest>,
1426 );
1427
1428 impl FetchGitHubInstallations {
1429 pub(crate) fn new(
1430 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
1431 ) -> Self {
1432 Self(RequestBuilder::new(stub))
1433 }
1434
1435 pub fn with_request<V: Into<crate::model::FetchGitHubInstallationsRequest>>(
1437 mut self,
1438 v: V,
1439 ) -> Self {
1440 self.0.request = v.into();
1441 self
1442 }
1443
1444 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1446 self.0.options = v.into();
1447 self
1448 }
1449
1450 pub async fn send(self) -> Result<crate::model::FetchGitHubInstallationsResponse> {
1452 (*self.0.stub)
1453 .fetch_git_hub_installations(self.0.request, self.0.options)
1454 .await
1455 .map(crate::Response::into_body)
1456 }
1457
1458 pub fn set_connection<T: Into<std::string::String>>(mut self, v: T) -> Self {
1462 self.0.request.connection = v.into();
1463 self
1464 }
1465 }
1466
1467 #[doc(hidden)]
1468 impl crate::RequestBuilder for FetchGitHubInstallations {
1469 fn request_options(&mut self) -> &mut crate::RequestOptions {
1470 &mut self.0.options
1471 }
1472 }
1473
1474 #[derive(Clone, Debug)]
1491 pub struct FetchGitRefs(RequestBuilder<crate::model::FetchGitRefsRequest>);
1492
1493 impl FetchGitRefs {
1494 pub(crate) fn new(
1495 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
1496 ) -> Self {
1497 Self(RequestBuilder::new(stub))
1498 }
1499
1500 pub fn with_request<V: Into<crate::model::FetchGitRefsRequest>>(mut self, v: V) -> Self {
1502 self.0.request = v.into();
1503 self
1504 }
1505
1506 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1508 self.0.options = v.into();
1509 self
1510 }
1511
1512 pub async fn send(self) -> Result<crate::model::FetchGitRefsResponse> {
1514 (*self.0.stub)
1515 .fetch_git_refs(self.0.request, self.0.options)
1516 .await
1517 .map(crate::Response::into_body)
1518 }
1519
1520 pub fn set_git_repository_link<T: Into<std::string::String>>(mut self, v: T) -> Self {
1524 self.0.request.git_repository_link = v.into();
1525 self
1526 }
1527
1528 pub fn set_ref_type<T: Into<crate::model::fetch_git_refs_request::RefType>>(
1532 mut self,
1533 v: T,
1534 ) -> Self {
1535 self.0.request.ref_type = v.into();
1536 self
1537 }
1538
1539 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1541 self.0.request.page_size = v.into();
1542 self
1543 }
1544
1545 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1547 self.0.request.page_token = v.into();
1548 self
1549 }
1550 }
1551
1552 #[doc(hidden)]
1553 impl crate::RequestBuilder for FetchGitRefs {
1554 fn request_options(&mut self) -> &mut crate::RequestOptions {
1555 &mut self.0.options
1556 }
1557 }
1558
1559 #[derive(Clone, Debug)]
1580 pub struct ListAccountConnectors(RequestBuilder<crate::model::ListAccountConnectorsRequest>);
1581
1582 impl ListAccountConnectors {
1583 pub(crate) fn new(
1584 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
1585 ) -> Self {
1586 Self(RequestBuilder::new(stub))
1587 }
1588
1589 pub fn with_request<V: Into<crate::model::ListAccountConnectorsRequest>>(
1591 mut self,
1592 v: V,
1593 ) -> Self {
1594 self.0.request = v.into();
1595 self
1596 }
1597
1598 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1600 self.0.options = v.into();
1601 self
1602 }
1603
1604 pub async fn send(self) -> Result<crate::model::ListAccountConnectorsResponse> {
1606 (*self.0.stub)
1607 .list_account_connectors(self.0.request, self.0.options)
1608 .await
1609 .map(crate::Response::into_body)
1610 }
1611
1612 pub fn by_page(
1614 self,
1615 ) -> impl google_cloud_gax::paginator::Paginator<
1616 crate::model::ListAccountConnectorsResponse,
1617 crate::Error,
1618 > {
1619 use std::clone::Clone;
1620 let token = self.0.request.page_token.clone();
1621 let execute = move |token: String| {
1622 let mut builder = self.clone();
1623 builder.0.request = builder.0.request.set_page_token(token);
1624 builder.send()
1625 };
1626 google_cloud_gax::paginator::internal::new_paginator(token, execute)
1627 }
1628
1629 pub fn by_item(
1631 self,
1632 ) -> impl google_cloud_gax::paginator::ItemPaginator<
1633 crate::model::ListAccountConnectorsResponse,
1634 crate::Error,
1635 > {
1636 use google_cloud_gax::paginator::Paginator;
1637 self.by_page().items()
1638 }
1639
1640 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1644 self.0.request.parent = v.into();
1645 self
1646 }
1647
1648 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1650 self.0.request.page_size = v.into();
1651 self
1652 }
1653
1654 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1656 self.0.request.page_token = v.into();
1657 self
1658 }
1659
1660 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1662 self.0.request.filter = v.into();
1663 self
1664 }
1665
1666 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1668 self.0.request.order_by = v.into();
1669 self
1670 }
1671 }
1672
1673 #[doc(hidden)]
1674 impl crate::RequestBuilder for ListAccountConnectors {
1675 fn request_options(&mut self) -> &mut crate::RequestOptions {
1676 &mut self.0.options
1677 }
1678 }
1679
1680 #[derive(Clone, Debug)]
1697 pub struct GetAccountConnector(RequestBuilder<crate::model::GetAccountConnectorRequest>);
1698
1699 impl GetAccountConnector {
1700 pub(crate) fn new(
1701 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
1702 ) -> Self {
1703 Self(RequestBuilder::new(stub))
1704 }
1705
1706 pub fn with_request<V: Into<crate::model::GetAccountConnectorRequest>>(
1708 mut self,
1709 v: V,
1710 ) -> Self {
1711 self.0.request = v.into();
1712 self
1713 }
1714
1715 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1717 self.0.options = v.into();
1718 self
1719 }
1720
1721 pub async fn send(self) -> Result<crate::model::AccountConnector> {
1723 (*self.0.stub)
1724 .get_account_connector(self.0.request, self.0.options)
1725 .await
1726 .map(crate::Response::into_body)
1727 }
1728
1729 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1733 self.0.request.name = v.into();
1734 self
1735 }
1736 }
1737
1738 #[doc(hidden)]
1739 impl crate::RequestBuilder for GetAccountConnector {
1740 fn request_options(&mut self) -> &mut crate::RequestOptions {
1741 &mut self.0.options
1742 }
1743 }
1744
1745 #[derive(Clone, Debug)]
1763 pub struct CreateAccountConnector(RequestBuilder<crate::model::CreateAccountConnectorRequest>);
1764
1765 impl CreateAccountConnector {
1766 pub(crate) fn new(
1767 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
1768 ) -> Self {
1769 Self(RequestBuilder::new(stub))
1770 }
1771
1772 pub fn with_request<V: Into<crate::model::CreateAccountConnectorRequest>>(
1774 mut self,
1775 v: V,
1776 ) -> Self {
1777 self.0.request = v.into();
1778 self
1779 }
1780
1781 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1783 self.0.options = v.into();
1784 self
1785 }
1786
1787 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1794 (*self.0.stub)
1795 .create_account_connector(self.0.request, self.0.options)
1796 .await
1797 .map(crate::Response::into_body)
1798 }
1799
1800 pub fn poller(
1802 self,
1803 ) -> impl google_cloud_lro::Poller<crate::model::AccountConnector, crate::model::OperationMetadata>
1804 {
1805 type Operation = google_cloud_lro::internal::Operation<
1806 crate::model::AccountConnector,
1807 crate::model::OperationMetadata,
1808 >;
1809 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1810 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1811
1812 let stub = self.0.stub.clone();
1813 let mut options = self.0.options.clone();
1814 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1815 let query = move |name| {
1816 let stub = stub.clone();
1817 let options = options.clone();
1818 async {
1819 let op = GetOperation::new(stub)
1820 .set_name(name)
1821 .with_options(options)
1822 .send()
1823 .await?;
1824 Ok(Operation::new(op))
1825 }
1826 };
1827
1828 let start = move || async {
1829 let op = self.send().await?;
1830 Ok(Operation::new(op))
1831 };
1832
1833 google_cloud_lro::internal::new_poller(
1834 polling_error_policy,
1835 polling_backoff_policy,
1836 start,
1837 query,
1838 )
1839 }
1840
1841 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1845 self.0.request.parent = v.into();
1846 self
1847 }
1848
1849 pub fn set_account_connector_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1853 self.0.request.account_connector_id = v.into();
1854 self
1855 }
1856
1857 pub fn set_account_connector<T>(mut self, v: T) -> Self
1861 where
1862 T: std::convert::Into<crate::model::AccountConnector>,
1863 {
1864 self.0.request.account_connector = std::option::Option::Some(v.into());
1865 self
1866 }
1867
1868 pub fn set_or_clear_account_connector<T>(mut self, v: std::option::Option<T>) -> Self
1872 where
1873 T: std::convert::Into<crate::model::AccountConnector>,
1874 {
1875 self.0.request.account_connector = v.map(|x| x.into());
1876 self
1877 }
1878
1879 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1881 self.0.request.request_id = v.into();
1882 self
1883 }
1884
1885 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
1887 self.0.request.validate_only = v.into();
1888 self
1889 }
1890 }
1891
1892 #[doc(hidden)]
1893 impl crate::RequestBuilder for CreateAccountConnector {
1894 fn request_options(&mut self) -> &mut crate::RequestOptions {
1895 &mut self.0.options
1896 }
1897 }
1898
1899 #[derive(Clone, Debug)]
1917 pub struct UpdateAccountConnector(RequestBuilder<crate::model::UpdateAccountConnectorRequest>);
1918
1919 impl UpdateAccountConnector {
1920 pub(crate) fn new(
1921 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
1922 ) -> Self {
1923 Self(RequestBuilder::new(stub))
1924 }
1925
1926 pub fn with_request<V: Into<crate::model::UpdateAccountConnectorRequest>>(
1928 mut self,
1929 v: V,
1930 ) -> Self {
1931 self.0.request = v.into();
1932 self
1933 }
1934
1935 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1937 self.0.options = v.into();
1938 self
1939 }
1940
1941 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1948 (*self.0.stub)
1949 .update_account_connector(self.0.request, self.0.options)
1950 .await
1951 .map(crate::Response::into_body)
1952 }
1953
1954 pub fn poller(
1956 self,
1957 ) -> impl google_cloud_lro::Poller<crate::model::AccountConnector, crate::model::OperationMetadata>
1958 {
1959 type Operation = google_cloud_lro::internal::Operation<
1960 crate::model::AccountConnector,
1961 crate::model::OperationMetadata,
1962 >;
1963 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1964 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1965
1966 let stub = self.0.stub.clone();
1967 let mut options = self.0.options.clone();
1968 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1969 let query = move |name| {
1970 let stub = stub.clone();
1971 let options = options.clone();
1972 async {
1973 let op = GetOperation::new(stub)
1974 .set_name(name)
1975 .with_options(options)
1976 .send()
1977 .await?;
1978 Ok(Operation::new(op))
1979 }
1980 };
1981
1982 let start = move || async {
1983 let op = self.send().await?;
1984 Ok(Operation::new(op))
1985 };
1986
1987 google_cloud_lro::internal::new_poller(
1988 polling_error_policy,
1989 polling_backoff_policy,
1990 start,
1991 query,
1992 )
1993 }
1994
1995 pub fn set_update_mask<T>(mut self, v: T) -> Self
1997 where
1998 T: std::convert::Into<wkt::FieldMask>,
1999 {
2000 self.0.request.update_mask = std::option::Option::Some(v.into());
2001 self
2002 }
2003
2004 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2006 where
2007 T: std::convert::Into<wkt::FieldMask>,
2008 {
2009 self.0.request.update_mask = v.map(|x| x.into());
2010 self
2011 }
2012
2013 pub fn set_account_connector<T>(mut self, v: T) -> Self
2017 where
2018 T: std::convert::Into<crate::model::AccountConnector>,
2019 {
2020 self.0.request.account_connector = std::option::Option::Some(v.into());
2021 self
2022 }
2023
2024 pub fn set_or_clear_account_connector<T>(mut self, v: std::option::Option<T>) -> Self
2028 where
2029 T: std::convert::Into<crate::model::AccountConnector>,
2030 {
2031 self.0.request.account_connector = v.map(|x| x.into());
2032 self
2033 }
2034
2035 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2037 self.0.request.request_id = v.into();
2038 self
2039 }
2040
2041 pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
2043 self.0.request.allow_missing = v.into();
2044 self
2045 }
2046
2047 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2049 self.0.request.validate_only = v.into();
2050 self
2051 }
2052 }
2053
2054 #[doc(hidden)]
2055 impl crate::RequestBuilder for UpdateAccountConnector {
2056 fn request_options(&mut self) -> &mut crate::RequestOptions {
2057 &mut self.0.options
2058 }
2059 }
2060
2061 #[derive(Clone, Debug)]
2079 pub struct DeleteAccountConnector(RequestBuilder<crate::model::DeleteAccountConnectorRequest>);
2080
2081 impl DeleteAccountConnector {
2082 pub(crate) fn new(
2083 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
2084 ) -> Self {
2085 Self(RequestBuilder::new(stub))
2086 }
2087
2088 pub fn with_request<V: Into<crate::model::DeleteAccountConnectorRequest>>(
2090 mut self,
2091 v: V,
2092 ) -> Self {
2093 self.0.request = v.into();
2094 self
2095 }
2096
2097 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2099 self.0.options = v.into();
2100 self
2101 }
2102
2103 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2110 (*self.0.stub)
2111 .delete_account_connector(self.0.request, self.0.options)
2112 .await
2113 .map(crate::Response::into_body)
2114 }
2115
2116 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
2118 type Operation =
2119 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
2120 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2121 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2122
2123 let stub = self.0.stub.clone();
2124 let mut options = self.0.options.clone();
2125 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2126 let query = move |name| {
2127 let stub = stub.clone();
2128 let options = options.clone();
2129 async {
2130 let op = GetOperation::new(stub)
2131 .set_name(name)
2132 .with_options(options)
2133 .send()
2134 .await?;
2135 Ok(Operation::new(op))
2136 }
2137 };
2138
2139 let start = move || async {
2140 let op = self.send().await?;
2141 Ok(Operation::new(op))
2142 };
2143
2144 google_cloud_lro::internal::new_unit_response_poller(
2145 polling_error_policy,
2146 polling_backoff_policy,
2147 start,
2148 query,
2149 )
2150 }
2151
2152 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2156 self.0.request.name = v.into();
2157 self
2158 }
2159
2160 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2162 self.0.request.request_id = v.into();
2163 self
2164 }
2165
2166 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2168 self.0.request.validate_only = v.into();
2169 self
2170 }
2171
2172 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
2174 self.0.request.etag = v.into();
2175 self
2176 }
2177
2178 pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
2180 self.0.request.force = v.into();
2181 self
2182 }
2183 }
2184
2185 #[doc(hidden)]
2186 impl crate::RequestBuilder for DeleteAccountConnector {
2187 fn request_options(&mut self) -> &mut crate::RequestOptions {
2188 &mut self.0.options
2189 }
2190 }
2191
2192 #[derive(Clone, Debug)]
2209 pub struct FetchAccessToken(RequestBuilder<crate::model::FetchAccessTokenRequest>);
2210
2211 impl FetchAccessToken {
2212 pub(crate) fn new(
2213 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
2214 ) -> Self {
2215 Self(RequestBuilder::new(stub))
2216 }
2217
2218 pub fn with_request<V: Into<crate::model::FetchAccessTokenRequest>>(
2220 mut self,
2221 v: V,
2222 ) -> Self {
2223 self.0.request = v.into();
2224 self
2225 }
2226
2227 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2229 self.0.options = v.into();
2230 self
2231 }
2232
2233 pub async fn send(self) -> Result<crate::model::FetchAccessTokenResponse> {
2235 (*self.0.stub)
2236 .fetch_access_token(self.0.request, self.0.options)
2237 .await
2238 .map(crate::Response::into_body)
2239 }
2240
2241 pub fn set_account_connector<T: Into<std::string::String>>(mut self, v: T) -> Self {
2245 self.0.request.account_connector = v.into();
2246 self
2247 }
2248 }
2249
2250 #[doc(hidden)]
2251 impl crate::RequestBuilder for FetchAccessToken {
2252 fn request_options(&mut self) -> &mut crate::RequestOptions {
2253 &mut self.0.options
2254 }
2255 }
2256
2257 #[derive(Clone, Debug)]
2278 pub struct ListUsers(RequestBuilder<crate::model::ListUsersRequest>);
2279
2280 impl ListUsers {
2281 pub(crate) fn new(
2282 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
2283 ) -> Self {
2284 Self(RequestBuilder::new(stub))
2285 }
2286
2287 pub fn with_request<V: Into<crate::model::ListUsersRequest>>(mut self, v: V) -> Self {
2289 self.0.request = v.into();
2290 self
2291 }
2292
2293 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2295 self.0.options = v.into();
2296 self
2297 }
2298
2299 pub async fn send(self) -> Result<crate::model::ListUsersResponse> {
2301 (*self.0.stub)
2302 .list_users(self.0.request, self.0.options)
2303 .await
2304 .map(crate::Response::into_body)
2305 }
2306
2307 pub fn by_page(
2309 self,
2310 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListUsersResponse, crate::Error>
2311 {
2312 use std::clone::Clone;
2313 let token = self.0.request.page_token.clone();
2314 let execute = move |token: String| {
2315 let mut builder = self.clone();
2316 builder.0.request = builder.0.request.set_page_token(token);
2317 builder.send()
2318 };
2319 google_cloud_gax::paginator::internal::new_paginator(token, execute)
2320 }
2321
2322 pub fn by_item(
2324 self,
2325 ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::ListUsersResponse, crate::Error>
2326 {
2327 use google_cloud_gax::paginator::Paginator;
2328 self.by_page().items()
2329 }
2330
2331 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2335 self.0.request.parent = v.into();
2336 self
2337 }
2338
2339 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2341 self.0.request.page_size = v.into();
2342 self
2343 }
2344
2345 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2347 self.0.request.page_token = v.into();
2348 self
2349 }
2350
2351 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2353 self.0.request.filter = v.into();
2354 self
2355 }
2356
2357 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
2359 self.0.request.order_by = v.into();
2360 self
2361 }
2362 }
2363
2364 #[doc(hidden)]
2365 impl crate::RequestBuilder for ListUsers {
2366 fn request_options(&mut self) -> &mut crate::RequestOptions {
2367 &mut self.0.options
2368 }
2369 }
2370
2371 #[derive(Clone, Debug)]
2389 pub struct DeleteUser(RequestBuilder<crate::model::DeleteUserRequest>);
2390
2391 impl DeleteUser {
2392 pub(crate) fn new(
2393 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
2394 ) -> Self {
2395 Self(RequestBuilder::new(stub))
2396 }
2397
2398 pub fn with_request<V: Into<crate::model::DeleteUserRequest>>(mut self, v: V) -> Self {
2400 self.0.request = v.into();
2401 self
2402 }
2403
2404 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2406 self.0.options = v.into();
2407 self
2408 }
2409
2410 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2417 (*self.0.stub)
2418 .delete_user(self.0.request, self.0.options)
2419 .await
2420 .map(crate::Response::into_body)
2421 }
2422
2423 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
2425 type Operation =
2426 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
2427 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2428 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2429
2430 let stub = self.0.stub.clone();
2431 let mut options = self.0.options.clone();
2432 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2433 let query = move |name| {
2434 let stub = stub.clone();
2435 let options = options.clone();
2436 async {
2437 let op = GetOperation::new(stub)
2438 .set_name(name)
2439 .with_options(options)
2440 .send()
2441 .await?;
2442 Ok(Operation::new(op))
2443 }
2444 };
2445
2446 let start = move || async {
2447 let op = self.send().await?;
2448 Ok(Operation::new(op))
2449 };
2450
2451 google_cloud_lro::internal::new_unit_response_poller(
2452 polling_error_policy,
2453 polling_backoff_policy,
2454 start,
2455 query,
2456 )
2457 }
2458
2459 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2463 self.0.request.name = v.into();
2464 self
2465 }
2466
2467 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2469 self.0.request.request_id = v.into();
2470 self
2471 }
2472
2473 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2475 self.0.request.validate_only = v.into();
2476 self
2477 }
2478
2479 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
2481 self.0.request.etag = v.into();
2482 self
2483 }
2484 }
2485
2486 #[doc(hidden)]
2487 impl crate::RequestBuilder for DeleteUser {
2488 fn request_options(&mut self) -> &mut crate::RequestOptions {
2489 &mut self.0.options
2490 }
2491 }
2492
2493 #[derive(Clone, Debug)]
2510 pub struct FetchSelf(RequestBuilder<crate::model::FetchSelfRequest>);
2511
2512 impl FetchSelf {
2513 pub(crate) fn new(
2514 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
2515 ) -> Self {
2516 Self(RequestBuilder::new(stub))
2517 }
2518
2519 pub fn with_request<V: Into<crate::model::FetchSelfRequest>>(mut self, v: V) -> Self {
2521 self.0.request = v.into();
2522 self
2523 }
2524
2525 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2527 self.0.options = v.into();
2528 self
2529 }
2530
2531 pub async fn send(self) -> Result<crate::model::User> {
2533 (*self.0.stub)
2534 .fetch_self(self.0.request, self.0.options)
2535 .await
2536 .map(crate::Response::into_body)
2537 }
2538
2539 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2543 self.0.request.name = v.into();
2544 self
2545 }
2546 }
2547
2548 #[doc(hidden)]
2549 impl crate::RequestBuilder for FetchSelf {
2550 fn request_options(&mut self) -> &mut crate::RequestOptions {
2551 &mut self.0.options
2552 }
2553 }
2554
2555 #[derive(Clone, Debug)]
2573 pub struct DeleteSelf(RequestBuilder<crate::model::DeleteSelfRequest>);
2574
2575 impl DeleteSelf {
2576 pub(crate) fn new(
2577 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
2578 ) -> Self {
2579 Self(RequestBuilder::new(stub))
2580 }
2581
2582 pub fn with_request<V: Into<crate::model::DeleteSelfRequest>>(mut self, v: V) -> Self {
2584 self.0.request = v.into();
2585 self
2586 }
2587
2588 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2590 self.0.options = v.into();
2591 self
2592 }
2593
2594 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2601 (*self.0.stub)
2602 .delete_self(self.0.request, self.0.options)
2603 .await
2604 .map(crate::Response::into_body)
2605 }
2606
2607 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
2609 type Operation =
2610 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
2611 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2612 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2613
2614 let stub = self.0.stub.clone();
2615 let mut options = self.0.options.clone();
2616 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2617 let query = move |name| {
2618 let stub = stub.clone();
2619 let options = options.clone();
2620 async {
2621 let op = GetOperation::new(stub)
2622 .set_name(name)
2623 .with_options(options)
2624 .send()
2625 .await?;
2626 Ok(Operation::new(op))
2627 }
2628 };
2629
2630 let start = move || async {
2631 let op = self.send().await?;
2632 Ok(Operation::new(op))
2633 };
2634
2635 google_cloud_lro::internal::new_unit_response_poller(
2636 polling_error_policy,
2637 polling_backoff_policy,
2638 start,
2639 query,
2640 )
2641 }
2642
2643 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2647 self.0.request.name = v.into();
2648 self
2649 }
2650 }
2651
2652 #[doc(hidden)]
2653 impl crate::RequestBuilder for DeleteSelf {
2654 fn request_options(&mut self) -> &mut crate::RequestOptions {
2655 &mut self.0.options
2656 }
2657 }
2658
2659 #[derive(Clone, Debug)]
2676 pub struct StartOAuth(RequestBuilder<crate::model::StartOAuthRequest>);
2677
2678 impl StartOAuth {
2679 pub(crate) fn new(
2680 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
2681 ) -> Self {
2682 Self(RequestBuilder::new(stub))
2683 }
2684
2685 pub fn with_request<V: Into<crate::model::StartOAuthRequest>>(mut self, v: V) -> Self {
2687 self.0.request = v.into();
2688 self
2689 }
2690
2691 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2693 self.0.options = v.into();
2694 self
2695 }
2696
2697 pub async fn send(self) -> Result<crate::model::StartOAuthResponse> {
2699 (*self.0.stub)
2700 .start_o_auth(self.0.request, self.0.options)
2701 .await
2702 .map(crate::Response::into_body)
2703 }
2704
2705 pub fn set_account_connector<T: Into<std::string::String>>(mut self, v: T) -> Self {
2709 self.0.request.account_connector = v.into();
2710 self
2711 }
2712 }
2713
2714 #[doc(hidden)]
2715 impl crate::RequestBuilder for StartOAuth {
2716 fn request_options(&mut self) -> &mut crate::RequestOptions {
2717 &mut self.0.options
2718 }
2719 }
2720
2721 #[derive(Clone, Debug)]
2738 pub struct FinishOAuth(RequestBuilder<crate::model::FinishOAuthRequest>);
2739
2740 impl FinishOAuth {
2741 pub(crate) fn new(
2742 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
2743 ) -> Self {
2744 Self(RequestBuilder::new(stub))
2745 }
2746
2747 pub fn with_request<V: Into<crate::model::FinishOAuthRequest>>(mut self, v: V) -> Self {
2749 self.0.request = v.into();
2750 self
2751 }
2752
2753 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2755 self.0.options = v.into();
2756 self
2757 }
2758
2759 pub async fn send(self) -> Result<crate::model::FinishOAuthResponse> {
2761 (*self.0.stub)
2762 .finish_o_auth(self.0.request, self.0.options)
2763 .await
2764 .map(crate::Response::into_body)
2765 }
2766
2767 pub fn set_account_connector<T: Into<std::string::String>>(mut self, v: T) -> Self {
2771 self.0.request.account_connector = v.into();
2772 self
2773 }
2774
2775 pub fn set_params<T: Into<Option<crate::model::finish_o_auth_request::Params>>>(
2780 mut self,
2781 v: T,
2782 ) -> Self {
2783 self.0.request.params = v.into();
2784 self
2785 }
2786
2787 pub fn set_oauth_params<
2793 T: std::convert::Into<std::boxed::Box<crate::model::finish_o_auth_request::OAuthParams>>,
2794 >(
2795 mut self,
2796 v: T,
2797 ) -> Self {
2798 self.0.request = self.0.request.set_oauth_params(v);
2799 self
2800 }
2801
2802 pub fn set_google_oauth_params<
2808 T: std::convert::Into<
2809 std::boxed::Box<crate::model::finish_o_auth_request::GoogleOAuthParams>,
2810 >,
2811 >(
2812 mut self,
2813 v: T,
2814 ) -> Self {
2815 self.0.request = self.0.request.set_google_oauth_params(v);
2816 self
2817 }
2818 }
2819
2820 #[doc(hidden)]
2821 impl crate::RequestBuilder for FinishOAuth {
2822 fn request_options(&mut self) -> &mut crate::RequestOptions {
2823 &mut self.0.options
2824 }
2825 }
2826
2827 #[derive(Clone, Debug)]
2848 pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
2849
2850 impl ListLocations {
2851 pub(crate) fn new(
2852 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
2853 ) -> Self {
2854 Self(RequestBuilder::new(stub))
2855 }
2856
2857 pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
2859 mut self,
2860 v: V,
2861 ) -> Self {
2862 self.0.request = v.into();
2863 self
2864 }
2865
2866 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2868 self.0.options = v.into();
2869 self
2870 }
2871
2872 pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
2874 (*self.0.stub)
2875 .list_locations(self.0.request, self.0.options)
2876 .await
2877 .map(crate::Response::into_body)
2878 }
2879
2880 pub fn by_page(
2882 self,
2883 ) -> impl google_cloud_gax::paginator::Paginator<
2884 google_cloud_location::model::ListLocationsResponse,
2885 crate::Error,
2886 > {
2887 use std::clone::Clone;
2888 let token = self.0.request.page_token.clone();
2889 let execute = move |token: String| {
2890 let mut builder = self.clone();
2891 builder.0.request = builder.0.request.set_page_token(token);
2892 builder.send()
2893 };
2894 google_cloud_gax::paginator::internal::new_paginator(token, execute)
2895 }
2896
2897 pub fn by_item(
2899 self,
2900 ) -> impl google_cloud_gax::paginator::ItemPaginator<
2901 google_cloud_location::model::ListLocationsResponse,
2902 crate::Error,
2903 > {
2904 use google_cloud_gax::paginator::Paginator;
2905 self.by_page().items()
2906 }
2907
2908 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2910 self.0.request.name = v.into();
2911 self
2912 }
2913
2914 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2916 self.0.request.filter = v.into();
2917 self
2918 }
2919
2920 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2922 self.0.request.page_size = v.into();
2923 self
2924 }
2925
2926 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2928 self.0.request.page_token = v.into();
2929 self
2930 }
2931 }
2932
2933 #[doc(hidden)]
2934 impl crate::RequestBuilder for ListLocations {
2935 fn request_options(&mut self) -> &mut crate::RequestOptions {
2936 &mut self.0.options
2937 }
2938 }
2939
2940 #[derive(Clone, Debug)]
2957 pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
2958
2959 impl GetLocation {
2960 pub(crate) fn new(
2961 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
2962 ) -> Self {
2963 Self(RequestBuilder::new(stub))
2964 }
2965
2966 pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
2968 mut self,
2969 v: V,
2970 ) -> Self {
2971 self.0.request = v.into();
2972 self
2973 }
2974
2975 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2977 self.0.options = v.into();
2978 self
2979 }
2980
2981 pub async fn send(self) -> Result<google_cloud_location::model::Location> {
2983 (*self.0.stub)
2984 .get_location(self.0.request, self.0.options)
2985 .await
2986 .map(crate::Response::into_body)
2987 }
2988
2989 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2991 self.0.request.name = v.into();
2992 self
2993 }
2994 }
2995
2996 #[doc(hidden)]
2997 impl crate::RequestBuilder for GetLocation {
2998 fn request_options(&mut self) -> &mut crate::RequestOptions {
2999 &mut self.0.options
3000 }
3001 }
3002
3003 #[derive(Clone, Debug)]
3024 pub struct ListOperations(
3025 RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
3026 );
3027
3028 impl ListOperations {
3029 pub(crate) fn new(
3030 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
3031 ) -> Self {
3032 Self(RequestBuilder::new(stub))
3033 }
3034
3035 pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
3037 mut self,
3038 v: V,
3039 ) -> Self {
3040 self.0.request = v.into();
3041 self
3042 }
3043
3044 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3046 self.0.options = v.into();
3047 self
3048 }
3049
3050 pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
3052 (*self.0.stub)
3053 .list_operations(self.0.request, self.0.options)
3054 .await
3055 .map(crate::Response::into_body)
3056 }
3057
3058 pub fn by_page(
3060 self,
3061 ) -> impl google_cloud_gax::paginator::Paginator<
3062 google_cloud_longrunning::model::ListOperationsResponse,
3063 crate::Error,
3064 > {
3065 use std::clone::Clone;
3066 let token = self.0.request.page_token.clone();
3067 let execute = move |token: String| {
3068 let mut builder = self.clone();
3069 builder.0.request = builder.0.request.set_page_token(token);
3070 builder.send()
3071 };
3072 google_cloud_gax::paginator::internal::new_paginator(token, execute)
3073 }
3074
3075 pub fn by_item(
3077 self,
3078 ) -> impl google_cloud_gax::paginator::ItemPaginator<
3079 google_cloud_longrunning::model::ListOperationsResponse,
3080 crate::Error,
3081 > {
3082 use google_cloud_gax::paginator::Paginator;
3083 self.by_page().items()
3084 }
3085
3086 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3088 self.0.request.name = v.into();
3089 self
3090 }
3091
3092 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3094 self.0.request.filter = v.into();
3095 self
3096 }
3097
3098 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3100 self.0.request.page_size = v.into();
3101 self
3102 }
3103
3104 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3106 self.0.request.page_token = v.into();
3107 self
3108 }
3109
3110 pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
3112 self.0.request.return_partial_success = v.into();
3113 self
3114 }
3115 }
3116
3117 #[doc(hidden)]
3118 impl crate::RequestBuilder for ListOperations {
3119 fn request_options(&mut self) -> &mut crate::RequestOptions {
3120 &mut self.0.options
3121 }
3122 }
3123
3124 #[derive(Clone, Debug)]
3141 pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
3142
3143 impl GetOperation {
3144 pub(crate) fn new(
3145 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
3146 ) -> Self {
3147 Self(RequestBuilder::new(stub))
3148 }
3149
3150 pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
3152 mut self,
3153 v: V,
3154 ) -> Self {
3155 self.0.request = v.into();
3156 self
3157 }
3158
3159 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3161 self.0.options = v.into();
3162 self
3163 }
3164
3165 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3167 (*self.0.stub)
3168 .get_operation(self.0.request, self.0.options)
3169 .await
3170 .map(crate::Response::into_body)
3171 }
3172
3173 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3175 self.0.request.name = v.into();
3176 self
3177 }
3178 }
3179
3180 #[doc(hidden)]
3181 impl crate::RequestBuilder for GetOperation {
3182 fn request_options(&mut self) -> &mut crate::RequestOptions {
3183 &mut self.0.options
3184 }
3185 }
3186
3187 #[derive(Clone, Debug)]
3204 pub struct DeleteOperation(
3205 RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
3206 );
3207
3208 impl DeleteOperation {
3209 pub(crate) fn new(
3210 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
3211 ) -> Self {
3212 Self(RequestBuilder::new(stub))
3213 }
3214
3215 pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
3217 mut self,
3218 v: V,
3219 ) -> Self {
3220 self.0.request = v.into();
3221 self
3222 }
3223
3224 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3226 self.0.options = v.into();
3227 self
3228 }
3229
3230 pub async fn send(self) -> Result<()> {
3232 (*self.0.stub)
3233 .delete_operation(self.0.request, self.0.options)
3234 .await
3235 .map(crate::Response::into_body)
3236 }
3237
3238 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3240 self.0.request.name = v.into();
3241 self
3242 }
3243 }
3244
3245 #[doc(hidden)]
3246 impl crate::RequestBuilder for DeleteOperation {
3247 fn request_options(&mut self) -> &mut crate::RequestOptions {
3248 &mut self.0.options
3249 }
3250 }
3251
3252 #[derive(Clone, Debug)]
3269 pub struct CancelOperation(
3270 RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
3271 );
3272
3273 impl CancelOperation {
3274 pub(crate) fn new(
3275 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
3276 ) -> Self {
3277 Self(RequestBuilder::new(stub))
3278 }
3279
3280 pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
3282 mut self,
3283 v: V,
3284 ) -> Self {
3285 self.0.request = v.into();
3286 self
3287 }
3288
3289 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3291 self.0.options = v.into();
3292 self
3293 }
3294
3295 pub async fn send(self) -> Result<()> {
3297 (*self.0.stub)
3298 .cancel_operation(self.0.request, self.0.options)
3299 .await
3300 .map(crate::Response::into_body)
3301 }
3302
3303 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3305 self.0.request.name = v.into();
3306 self
3307 }
3308 }
3309
3310 #[doc(hidden)]
3311 impl crate::RequestBuilder for CancelOperation {
3312 fn request_options(&mut self) -> &mut crate::RequestOptions {
3313 &mut self.0.options
3314 }
3315 }
3316}
3317
3318pub mod insights_config_service {
3319 use crate::Result;
3320
3321 pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
3335
3336 pub(crate) mod client {
3337 use super::super::super::client::InsightsConfigService;
3338 pub struct Factory;
3339 impl crate::ClientFactory for Factory {
3340 type Client = InsightsConfigService;
3341 type Credentials = gaxi::options::Credentials;
3342 async fn build(
3343 self,
3344 config: gaxi::options::ClientConfig,
3345 ) -> crate::ClientBuilderResult<Self::Client> {
3346 Self::Client::new(config).await
3347 }
3348 }
3349 }
3350
3351 #[derive(Clone, Debug)]
3353 pub(crate) struct RequestBuilder<R: std::default::Default> {
3354 stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
3355 request: R,
3356 options: crate::RequestOptions,
3357 }
3358
3359 impl<R> RequestBuilder<R>
3360 where
3361 R: std::default::Default,
3362 {
3363 pub(crate) fn new(
3364 stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
3365 ) -> Self {
3366 Self {
3367 stub,
3368 request: R::default(),
3369 options: crate::RequestOptions::default(),
3370 }
3371 }
3372 }
3373
3374 #[derive(Clone, Debug)]
3395 pub struct ListInsightsConfigs(RequestBuilder<crate::model::ListInsightsConfigsRequest>);
3396
3397 impl ListInsightsConfigs {
3398 pub(crate) fn new(
3399 stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
3400 ) -> Self {
3401 Self(RequestBuilder::new(stub))
3402 }
3403
3404 pub fn with_request<V: Into<crate::model::ListInsightsConfigsRequest>>(
3406 mut self,
3407 v: V,
3408 ) -> Self {
3409 self.0.request = v.into();
3410 self
3411 }
3412
3413 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3415 self.0.options = v.into();
3416 self
3417 }
3418
3419 pub async fn send(self) -> Result<crate::model::ListInsightsConfigsResponse> {
3421 (*self.0.stub)
3422 .list_insights_configs(self.0.request, self.0.options)
3423 .await
3424 .map(crate::Response::into_body)
3425 }
3426
3427 pub fn by_page(
3429 self,
3430 ) -> impl google_cloud_gax::paginator::Paginator<
3431 crate::model::ListInsightsConfigsResponse,
3432 crate::Error,
3433 > {
3434 use std::clone::Clone;
3435 let token = self.0.request.page_token.clone();
3436 let execute = move |token: String| {
3437 let mut builder = self.clone();
3438 builder.0.request = builder.0.request.set_page_token(token);
3439 builder.send()
3440 };
3441 google_cloud_gax::paginator::internal::new_paginator(token, execute)
3442 }
3443
3444 pub fn by_item(
3446 self,
3447 ) -> impl google_cloud_gax::paginator::ItemPaginator<
3448 crate::model::ListInsightsConfigsResponse,
3449 crate::Error,
3450 > {
3451 use google_cloud_gax::paginator::Paginator;
3452 self.by_page().items()
3453 }
3454
3455 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3459 self.0.request.parent = v.into();
3460 self
3461 }
3462
3463 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3465 self.0.request.page_size = v.into();
3466 self
3467 }
3468
3469 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3471 self.0.request.page_token = v.into();
3472 self
3473 }
3474
3475 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3477 self.0.request.filter = v.into();
3478 self
3479 }
3480
3481 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3483 self.0.request.order_by = v.into();
3484 self
3485 }
3486 }
3487
3488 #[doc(hidden)]
3489 impl crate::RequestBuilder for ListInsightsConfigs {
3490 fn request_options(&mut self) -> &mut crate::RequestOptions {
3491 &mut self.0.options
3492 }
3493 }
3494
3495 #[derive(Clone, Debug)]
3513 pub struct CreateInsightsConfig(RequestBuilder<crate::model::CreateInsightsConfigRequest>);
3514
3515 impl CreateInsightsConfig {
3516 pub(crate) fn new(
3517 stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
3518 ) -> Self {
3519 Self(RequestBuilder::new(stub))
3520 }
3521
3522 pub fn with_request<V: Into<crate::model::CreateInsightsConfigRequest>>(
3524 mut self,
3525 v: V,
3526 ) -> Self {
3527 self.0.request = v.into();
3528 self
3529 }
3530
3531 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3533 self.0.options = v.into();
3534 self
3535 }
3536
3537 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3544 (*self.0.stub)
3545 .create_insights_config(self.0.request, self.0.options)
3546 .await
3547 .map(crate::Response::into_body)
3548 }
3549
3550 pub fn poller(
3552 self,
3553 ) -> impl google_cloud_lro::Poller<crate::model::InsightsConfig, crate::model::OperationMetadata>
3554 {
3555 type Operation = google_cloud_lro::internal::Operation<
3556 crate::model::InsightsConfig,
3557 crate::model::OperationMetadata,
3558 >;
3559 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3560 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3561
3562 let stub = self.0.stub.clone();
3563 let mut options = self.0.options.clone();
3564 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3565 let query = move |name| {
3566 let stub = stub.clone();
3567 let options = options.clone();
3568 async {
3569 let op = GetOperation::new(stub)
3570 .set_name(name)
3571 .with_options(options)
3572 .send()
3573 .await?;
3574 Ok(Operation::new(op))
3575 }
3576 };
3577
3578 let start = move || async {
3579 let op = self.send().await?;
3580 Ok(Operation::new(op))
3581 };
3582
3583 google_cloud_lro::internal::new_poller(
3584 polling_error_policy,
3585 polling_backoff_policy,
3586 start,
3587 query,
3588 )
3589 }
3590
3591 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3595 self.0.request.parent = v.into();
3596 self
3597 }
3598
3599 pub fn set_insights_config_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3603 self.0.request.insights_config_id = v.into();
3604 self
3605 }
3606
3607 pub fn set_insights_config<T>(mut self, v: T) -> Self
3611 where
3612 T: std::convert::Into<crate::model::InsightsConfig>,
3613 {
3614 self.0.request.insights_config = std::option::Option::Some(v.into());
3615 self
3616 }
3617
3618 pub fn set_or_clear_insights_config<T>(mut self, v: std::option::Option<T>) -> Self
3622 where
3623 T: std::convert::Into<crate::model::InsightsConfig>,
3624 {
3625 self.0.request.insights_config = v.map(|x| x.into());
3626 self
3627 }
3628
3629 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3631 self.0.request.validate_only = v.into();
3632 self
3633 }
3634 }
3635
3636 #[doc(hidden)]
3637 impl crate::RequestBuilder for CreateInsightsConfig {
3638 fn request_options(&mut self) -> &mut crate::RequestOptions {
3639 &mut self.0.options
3640 }
3641 }
3642
3643 #[derive(Clone, Debug)]
3660 pub struct GetInsightsConfig(RequestBuilder<crate::model::GetInsightsConfigRequest>);
3661
3662 impl GetInsightsConfig {
3663 pub(crate) fn new(
3664 stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
3665 ) -> Self {
3666 Self(RequestBuilder::new(stub))
3667 }
3668
3669 pub fn with_request<V: Into<crate::model::GetInsightsConfigRequest>>(
3671 mut self,
3672 v: V,
3673 ) -> Self {
3674 self.0.request = v.into();
3675 self
3676 }
3677
3678 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3680 self.0.options = v.into();
3681 self
3682 }
3683
3684 pub async fn send(self) -> Result<crate::model::InsightsConfig> {
3686 (*self.0.stub)
3687 .get_insights_config(self.0.request, self.0.options)
3688 .await
3689 .map(crate::Response::into_body)
3690 }
3691
3692 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3696 self.0.request.name = v.into();
3697 self
3698 }
3699 }
3700
3701 #[doc(hidden)]
3702 impl crate::RequestBuilder for GetInsightsConfig {
3703 fn request_options(&mut self) -> &mut crate::RequestOptions {
3704 &mut self.0.options
3705 }
3706 }
3707
3708 #[derive(Clone, Debug)]
3726 pub struct UpdateInsightsConfig(RequestBuilder<crate::model::UpdateInsightsConfigRequest>);
3727
3728 impl UpdateInsightsConfig {
3729 pub(crate) fn new(
3730 stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
3731 ) -> Self {
3732 Self(RequestBuilder::new(stub))
3733 }
3734
3735 pub fn with_request<V: Into<crate::model::UpdateInsightsConfigRequest>>(
3737 mut self,
3738 v: V,
3739 ) -> Self {
3740 self.0.request = v.into();
3741 self
3742 }
3743
3744 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3746 self.0.options = v.into();
3747 self
3748 }
3749
3750 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3757 (*self.0.stub)
3758 .update_insights_config(self.0.request, self.0.options)
3759 .await
3760 .map(crate::Response::into_body)
3761 }
3762
3763 pub fn poller(
3765 self,
3766 ) -> impl google_cloud_lro::Poller<crate::model::InsightsConfig, crate::model::OperationMetadata>
3767 {
3768 type Operation = google_cloud_lro::internal::Operation<
3769 crate::model::InsightsConfig,
3770 crate::model::OperationMetadata,
3771 >;
3772 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3773 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3774
3775 let stub = self.0.stub.clone();
3776 let mut options = self.0.options.clone();
3777 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3778 let query = move |name| {
3779 let stub = stub.clone();
3780 let options = options.clone();
3781 async {
3782 let op = GetOperation::new(stub)
3783 .set_name(name)
3784 .with_options(options)
3785 .send()
3786 .await?;
3787 Ok(Operation::new(op))
3788 }
3789 };
3790
3791 let start = move || async {
3792 let op = self.send().await?;
3793 Ok(Operation::new(op))
3794 };
3795
3796 google_cloud_lro::internal::new_poller(
3797 polling_error_policy,
3798 polling_backoff_policy,
3799 start,
3800 query,
3801 )
3802 }
3803
3804 pub fn set_insights_config<T>(mut self, v: T) -> Self
3808 where
3809 T: std::convert::Into<crate::model::InsightsConfig>,
3810 {
3811 self.0.request.insights_config = std::option::Option::Some(v.into());
3812 self
3813 }
3814
3815 pub fn set_or_clear_insights_config<T>(mut self, v: std::option::Option<T>) -> Self
3819 where
3820 T: std::convert::Into<crate::model::InsightsConfig>,
3821 {
3822 self.0.request.insights_config = v.map(|x| x.into());
3823 self
3824 }
3825
3826 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3828 self.0.request.request_id = v.into();
3829 self
3830 }
3831
3832 pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
3834 self.0.request.allow_missing = v.into();
3835 self
3836 }
3837
3838 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3840 self.0.request.validate_only = v.into();
3841 self
3842 }
3843 }
3844
3845 #[doc(hidden)]
3846 impl crate::RequestBuilder for UpdateInsightsConfig {
3847 fn request_options(&mut self) -> &mut crate::RequestOptions {
3848 &mut self.0.options
3849 }
3850 }
3851
3852 #[derive(Clone, Debug)]
3870 pub struct DeleteInsightsConfig(RequestBuilder<crate::model::DeleteInsightsConfigRequest>);
3871
3872 impl DeleteInsightsConfig {
3873 pub(crate) fn new(
3874 stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
3875 ) -> Self {
3876 Self(RequestBuilder::new(stub))
3877 }
3878
3879 pub fn with_request<V: Into<crate::model::DeleteInsightsConfigRequest>>(
3881 mut self,
3882 v: V,
3883 ) -> Self {
3884 self.0.request = v.into();
3885 self
3886 }
3887
3888 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3890 self.0.options = v.into();
3891 self
3892 }
3893
3894 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3901 (*self.0.stub)
3902 .delete_insights_config(self.0.request, self.0.options)
3903 .await
3904 .map(crate::Response::into_body)
3905 }
3906
3907 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
3909 type Operation =
3910 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3911 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3912 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3913
3914 let stub = self.0.stub.clone();
3915 let mut options = self.0.options.clone();
3916 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3917 let query = move |name| {
3918 let stub = stub.clone();
3919 let options = options.clone();
3920 async {
3921 let op = GetOperation::new(stub)
3922 .set_name(name)
3923 .with_options(options)
3924 .send()
3925 .await?;
3926 Ok(Operation::new(op))
3927 }
3928 };
3929
3930 let start = move || async {
3931 let op = self.send().await?;
3932 Ok(Operation::new(op))
3933 };
3934
3935 google_cloud_lro::internal::new_unit_response_poller(
3936 polling_error_policy,
3937 polling_backoff_policy,
3938 start,
3939 query,
3940 )
3941 }
3942
3943 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3947 self.0.request.name = v.into();
3948 self
3949 }
3950
3951 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3953 self.0.request.request_id = v.into();
3954 self
3955 }
3956
3957 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3959 self.0.request.validate_only = v.into();
3960 self
3961 }
3962
3963 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
3965 self.0.request.etag = v.into();
3966 self
3967 }
3968 }
3969
3970 #[doc(hidden)]
3971 impl crate::RequestBuilder for DeleteInsightsConfig {
3972 fn request_options(&mut self) -> &mut crate::RequestOptions {
3973 &mut self.0.options
3974 }
3975 }
3976
3977 #[derive(Clone, Debug)]
3994 pub struct GetDeploymentEvent(RequestBuilder<crate::model::GetDeploymentEventRequest>);
3995
3996 impl GetDeploymentEvent {
3997 pub(crate) fn new(
3998 stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
3999 ) -> Self {
4000 Self(RequestBuilder::new(stub))
4001 }
4002
4003 pub fn with_request<V: Into<crate::model::GetDeploymentEventRequest>>(
4005 mut self,
4006 v: V,
4007 ) -> Self {
4008 self.0.request = v.into();
4009 self
4010 }
4011
4012 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4014 self.0.options = v.into();
4015 self
4016 }
4017
4018 pub async fn send(self) -> Result<crate::model::DeploymentEvent> {
4020 (*self.0.stub)
4021 .get_deployment_event(self.0.request, self.0.options)
4022 .await
4023 .map(crate::Response::into_body)
4024 }
4025
4026 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4030 self.0.request.name = v.into();
4031 self
4032 }
4033 }
4034
4035 #[doc(hidden)]
4036 impl crate::RequestBuilder for GetDeploymentEvent {
4037 fn request_options(&mut self) -> &mut crate::RequestOptions {
4038 &mut self.0.options
4039 }
4040 }
4041
4042 #[derive(Clone, Debug)]
4063 pub struct ListDeploymentEvents(RequestBuilder<crate::model::ListDeploymentEventsRequest>);
4064
4065 impl ListDeploymentEvents {
4066 pub(crate) fn new(
4067 stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
4068 ) -> Self {
4069 Self(RequestBuilder::new(stub))
4070 }
4071
4072 pub fn with_request<V: Into<crate::model::ListDeploymentEventsRequest>>(
4074 mut self,
4075 v: V,
4076 ) -> Self {
4077 self.0.request = v.into();
4078 self
4079 }
4080
4081 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4083 self.0.options = v.into();
4084 self
4085 }
4086
4087 pub async fn send(self) -> Result<crate::model::ListDeploymentEventsResponse> {
4089 (*self.0.stub)
4090 .list_deployment_events(self.0.request, self.0.options)
4091 .await
4092 .map(crate::Response::into_body)
4093 }
4094
4095 pub fn by_page(
4097 self,
4098 ) -> impl google_cloud_gax::paginator::Paginator<
4099 crate::model::ListDeploymentEventsResponse,
4100 crate::Error,
4101 > {
4102 use std::clone::Clone;
4103 let token = self.0.request.page_token.clone();
4104 let execute = move |token: String| {
4105 let mut builder = self.clone();
4106 builder.0.request = builder.0.request.set_page_token(token);
4107 builder.send()
4108 };
4109 google_cloud_gax::paginator::internal::new_paginator(token, execute)
4110 }
4111
4112 pub fn by_item(
4114 self,
4115 ) -> impl google_cloud_gax::paginator::ItemPaginator<
4116 crate::model::ListDeploymentEventsResponse,
4117 crate::Error,
4118 > {
4119 use google_cloud_gax::paginator::Paginator;
4120 self.by_page().items()
4121 }
4122
4123 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4127 self.0.request.parent = v.into();
4128 self
4129 }
4130
4131 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4133 self.0.request.page_size = v.into();
4134 self
4135 }
4136
4137 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4139 self.0.request.page_token = v.into();
4140 self
4141 }
4142
4143 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4145 self.0.request.filter = v.into();
4146 self
4147 }
4148 }
4149
4150 #[doc(hidden)]
4151 impl crate::RequestBuilder for ListDeploymentEvents {
4152 fn request_options(&mut self) -> &mut crate::RequestOptions {
4153 &mut self.0.options
4154 }
4155 }
4156
4157 #[derive(Clone, Debug)]
4178 pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
4179
4180 impl ListLocations {
4181 pub(crate) fn new(
4182 stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
4183 ) -> Self {
4184 Self(RequestBuilder::new(stub))
4185 }
4186
4187 pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
4189 mut self,
4190 v: V,
4191 ) -> Self {
4192 self.0.request = v.into();
4193 self
4194 }
4195
4196 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4198 self.0.options = v.into();
4199 self
4200 }
4201
4202 pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
4204 (*self.0.stub)
4205 .list_locations(self.0.request, self.0.options)
4206 .await
4207 .map(crate::Response::into_body)
4208 }
4209
4210 pub fn by_page(
4212 self,
4213 ) -> impl google_cloud_gax::paginator::Paginator<
4214 google_cloud_location::model::ListLocationsResponse,
4215 crate::Error,
4216 > {
4217 use std::clone::Clone;
4218 let token = self.0.request.page_token.clone();
4219 let execute = move |token: String| {
4220 let mut builder = self.clone();
4221 builder.0.request = builder.0.request.set_page_token(token);
4222 builder.send()
4223 };
4224 google_cloud_gax::paginator::internal::new_paginator(token, execute)
4225 }
4226
4227 pub fn by_item(
4229 self,
4230 ) -> impl google_cloud_gax::paginator::ItemPaginator<
4231 google_cloud_location::model::ListLocationsResponse,
4232 crate::Error,
4233 > {
4234 use google_cloud_gax::paginator::Paginator;
4235 self.by_page().items()
4236 }
4237
4238 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4240 self.0.request.name = v.into();
4241 self
4242 }
4243
4244 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4246 self.0.request.filter = v.into();
4247 self
4248 }
4249
4250 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4252 self.0.request.page_size = v.into();
4253 self
4254 }
4255
4256 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4258 self.0.request.page_token = v.into();
4259 self
4260 }
4261 }
4262
4263 #[doc(hidden)]
4264 impl crate::RequestBuilder for ListLocations {
4265 fn request_options(&mut self) -> &mut crate::RequestOptions {
4266 &mut self.0.options
4267 }
4268 }
4269
4270 #[derive(Clone, Debug)]
4287 pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
4288
4289 impl GetLocation {
4290 pub(crate) fn new(
4291 stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
4292 ) -> Self {
4293 Self(RequestBuilder::new(stub))
4294 }
4295
4296 pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
4298 mut self,
4299 v: V,
4300 ) -> Self {
4301 self.0.request = v.into();
4302 self
4303 }
4304
4305 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4307 self.0.options = v.into();
4308 self
4309 }
4310
4311 pub async fn send(self) -> Result<google_cloud_location::model::Location> {
4313 (*self.0.stub)
4314 .get_location(self.0.request, self.0.options)
4315 .await
4316 .map(crate::Response::into_body)
4317 }
4318
4319 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4321 self.0.request.name = v.into();
4322 self
4323 }
4324 }
4325
4326 #[doc(hidden)]
4327 impl crate::RequestBuilder for GetLocation {
4328 fn request_options(&mut self) -> &mut crate::RequestOptions {
4329 &mut self.0.options
4330 }
4331 }
4332
4333 #[derive(Clone, Debug)]
4354 pub struct ListOperations(
4355 RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
4356 );
4357
4358 impl ListOperations {
4359 pub(crate) fn new(
4360 stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
4361 ) -> Self {
4362 Self(RequestBuilder::new(stub))
4363 }
4364
4365 pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
4367 mut self,
4368 v: V,
4369 ) -> Self {
4370 self.0.request = v.into();
4371 self
4372 }
4373
4374 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4376 self.0.options = v.into();
4377 self
4378 }
4379
4380 pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
4382 (*self.0.stub)
4383 .list_operations(self.0.request, self.0.options)
4384 .await
4385 .map(crate::Response::into_body)
4386 }
4387
4388 pub fn by_page(
4390 self,
4391 ) -> impl google_cloud_gax::paginator::Paginator<
4392 google_cloud_longrunning::model::ListOperationsResponse,
4393 crate::Error,
4394 > {
4395 use std::clone::Clone;
4396 let token = self.0.request.page_token.clone();
4397 let execute = move |token: String| {
4398 let mut builder = self.clone();
4399 builder.0.request = builder.0.request.set_page_token(token);
4400 builder.send()
4401 };
4402 google_cloud_gax::paginator::internal::new_paginator(token, execute)
4403 }
4404
4405 pub fn by_item(
4407 self,
4408 ) -> impl google_cloud_gax::paginator::ItemPaginator<
4409 google_cloud_longrunning::model::ListOperationsResponse,
4410 crate::Error,
4411 > {
4412 use google_cloud_gax::paginator::Paginator;
4413 self.by_page().items()
4414 }
4415
4416 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4418 self.0.request.name = v.into();
4419 self
4420 }
4421
4422 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4424 self.0.request.filter = v.into();
4425 self
4426 }
4427
4428 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4430 self.0.request.page_size = v.into();
4431 self
4432 }
4433
4434 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4436 self.0.request.page_token = v.into();
4437 self
4438 }
4439
4440 pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
4442 self.0.request.return_partial_success = v.into();
4443 self
4444 }
4445 }
4446
4447 #[doc(hidden)]
4448 impl crate::RequestBuilder for ListOperations {
4449 fn request_options(&mut self) -> &mut crate::RequestOptions {
4450 &mut self.0.options
4451 }
4452 }
4453
4454 #[derive(Clone, Debug)]
4471 pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
4472
4473 impl GetOperation {
4474 pub(crate) fn new(
4475 stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
4476 ) -> Self {
4477 Self(RequestBuilder::new(stub))
4478 }
4479
4480 pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
4482 mut self,
4483 v: V,
4484 ) -> Self {
4485 self.0.request = v.into();
4486 self
4487 }
4488
4489 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4491 self.0.options = v.into();
4492 self
4493 }
4494
4495 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4497 (*self.0.stub)
4498 .get_operation(self.0.request, self.0.options)
4499 .await
4500 .map(crate::Response::into_body)
4501 }
4502
4503 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4505 self.0.request.name = v.into();
4506 self
4507 }
4508 }
4509
4510 #[doc(hidden)]
4511 impl crate::RequestBuilder for GetOperation {
4512 fn request_options(&mut self) -> &mut crate::RequestOptions {
4513 &mut self.0.options
4514 }
4515 }
4516
4517 #[derive(Clone, Debug)]
4534 pub struct DeleteOperation(
4535 RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
4536 );
4537
4538 impl DeleteOperation {
4539 pub(crate) fn new(
4540 stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
4541 ) -> Self {
4542 Self(RequestBuilder::new(stub))
4543 }
4544
4545 pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
4547 mut self,
4548 v: V,
4549 ) -> Self {
4550 self.0.request = v.into();
4551 self
4552 }
4553
4554 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4556 self.0.options = v.into();
4557 self
4558 }
4559
4560 pub async fn send(self) -> Result<()> {
4562 (*self.0.stub)
4563 .delete_operation(self.0.request, self.0.options)
4564 .await
4565 .map(crate::Response::into_body)
4566 }
4567
4568 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4570 self.0.request.name = v.into();
4571 self
4572 }
4573 }
4574
4575 #[doc(hidden)]
4576 impl crate::RequestBuilder for DeleteOperation {
4577 fn request_options(&mut self) -> &mut crate::RequestOptions {
4578 &mut self.0.options
4579 }
4580 }
4581
4582 #[derive(Clone, Debug)]
4599 pub struct CancelOperation(
4600 RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
4601 );
4602
4603 impl CancelOperation {
4604 pub(crate) fn new(
4605 stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
4606 ) -> Self {
4607 Self(RequestBuilder::new(stub))
4608 }
4609
4610 pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
4612 mut self,
4613 v: V,
4614 ) -> Self {
4615 self.0.request = v.into();
4616 self
4617 }
4618
4619 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4621 self.0.options = v.into();
4622 self
4623 }
4624
4625 pub async fn send(self) -> Result<()> {
4627 (*self.0.stub)
4628 .cancel_operation(self.0.request, self.0.options)
4629 .await
4630 .map(crate::Response::into_body)
4631 }
4632
4633 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4635 self.0.request.name = v.into();
4636 self
4637 }
4638 }
4639
4640 #[doc(hidden)]
4641 impl crate::RequestBuilder for CancelOperation {
4642 fn request_options(&mut self) -> &mut crate::RequestOptions {
4643 &mut self.0.options
4644 }
4645 }
4646}