1pub mod developer_connect {
19 use crate::Result;
20
21 pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
35
36 pub(crate) mod client {
37 use super::super::super::client::DeveloperConnect;
38 pub struct Factory;
39 impl crate::ClientFactory for Factory {
40 type Client = DeveloperConnect;
41 type Credentials = gaxi::options::Credentials;
42 async fn build(
43 self,
44 config: gaxi::options::ClientConfig,
45 ) -> crate::ClientBuilderResult<Self::Client> {
46 Self::Client::new(config).await
47 }
48 }
49 }
50
51 #[derive(Clone, Debug)]
53 pub(crate) struct RequestBuilder<R: std::default::Default> {
54 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
55 request: R,
56 options: crate::RequestOptions,
57 }
58
59 impl<R> RequestBuilder<R>
60 where
61 R: std::default::Default,
62 {
63 pub(crate) fn new(
64 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
65 ) -> Self {
66 Self {
67 stub,
68 request: R::default(),
69 options: crate::RequestOptions::default(),
70 }
71 }
72 }
73
74 #[derive(Clone, Debug)]
95 pub struct ListConnections(RequestBuilder<crate::model::ListConnectionsRequest>);
96
97 impl ListConnections {
98 pub(crate) fn new(
99 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
100 ) -> Self {
101 Self(RequestBuilder::new(stub))
102 }
103
104 pub fn with_request<V: Into<crate::model::ListConnectionsRequest>>(mut self, v: V) -> Self {
106 self.0.request = v.into();
107 self
108 }
109
110 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
112 self.0.options = v.into();
113 self
114 }
115
116 pub async fn send(self) -> Result<crate::model::ListConnectionsResponse> {
118 (*self.0.stub)
119 .list_connections(self.0.request, self.0.options)
120 .await
121 .map(crate::Response::into_body)
122 }
123
124 pub fn by_page(
126 self,
127 ) -> impl google_cloud_gax::paginator::Paginator<
128 crate::model::ListConnectionsResponse,
129 crate::Error,
130 > {
131 use std::clone::Clone;
132 let token = self.0.request.page_token.clone();
133 let execute = move |token: String| {
134 let mut builder = self.clone();
135 builder.0.request = builder.0.request.set_page_token(token);
136 builder.send()
137 };
138 google_cloud_gax::paginator::internal::new_paginator(token, execute)
139 }
140
141 pub fn by_item(
143 self,
144 ) -> impl google_cloud_gax::paginator::ItemPaginator<
145 crate::model::ListConnectionsResponse,
146 crate::Error,
147 > {
148 use google_cloud_gax::paginator::Paginator;
149 self.by_page().items()
150 }
151
152 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
156 self.0.request.parent = v.into();
157 self
158 }
159
160 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
162 self.0.request.page_size = v.into();
163 self
164 }
165
166 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
168 self.0.request.page_token = v.into();
169 self
170 }
171
172 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
174 self.0.request.filter = v.into();
175 self
176 }
177
178 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
180 self.0.request.order_by = v.into();
181 self
182 }
183 }
184
185 #[doc(hidden)]
186 impl crate::RequestBuilder for ListConnections {
187 fn request_options(&mut self) -> &mut crate::RequestOptions {
188 &mut self.0.options
189 }
190 }
191
192 #[derive(Clone, Debug)]
209 pub struct GetConnection(RequestBuilder<crate::model::GetConnectionRequest>);
210
211 impl GetConnection {
212 pub(crate) fn new(
213 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
214 ) -> Self {
215 Self(RequestBuilder::new(stub))
216 }
217
218 pub fn with_request<V: Into<crate::model::GetConnectionRequest>>(mut self, v: V) -> Self {
220 self.0.request = v.into();
221 self
222 }
223
224 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
226 self.0.options = v.into();
227 self
228 }
229
230 pub async fn send(self) -> Result<crate::model::Connection> {
232 (*self.0.stub)
233 .get_connection(self.0.request, self.0.options)
234 .await
235 .map(crate::Response::into_body)
236 }
237
238 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
242 self.0.request.name = v.into();
243 self
244 }
245 }
246
247 #[doc(hidden)]
248 impl crate::RequestBuilder for GetConnection {
249 fn request_options(&mut self) -> &mut crate::RequestOptions {
250 &mut self.0.options
251 }
252 }
253
254 #[derive(Clone, Debug)]
272 pub struct CreateConnection(RequestBuilder<crate::model::CreateConnectionRequest>);
273
274 impl CreateConnection {
275 pub(crate) fn new(
276 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
277 ) -> Self {
278 Self(RequestBuilder::new(stub))
279 }
280
281 pub fn with_request<V: Into<crate::model::CreateConnectionRequest>>(
283 mut self,
284 v: V,
285 ) -> Self {
286 self.0.request = v.into();
287 self
288 }
289
290 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
292 self.0.options = v.into();
293 self
294 }
295
296 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
303 (*self.0.stub)
304 .create_connection(self.0.request, self.0.options)
305 .await
306 .map(crate::Response::into_body)
307 }
308
309 pub fn poller(
311 self,
312 ) -> impl google_cloud_lro::Poller<crate::model::Connection, crate::model::OperationMetadata>
313 {
314 type Operation = google_cloud_lro::internal::Operation<
315 crate::model::Connection,
316 crate::model::OperationMetadata,
317 >;
318 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
319 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
320 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
321 if let Some(ref mut details) = poller_options.tracing {
322 details.method_name = "google_cloud_developerconnect_v1::client::DeveloperConnect::create_connection::until_done";
323 }
324
325 let stub = self.0.stub.clone();
326 let mut options = self.0.options.clone();
327 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
328 let query = move |name| {
329 let stub = stub.clone();
330 let options = options.clone();
331 async {
332 let op = GetOperation::new(stub)
333 .set_name(name)
334 .with_options(options)
335 .send()
336 .await?;
337 Ok(Operation::new(op))
338 }
339 };
340
341 let start = move || async {
342 let op = self.send().await?;
343 Ok(Operation::new(op))
344 };
345
346 use google_cloud_lro::internal::PollerExt;
347 {
348 google_cloud_lro::internal::new_poller(
349 polling_error_policy,
350 polling_backoff_policy,
351 start,
352 query,
353 )
354 }
355 .with_options(poller_options)
356 }
357
358 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
362 self.0.request.parent = v.into();
363 self
364 }
365
366 pub fn set_connection_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
370 self.0.request.connection_id = v.into();
371 self
372 }
373
374 pub fn set_connection<T>(mut self, v: T) -> Self
378 where
379 T: std::convert::Into<crate::model::Connection>,
380 {
381 self.0.request.connection = std::option::Option::Some(v.into());
382 self
383 }
384
385 pub fn set_or_clear_connection<T>(mut self, v: std::option::Option<T>) -> Self
389 where
390 T: std::convert::Into<crate::model::Connection>,
391 {
392 self.0.request.connection = v.map(|x| x.into());
393 self
394 }
395
396 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
398 self.0.request.request_id = v.into();
399 self
400 }
401
402 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
404 self.0.request.validate_only = v.into();
405 self
406 }
407 }
408
409 #[doc(hidden)]
410 impl crate::RequestBuilder for CreateConnection {
411 fn request_options(&mut self) -> &mut crate::RequestOptions {
412 &mut self.0.options
413 }
414 }
415
416 #[derive(Clone, Debug)]
434 pub struct UpdateConnection(RequestBuilder<crate::model::UpdateConnectionRequest>);
435
436 impl UpdateConnection {
437 pub(crate) fn new(
438 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
439 ) -> Self {
440 Self(RequestBuilder::new(stub))
441 }
442
443 pub fn with_request<V: Into<crate::model::UpdateConnectionRequest>>(
445 mut self,
446 v: V,
447 ) -> Self {
448 self.0.request = v.into();
449 self
450 }
451
452 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
454 self.0.options = v.into();
455 self
456 }
457
458 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
465 (*self.0.stub)
466 .update_connection(self.0.request, self.0.options)
467 .await
468 .map(crate::Response::into_body)
469 }
470
471 pub fn poller(
473 self,
474 ) -> impl google_cloud_lro::Poller<crate::model::Connection, crate::model::OperationMetadata>
475 {
476 type Operation = google_cloud_lro::internal::Operation<
477 crate::model::Connection,
478 crate::model::OperationMetadata,
479 >;
480 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
481 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
482 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
483 if let Some(ref mut details) = poller_options.tracing {
484 details.method_name = "google_cloud_developerconnect_v1::client::DeveloperConnect::update_connection::until_done";
485 }
486
487 let stub = self.0.stub.clone();
488 let mut options = self.0.options.clone();
489 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
490 let query = move |name| {
491 let stub = stub.clone();
492 let options = options.clone();
493 async {
494 let op = GetOperation::new(stub)
495 .set_name(name)
496 .with_options(options)
497 .send()
498 .await?;
499 Ok(Operation::new(op))
500 }
501 };
502
503 let start = move || async {
504 let op = self.send().await?;
505 Ok(Operation::new(op))
506 };
507
508 use google_cloud_lro::internal::PollerExt;
509 {
510 google_cloud_lro::internal::new_poller(
511 polling_error_policy,
512 polling_backoff_policy,
513 start,
514 query,
515 )
516 }
517 .with_options(poller_options)
518 }
519
520 pub fn set_update_mask<T>(mut self, v: T) -> Self
524 where
525 T: std::convert::Into<wkt::FieldMask>,
526 {
527 self.0.request.update_mask = std::option::Option::Some(v.into());
528 self
529 }
530
531 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
535 where
536 T: std::convert::Into<wkt::FieldMask>,
537 {
538 self.0.request.update_mask = v.map(|x| x.into());
539 self
540 }
541
542 pub fn set_connection<T>(mut self, v: T) -> Self
546 where
547 T: std::convert::Into<crate::model::Connection>,
548 {
549 self.0.request.connection = std::option::Option::Some(v.into());
550 self
551 }
552
553 pub fn set_or_clear_connection<T>(mut self, v: std::option::Option<T>) -> Self
557 where
558 T: std::convert::Into<crate::model::Connection>,
559 {
560 self.0.request.connection = v.map(|x| x.into());
561 self
562 }
563
564 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
566 self.0.request.request_id = v.into();
567 self
568 }
569
570 pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
572 self.0.request.allow_missing = v.into();
573 self
574 }
575
576 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
578 self.0.request.validate_only = v.into();
579 self
580 }
581 }
582
583 #[doc(hidden)]
584 impl crate::RequestBuilder for UpdateConnection {
585 fn request_options(&mut self) -> &mut crate::RequestOptions {
586 &mut self.0.options
587 }
588 }
589
590 #[derive(Clone, Debug)]
608 pub struct DeleteConnection(RequestBuilder<crate::model::DeleteConnectionRequest>);
609
610 impl DeleteConnection {
611 pub(crate) fn new(
612 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
613 ) -> Self {
614 Self(RequestBuilder::new(stub))
615 }
616
617 pub fn with_request<V: Into<crate::model::DeleteConnectionRequest>>(
619 mut self,
620 v: V,
621 ) -> Self {
622 self.0.request = v.into();
623 self
624 }
625
626 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
628 self.0.options = v.into();
629 self
630 }
631
632 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
639 (*self.0.stub)
640 .delete_connection(self.0.request, self.0.options)
641 .await
642 .map(crate::Response::into_body)
643 }
644
645 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
647 type Operation =
648 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
649 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
650 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
651 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
652 if let Some(ref mut details) = poller_options.tracing {
653 details.method_name = "google_cloud_developerconnect_v1::client::DeveloperConnect::delete_connection::until_done";
654 }
655
656 let stub = self.0.stub.clone();
657 let mut options = self.0.options.clone();
658 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
659 let query = move |name| {
660 let stub = stub.clone();
661 let options = options.clone();
662 async {
663 let op = GetOperation::new(stub)
664 .set_name(name)
665 .with_options(options)
666 .send()
667 .await?;
668 Ok(Operation::new(op))
669 }
670 };
671
672 let start = move || async {
673 let op = self.send().await?;
674 Ok(Operation::new(op))
675 };
676
677 use google_cloud_lro::internal::PollerExt;
678 {
679 google_cloud_lro::internal::new_unit_response_poller(
680 polling_error_policy,
681 polling_backoff_policy,
682 start,
683 query,
684 )
685 }
686 .with_options(poller_options)
687 }
688
689 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
693 self.0.request.name = v.into();
694 self
695 }
696
697 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
699 self.0.request.request_id = v.into();
700 self
701 }
702
703 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
705 self.0.request.validate_only = v.into();
706 self
707 }
708
709 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
711 self.0.request.etag = v.into();
712 self
713 }
714 }
715
716 #[doc(hidden)]
717 impl crate::RequestBuilder for DeleteConnection {
718 fn request_options(&mut self) -> &mut crate::RequestOptions {
719 &mut self.0.options
720 }
721 }
722
723 #[derive(Clone, Debug)]
741 pub struct CreateGitRepositoryLink(
742 RequestBuilder<crate::model::CreateGitRepositoryLinkRequest>,
743 );
744
745 impl CreateGitRepositoryLink {
746 pub(crate) fn new(
747 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
748 ) -> Self {
749 Self(RequestBuilder::new(stub))
750 }
751
752 pub fn with_request<V: Into<crate::model::CreateGitRepositoryLinkRequest>>(
754 mut self,
755 v: V,
756 ) -> Self {
757 self.0.request = v.into();
758 self
759 }
760
761 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
763 self.0.options = v.into();
764 self
765 }
766
767 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
774 (*self.0.stub)
775 .create_git_repository_link(self.0.request, self.0.options)
776 .await
777 .map(crate::Response::into_body)
778 }
779
780 pub fn poller(
782 self,
783 ) -> impl google_cloud_lro::Poller<
784 crate::model::GitRepositoryLink,
785 crate::model::OperationMetadata,
786 > {
787 type Operation = google_cloud_lro::internal::Operation<
788 crate::model::GitRepositoryLink,
789 crate::model::OperationMetadata,
790 >;
791 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
792 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
793 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
794 if let Some(ref mut details) = poller_options.tracing {
795 details.method_name = "google_cloud_developerconnect_v1::client::DeveloperConnect::create_git_repository_link::until_done";
796 }
797
798 let stub = self.0.stub.clone();
799 let mut options = self.0.options.clone();
800 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
801 let query = move |name| {
802 let stub = stub.clone();
803 let options = options.clone();
804 async {
805 let op = GetOperation::new(stub)
806 .set_name(name)
807 .with_options(options)
808 .send()
809 .await?;
810 Ok(Operation::new(op))
811 }
812 };
813
814 let start = move || async {
815 let op = self.send().await?;
816 Ok(Operation::new(op))
817 };
818
819 use google_cloud_lro::internal::PollerExt;
820 {
821 google_cloud_lro::internal::new_poller(
822 polling_error_policy,
823 polling_backoff_policy,
824 start,
825 query,
826 )
827 }
828 .with_options(poller_options)
829 }
830
831 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
835 self.0.request.parent = v.into();
836 self
837 }
838
839 pub fn set_git_repository_link<T>(mut self, v: T) -> Self
843 where
844 T: std::convert::Into<crate::model::GitRepositoryLink>,
845 {
846 self.0.request.git_repository_link = std::option::Option::Some(v.into());
847 self
848 }
849
850 pub fn set_or_clear_git_repository_link<T>(mut self, v: std::option::Option<T>) -> Self
854 where
855 T: std::convert::Into<crate::model::GitRepositoryLink>,
856 {
857 self.0.request.git_repository_link = v.map(|x| x.into());
858 self
859 }
860
861 pub fn set_git_repository_link_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
865 self.0.request.git_repository_link_id = v.into();
866 self
867 }
868
869 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
871 self.0.request.request_id = v.into();
872 self
873 }
874
875 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
877 self.0.request.validate_only = v.into();
878 self
879 }
880 }
881
882 #[doc(hidden)]
883 impl crate::RequestBuilder for CreateGitRepositoryLink {
884 fn request_options(&mut self) -> &mut crate::RequestOptions {
885 &mut self.0.options
886 }
887 }
888
889 #[derive(Clone, Debug)]
907 pub struct DeleteGitRepositoryLink(
908 RequestBuilder<crate::model::DeleteGitRepositoryLinkRequest>,
909 );
910
911 impl DeleteGitRepositoryLink {
912 pub(crate) fn new(
913 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
914 ) -> Self {
915 Self(RequestBuilder::new(stub))
916 }
917
918 pub fn with_request<V: Into<crate::model::DeleteGitRepositoryLinkRequest>>(
920 mut self,
921 v: V,
922 ) -> Self {
923 self.0.request = v.into();
924 self
925 }
926
927 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
929 self.0.options = v.into();
930 self
931 }
932
933 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
940 (*self.0.stub)
941 .delete_git_repository_link(self.0.request, self.0.options)
942 .await
943 .map(crate::Response::into_body)
944 }
945
946 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
948 type Operation =
949 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
950 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
951 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
952 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
953 if let Some(ref mut details) = poller_options.tracing {
954 details.method_name = "google_cloud_developerconnect_v1::client::DeveloperConnect::delete_git_repository_link::until_done";
955 }
956
957 let stub = self.0.stub.clone();
958 let mut options = self.0.options.clone();
959 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
960 let query = move |name| {
961 let stub = stub.clone();
962 let options = options.clone();
963 async {
964 let op = GetOperation::new(stub)
965 .set_name(name)
966 .with_options(options)
967 .send()
968 .await?;
969 Ok(Operation::new(op))
970 }
971 };
972
973 let start = move || async {
974 let op = self.send().await?;
975 Ok(Operation::new(op))
976 };
977
978 use google_cloud_lro::internal::PollerExt;
979 {
980 google_cloud_lro::internal::new_unit_response_poller(
981 polling_error_policy,
982 polling_backoff_policy,
983 start,
984 query,
985 )
986 }
987 .with_options(poller_options)
988 }
989
990 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
994 self.0.request.name = v.into();
995 self
996 }
997
998 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1000 self.0.request.request_id = v.into();
1001 self
1002 }
1003
1004 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
1006 self.0.request.validate_only = v.into();
1007 self
1008 }
1009
1010 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
1012 self.0.request.etag = v.into();
1013 self
1014 }
1015 }
1016
1017 #[doc(hidden)]
1018 impl crate::RequestBuilder for DeleteGitRepositoryLink {
1019 fn request_options(&mut self) -> &mut crate::RequestOptions {
1020 &mut self.0.options
1021 }
1022 }
1023
1024 #[derive(Clone, Debug)]
1045 pub struct ListGitRepositoryLinks(RequestBuilder<crate::model::ListGitRepositoryLinksRequest>);
1046
1047 impl ListGitRepositoryLinks {
1048 pub(crate) fn new(
1049 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
1050 ) -> Self {
1051 Self(RequestBuilder::new(stub))
1052 }
1053
1054 pub fn with_request<V: Into<crate::model::ListGitRepositoryLinksRequest>>(
1056 mut self,
1057 v: V,
1058 ) -> Self {
1059 self.0.request = v.into();
1060 self
1061 }
1062
1063 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1065 self.0.options = v.into();
1066 self
1067 }
1068
1069 pub async fn send(self) -> Result<crate::model::ListGitRepositoryLinksResponse> {
1071 (*self.0.stub)
1072 .list_git_repository_links(self.0.request, self.0.options)
1073 .await
1074 .map(crate::Response::into_body)
1075 }
1076
1077 pub fn by_page(
1079 self,
1080 ) -> impl google_cloud_gax::paginator::Paginator<
1081 crate::model::ListGitRepositoryLinksResponse,
1082 crate::Error,
1083 > {
1084 use std::clone::Clone;
1085 let token = self.0.request.page_token.clone();
1086 let execute = move |token: String| {
1087 let mut builder = self.clone();
1088 builder.0.request = builder.0.request.set_page_token(token);
1089 builder.send()
1090 };
1091 google_cloud_gax::paginator::internal::new_paginator(token, execute)
1092 }
1093
1094 pub fn by_item(
1096 self,
1097 ) -> impl google_cloud_gax::paginator::ItemPaginator<
1098 crate::model::ListGitRepositoryLinksResponse,
1099 crate::Error,
1100 > {
1101 use google_cloud_gax::paginator::Paginator;
1102 self.by_page().items()
1103 }
1104
1105 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1109 self.0.request.parent = v.into();
1110 self
1111 }
1112
1113 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1115 self.0.request.page_size = v.into();
1116 self
1117 }
1118
1119 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1121 self.0.request.page_token = v.into();
1122 self
1123 }
1124
1125 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1127 self.0.request.filter = v.into();
1128 self
1129 }
1130
1131 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1133 self.0.request.order_by = v.into();
1134 self
1135 }
1136 }
1137
1138 #[doc(hidden)]
1139 impl crate::RequestBuilder for ListGitRepositoryLinks {
1140 fn request_options(&mut self) -> &mut crate::RequestOptions {
1141 &mut self.0.options
1142 }
1143 }
1144
1145 #[derive(Clone, Debug)]
1162 pub struct GetGitRepositoryLink(RequestBuilder<crate::model::GetGitRepositoryLinkRequest>);
1163
1164 impl GetGitRepositoryLink {
1165 pub(crate) fn new(
1166 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
1167 ) -> Self {
1168 Self(RequestBuilder::new(stub))
1169 }
1170
1171 pub fn with_request<V: Into<crate::model::GetGitRepositoryLinkRequest>>(
1173 mut self,
1174 v: V,
1175 ) -> Self {
1176 self.0.request = v.into();
1177 self
1178 }
1179
1180 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1182 self.0.options = v.into();
1183 self
1184 }
1185
1186 pub async fn send(self) -> Result<crate::model::GitRepositoryLink> {
1188 (*self.0.stub)
1189 .get_git_repository_link(self.0.request, self.0.options)
1190 .await
1191 .map(crate::Response::into_body)
1192 }
1193
1194 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1198 self.0.request.name = v.into();
1199 self
1200 }
1201 }
1202
1203 #[doc(hidden)]
1204 impl crate::RequestBuilder for GetGitRepositoryLink {
1205 fn request_options(&mut self) -> &mut crate::RequestOptions {
1206 &mut self.0.options
1207 }
1208 }
1209
1210 #[derive(Clone, Debug)]
1227 pub struct FetchReadWriteToken(RequestBuilder<crate::model::FetchReadWriteTokenRequest>);
1228
1229 impl FetchReadWriteToken {
1230 pub(crate) fn new(
1231 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
1232 ) -> Self {
1233 Self(RequestBuilder::new(stub))
1234 }
1235
1236 pub fn with_request<V: Into<crate::model::FetchReadWriteTokenRequest>>(
1238 mut self,
1239 v: V,
1240 ) -> Self {
1241 self.0.request = v.into();
1242 self
1243 }
1244
1245 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1247 self.0.options = v.into();
1248 self
1249 }
1250
1251 pub async fn send(self) -> Result<crate::model::FetchReadWriteTokenResponse> {
1253 (*self.0.stub)
1254 .fetch_read_write_token(self.0.request, self.0.options)
1255 .await
1256 .map(crate::Response::into_body)
1257 }
1258
1259 pub fn set_git_repository_link<T: Into<std::string::String>>(mut self, v: T) -> Self {
1263 self.0.request.git_repository_link = v.into();
1264 self
1265 }
1266 }
1267
1268 #[doc(hidden)]
1269 impl crate::RequestBuilder for FetchReadWriteToken {
1270 fn request_options(&mut self) -> &mut crate::RequestOptions {
1271 &mut self.0.options
1272 }
1273 }
1274
1275 #[derive(Clone, Debug)]
1292 pub struct FetchReadToken(RequestBuilder<crate::model::FetchReadTokenRequest>);
1293
1294 impl FetchReadToken {
1295 pub(crate) fn new(
1296 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
1297 ) -> Self {
1298 Self(RequestBuilder::new(stub))
1299 }
1300
1301 pub fn with_request<V: Into<crate::model::FetchReadTokenRequest>>(mut self, v: V) -> Self {
1303 self.0.request = v.into();
1304 self
1305 }
1306
1307 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1309 self.0.options = v.into();
1310 self
1311 }
1312
1313 pub async fn send(self) -> Result<crate::model::FetchReadTokenResponse> {
1315 (*self.0.stub)
1316 .fetch_read_token(self.0.request, self.0.options)
1317 .await
1318 .map(crate::Response::into_body)
1319 }
1320
1321 pub fn set_git_repository_link<T: Into<std::string::String>>(mut self, v: T) -> Self {
1325 self.0.request.git_repository_link = v.into();
1326 self
1327 }
1328 }
1329
1330 #[doc(hidden)]
1331 impl crate::RequestBuilder for FetchReadToken {
1332 fn request_options(&mut self) -> &mut crate::RequestOptions {
1333 &mut self.0.options
1334 }
1335 }
1336
1337 #[derive(Clone, Debug)]
1354 pub struct OpenGitRepositoryLinkPullRequest(
1355 RequestBuilder<crate::model::OpenGitRepositoryLinkPullRequestRequest>,
1356 );
1357
1358 impl OpenGitRepositoryLinkPullRequest {
1359 pub(crate) fn new(
1360 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
1361 ) -> Self {
1362 Self(RequestBuilder::new(stub))
1363 }
1364
1365 pub fn with_request<V: Into<crate::model::OpenGitRepositoryLinkPullRequestRequest>>(
1367 mut self,
1368 v: V,
1369 ) -> Self {
1370 self.0.request = v.into();
1371 self
1372 }
1373
1374 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1376 self.0.options = v.into();
1377 self
1378 }
1379
1380 pub async fn send(self) -> Result<crate::model::PullRequest> {
1382 (*self.0.stub)
1383 .open_git_repository_link_pull_request(self.0.request, self.0.options)
1384 .await
1385 .map(crate::Response::into_body)
1386 }
1387
1388 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1392 self.0.request.name = v.into();
1393 self
1394 }
1395
1396 pub fn set_pull_request<T>(mut self, v: T) -> Self
1400 where
1401 T: std::convert::Into<crate::model::PullRequest>,
1402 {
1403 self.0.request.pull_request = std::option::Option::Some(v.into());
1404 self
1405 }
1406
1407 pub fn set_or_clear_pull_request<T>(mut self, v: std::option::Option<T>) -> Self
1411 where
1412 T: std::convert::Into<crate::model::PullRequest>,
1413 {
1414 self.0.request.pull_request = v.map(|x| x.into());
1415 self
1416 }
1417 }
1418
1419 #[doc(hidden)]
1420 impl crate::RequestBuilder for OpenGitRepositoryLinkPullRequest {
1421 fn request_options(&mut self) -> &mut crate::RequestOptions {
1422 &mut self.0.options
1423 }
1424 }
1425
1426 #[derive(Clone, Debug)]
1447 pub struct FetchLinkableGitRepositories(
1448 RequestBuilder<crate::model::FetchLinkableGitRepositoriesRequest>,
1449 );
1450
1451 impl FetchLinkableGitRepositories {
1452 pub(crate) fn new(
1453 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
1454 ) -> Self {
1455 Self(RequestBuilder::new(stub))
1456 }
1457
1458 pub fn with_request<V: Into<crate::model::FetchLinkableGitRepositoriesRequest>>(
1460 mut self,
1461 v: V,
1462 ) -> Self {
1463 self.0.request = v.into();
1464 self
1465 }
1466
1467 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1469 self.0.options = v.into();
1470 self
1471 }
1472
1473 pub async fn send(self) -> Result<crate::model::FetchLinkableGitRepositoriesResponse> {
1475 (*self.0.stub)
1476 .fetch_linkable_git_repositories(self.0.request, self.0.options)
1477 .await
1478 .map(crate::Response::into_body)
1479 }
1480
1481 pub fn by_page(
1483 self,
1484 ) -> impl google_cloud_gax::paginator::Paginator<
1485 crate::model::FetchLinkableGitRepositoriesResponse,
1486 crate::Error,
1487 > {
1488 use std::clone::Clone;
1489 let token = self.0.request.page_token.clone();
1490 let execute = move |token: String| {
1491 let mut builder = self.clone();
1492 builder.0.request = builder.0.request.set_page_token(token);
1493 builder.send()
1494 };
1495 google_cloud_gax::paginator::internal::new_paginator(token, execute)
1496 }
1497
1498 pub fn by_item(
1500 self,
1501 ) -> impl google_cloud_gax::paginator::ItemPaginator<
1502 crate::model::FetchLinkableGitRepositoriesResponse,
1503 crate::Error,
1504 > {
1505 use google_cloud_gax::paginator::Paginator;
1506 self.by_page().items()
1507 }
1508
1509 pub fn set_connection<T: Into<std::string::String>>(mut self, v: T) -> Self {
1513 self.0.request.connection = v.into();
1514 self
1515 }
1516
1517 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1519 self.0.request.page_size = v.into();
1520 self
1521 }
1522
1523 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1525 self.0.request.page_token = v.into();
1526 self
1527 }
1528 }
1529
1530 #[doc(hidden)]
1531 impl crate::RequestBuilder for FetchLinkableGitRepositories {
1532 fn request_options(&mut self) -> &mut crate::RequestOptions {
1533 &mut self.0.options
1534 }
1535 }
1536
1537 #[derive(Clone, Debug)]
1554 pub struct FetchGitHubInstallations(
1555 RequestBuilder<crate::model::FetchGitHubInstallationsRequest>,
1556 );
1557
1558 impl FetchGitHubInstallations {
1559 pub(crate) fn new(
1560 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
1561 ) -> Self {
1562 Self(RequestBuilder::new(stub))
1563 }
1564
1565 pub fn with_request<V: Into<crate::model::FetchGitHubInstallationsRequest>>(
1567 mut self,
1568 v: V,
1569 ) -> Self {
1570 self.0.request = v.into();
1571 self
1572 }
1573
1574 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1576 self.0.options = v.into();
1577 self
1578 }
1579
1580 pub async fn send(self) -> Result<crate::model::FetchGitHubInstallationsResponse> {
1582 (*self.0.stub)
1583 .fetch_git_hub_installations(self.0.request, self.0.options)
1584 .await
1585 .map(crate::Response::into_body)
1586 }
1587
1588 pub fn set_connection<T: Into<std::string::String>>(mut self, v: T) -> Self {
1592 self.0.request.connection = v.into();
1593 self
1594 }
1595 }
1596
1597 #[doc(hidden)]
1598 impl crate::RequestBuilder for FetchGitHubInstallations {
1599 fn request_options(&mut self) -> &mut crate::RequestOptions {
1600 &mut self.0.options
1601 }
1602 }
1603
1604 #[derive(Clone, Debug)]
1621 pub struct FetchGitRefs(RequestBuilder<crate::model::FetchGitRefsRequest>);
1622
1623 impl FetchGitRefs {
1624 pub(crate) fn new(
1625 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
1626 ) -> Self {
1627 Self(RequestBuilder::new(stub))
1628 }
1629
1630 pub fn with_request<V: Into<crate::model::FetchGitRefsRequest>>(mut self, v: V) -> Self {
1632 self.0.request = v.into();
1633 self
1634 }
1635
1636 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1638 self.0.options = v.into();
1639 self
1640 }
1641
1642 pub async fn send(self) -> Result<crate::model::FetchGitRefsResponse> {
1644 (*self.0.stub)
1645 .fetch_git_refs(self.0.request, self.0.options)
1646 .await
1647 .map(crate::Response::into_body)
1648 }
1649
1650 pub fn set_git_repository_link<T: Into<std::string::String>>(mut self, v: T) -> Self {
1654 self.0.request.git_repository_link = v.into();
1655 self
1656 }
1657
1658 pub fn set_ref_type<T: Into<crate::model::fetch_git_refs_request::RefType>>(
1662 mut self,
1663 v: T,
1664 ) -> Self {
1665 self.0.request.ref_type = v.into();
1666 self
1667 }
1668
1669 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1671 self.0.request.page_size = v.into();
1672 self
1673 }
1674
1675 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1677 self.0.request.page_token = v.into();
1678 self
1679 }
1680 }
1681
1682 #[doc(hidden)]
1683 impl crate::RequestBuilder for FetchGitRefs {
1684 fn request_options(&mut self) -> &mut crate::RequestOptions {
1685 &mut self.0.options
1686 }
1687 }
1688
1689 #[derive(Clone, Debug)]
1706 pub struct DiffGitRepositoryLinkCommit(
1707 RequestBuilder<crate::model::DiffGitRepositoryLinkCommitRequest>,
1708 );
1709
1710 impl DiffGitRepositoryLinkCommit {
1711 pub(crate) fn new(
1712 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
1713 ) -> Self {
1714 Self(RequestBuilder::new(stub))
1715 }
1716
1717 pub fn with_request<V: Into<crate::model::DiffGitRepositoryLinkCommitRequest>>(
1719 mut self,
1720 v: V,
1721 ) -> Self {
1722 self.0.request = v.into();
1723 self
1724 }
1725
1726 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1728 self.0.options = v.into();
1729 self
1730 }
1731
1732 pub async fn send(self) -> Result<crate::model::DiffGitRepositoryLinkCommitResponse> {
1734 (*self.0.stub)
1735 .diff_git_repository_link_commit(self.0.request, self.0.options)
1736 .await
1737 .map(crate::Response::into_body)
1738 }
1739
1740 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1744 self.0.request.name = v.into();
1745 self
1746 }
1747
1748 pub fn set_base_sha<T: Into<std::string::String>>(mut self, v: T) -> Self {
1752 self.0.request.base_sha = v.into();
1753 self
1754 }
1755
1756 pub fn set_head_sha<T: Into<std::string::String>>(mut self, v: T) -> Self {
1760 self.0.request.head_sha = v.into();
1761 self
1762 }
1763
1764 pub fn set_path_filters<T, V>(mut self, v: T) -> Self
1766 where
1767 T: std::iter::IntoIterator<Item = V>,
1768 V: std::convert::Into<std::string::String>,
1769 {
1770 use std::iter::Iterator;
1771 self.0.request.path_filters = v.into_iter().map(|i| i.into()).collect();
1772 self
1773 }
1774 }
1775
1776 #[doc(hidden)]
1777 impl crate::RequestBuilder for DiffGitRepositoryLinkCommit {
1778 fn request_options(&mut self) -> &mut crate::RequestOptions {
1779 &mut self.0.options
1780 }
1781 }
1782
1783 #[derive(Clone, Debug)]
1800 pub struct FetchGitRepositoryLinkCommit(
1801 RequestBuilder<crate::model::FetchGitRepositoryLinkCommitRequest>,
1802 );
1803
1804 impl FetchGitRepositoryLinkCommit {
1805 pub(crate) fn new(
1806 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
1807 ) -> Self {
1808 Self(RequestBuilder::new(stub))
1809 }
1810
1811 pub fn with_request<V: Into<crate::model::FetchGitRepositoryLinkCommitRequest>>(
1813 mut self,
1814 v: V,
1815 ) -> Self {
1816 self.0.request = v.into();
1817 self
1818 }
1819
1820 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1822 self.0.options = v.into();
1823 self
1824 }
1825
1826 pub async fn send(self) -> Result<crate::model::FetchGitRepositoryLinkCommitResponse> {
1828 (*self.0.stub)
1829 .fetch_git_repository_link_commit(self.0.request, self.0.options)
1830 .await
1831 .map(crate::Response::into_body)
1832 }
1833
1834 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1838 self.0.request.name = v.into();
1839 self
1840 }
1841
1842 pub fn set_commit_sha<T: Into<std::string::String>>(mut self, v: T) -> Self {
1846 self.0.request.commit_sha = v.into();
1847 self
1848 }
1849
1850 pub fn set_view<T: Into<crate::model::CommitView>>(mut self, v: T) -> Self {
1852 self.0.request.view = v.into();
1853 self
1854 }
1855
1856 pub fn set_path_filters<T, V>(mut self, v: T) -> Self
1858 where
1859 T: std::iter::IntoIterator<Item = V>,
1860 V: std::convert::Into<std::string::String>,
1861 {
1862 use std::iter::Iterator;
1863 self.0.request.path_filters = v.into_iter().map(|i| i.into()).collect();
1864 self
1865 }
1866 }
1867
1868 #[doc(hidden)]
1869 impl crate::RequestBuilder for FetchGitRepositoryLinkCommit {
1870 fn request_options(&mut self) -> &mut crate::RequestOptions {
1871 &mut self.0.options
1872 }
1873 }
1874
1875 #[derive(Clone, Debug)]
1896 pub struct FetchGitRepositoryLinkCommitList(
1897 RequestBuilder<crate::model::FetchGitRepositoryLinkCommitListRequest>,
1898 );
1899
1900 impl FetchGitRepositoryLinkCommitList {
1901 pub(crate) fn new(
1902 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
1903 ) -> Self {
1904 Self(RequestBuilder::new(stub))
1905 }
1906
1907 pub fn with_request<V: Into<crate::model::FetchGitRepositoryLinkCommitListRequest>>(
1909 mut self,
1910 v: V,
1911 ) -> Self {
1912 self.0.request = v.into();
1913 self
1914 }
1915
1916 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1918 self.0.options = v.into();
1919 self
1920 }
1921
1922 pub async fn send(self) -> Result<crate::model::FetchGitRepositoryLinkCommitListResponse> {
1924 (*self.0.stub)
1925 .fetch_git_repository_link_commit_list(self.0.request, self.0.options)
1926 .await
1927 .map(crate::Response::into_body)
1928 }
1929
1930 pub fn by_page(
1932 self,
1933 ) -> impl google_cloud_gax::paginator::Paginator<
1934 crate::model::FetchGitRepositoryLinkCommitListResponse,
1935 crate::Error,
1936 > {
1937 use std::clone::Clone;
1938 let token = self.0.request.page_token.clone();
1939 let execute = move |token: String| {
1940 let mut builder = self.clone();
1941 builder.0.request = builder.0.request.set_page_token(token);
1942 builder.send()
1943 };
1944 google_cloud_gax::paginator::internal::new_paginator(token, execute)
1945 }
1946
1947 pub fn by_item(
1949 self,
1950 ) -> impl google_cloud_gax::paginator::ItemPaginator<
1951 crate::model::FetchGitRepositoryLinkCommitListResponse,
1952 crate::Error,
1953 > {
1954 use google_cloud_gax::paginator::Paginator;
1955 self.by_page().items()
1956 }
1957
1958 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1962 self.0.request.name = v.into();
1963 self
1964 }
1965
1966 pub fn set_ref<T: Into<std::string::String>>(mut self, v: T) -> Self {
1968 self.0.request.r#ref = v.into();
1969 self
1970 }
1971
1972 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1974 self.0.request.page_size = v.into();
1975 self
1976 }
1977
1978 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1980 self.0.request.page_token = v.into();
1981 self
1982 }
1983
1984 pub fn set_view<T: Into<crate::model::CommitView>>(mut self, v: T) -> Self {
1986 self.0.request.view = v.into();
1987 self
1988 }
1989 }
1990
1991 #[doc(hidden)]
1992 impl crate::RequestBuilder for FetchGitRepositoryLinkCommitList {
1993 fn request_options(&mut self) -> &mut crate::RequestOptions {
1994 &mut self.0.options
1995 }
1996 }
1997
1998 #[derive(Clone, Debug)]
2015 pub struct FetchGitRepositoryLinkFileBlame(
2016 RequestBuilder<crate::model::FetchGitRepositoryLinkFileBlameRequest>,
2017 );
2018
2019 impl FetchGitRepositoryLinkFileBlame {
2020 pub(crate) fn new(
2021 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
2022 ) -> Self {
2023 Self(RequestBuilder::new(stub))
2024 }
2025
2026 pub fn with_request<V: Into<crate::model::FetchGitRepositoryLinkFileBlameRequest>>(
2028 mut self,
2029 v: V,
2030 ) -> Self {
2031 self.0.request = v.into();
2032 self
2033 }
2034
2035 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2037 self.0.options = v.into();
2038 self
2039 }
2040
2041 pub async fn send(self) -> Result<crate::model::FetchGitRepositoryLinkFileBlameResponse> {
2043 (*self.0.stub)
2044 .fetch_git_repository_link_file_blame(self.0.request, self.0.options)
2045 .await
2046 .map(crate::Response::into_body)
2047 }
2048
2049 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2053 self.0.request.name = v.into();
2054 self
2055 }
2056
2057 pub fn set_ref<T: Into<std::string::String>>(mut self, v: T) -> Self {
2061 self.0.request.r#ref = v.into();
2062 self
2063 }
2064
2065 pub fn set_path<T: Into<std::string::String>>(mut self, v: T) -> Self {
2069 self.0.request.path = v.into();
2070 self
2071 }
2072
2073 pub fn set_first_line<T: Into<i32>>(mut self, v: T) -> Self {
2075 self.0.request.first_line = v.into();
2076 self
2077 }
2078
2079 pub fn set_last_line<T: Into<i32>>(mut self, v: T) -> Self {
2081 self.0.request.last_line = v.into();
2082 self
2083 }
2084 }
2085
2086 #[doc(hidden)]
2087 impl crate::RequestBuilder for FetchGitRepositoryLinkFileBlame {
2088 fn request_options(&mut self) -> &mut crate::RequestOptions {
2089 &mut self.0.options
2090 }
2091 }
2092
2093 #[derive(Clone, Debug)]
2110 pub struct FetchGitRepositoryLinkPullRequest(
2111 RequestBuilder<crate::model::FetchGitRepositoryLinkPullRequestRequest>,
2112 );
2113
2114 impl FetchGitRepositoryLinkPullRequest {
2115 pub(crate) fn new(
2116 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
2117 ) -> Self {
2118 Self(RequestBuilder::new(stub))
2119 }
2120
2121 pub fn with_request<V: Into<crate::model::FetchGitRepositoryLinkPullRequestRequest>>(
2123 mut self,
2124 v: V,
2125 ) -> Self {
2126 self.0.request = v.into();
2127 self
2128 }
2129
2130 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2132 self.0.options = v.into();
2133 self
2134 }
2135
2136 pub async fn send(self) -> Result<crate::model::PullRequest> {
2138 (*self.0.stub)
2139 .fetch_git_repository_link_pull_request(self.0.request, self.0.options)
2140 .await
2141 .map(crate::Response::into_body)
2142 }
2143
2144 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2148 self.0.request.name = v.into();
2149 self
2150 }
2151
2152 pub fn set_pull_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2156 self.0.request.pull_request_id = v.into();
2157 self
2158 }
2159 }
2160
2161 #[doc(hidden)]
2162 impl crate::RequestBuilder for FetchGitRepositoryLinkPullRequest {
2163 fn request_options(&mut self) -> &mut crate::RequestOptions {
2164 &mut self.0.options
2165 }
2166 }
2167
2168 #[derive(Clone, Debug)]
2185 pub struct AddGitRepositoryLinkPullRequestComment(
2186 RequestBuilder<crate::model::AddGitRepositoryLinkPullRequestCommentRequest>,
2187 );
2188
2189 impl AddGitRepositoryLinkPullRequestComment {
2190 pub(crate) fn new(
2191 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
2192 ) -> Self {
2193 Self(RequestBuilder::new(stub))
2194 }
2195
2196 pub fn with_request<
2198 V: Into<crate::model::AddGitRepositoryLinkPullRequestCommentRequest>,
2199 >(
2200 mut self,
2201 v: V,
2202 ) -> Self {
2203 self.0.request = v.into();
2204 self
2205 }
2206
2207 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2209 self.0.options = v.into();
2210 self
2211 }
2212
2213 pub async fn send(self) -> Result<crate::model::PullRequestComment> {
2215 (*self.0.stub)
2216 .add_git_repository_link_pull_request_comment(self.0.request, self.0.options)
2217 .await
2218 .map(crate::Response::into_body)
2219 }
2220
2221 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2225 self.0.request.name = v.into();
2226 self
2227 }
2228
2229 pub fn set_pull_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2233 self.0.request.pull_request_id = v.into();
2234 self
2235 }
2236
2237 pub fn set_comment<T>(mut self, v: T) -> Self
2241 where
2242 T: std::convert::Into<crate::model::PullRequestComment>,
2243 {
2244 self.0.request.comment = std::option::Option::Some(v.into());
2245 self
2246 }
2247
2248 pub fn set_or_clear_comment<T>(mut self, v: std::option::Option<T>) -> Self
2252 where
2253 T: std::convert::Into<crate::model::PullRequestComment>,
2254 {
2255 self.0.request.comment = v.map(|x| x.into());
2256 self
2257 }
2258 }
2259
2260 #[doc(hidden)]
2261 impl crate::RequestBuilder for AddGitRepositoryLinkPullRequestComment {
2262 fn request_options(&mut self) -> &mut crate::RequestOptions {
2263 &mut self.0.options
2264 }
2265 }
2266
2267 #[derive(Clone, Debug)]
2284 pub struct AddGitRepositoryLinkPullRequestReviewComment(
2285 RequestBuilder<crate::model::AddGitRepositoryLinkPullRequestReviewCommentRequest>,
2286 );
2287
2288 impl AddGitRepositoryLinkPullRequestReviewComment {
2289 pub(crate) fn new(
2290 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
2291 ) -> Self {
2292 Self(RequestBuilder::new(stub))
2293 }
2294
2295 pub fn with_request<
2297 V: Into<crate::model::AddGitRepositoryLinkPullRequestReviewCommentRequest>,
2298 >(
2299 mut self,
2300 v: V,
2301 ) -> Self {
2302 self.0.request = v.into();
2303 self
2304 }
2305
2306 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2308 self.0.options = v.into();
2309 self
2310 }
2311
2312 pub async fn send(self) -> Result<crate::model::PullRequestReviewComment> {
2314 (*self.0.stub)
2315 .add_git_repository_link_pull_request_review_comment(self.0.request, self.0.options)
2316 .await
2317 .map(crate::Response::into_body)
2318 }
2319
2320 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2324 self.0.request.name = v.into();
2325 self
2326 }
2327
2328 pub fn set_pull_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2332 self.0.request.pull_request_id = v.into();
2333 self
2334 }
2335
2336 pub fn set_comment<T>(mut self, v: T) -> Self
2340 where
2341 T: std::convert::Into<crate::model::PullRequestReviewComment>,
2342 {
2343 self.0.request.comment = std::option::Option::Some(v.into());
2344 self
2345 }
2346
2347 pub fn set_or_clear_comment<T>(mut self, v: std::option::Option<T>) -> Self
2351 where
2352 T: std::convert::Into<crate::model::PullRequestReviewComment>,
2353 {
2354 self.0.request.comment = v.map(|x| x.into());
2355 self
2356 }
2357
2358 pub fn set_commit_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2360 self.0.request.commit_id = v.into();
2361 self
2362 }
2363 }
2364
2365 #[doc(hidden)]
2366 impl crate::RequestBuilder for AddGitRepositoryLinkPullRequestReviewComment {
2367 fn request_options(&mut self) -> &mut crate::RequestOptions {
2368 &mut self.0.options
2369 }
2370 }
2371
2372 #[derive(Clone, Debug)]
2389 pub struct ModifyGitRepositoryLinkPullRequest(
2390 RequestBuilder<crate::model::ModifyGitRepositoryLinkPullRequestRequest>,
2391 );
2392
2393 impl ModifyGitRepositoryLinkPullRequest {
2394 pub(crate) fn new(
2395 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
2396 ) -> Self {
2397 Self(RequestBuilder::new(stub))
2398 }
2399
2400 pub fn with_request<V: Into<crate::model::ModifyGitRepositoryLinkPullRequestRequest>>(
2402 mut self,
2403 v: V,
2404 ) -> Self {
2405 self.0.request = v.into();
2406 self
2407 }
2408
2409 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2411 self.0.options = v.into();
2412 self
2413 }
2414
2415 pub async fn send(self) -> Result<crate::model::PullRequest> {
2417 (*self.0.stub)
2418 .modify_git_repository_link_pull_request(self.0.request, self.0.options)
2419 .await
2420 .map(crate::Response::into_body)
2421 }
2422
2423 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2427 self.0.request.name = v.into();
2428 self
2429 }
2430
2431 pub fn set_pull_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2435 self.0.request.pull_request_id = v.into();
2436 self
2437 }
2438
2439 pub fn set_title<T: Into<std::string::String>>(mut self, v: T) -> Self {
2441 self.0.request.title = v.into();
2442 self
2443 }
2444
2445 pub fn set_body<T: Into<std::string::String>>(mut self, v: T) -> Self {
2447 self.0.request.body = v.into();
2448 self
2449 }
2450
2451 pub fn set_base_ref<T: Into<std::string::String>>(mut self, v: T) -> Self {
2453 self.0.request.base_ref = v.into();
2454 self
2455 }
2456
2457 pub fn set_state<
2459 T: Into<crate::model::modify_git_repository_link_pull_request_request::State>,
2460 >(
2461 mut self,
2462 v: T,
2463 ) -> Self {
2464 self.0.request.state = v.into();
2465 self
2466 }
2467 }
2468
2469 #[doc(hidden)]
2470 impl crate::RequestBuilder for ModifyGitRepositoryLinkPullRequest {
2471 fn request_options(&mut self) -> &mut crate::RequestOptions {
2472 &mut self.0.options
2473 }
2474 }
2475
2476 #[derive(Clone, Debug)]
2497 pub struct FetchGitRepositoryLinkPullRequestList(
2498 RequestBuilder<crate::model::FetchGitRepositoryLinkPullRequestListRequest>,
2499 );
2500
2501 impl FetchGitRepositoryLinkPullRequestList {
2502 pub(crate) fn new(
2503 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
2504 ) -> Self {
2505 Self(RequestBuilder::new(stub))
2506 }
2507
2508 pub fn with_request<V: Into<crate::model::FetchGitRepositoryLinkPullRequestListRequest>>(
2510 mut self,
2511 v: V,
2512 ) -> Self {
2513 self.0.request = v.into();
2514 self
2515 }
2516
2517 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2519 self.0.options = v.into();
2520 self
2521 }
2522
2523 pub async fn send(
2525 self,
2526 ) -> Result<crate::model::FetchGitRepositoryLinkPullRequestListResponse> {
2527 (*self.0.stub)
2528 .fetch_git_repository_link_pull_request_list(self.0.request, self.0.options)
2529 .await
2530 .map(crate::Response::into_body)
2531 }
2532
2533 pub fn by_page(
2535 self,
2536 ) -> impl google_cloud_gax::paginator::Paginator<
2537 crate::model::FetchGitRepositoryLinkPullRequestListResponse,
2538 crate::Error,
2539 > {
2540 use std::clone::Clone;
2541 let token = self.0.request.page_token.clone();
2542 let execute = move |token: String| {
2543 let mut builder = self.clone();
2544 builder.0.request = builder.0.request.set_page_token(token);
2545 builder.send()
2546 };
2547 google_cloud_gax::paginator::internal::new_paginator(token, execute)
2548 }
2549
2550 pub fn by_item(
2552 self,
2553 ) -> impl google_cloud_gax::paginator::ItemPaginator<
2554 crate::model::FetchGitRepositoryLinkPullRequestListResponse,
2555 crate::Error,
2556 > {
2557 use google_cloud_gax::paginator::Paginator;
2558 self.by_page().items()
2559 }
2560
2561 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2565 self.0.request.name = v.into();
2566 self
2567 }
2568
2569 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2571 self.0.request.filter = v.into();
2572 self
2573 }
2574
2575 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2577 self.0.request.page_size = v.into();
2578 self
2579 }
2580
2581 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2583 self.0.request.page_token = v.into();
2584 self
2585 }
2586 }
2587
2588 #[doc(hidden)]
2589 impl crate::RequestBuilder for FetchGitRepositoryLinkPullRequestList {
2590 fn request_options(&mut self) -> &mut crate::RequestOptions {
2591 &mut self.0.options
2592 }
2593 }
2594
2595 #[derive(Clone, Debug)]
2616 pub struct ListAccountConnectors(RequestBuilder<crate::model::ListAccountConnectorsRequest>);
2617
2618 impl ListAccountConnectors {
2619 pub(crate) fn new(
2620 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
2621 ) -> Self {
2622 Self(RequestBuilder::new(stub))
2623 }
2624
2625 pub fn with_request<V: Into<crate::model::ListAccountConnectorsRequest>>(
2627 mut self,
2628 v: V,
2629 ) -> Self {
2630 self.0.request = v.into();
2631 self
2632 }
2633
2634 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2636 self.0.options = v.into();
2637 self
2638 }
2639
2640 pub async fn send(self) -> Result<crate::model::ListAccountConnectorsResponse> {
2642 (*self.0.stub)
2643 .list_account_connectors(self.0.request, self.0.options)
2644 .await
2645 .map(crate::Response::into_body)
2646 }
2647
2648 pub fn by_page(
2650 self,
2651 ) -> impl google_cloud_gax::paginator::Paginator<
2652 crate::model::ListAccountConnectorsResponse,
2653 crate::Error,
2654 > {
2655 use std::clone::Clone;
2656 let token = self.0.request.page_token.clone();
2657 let execute = move |token: String| {
2658 let mut builder = self.clone();
2659 builder.0.request = builder.0.request.set_page_token(token);
2660 builder.send()
2661 };
2662 google_cloud_gax::paginator::internal::new_paginator(token, execute)
2663 }
2664
2665 pub fn by_item(
2667 self,
2668 ) -> impl google_cloud_gax::paginator::ItemPaginator<
2669 crate::model::ListAccountConnectorsResponse,
2670 crate::Error,
2671 > {
2672 use google_cloud_gax::paginator::Paginator;
2673 self.by_page().items()
2674 }
2675
2676 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2680 self.0.request.parent = v.into();
2681 self
2682 }
2683
2684 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2686 self.0.request.page_size = v.into();
2687 self
2688 }
2689
2690 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2692 self.0.request.page_token = v.into();
2693 self
2694 }
2695
2696 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2698 self.0.request.filter = v.into();
2699 self
2700 }
2701
2702 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
2704 self.0.request.order_by = v.into();
2705 self
2706 }
2707 }
2708
2709 #[doc(hidden)]
2710 impl crate::RequestBuilder for ListAccountConnectors {
2711 fn request_options(&mut self) -> &mut crate::RequestOptions {
2712 &mut self.0.options
2713 }
2714 }
2715
2716 #[derive(Clone, Debug)]
2733 pub struct GetAccountConnector(RequestBuilder<crate::model::GetAccountConnectorRequest>);
2734
2735 impl GetAccountConnector {
2736 pub(crate) fn new(
2737 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
2738 ) -> Self {
2739 Self(RequestBuilder::new(stub))
2740 }
2741
2742 pub fn with_request<V: Into<crate::model::GetAccountConnectorRequest>>(
2744 mut self,
2745 v: V,
2746 ) -> Self {
2747 self.0.request = v.into();
2748 self
2749 }
2750
2751 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2753 self.0.options = v.into();
2754 self
2755 }
2756
2757 pub async fn send(self) -> Result<crate::model::AccountConnector> {
2759 (*self.0.stub)
2760 .get_account_connector(self.0.request, self.0.options)
2761 .await
2762 .map(crate::Response::into_body)
2763 }
2764
2765 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2769 self.0.request.name = v.into();
2770 self
2771 }
2772 }
2773
2774 #[doc(hidden)]
2775 impl crate::RequestBuilder for GetAccountConnector {
2776 fn request_options(&mut self) -> &mut crate::RequestOptions {
2777 &mut self.0.options
2778 }
2779 }
2780
2781 #[derive(Clone, Debug)]
2799 pub struct CreateAccountConnector(RequestBuilder<crate::model::CreateAccountConnectorRequest>);
2800
2801 impl CreateAccountConnector {
2802 pub(crate) fn new(
2803 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
2804 ) -> Self {
2805 Self(RequestBuilder::new(stub))
2806 }
2807
2808 pub fn with_request<V: Into<crate::model::CreateAccountConnectorRequest>>(
2810 mut self,
2811 v: V,
2812 ) -> Self {
2813 self.0.request = v.into();
2814 self
2815 }
2816
2817 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2819 self.0.options = v.into();
2820 self
2821 }
2822
2823 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2830 (*self.0.stub)
2831 .create_account_connector(self.0.request, self.0.options)
2832 .await
2833 .map(crate::Response::into_body)
2834 }
2835
2836 pub fn poller(
2838 self,
2839 ) -> impl google_cloud_lro::Poller<crate::model::AccountConnector, crate::model::OperationMetadata>
2840 {
2841 type Operation = google_cloud_lro::internal::Operation<
2842 crate::model::AccountConnector,
2843 crate::model::OperationMetadata,
2844 >;
2845 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2846 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2847 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2848 if let Some(ref mut details) = poller_options.tracing {
2849 details.method_name = "google_cloud_developerconnect_v1::client::DeveloperConnect::create_account_connector::until_done";
2850 }
2851
2852 let stub = self.0.stub.clone();
2853 let mut options = self.0.options.clone();
2854 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2855 let query = move |name| {
2856 let stub = stub.clone();
2857 let options = options.clone();
2858 async {
2859 let op = GetOperation::new(stub)
2860 .set_name(name)
2861 .with_options(options)
2862 .send()
2863 .await?;
2864 Ok(Operation::new(op))
2865 }
2866 };
2867
2868 let start = move || async {
2869 let op = self.send().await?;
2870 Ok(Operation::new(op))
2871 };
2872
2873 use google_cloud_lro::internal::PollerExt;
2874 {
2875 google_cloud_lro::internal::new_poller(
2876 polling_error_policy,
2877 polling_backoff_policy,
2878 start,
2879 query,
2880 )
2881 }
2882 .with_options(poller_options)
2883 }
2884
2885 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2889 self.0.request.parent = v.into();
2890 self
2891 }
2892
2893 pub fn set_account_connector_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2897 self.0.request.account_connector_id = v.into();
2898 self
2899 }
2900
2901 pub fn set_account_connector<T>(mut self, v: T) -> Self
2905 where
2906 T: std::convert::Into<crate::model::AccountConnector>,
2907 {
2908 self.0.request.account_connector = std::option::Option::Some(v.into());
2909 self
2910 }
2911
2912 pub fn set_or_clear_account_connector<T>(mut self, v: std::option::Option<T>) -> Self
2916 where
2917 T: std::convert::Into<crate::model::AccountConnector>,
2918 {
2919 self.0.request.account_connector = v.map(|x| x.into());
2920 self
2921 }
2922
2923 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2925 self.0.request.request_id = v.into();
2926 self
2927 }
2928
2929 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2931 self.0.request.validate_only = v.into();
2932 self
2933 }
2934 }
2935
2936 #[doc(hidden)]
2937 impl crate::RequestBuilder for CreateAccountConnector {
2938 fn request_options(&mut self) -> &mut crate::RequestOptions {
2939 &mut self.0.options
2940 }
2941 }
2942
2943 #[derive(Clone, Debug)]
2961 pub struct UpdateAccountConnector(RequestBuilder<crate::model::UpdateAccountConnectorRequest>);
2962
2963 impl UpdateAccountConnector {
2964 pub(crate) fn new(
2965 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
2966 ) -> Self {
2967 Self(RequestBuilder::new(stub))
2968 }
2969
2970 pub fn with_request<V: Into<crate::model::UpdateAccountConnectorRequest>>(
2972 mut self,
2973 v: V,
2974 ) -> Self {
2975 self.0.request = v.into();
2976 self
2977 }
2978
2979 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2981 self.0.options = v.into();
2982 self
2983 }
2984
2985 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2992 (*self.0.stub)
2993 .update_account_connector(self.0.request, self.0.options)
2994 .await
2995 .map(crate::Response::into_body)
2996 }
2997
2998 pub fn poller(
3000 self,
3001 ) -> impl google_cloud_lro::Poller<crate::model::AccountConnector, crate::model::OperationMetadata>
3002 {
3003 type Operation = google_cloud_lro::internal::Operation<
3004 crate::model::AccountConnector,
3005 crate::model::OperationMetadata,
3006 >;
3007 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3008 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3009 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3010 if let Some(ref mut details) = poller_options.tracing {
3011 details.method_name = "google_cloud_developerconnect_v1::client::DeveloperConnect::update_account_connector::until_done";
3012 }
3013
3014 let stub = self.0.stub.clone();
3015 let mut options = self.0.options.clone();
3016 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3017 let query = move |name| {
3018 let stub = stub.clone();
3019 let options = options.clone();
3020 async {
3021 let op = GetOperation::new(stub)
3022 .set_name(name)
3023 .with_options(options)
3024 .send()
3025 .await?;
3026 Ok(Operation::new(op))
3027 }
3028 };
3029
3030 let start = move || async {
3031 let op = self.send().await?;
3032 Ok(Operation::new(op))
3033 };
3034
3035 use google_cloud_lro::internal::PollerExt;
3036 {
3037 google_cloud_lro::internal::new_poller(
3038 polling_error_policy,
3039 polling_backoff_policy,
3040 start,
3041 query,
3042 )
3043 }
3044 .with_options(poller_options)
3045 }
3046
3047 pub fn set_update_mask<T>(mut self, v: T) -> Self
3049 where
3050 T: std::convert::Into<wkt::FieldMask>,
3051 {
3052 self.0.request.update_mask = std::option::Option::Some(v.into());
3053 self
3054 }
3055
3056 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3058 where
3059 T: std::convert::Into<wkt::FieldMask>,
3060 {
3061 self.0.request.update_mask = v.map(|x| x.into());
3062 self
3063 }
3064
3065 pub fn set_account_connector<T>(mut self, v: T) -> Self
3069 where
3070 T: std::convert::Into<crate::model::AccountConnector>,
3071 {
3072 self.0.request.account_connector = std::option::Option::Some(v.into());
3073 self
3074 }
3075
3076 pub fn set_or_clear_account_connector<T>(mut self, v: std::option::Option<T>) -> Self
3080 where
3081 T: std::convert::Into<crate::model::AccountConnector>,
3082 {
3083 self.0.request.account_connector = v.map(|x| x.into());
3084 self
3085 }
3086
3087 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3089 self.0.request.request_id = v.into();
3090 self
3091 }
3092
3093 pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
3095 self.0.request.allow_missing = v.into();
3096 self
3097 }
3098
3099 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3101 self.0.request.validate_only = v.into();
3102 self
3103 }
3104 }
3105
3106 #[doc(hidden)]
3107 impl crate::RequestBuilder for UpdateAccountConnector {
3108 fn request_options(&mut self) -> &mut crate::RequestOptions {
3109 &mut self.0.options
3110 }
3111 }
3112
3113 #[derive(Clone, Debug)]
3131 pub struct DeleteAccountConnector(RequestBuilder<crate::model::DeleteAccountConnectorRequest>);
3132
3133 impl DeleteAccountConnector {
3134 pub(crate) fn new(
3135 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
3136 ) -> Self {
3137 Self(RequestBuilder::new(stub))
3138 }
3139
3140 pub fn with_request<V: Into<crate::model::DeleteAccountConnectorRequest>>(
3142 mut self,
3143 v: V,
3144 ) -> Self {
3145 self.0.request = v.into();
3146 self
3147 }
3148
3149 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3151 self.0.options = v.into();
3152 self
3153 }
3154
3155 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3162 (*self.0.stub)
3163 .delete_account_connector(self.0.request, self.0.options)
3164 .await
3165 .map(crate::Response::into_body)
3166 }
3167
3168 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
3170 type Operation =
3171 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3172 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3173 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3174 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3175 if let Some(ref mut details) = poller_options.tracing {
3176 details.method_name = "google_cloud_developerconnect_v1::client::DeveloperConnect::delete_account_connector::until_done";
3177 }
3178
3179 let stub = self.0.stub.clone();
3180 let mut options = self.0.options.clone();
3181 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3182 let query = move |name| {
3183 let stub = stub.clone();
3184 let options = options.clone();
3185 async {
3186 let op = GetOperation::new(stub)
3187 .set_name(name)
3188 .with_options(options)
3189 .send()
3190 .await?;
3191 Ok(Operation::new(op))
3192 }
3193 };
3194
3195 let start = move || async {
3196 let op = self.send().await?;
3197 Ok(Operation::new(op))
3198 };
3199
3200 use google_cloud_lro::internal::PollerExt;
3201 {
3202 google_cloud_lro::internal::new_unit_response_poller(
3203 polling_error_policy,
3204 polling_backoff_policy,
3205 start,
3206 query,
3207 )
3208 }
3209 .with_options(poller_options)
3210 }
3211
3212 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3216 self.0.request.name = v.into();
3217 self
3218 }
3219
3220 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3222 self.0.request.request_id = v.into();
3223 self
3224 }
3225
3226 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3228 self.0.request.validate_only = v.into();
3229 self
3230 }
3231
3232 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
3234 self.0.request.etag = v.into();
3235 self
3236 }
3237
3238 pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
3240 self.0.request.force = v.into();
3241 self
3242 }
3243 }
3244
3245 #[doc(hidden)]
3246 impl crate::RequestBuilder for DeleteAccountConnector {
3247 fn request_options(&mut self) -> &mut crate::RequestOptions {
3248 &mut self.0.options
3249 }
3250 }
3251
3252 #[derive(Clone, Debug)]
3269 pub struct FetchAccessToken(RequestBuilder<crate::model::FetchAccessTokenRequest>);
3270
3271 impl FetchAccessToken {
3272 pub(crate) fn new(
3273 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
3274 ) -> Self {
3275 Self(RequestBuilder::new(stub))
3276 }
3277
3278 pub fn with_request<V: Into<crate::model::FetchAccessTokenRequest>>(
3280 mut self,
3281 v: V,
3282 ) -> Self {
3283 self.0.request = v.into();
3284 self
3285 }
3286
3287 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3289 self.0.options = v.into();
3290 self
3291 }
3292
3293 pub async fn send(self) -> Result<crate::model::FetchAccessTokenResponse> {
3295 (*self.0.stub)
3296 .fetch_access_token(self.0.request, self.0.options)
3297 .await
3298 .map(crate::Response::into_body)
3299 }
3300
3301 pub fn set_account_connector<T: Into<std::string::String>>(mut self, v: T) -> Self {
3305 self.0.request.account_connector = v.into();
3306 self
3307 }
3308 }
3309
3310 #[doc(hidden)]
3311 impl crate::RequestBuilder for FetchAccessToken {
3312 fn request_options(&mut self) -> &mut crate::RequestOptions {
3313 &mut self.0.options
3314 }
3315 }
3316
3317 #[derive(Clone, Debug)]
3338 pub struct ListUsers(RequestBuilder<crate::model::ListUsersRequest>);
3339
3340 impl ListUsers {
3341 pub(crate) fn new(
3342 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
3343 ) -> Self {
3344 Self(RequestBuilder::new(stub))
3345 }
3346
3347 pub fn with_request<V: Into<crate::model::ListUsersRequest>>(mut self, v: V) -> Self {
3349 self.0.request = v.into();
3350 self
3351 }
3352
3353 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3355 self.0.options = v.into();
3356 self
3357 }
3358
3359 pub async fn send(self) -> Result<crate::model::ListUsersResponse> {
3361 (*self.0.stub)
3362 .list_users(self.0.request, self.0.options)
3363 .await
3364 .map(crate::Response::into_body)
3365 }
3366
3367 pub fn by_page(
3369 self,
3370 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListUsersResponse, crate::Error>
3371 {
3372 use std::clone::Clone;
3373 let token = self.0.request.page_token.clone();
3374 let execute = move |token: String| {
3375 let mut builder = self.clone();
3376 builder.0.request = builder.0.request.set_page_token(token);
3377 builder.send()
3378 };
3379 google_cloud_gax::paginator::internal::new_paginator(token, execute)
3380 }
3381
3382 pub fn by_item(
3384 self,
3385 ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::ListUsersResponse, crate::Error>
3386 {
3387 use google_cloud_gax::paginator::Paginator;
3388 self.by_page().items()
3389 }
3390
3391 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3395 self.0.request.parent = v.into();
3396 self
3397 }
3398
3399 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3401 self.0.request.page_size = v.into();
3402 self
3403 }
3404
3405 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3407 self.0.request.page_token = v.into();
3408 self
3409 }
3410
3411 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3413 self.0.request.filter = v.into();
3414 self
3415 }
3416
3417 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3419 self.0.request.order_by = v.into();
3420 self
3421 }
3422 }
3423
3424 #[doc(hidden)]
3425 impl crate::RequestBuilder for ListUsers {
3426 fn request_options(&mut self) -> &mut crate::RequestOptions {
3427 &mut self.0.options
3428 }
3429 }
3430
3431 #[derive(Clone, Debug)]
3449 pub struct DeleteUser(RequestBuilder<crate::model::DeleteUserRequest>);
3450
3451 impl DeleteUser {
3452 pub(crate) fn new(
3453 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
3454 ) -> Self {
3455 Self(RequestBuilder::new(stub))
3456 }
3457
3458 pub fn with_request<V: Into<crate::model::DeleteUserRequest>>(mut self, v: V) -> Self {
3460 self.0.request = v.into();
3461 self
3462 }
3463
3464 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3466 self.0.options = v.into();
3467 self
3468 }
3469
3470 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3477 (*self.0.stub)
3478 .delete_user(self.0.request, self.0.options)
3479 .await
3480 .map(crate::Response::into_body)
3481 }
3482
3483 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
3485 type Operation =
3486 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3487 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3488 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3489 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3490 if let Some(ref mut details) = poller_options.tracing {
3491 details.method_name = "google_cloud_developerconnect_v1::client::DeveloperConnect::delete_user::until_done";
3492 }
3493
3494 let stub = self.0.stub.clone();
3495 let mut options = self.0.options.clone();
3496 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3497 let query = move |name| {
3498 let stub = stub.clone();
3499 let options = options.clone();
3500 async {
3501 let op = GetOperation::new(stub)
3502 .set_name(name)
3503 .with_options(options)
3504 .send()
3505 .await?;
3506 Ok(Operation::new(op))
3507 }
3508 };
3509
3510 let start = move || async {
3511 let op = self.send().await?;
3512 Ok(Operation::new(op))
3513 };
3514
3515 use google_cloud_lro::internal::PollerExt;
3516 {
3517 google_cloud_lro::internal::new_unit_response_poller(
3518 polling_error_policy,
3519 polling_backoff_policy,
3520 start,
3521 query,
3522 )
3523 }
3524 .with_options(poller_options)
3525 }
3526
3527 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3531 self.0.request.name = v.into();
3532 self
3533 }
3534
3535 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3537 self.0.request.request_id = v.into();
3538 self
3539 }
3540
3541 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3543 self.0.request.validate_only = v.into();
3544 self
3545 }
3546
3547 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
3549 self.0.request.etag = v.into();
3550 self
3551 }
3552 }
3553
3554 #[doc(hidden)]
3555 impl crate::RequestBuilder for DeleteUser {
3556 fn request_options(&mut self) -> &mut crate::RequestOptions {
3557 &mut self.0.options
3558 }
3559 }
3560
3561 #[derive(Clone, Debug)]
3578 pub struct FetchSelf(RequestBuilder<crate::model::FetchSelfRequest>);
3579
3580 impl FetchSelf {
3581 pub(crate) fn new(
3582 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
3583 ) -> Self {
3584 Self(RequestBuilder::new(stub))
3585 }
3586
3587 pub fn with_request<V: Into<crate::model::FetchSelfRequest>>(mut self, v: V) -> Self {
3589 self.0.request = v.into();
3590 self
3591 }
3592
3593 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3595 self.0.options = v.into();
3596 self
3597 }
3598
3599 pub async fn send(self) -> Result<crate::model::User> {
3601 (*self.0.stub)
3602 .fetch_self(self.0.request, self.0.options)
3603 .await
3604 .map(crate::Response::into_body)
3605 }
3606
3607 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3611 self.0.request.name = v.into();
3612 self
3613 }
3614 }
3615
3616 #[doc(hidden)]
3617 impl crate::RequestBuilder for FetchSelf {
3618 fn request_options(&mut self) -> &mut crate::RequestOptions {
3619 &mut self.0.options
3620 }
3621 }
3622
3623 #[derive(Clone, Debug)]
3641 pub struct DeleteSelf(RequestBuilder<crate::model::DeleteSelfRequest>);
3642
3643 impl DeleteSelf {
3644 pub(crate) fn new(
3645 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
3646 ) -> Self {
3647 Self(RequestBuilder::new(stub))
3648 }
3649
3650 pub fn with_request<V: Into<crate::model::DeleteSelfRequest>>(mut self, v: V) -> Self {
3652 self.0.request = v.into();
3653 self
3654 }
3655
3656 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3658 self.0.options = v.into();
3659 self
3660 }
3661
3662 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3669 (*self.0.stub)
3670 .delete_self(self.0.request, self.0.options)
3671 .await
3672 .map(crate::Response::into_body)
3673 }
3674
3675 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
3677 type Operation =
3678 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3679 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3680 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3681 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3682 if let Some(ref mut details) = poller_options.tracing {
3683 details.method_name = "google_cloud_developerconnect_v1::client::DeveloperConnect::delete_self::until_done";
3684 }
3685
3686 let stub = self.0.stub.clone();
3687 let mut options = self.0.options.clone();
3688 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3689 let query = move |name| {
3690 let stub = stub.clone();
3691 let options = options.clone();
3692 async {
3693 let op = GetOperation::new(stub)
3694 .set_name(name)
3695 .with_options(options)
3696 .send()
3697 .await?;
3698 Ok(Operation::new(op))
3699 }
3700 };
3701
3702 let start = move || async {
3703 let op = self.send().await?;
3704 Ok(Operation::new(op))
3705 };
3706
3707 use google_cloud_lro::internal::PollerExt;
3708 {
3709 google_cloud_lro::internal::new_unit_response_poller(
3710 polling_error_policy,
3711 polling_backoff_policy,
3712 start,
3713 query,
3714 )
3715 }
3716 .with_options(poller_options)
3717 }
3718
3719 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3723 self.0.request.name = v.into();
3724 self
3725 }
3726 }
3727
3728 #[doc(hidden)]
3729 impl crate::RequestBuilder for DeleteSelf {
3730 fn request_options(&mut self) -> &mut crate::RequestOptions {
3731 &mut self.0.options
3732 }
3733 }
3734
3735 #[derive(Clone, Debug)]
3752 pub struct StartOAuth(RequestBuilder<crate::model::StartOAuthRequest>);
3753
3754 impl StartOAuth {
3755 pub(crate) fn new(
3756 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
3757 ) -> Self {
3758 Self(RequestBuilder::new(stub))
3759 }
3760
3761 pub fn with_request<V: Into<crate::model::StartOAuthRequest>>(mut self, v: V) -> Self {
3763 self.0.request = v.into();
3764 self
3765 }
3766
3767 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3769 self.0.options = v.into();
3770 self
3771 }
3772
3773 pub async fn send(self) -> Result<crate::model::StartOAuthResponse> {
3775 (*self.0.stub)
3776 .start_o_auth(self.0.request, self.0.options)
3777 .await
3778 .map(crate::Response::into_body)
3779 }
3780
3781 pub fn set_account_connector<T: Into<std::string::String>>(mut self, v: T) -> Self {
3785 self.0.request.account_connector = v.into();
3786 self
3787 }
3788 }
3789
3790 #[doc(hidden)]
3791 impl crate::RequestBuilder for StartOAuth {
3792 fn request_options(&mut self) -> &mut crate::RequestOptions {
3793 &mut self.0.options
3794 }
3795 }
3796
3797 #[derive(Clone, Debug)]
3814 pub struct FinishOAuth(RequestBuilder<crate::model::FinishOAuthRequest>);
3815
3816 impl FinishOAuth {
3817 pub(crate) fn new(
3818 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
3819 ) -> Self {
3820 Self(RequestBuilder::new(stub))
3821 }
3822
3823 pub fn with_request<V: Into<crate::model::FinishOAuthRequest>>(mut self, v: V) -> Self {
3825 self.0.request = v.into();
3826 self
3827 }
3828
3829 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3831 self.0.options = v.into();
3832 self
3833 }
3834
3835 pub async fn send(self) -> Result<crate::model::FinishOAuthResponse> {
3837 (*self.0.stub)
3838 .finish_o_auth(self.0.request, self.0.options)
3839 .await
3840 .map(crate::Response::into_body)
3841 }
3842
3843 pub fn set_account_connector<T: Into<std::string::String>>(mut self, v: T) -> Self {
3847 self.0.request.account_connector = v.into();
3848 self
3849 }
3850
3851 pub fn set_params<T: Into<Option<crate::model::finish_o_auth_request::Params>>>(
3856 mut self,
3857 v: T,
3858 ) -> Self {
3859 self.0.request.params = v.into();
3860 self
3861 }
3862
3863 pub fn set_oauth_params<
3869 T: std::convert::Into<std::boxed::Box<crate::model::finish_o_auth_request::OAuthParams>>,
3870 >(
3871 mut self,
3872 v: T,
3873 ) -> Self {
3874 self.0.request = self.0.request.set_oauth_params(v);
3875 self
3876 }
3877
3878 pub fn set_google_oauth_params<
3884 T: std::convert::Into<
3885 std::boxed::Box<crate::model::finish_o_auth_request::GoogleOAuthParams>,
3886 >,
3887 >(
3888 mut self,
3889 v: T,
3890 ) -> Self {
3891 self.0.request = self.0.request.set_google_oauth_params(v);
3892 self
3893 }
3894 }
3895
3896 #[doc(hidden)]
3897 impl crate::RequestBuilder for FinishOAuth {
3898 fn request_options(&mut self) -> &mut crate::RequestOptions {
3899 &mut self.0.options
3900 }
3901 }
3902
3903 #[derive(Clone, Debug)]
3924 pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
3925
3926 impl ListLocations {
3927 pub(crate) fn new(
3928 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
3929 ) -> Self {
3930 Self(RequestBuilder::new(stub))
3931 }
3932
3933 pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
3935 mut self,
3936 v: V,
3937 ) -> Self {
3938 self.0.request = v.into();
3939 self
3940 }
3941
3942 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3944 self.0.options = v.into();
3945 self
3946 }
3947
3948 pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
3950 (*self.0.stub)
3951 .list_locations(self.0.request, self.0.options)
3952 .await
3953 .map(crate::Response::into_body)
3954 }
3955
3956 pub fn by_page(
3958 self,
3959 ) -> impl google_cloud_gax::paginator::Paginator<
3960 google_cloud_location::model::ListLocationsResponse,
3961 crate::Error,
3962 > {
3963 use std::clone::Clone;
3964 let token = self.0.request.page_token.clone();
3965 let execute = move |token: String| {
3966 let mut builder = self.clone();
3967 builder.0.request = builder.0.request.set_page_token(token);
3968 builder.send()
3969 };
3970 google_cloud_gax::paginator::internal::new_paginator(token, execute)
3971 }
3972
3973 pub fn by_item(
3975 self,
3976 ) -> impl google_cloud_gax::paginator::ItemPaginator<
3977 google_cloud_location::model::ListLocationsResponse,
3978 crate::Error,
3979 > {
3980 use google_cloud_gax::paginator::Paginator;
3981 self.by_page().items()
3982 }
3983
3984 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3986 self.0.request.name = v.into();
3987 self
3988 }
3989
3990 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3992 self.0.request.filter = v.into();
3993 self
3994 }
3995
3996 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3998 self.0.request.page_size = v.into();
3999 self
4000 }
4001
4002 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4004 self.0.request.page_token = v.into();
4005 self
4006 }
4007 }
4008
4009 #[doc(hidden)]
4010 impl crate::RequestBuilder for ListLocations {
4011 fn request_options(&mut self) -> &mut crate::RequestOptions {
4012 &mut self.0.options
4013 }
4014 }
4015
4016 #[derive(Clone, Debug)]
4033 pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
4034
4035 impl GetLocation {
4036 pub(crate) fn new(
4037 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
4038 ) -> Self {
4039 Self(RequestBuilder::new(stub))
4040 }
4041
4042 pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
4044 mut self,
4045 v: V,
4046 ) -> Self {
4047 self.0.request = v.into();
4048 self
4049 }
4050
4051 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4053 self.0.options = v.into();
4054 self
4055 }
4056
4057 pub async fn send(self) -> Result<google_cloud_location::model::Location> {
4059 (*self.0.stub)
4060 .get_location(self.0.request, self.0.options)
4061 .await
4062 .map(crate::Response::into_body)
4063 }
4064
4065 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4067 self.0.request.name = v.into();
4068 self
4069 }
4070 }
4071
4072 #[doc(hidden)]
4073 impl crate::RequestBuilder for GetLocation {
4074 fn request_options(&mut self) -> &mut crate::RequestOptions {
4075 &mut self.0.options
4076 }
4077 }
4078
4079 #[derive(Clone, Debug)]
4100 pub struct ListOperations(
4101 RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
4102 );
4103
4104 impl ListOperations {
4105 pub(crate) fn new(
4106 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
4107 ) -> Self {
4108 Self(RequestBuilder::new(stub))
4109 }
4110
4111 pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
4113 mut self,
4114 v: V,
4115 ) -> Self {
4116 self.0.request = v.into();
4117 self
4118 }
4119
4120 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4122 self.0.options = v.into();
4123 self
4124 }
4125
4126 pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
4128 (*self.0.stub)
4129 .list_operations(self.0.request, self.0.options)
4130 .await
4131 .map(crate::Response::into_body)
4132 }
4133
4134 pub fn by_page(
4136 self,
4137 ) -> impl google_cloud_gax::paginator::Paginator<
4138 google_cloud_longrunning::model::ListOperationsResponse,
4139 crate::Error,
4140 > {
4141 use std::clone::Clone;
4142 let token = self.0.request.page_token.clone();
4143 let execute = move |token: String| {
4144 let mut builder = self.clone();
4145 builder.0.request = builder.0.request.set_page_token(token);
4146 builder.send()
4147 };
4148 google_cloud_gax::paginator::internal::new_paginator(token, execute)
4149 }
4150
4151 pub fn by_item(
4153 self,
4154 ) -> impl google_cloud_gax::paginator::ItemPaginator<
4155 google_cloud_longrunning::model::ListOperationsResponse,
4156 crate::Error,
4157 > {
4158 use google_cloud_gax::paginator::Paginator;
4159 self.by_page().items()
4160 }
4161
4162 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4164 self.0.request.name = v.into();
4165 self
4166 }
4167
4168 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4170 self.0.request.filter = v.into();
4171 self
4172 }
4173
4174 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4176 self.0.request.page_size = v.into();
4177 self
4178 }
4179
4180 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4182 self.0.request.page_token = v.into();
4183 self
4184 }
4185
4186 pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
4188 self.0.request.return_partial_success = v.into();
4189 self
4190 }
4191 }
4192
4193 #[doc(hidden)]
4194 impl crate::RequestBuilder for ListOperations {
4195 fn request_options(&mut self) -> &mut crate::RequestOptions {
4196 &mut self.0.options
4197 }
4198 }
4199
4200 #[derive(Clone, Debug)]
4217 pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
4218
4219 impl GetOperation {
4220 pub(crate) fn new(
4221 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
4222 ) -> Self {
4223 Self(RequestBuilder::new(stub))
4224 }
4225
4226 pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
4228 mut self,
4229 v: V,
4230 ) -> Self {
4231 self.0.request = v.into();
4232 self
4233 }
4234
4235 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4237 self.0.options = v.into();
4238 self
4239 }
4240
4241 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4243 (*self.0.stub)
4244 .get_operation(self.0.request, self.0.options)
4245 .await
4246 .map(crate::Response::into_body)
4247 }
4248
4249 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4251 self.0.request.name = v.into();
4252 self
4253 }
4254 }
4255
4256 #[doc(hidden)]
4257 impl crate::RequestBuilder for GetOperation {
4258 fn request_options(&mut self) -> &mut crate::RequestOptions {
4259 &mut self.0.options
4260 }
4261 }
4262
4263 #[derive(Clone, Debug)]
4280 pub struct DeleteOperation(
4281 RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
4282 );
4283
4284 impl DeleteOperation {
4285 pub(crate) fn new(
4286 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
4287 ) -> Self {
4288 Self(RequestBuilder::new(stub))
4289 }
4290
4291 pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
4293 mut self,
4294 v: V,
4295 ) -> Self {
4296 self.0.request = v.into();
4297 self
4298 }
4299
4300 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4302 self.0.options = v.into();
4303 self
4304 }
4305
4306 pub async fn send(self) -> Result<()> {
4308 (*self.0.stub)
4309 .delete_operation(self.0.request, self.0.options)
4310 .await
4311 .map(crate::Response::into_body)
4312 }
4313
4314 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4316 self.0.request.name = v.into();
4317 self
4318 }
4319 }
4320
4321 #[doc(hidden)]
4322 impl crate::RequestBuilder for DeleteOperation {
4323 fn request_options(&mut self) -> &mut crate::RequestOptions {
4324 &mut self.0.options
4325 }
4326 }
4327
4328 #[derive(Clone, Debug)]
4345 pub struct CancelOperation(
4346 RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
4347 );
4348
4349 impl CancelOperation {
4350 pub(crate) fn new(
4351 stub: std::sync::Arc<dyn super::super::stub::dynamic::DeveloperConnect>,
4352 ) -> Self {
4353 Self(RequestBuilder::new(stub))
4354 }
4355
4356 pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
4358 mut self,
4359 v: V,
4360 ) -> Self {
4361 self.0.request = v.into();
4362 self
4363 }
4364
4365 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4367 self.0.options = v.into();
4368 self
4369 }
4370
4371 pub async fn send(self) -> Result<()> {
4373 (*self.0.stub)
4374 .cancel_operation(self.0.request, self.0.options)
4375 .await
4376 .map(crate::Response::into_body)
4377 }
4378
4379 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4381 self.0.request.name = v.into();
4382 self
4383 }
4384 }
4385
4386 #[doc(hidden)]
4387 impl crate::RequestBuilder for CancelOperation {
4388 fn request_options(&mut self) -> &mut crate::RequestOptions {
4389 &mut self.0.options
4390 }
4391 }
4392}
4393
4394pub mod insights_config_service {
4396 use crate::Result;
4397
4398 pub type ClientBuilder = crate::ClientBuilder<client::Factory, gaxi::options::Credentials>;
4412
4413 pub(crate) mod client {
4414 use super::super::super::client::InsightsConfigService;
4415 pub struct Factory;
4416 impl crate::ClientFactory for Factory {
4417 type Client = InsightsConfigService;
4418 type Credentials = gaxi::options::Credentials;
4419 async fn build(
4420 self,
4421 config: gaxi::options::ClientConfig,
4422 ) -> crate::ClientBuilderResult<Self::Client> {
4423 Self::Client::new(config).await
4424 }
4425 }
4426 }
4427
4428 #[derive(Clone, Debug)]
4430 pub(crate) struct RequestBuilder<R: std::default::Default> {
4431 stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
4432 request: R,
4433 options: crate::RequestOptions,
4434 }
4435
4436 impl<R> RequestBuilder<R>
4437 where
4438 R: std::default::Default,
4439 {
4440 pub(crate) fn new(
4441 stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
4442 ) -> Self {
4443 Self {
4444 stub,
4445 request: R::default(),
4446 options: crate::RequestOptions::default(),
4447 }
4448 }
4449 }
4450
4451 #[derive(Clone, Debug)]
4472 pub struct ListInsightsConfigs(RequestBuilder<crate::model::ListInsightsConfigsRequest>);
4473
4474 impl ListInsightsConfigs {
4475 pub(crate) fn new(
4476 stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
4477 ) -> Self {
4478 Self(RequestBuilder::new(stub))
4479 }
4480
4481 pub fn with_request<V: Into<crate::model::ListInsightsConfigsRequest>>(
4483 mut self,
4484 v: V,
4485 ) -> Self {
4486 self.0.request = v.into();
4487 self
4488 }
4489
4490 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4492 self.0.options = v.into();
4493 self
4494 }
4495
4496 pub async fn send(self) -> Result<crate::model::ListInsightsConfigsResponse> {
4498 (*self.0.stub)
4499 .list_insights_configs(self.0.request, self.0.options)
4500 .await
4501 .map(crate::Response::into_body)
4502 }
4503
4504 pub fn by_page(
4506 self,
4507 ) -> impl google_cloud_gax::paginator::Paginator<
4508 crate::model::ListInsightsConfigsResponse,
4509 crate::Error,
4510 > {
4511 use std::clone::Clone;
4512 let token = self.0.request.page_token.clone();
4513 let execute = move |token: String| {
4514 let mut builder = self.clone();
4515 builder.0.request = builder.0.request.set_page_token(token);
4516 builder.send()
4517 };
4518 google_cloud_gax::paginator::internal::new_paginator(token, execute)
4519 }
4520
4521 pub fn by_item(
4523 self,
4524 ) -> impl google_cloud_gax::paginator::ItemPaginator<
4525 crate::model::ListInsightsConfigsResponse,
4526 crate::Error,
4527 > {
4528 use google_cloud_gax::paginator::Paginator;
4529 self.by_page().items()
4530 }
4531
4532 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4536 self.0.request.parent = v.into();
4537 self
4538 }
4539
4540 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4542 self.0.request.page_size = v.into();
4543 self
4544 }
4545
4546 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4548 self.0.request.page_token = v.into();
4549 self
4550 }
4551
4552 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4554 self.0.request.filter = v.into();
4555 self
4556 }
4557
4558 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
4560 self.0.request.order_by = v.into();
4561 self
4562 }
4563 }
4564
4565 #[doc(hidden)]
4566 impl crate::RequestBuilder for ListInsightsConfigs {
4567 fn request_options(&mut self) -> &mut crate::RequestOptions {
4568 &mut self.0.options
4569 }
4570 }
4571
4572 #[derive(Clone, Debug)]
4590 pub struct CreateInsightsConfig(RequestBuilder<crate::model::CreateInsightsConfigRequest>);
4591
4592 impl CreateInsightsConfig {
4593 pub(crate) fn new(
4594 stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
4595 ) -> Self {
4596 Self(RequestBuilder::new(stub))
4597 }
4598
4599 pub fn with_request<V: Into<crate::model::CreateInsightsConfigRequest>>(
4601 mut self,
4602 v: V,
4603 ) -> Self {
4604 self.0.request = v.into();
4605 self
4606 }
4607
4608 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4610 self.0.options = v.into();
4611 self
4612 }
4613
4614 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4621 (*self.0.stub)
4622 .create_insights_config(self.0.request, self.0.options)
4623 .await
4624 .map(crate::Response::into_body)
4625 }
4626
4627 pub fn poller(
4629 self,
4630 ) -> impl google_cloud_lro::Poller<crate::model::InsightsConfig, crate::model::OperationMetadata>
4631 {
4632 type Operation = google_cloud_lro::internal::Operation<
4633 crate::model::InsightsConfig,
4634 crate::model::OperationMetadata,
4635 >;
4636 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4637 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4638 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4639 if let Some(ref mut details) = poller_options.tracing {
4640 details.method_name = "google_cloud_developerconnect_v1::client::InsightsConfigService::create_insights_config::until_done";
4641 }
4642
4643 let stub = self.0.stub.clone();
4644 let mut options = self.0.options.clone();
4645 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4646 let query = move |name| {
4647 let stub = stub.clone();
4648 let options = options.clone();
4649 async {
4650 let op = GetOperation::new(stub)
4651 .set_name(name)
4652 .with_options(options)
4653 .send()
4654 .await?;
4655 Ok(Operation::new(op))
4656 }
4657 };
4658
4659 let start = move || async {
4660 let op = self.send().await?;
4661 Ok(Operation::new(op))
4662 };
4663
4664 use google_cloud_lro::internal::PollerExt;
4665 {
4666 google_cloud_lro::internal::new_poller(
4667 polling_error_policy,
4668 polling_backoff_policy,
4669 start,
4670 query,
4671 )
4672 }
4673 .with_options(poller_options)
4674 }
4675
4676 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4680 self.0.request.parent = v.into();
4681 self
4682 }
4683
4684 pub fn set_insights_config_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4688 self.0.request.insights_config_id = v.into();
4689 self
4690 }
4691
4692 pub fn set_insights_config<T>(mut self, v: T) -> Self
4696 where
4697 T: std::convert::Into<crate::model::InsightsConfig>,
4698 {
4699 self.0.request.insights_config = std::option::Option::Some(v.into());
4700 self
4701 }
4702
4703 pub fn set_or_clear_insights_config<T>(mut self, v: std::option::Option<T>) -> Self
4707 where
4708 T: std::convert::Into<crate::model::InsightsConfig>,
4709 {
4710 self.0.request.insights_config = v.map(|x| x.into());
4711 self
4712 }
4713
4714 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
4716 self.0.request.validate_only = v.into();
4717 self
4718 }
4719 }
4720
4721 #[doc(hidden)]
4722 impl crate::RequestBuilder for CreateInsightsConfig {
4723 fn request_options(&mut self) -> &mut crate::RequestOptions {
4724 &mut self.0.options
4725 }
4726 }
4727
4728 #[derive(Clone, Debug)]
4745 pub struct GetInsightsConfig(RequestBuilder<crate::model::GetInsightsConfigRequest>);
4746
4747 impl GetInsightsConfig {
4748 pub(crate) fn new(
4749 stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
4750 ) -> Self {
4751 Self(RequestBuilder::new(stub))
4752 }
4753
4754 pub fn with_request<V: Into<crate::model::GetInsightsConfigRequest>>(
4756 mut self,
4757 v: V,
4758 ) -> Self {
4759 self.0.request = v.into();
4760 self
4761 }
4762
4763 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4765 self.0.options = v.into();
4766 self
4767 }
4768
4769 pub async fn send(self) -> Result<crate::model::InsightsConfig> {
4771 (*self.0.stub)
4772 .get_insights_config(self.0.request, self.0.options)
4773 .await
4774 .map(crate::Response::into_body)
4775 }
4776
4777 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4781 self.0.request.name = v.into();
4782 self
4783 }
4784 }
4785
4786 #[doc(hidden)]
4787 impl crate::RequestBuilder for GetInsightsConfig {
4788 fn request_options(&mut self) -> &mut crate::RequestOptions {
4789 &mut self.0.options
4790 }
4791 }
4792
4793 #[derive(Clone, Debug)]
4811 pub struct UpdateInsightsConfig(RequestBuilder<crate::model::UpdateInsightsConfigRequest>);
4812
4813 impl UpdateInsightsConfig {
4814 pub(crate) fn new(
4815 stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
4816 ) -> Self {
4817 Self(RequestBuilder::new(stub))
4818 }
4819
4820 pub fn with_request<V: Into<crate::model::UpdateInsightsConfigRequest>>(
4822 mut self,
4823 v: V,
4824 ) -> Self {
4825 self.0.request = v.into();
4826 self
4827 }
4828
4829 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4831 self.0.options = v.into();
4832 self
4833 }
4834
4835 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4842 (*self.0.stub)
4843 .update_insights_config(self.0.request, self.0.options)
4844 .await
4845 .map(crate::Response::into_body)
4846 }
4847
4848 pub fn poller(
4850 self,
4851 ) -> impl google_cloud_lro::Poller<crate::model::InsightsConfig, crate::model::OperationMetadata>
4852 {
4853 type Operation = google_cloud_lro::internal::Operation<
4854 crate::model::InsightsConfig,
4855 crate::model::OperationMetadata,
4856 >;
4857 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4858 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4859 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4860 if let Some(ref mut details) = poller_options.tracing {
4861 details.method_name = "google_cloud_developerconnect_v1::client::InsightsConfigService::update_insights_config::until_done";
4862 }
4863
4864 let stub = self.0.stub.clone();
4865 let mut options = self.0.options.clone();
4866 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4867 let query = move |name| {
4868 let stub = stub.clone();
4869 let options = options.clone();
4870 async {
4871 let op = GetOperation::new(stub)
4872 .set_name(name)
4873 .with_options(options)
4874 .send()
4875 .await?;
4876 Ok(Operation::new(op))
4877 }
4878 };
4879
4880 let start = move || async {
4881 let op = self.send().await?;
4882 Ok(Operation::new(op))
4883 };
4884
4885 use google_cloud_lro::internal::PollerExt;
4886 {
4887 google_cloud_lro::internal::new_poller(
4888 polling_error_policy,
4889 polling_backoff_policy,
4890 start,
4891 query,
4892 )
4893 }
4894 .with_options(poller_options)
4895 }
4896
4897 pub fn set_insights_config<T>(mut self, v: T) -> Self
4901 where
4902 T: std::convert::Into<crate::model::InsightsConfig>,
4903 {
4904 self.0.request.insights_config = std::option::Option::Some(v.into());
4905 self
4906 }
4907
4908 pub fn set_or_clear_insights_config<T>(mut self, v: std::option::Option<T>) -> Self
4912 where
4913 T: std::convert::Into<crate::model::InsightsConfig>,
4914 {
4915 self.0.request.insights_config = v.map(|x| x.into());
4916 self
4917 }
4918
4919 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4921 self.0.request.request_id = v.into();
4922 self
4923 }
4924
4925 pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
4927 self.0.request.allow_missing = v.into();
4928 self
4929 }
4930
4931 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
4933 self.0.request.validate_only = v.into();
4934 self
4935 }
4936 }
4937
4938 #[doc(hidden)]
4939 impl crate::RequestBuilder for UpdateInsightsConfig {
4940 fn request_options(&mut self) -> &mut crate::RequestOptions {
4941 &mut self.0.options
4942 }
4943 }
4944
4945 #[derive(Clone, Debug)]
4963 pub struct DeleteInsightsConfig(RequestBuilder<crate::model::DeleteInsightsConfigRequest>);
4964
4965 impl DeleteInsightsConfig {
4966 pub(crate) fn new(
4967 stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
4968 ) -> Self {
4969 Self(RequestBuilder::new(stub))
4970 }
4971
4972 pub fn with_request<V: Into<crate::model::DeleteInsightsConfigRequest>>(
4974 mut self,
4975 v: V,
4976 ) -> Self {
4977 self.0.request = v.into();
4978 self
4979 }
4980
4981 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4983 self.0.options = v.into();
4984 self
4985 }
4986
4987 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4994 (*self.0.stub)
4995 .delete_insights_config(self.0.request, self.0.options)
4996 .await
4997 .map(crate::Response::into_body)
4998 }
4999
5000 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
5002 type Operation =
5003 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
5004 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5005 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5006 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5007 if let Some(ref mut details) = poller_options.tracing {
5008 details.method_name = "google_cloud_developerconnect_v1::client::InsightsConfigService::delete_insights_config::until_done";
5009 }
5010
5011 let stub = self.0.stub.clone();
5012 let mut options = self.0.options.clone();
5013 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5014 let query = move |name| {
5015 let stub = stub.clone();
5016 let options = options.clone();
5017 async {
5018 let op = GetOperation::new(stub)
5019 .set_name(name)
5020 .with_options(options)
5021 .send()
5022 .await?;
5023 Ok(Operation::new(op))
5024 }
5025 };
5026
5027 let start = move || async {
5028 let op = self.send().await?;
5029 Ok(Operation::new(op))
5030 };
5031
5032 use google_cloud_lro::internal::PollerExt;
5033 {
5034 google_cloud_lro::internal::new_unit_response_poller(
5035 polling_error_policy,
5036 polling_backoff_policy,
5037 start,
5038 query,
5039 )
5040 }
5041 .with_options(poller_options)
5042 }
5043
5044 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5048 self.0.request.name = v.into();
5049 self
5050 }
5051
5052 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5054 self.0.request.request_id = v.into();
5055 self
5056 }
5057
5058 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
5060 self.0.request.validate_only = v.into();
5061 self
5062 }
5063
5064 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
5066 self.0.request.etag = v.into();
5067 self
5068 }
5069 }
5070
5071 #[doc(hidden)]
5072 impl crate::RequestBuilder for DeleteInsightsConfig {
5073 fn request_options(&mut self) -> &mut crate::RequestOptions {
5074 &mut self.0.options
5075 }
5076 }
5077
5078 #[derive(Clone, Debug)]
5095 pub struct GetDeploymentEvent(RequestBuilder<crate::model::GetDeploymentEventRequest>);
5096
5097 impl GetDeploymentEvent {
5098 pub(crate) fn new(
5099 stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
5100 ) -> Self {
5101 Self(RequestBuilder::new(stub))
5102 }
5103
5104 pub fn with_request<V: Into<crate::model::GetDeploymentEventRequest>>(
5106 mut self,
5107 v: V,
5108 ) -> Self {
5109 self.0.request = v.into();
5110 self
5111 }
5112
5113 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5115 self.0.options = v.into();
5116 self
5117 }
5118
5119 pub async fn send(self) -> Result<crate::model::DeploymentEvent> {
5121 (*self.0.stub)
5122 .get_deployment_event(self.0.request, self.0.options)
5123 .await
5124 .map(crate::Response::into_body)
5125 }
5126
5127 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5131 self.0.request.name = v.into();
5132 self
5133 }
5134 }
5135
5136 #[doc(hidden)]
5137 impl crate::RequestBuilder for GetDeploymentEvent {
5138 fn request_options(&mut self) -> &mut crate::RequestOptions {
5139 &mut self.0.options
5140 }
5141 }
5142
5143 #[derive(Clone, Debug)]
5164 pub struct ListDeploymentEvents(RequestBuilder<crate::model::ListDeploymentEventsRequest>);
5165
5166 impl ListDeploymentEvents {
5167 pub(crate) fn new(
5168 stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
5169 ) -> Self {
5170 Self(RequestBuilder::new(stub))
5171 }
5172
5173 pub fn with_request<V: Into<crate::model::ListDeploymentEventsRequest>>(
5175 mut self,
5176 v: V,
5177 ) -> Self {
5178 self.0.request = v.into();
5179 self
5180 }
5181
5182 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5184 self.0.options = v.into();
5185 self
5186 }
5187
5188 pub async fn send(self) -> Result<crate::model::ListDeploymentEventsResponse> {
5190 (*self.0.stub)
5191 .list_deployment_events(self.0.request, self.0.options)
5192 .await
5193 .map(crate::Response::into_body)
5194 }
5195
5196 pub fn by_page(
5198 self,
5199 ) -> impl google_cloud_gax::paginator::Paginator<
5200 crate::model::ListDeploymentEventsResponse,
5201 crate::Error,
5202 > {
5203 use std::clone::Clone;
5204 let token = self.0.request.page_token.clone();
5205 let execute = move |token: String| {
5206 let mut builder = self.clone();
5207 builder.0.request = builder.0.request.set_page_token(token);
5208 builder.send()
5209 };
5210 google_cloud_gax::paginator::internal::new_paginator(token, execute)
5211 }
5212
5213 pub fn by_item(
5215 self,
5216 ) -> impl google_cloud_gax::paginator::ItemPaginator<
5217 crate::model::ListDeploymentEventsResponse,
5218 crate::Error,
5219 > {
5220 use google_cloud_gax::paginator::Paginator;
5221 self.by_page().items()
5222 }
5223
5224 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5228 self.0.request.parent = v.into();
5229 self
5230 }
5231
5232 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5234 self.0.request.page_size = v.into();
5235 self
5236 }
5237
5238 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5240 self.0.request.page_token = v.into();
5241 self
5242 }
5243
5244 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5246 self.0.request.filter = v.into();
5247 self
5248 }
5249 }
5250
5251 #[doc(hidden)]
5252 impl crate::RequestBuilder for ListDeploymentEvents {
5253 fn request_options(&mut self) -> &mut crate::RequestOptions {
5254 &mut self.0.options
5255 }
5256 }
5257
5258 #[derive(Clone, Debug)]
5279 pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
5280
5281 impl ListLocations {
5282 pub(crate) fn new(
5283 stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
5284 ) -> Self {
5285 Self(RequestBuilder::new(stub))
5286 }
5287
5288 pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
5290 mut self,
5291 v: V,
5292 ) -> Self {
5293 self.0.request = v.into();
5294 self
5295 }
5296
5297 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5299 self.0.options = v.into();
5300 self
5301 }
5302
5303 pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
5305 (*self.0.stub)
5306 .list_locations(self.0.request, self.0.options)
5307 .await
5308 .map(crate::Response::into_body)
5309 }
5310
5311 pub fn by_page(
5313 self,
5314 ) -> impl google_cloud_gax::paginator::Paginator<
5315 google_cloud_location::model::ListLocationsResponse,
5316 crate::Error,
5317 > {
5318 use std::clone::Clone;
5319 let token = self.0.request.page_token.clone();
5320 let execute = move |token: String| {
5321 let mut builder = self.clone();
5322 builder.0.request = builder.0.request.set_page_token(token);
5323 builder.send()
5324 };
5325 google_cloud_gax::paginator::internal::new_paginator(token, execute)
5326 }
5327
5328 pub fn by_item(
5330 self,
5331 ) -> impl google_cloud_gax::paginator::ItemPaginator<
5332 google_cloud_location::model::ListLocationsResponse,
5333 crate::Error,
5334 > {
5335 use google_cloud_gax::paginator::Paginator;
5336 self.by_page().items()
5337 }
5338
5339 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5341 self.0.request.name = v.into();
5342 self
5343 }
5344
5345 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5347 self.0.request.filter = v.into();
5348 self
5349 }
5350
5351 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5353 self.0.request.page_size = v.into();
5354 self
5355 }
5356
5357 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5359 self.0.request.page_token = v.into();
5360 self
5361 }
5362 }
5363
5364 #[doc(hidden)]
5365 impl crate::RequestBuilder for ListLocations {
5366 fn request_options(&mut self) -> &mut crate::RequestOptions {
5367 &mut self.0.options
5368 }
5369 }
5370
5371 #[derive(Clone, Debug)]
5388 pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
5389
5390 impl GetLocation {
5391 pub(crate) fn new(
5392 stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
5393 ) -> Self {
5394 Self(RequestBuilder::new(stub))
5395 }
5396
5397 pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
5399 mut self,
5400 v: V,
5401 ) -> Self {
5402 self.0.request = v.into();
5403 self
5404 }
5405
5406 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5408 self.0.options = v.into();
5409 self
5410 }
5411
5412 pub async fn send(self) -> Result<google_cloud_location::model::Location> {
5414 (*self.0.stub)
5415 .get_location(self.0.request, self.0.options)
5416 .await
5417 .map(crate::Response::into_body)
5418 }
5419
5420 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5422 self.0.request.name = v.into();
5423 self
5424 }
5425 }
5426
5427 #[doc(hidden)]
5428 impl crate::RequestBuilder for GetLocation {
5429 fn request_options(&mut self) -> &mut crate::RequestOptions {
5430 &mut self.0.options
5431 }
5432 }
5433
5434 #[derive(Clone, Debug)]
5455 pub struct ListOperations(
5456 RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
5457 );
5458
5459 impl ListOperations {
5460 pub(crate) fn new(
5461 stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
5462 ) -> Self {
5463 Self(RequestBuilder::new(stub))
5464 }
5465
5466 pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
5468 mut self,
5469 v: V,
5470 ) -> Self {
5471 self.0.request = v.into();
5472 self
5473 }
5474
5475 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5477 self.0.options = v.into();
5478 self
5479 }
5480
5481 pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
5483 (*self.0.stub)
5484 .list_operations(self.0.request, self.0.options)
5485 .await
5486 .map(crate::Response::into_body)
5487 }
5488
5489 pub fn by_page(
5491 self,
5492 ) -> impl google_cloud_gax::paginator::Paginator<
5493 google_cloud_longrunning::model::ListOperationsResponse,
5494 crate::Error,
5495 > {
5496 use std::clone::Clone;
5497 let token = self.0.request.page_token.clone();
5498 let execute = move |token: String| {
5499 let mut builder = self.clone();
5500 builder.0.request = builder.0.request.set_page_token(token);
5501 builder.send()
5502 };
5503 google_cloud_gax::paginator::internal::new_paginator(token, execute)
5504 }
5505
5506 pub fn by_item(
5508 self,
5509 ) -> impl google_cloud_gax::paginator::ItemPaginator<
5510 google_cloud_longrunning::model::ListOperationsResponse,
5511 crate::Error,
5512 > {
5513 use google_cloud_gax::paginator::Paginator;
5514 self.by_page().items()
5515 }
5516
5517 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5519 self.0.request.name = v.into();
5520 self
5521 }
5522
5523 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5525 self.0.request.filter = v.into();
5526 self
5527 }
5528
5529 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5531 self.0.request.page_size = v.into();
5532 self
5533 }
5534
5535 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5537 self.0.request.page_token = v.into();
5538 self
5539 }
5540
5541 pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
5543 self.0.request.return_partial_success = v.into();
5544 self
5545 }
5546 }
5547
5548 #[doc(hidden)]
5549 impl crate::RequestBuilder for ListOperations {
5550 fn request_options(&mut self) -> &mut crate::RequestOptions {
5551 &mut self.0.options
5552 }
5553 }
5554
5555 #[derive(Clone, Debug)]
5572 pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
5573
5574 impl GetOperation {
5575 pub(crate) fn new(
5576 stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
5577 ) -> Self {
5578 Self(RequestBuilder::new(stub))
5579 }
5580
5581 pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
5583 mut self,
5584 v: V,
5585 ) -> Self {
5586 self.0.request = v.into();
5587 self
5588 }
5589
5590 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5592 self.0.options = v.into();
5593 self
5594 }
5595
5596 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5598 (*self.0.stub)
5599 .get_operation(self.0.request, self.0.options)
5600 .await
5601 .map(crate::Response::into_body)
5602 }
5603
5604 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5606 self.0.request.name = v.into();
5607 self
5608 }
5609 }
5610
5611 #[doc(hidden)]
5612 impl crate::RequestBuilder for GetOperation {
5613 fn request_options(&mut self) -> &mut crate::RequestOptions {
5614 &mut self.0.options
5615 }
5616 }
5617
5618 #[derive(Clone, Debug)]
5635 pub struct DeleteOperation(
5636 RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
5637 );
5638
5639 impl DeleteOperation {
5640 pub(crate) fn new(
5641 stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
5642 ) -> Self {
5643 Self(RequestBuilder::new(stub))
5644 }
5645
5646 pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
5648 mut self,
5649 v: V,
5650 ) -> Self {
5651 self.0.request = v.into();
5652 self
5653 }
5654
5655 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5657 self.0.options = v.into();
5658 self
5659 }
5660
5661 pub async fn send(self) -> Result<()> {
5663 (*self.0.stub)
5664 .delete_operation(self.0.request, self.0.options)
5665 .await
5666 .map(crate::Response::into_body)
5667 }
5668
5669 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5671 self.0.request.name = v.into();
5672 self
5673 }
5674 }
5675
5676 #[doc(hidden)]
5677 impl crate::RequestBuilder for DeleteOperation {
5678 fn request_options(&mut self) -> &mut crate::RequestOptions {
5679 &mut self.0.options
5680 }
5681 }
5682
5683 #[derive(Clone, Debug)]
5700 pub struct CancelOperation(
5701 RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
5702 );
5703
5704 impl CancelOperation {
5705 pub(crate) fn new(
5706 stub: std::sync::Arc<dyn super::super::stub::dynamic::InsightsConfigService>,
5707 ) -> Self {
5708 Self(RequestBuilder::new(stub))
5709 }
5710
5711 pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
5713 mut self,
5714 v: V,
5715 ) -> Self {
5716 self.0.request = v.into();
5717 self
5718 }
5719
5720 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5722 self.0.options = v.into();
5723 self
5724 }
5725
5726 pub async fn send(self) -> Result<()> {
5728 (*self.0.stub)
5729 .cancel_operation(self.0.request, self.0.options)
5730 .await
5731 .map(crate::Response::into_body)
5732 }
5733
5734 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5736 self.0.request.name = v.into();
5737 self
5738 }
5739 }
5740
5741 #[doc(hidden)]
5742 impl crate::RequestBuilder for CancelOperation {
5743 fn request_options(&mut self) -> &mut crate::RequestOptions {
5744 &mut self.0.options
5745 }
5746 }
5747}