1pub mod secure_source_manager {
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::SecureSourceManager;
38 pub struct Factory;
39 impl crate::ClientFactory for Factory {
40 type Client = SecureSourceManager;
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::SecureSourceManager>,
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::SecureSourceManager>,
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 ListInstances(RequestBuilder<crate::model::ListInstancesRequest>);
96
97 impl ListInstances {
98 pub(crate) fn new(
99 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
100 ) -> Self {
101 Self(RequestBuilder::new(stub))
102 }
103
104 pub fn with_request<V: Into<crate::model::ListInstancesRequest>>(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::ListInstancesResponse> {
118 (*self.0.stub)
119 .list_instances(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<crate::model::ListInstancesResponse, crate::Error>
128 {
129 use std::clone::Clone;
130 let token = self.0.request.page_token.clone();
131 let execute = move |token: String| {
132 let mut builder = self.clone();
133 builder.0.request = builder.0.request.set_page_token(token);
134 builder.send()
135 };
136 google_cloud_gax::paginator::internal::new_paginator(token, execute)
137 }
138
139 pub fn by_item(
141 self,
142 ) -> impl google_cloud_gax::paginator::ItemPaginator<
143 crate::model::ListInstancesResponse,
144 crate::Error,
145 > {
146 use google_cloud_gax::paginator::Paginator;
147 self.by_page().items()
148 }
149
150 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
154 self.0.request.parent = v.into();
155 self
156 }
157
158 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
160 self.0.request.page_size = v.into();
161 self
162 }
163
164 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
166 self.0.request.page_token = v.into();
167 self
168 }
169
170 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
172 self.0.request.filter = v.into();
173 self
174 }
175
176 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
178 self.0.request.order_by = v.into();
179 self
180 }
181 }
182
183 #[doc(hidden)]
184 impl crate::RequestBuilder for ListInstances {
185 fn request_options(&mut self) -> &mut crate::RequestOptions {
186 &mut self.0.options
187 }
188 }
189
190 #[derive(Clone, Debug)]
207 pub struct GetInstance(RequestBuilder<crate::model::GetInstanceRequest>);
208
209 impl GetInstance {
210 pub(crate) fn new(
211 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
212 ) -> Self {
213 Self(RequestBuilder::new(stub))
214 }
215
216 pub fn with_request<V: Into<crate::model::GetInstanceRequest>>(mut self, v: V) -> Self {
218 self.0.request = v.into();
219 self
220 }
221
222 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
224 self.0.options = v.into();
225 self
226 }
227
228 pub async fn send(self) -> Result<crate::model::Instance> {
230 (*self.0.stub)
231 .get_instance(self.0.request, self.0.options)
232 .await
233 .map(crate::Response::into_body)
234 }
235
236 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
240 self.0.request.name = v.into();
241 self
242 }
243 }
244
245 #[doc(hidden)]
246 impl crate::RequestBuilder for GetInstance {
247 fn request_options(&mut self) -> &mut crate::RequestOptions {
248 &mut self.0.options
249 }
250 }
251
252 #[derive(Clone, Debug)]
270 pub struct CreateInstance(RequestBuilder<crate::model::CreateInstanceRequest>);
271
272 impl CreateInstance {
273 pub(crate) fn new(
274 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
275 ) -> Self {
276 Self(RequestBuilder::new(stub))
277 }
278
279 pub fn with_request<V: Into<crate::model::CreateInstanceRequest>>(mut self, v: V) -> Self {
281 self.0.request = v.into();
282 self
283 }
284
285 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
287 self.0.options = v.into();
288 self
289 }
290
291 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
298 (*self.0.stub)
299 .create_instance(self.0.request, self.0.options)
300 .await
301 .map(crate::Response::into_body)
302 }
303
304 pub fn poller(
306 self,
307 ) -> impl google_cloud_lro::Poller<crate::model::Instance, crate::model::OperationMetadata>
308 {
309 type Operation = google_cloud_lro::internal::Operation<
310 crate::model::Instance,
311 crate::model::OperationMetadata,
312 >;
313 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
314 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
315 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
316 if let Some(ref mut details) = poller_options.tracing {
317 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::create_instance::until_done";
318 }
319
320 let stub = self.0.stub.clone();
321 let mut options = self.0.options.clone();
322 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
323 let query = move |name| {
324 let stub = stub.clone();
325 let options = options.clone();
326 async {
327 let op = GetOperation::new(stub)
328 .set_name(name)
329 .with_options(options)
330 .send()
331 .await?;
332 Ok(Operation::new(op))
333 }
334 };
335
336 let start = move || async {
337 let op = self.send().await?;
338 Ok(Operation::new(op))
339 };
340
341 use google_cloud_lro::internal::PollerExt;
342 {
343 google_cloud_lro::internal::new_poller(
344 polling_error_policy,
345 polling_backoff_policy,
346 start,
347 query,
348 )
349 }
350 .with_options(poller_options)
351 }
352
353 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
357 self.0.request.parent = v.into();
358 self
359 }
360
361 pub fn set_instance_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
365 self.0.request.instance_id = v.into();
366 self
367 }
368
369 pub fn set_instance<T>(mut self, v: T) -> Self
373 where
374 T: std::convert::Into<crate::model::Instance>,
375 {
376 self.0.request.instance = std::option::Option::Some(v.into());
377 self
378 }
379
380 pub fn set_or_clear_instance<T>(mut self, v: std::option::Option<T>) -> Self
384 where
385 T: std::convert::Into<crate::model::Instance>,
386 {
387 self.0.request.instance = v.map(|x| x.into());
388 self
389 }
390
391 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
393 self.0.request.request_id = v.into();
394 self
395 }
396 }
397
398 #[doc(hidden)]
399 impl crate::RequestBuilder for CreateInstance {
400 fn request_options(&mut self) -> &mut crate::RequestOptions {
401 &mut self.0.options
402 }
403 }
404
405 #[derive(Clone, Debug)]
423 pub struct DeleteInstance(RequestBuilder<crate::model::DeleteInstanceRequest>);
424
425 impl DeleteInstance {
426 pub(crate) fn new(
427 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
428 ) -> Self {
429 Self(RequestBuilder::new(stub))
430 }
431
432 pub fn with_request<V: Into<crate::model::DeleteInstanceRequest>>(mut self, v: V) -> Self {
434 self.0.request = v.into();
435 self
436 }
437
438 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
440 self.0.options = v.into();
441 self
442 }
443
444 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
451 (*self.0.stub)
452 .delete_instance(self.0.request, self.0.options)
453 .await
454 .map(crate::Response::into_body)
455 }
456
457 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
459 type Operation =
460 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
461 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
462 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
463 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
464 if let Some(ref mut details) = poller_options.tracing {
465 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::delete_instance::until_done";
466 }
467
468 let stub = self.0.stub.clone();
469 let mut options = self.0.options.clone();
470 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
471 let query = move |name| {
472 let stub = stub.clone();
473 let options = options.clone();
474 async {
475 let op = GetOperation::new(stub)
476 .set_name(name)
477 .with_options(options)
478 .send()
479 .await?;
480 Ok(Operation::new(op))
481 }
482 };
483
484 let start = move || async {
485 let op = self.send().await?;
486 Ok(Operation::new(op))
487 };
488
489 use google_cloud_lro::internal::PollerExt;
490 {
491 google_cloud_lro::internal::new_unit_response_poller(
492 polling_error_policy,
493 polling_backoff_policy,
494 start,
495 query,
496 )
497 }
498 .with_options(poller_options)
499 }
500
501 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
505 self.0.request.name = v.into();
506 self
507 }
508
509 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
511 self.0.request.request_id = v.into();
512 self
513 }
514
515 pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
517 self.0.request.force = v.into();
518 self
519 }
520 }
521
522 #[doc(hidden)]
523 impl crate::RequestBuilder for DeleteInstance {
524 fn request_options(&mut self) -> &mut crate::RequestOptions {
525 &mut self.0.options
526 }
527 }
528
529 #[derive(Clone, Debug)]
550 pub struct ListRepositories(RequestBuilder<crate::model::ListRepositoriesRequest>);
551
552 impl ListRepositories {
553 pub(crate) fn new(
554 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
555 ) -> Self {
556 Self(RequestBuilder::new(stub))
557 }
558
559 pub fn with_request<V: Into<crate::model::ListRepositoriesRequest>>(
561 mut self,
562 v: V,
563 ) -> Self {
564 self.0.request = v.into();
565 self
566 }
567
568 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
570 self.0.options = v.into();
571 self
572 }
573
574 pub async fn send(self) -> Result<crate::model::ListRepositoriesResponse> {
576 (*self.0.stub)
577 .list_repositories(self.0.request, self.0.options)
578 .await
579 .map(crate::Response::into_body)
580 }
581
582 pub fn by_page(
584 self,
585 ) -> impl google_cloud_gax::paginator::Paginator<
586 crate::model::ListRepositoriesResponse,
587 crate::Error,
588 > {
589 use std::clone::Clone;
590 let token = self.0.request.page_token.clone();
591 let execute = move |token: String| {
592 let mut builder = self.clone();
593 builder.0.request = builder.0.request.set_page_token(token);
594 builder.send()
595 };
596 google_cloud_gax::paginator::internal::new_paginator(token, execute)
597 }
598
599 pub fn by_item(
601 self,
602 ) -> impl google_cloud_gax::paginator::ItemPaginator<
603 crate::model::ListRepositoriesResponse,
604 crate::Error,
605 > {
606 use google_cloud_gax::paginator::Paginator;
607 self.by_page().items()
608 }
609
610 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
614 self.0.request.parent = v.into();
615 self
616 }
617
618 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
620 self.0.request.page_size = v.into();
621 self
622 }
623
624 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
626 self.0.request.page_token = v.into();
627 self
628 }
629
630 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
632 self.0.request.filter = v.into();
633 self
634 }
635
636 pub fn set_instance<T: Into<std::string::String>>(mut self, v: T) -> Self {
638 self.0.request.instance = v.into();
639 self
640 }
641 }
642
643 #[doc(hidden)]
644 impl crate::RequestBuilder for ListRepositories {
645 fn request_options(&mut self) -> &mut crate::RequestOptions {
646 &mut self.0.options
647 }
648 }
649
650 #[derive(Clone, Debug)]
667 pub struct GetRepository(RequestBuilder<crate::model::GetRepositoryRequest>);
668
669 impl GetRepository {
670 pub(crate) fn new(
671 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
672 ) -> Self {
673 Self(RequestBuilder::new(stub))
674 }
675
676 pub fn with_request<V: Into<crate::model::GetRepositoryRequest>>(mut self, v: V) -> Self {
678 self.0.request = v.into();
679 self
680 }
681
682 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
684 self.0.options = v.into();
685 self
686 }
687
688 pub async fn send(self) -> Result<crate::model::Repository> {
690 (*self.0.stub)
691 .get_repository(self.0.request, self.0.options)
692 .await
693 .map(crate::Response::into_body)
694 }
695
696 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
700 self.0.request.name = v.into();
701 self
702 }
703 }
704
705 #[doc(hidden)]
706 impl crate::RequestBuilder for GetRepository {
707 fn request_options(&mut self) -> &mut crate::RequestOptions {
708 &mut self.0.options
709 }
710 }
711
712 #[derive(Clone, Debug)]
730 pub struct CreateRepository(RequestBuilder<crate::model::CreateRepositoryRequest>);
731
732 impl CreateRepository {
733 pub(crate) fn new(
734 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
735 ) -> Self {
736 Self(RequestBuilder::new(stub))
737 }
738
739 pub fn with_request<V: Into<crate::model::CreateRepositoryRequest>>(
741 mut self,
742 v: V,
743 ) -> Self {
744 self.0.request = v.into();
745 self
746 }
747
748 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
750 self.0.options = v.into();
751 self
752 }
753
754 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
761 (*self.0.stub)
762 .create_repository(self.0.request, self.0.options)
763 .await
764 .map(crate::Response::into_body)
765 }
766
767 pub fn poller(
769 self,
770 ) -> impl google_cloud_lro::Poller<crate::model::Repository, crate::model::OperationMetadata>
771 {
772 type Operation = google_cloud_lro::internal::Operation<
773 crate::model::Repository,
774 crate::model::OperationMetadata,
775 >;
776 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
777 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
778 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
779 if let Some(ref mut details) = poller_options.tracing {
780 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::create_repository::until_done";
781 }
782
783 let stub = self.0.stub.clone();
784 let mut options = self.0.options.clone();
785 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
786 let query = move |name| {
787 let stub = stub.clone();
788 let options = options.clone();
789 async {
790 let op = GetOperation::new(stub)
791 .set_name(name)
792 .with_options(options)
793 .send()
794 .await?;
795 Ok(Operation::new(op))
796 }
797 };
798
799 let start = move || async {
800 let op = self.send().await?;
801 Ok(Operation::new(op))
802 };
803
804 use google_cloud_lro::internal::PollerExt;
805 {
806 google_cloud_lro::internal::new_poller(
807 polling_error_policy,
808 polling_backoff_policy,
809 start,
810 query,
811 )
812 }
813 .with_options(poller_options)
814 }
815
816 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
820 self.0.request.parent = v.into();
821 self
822 }
823
824 pub fn set_repository<T>(mut self, v: T) -> Self
828 where
829 T: std::convert::Into<crate::model::Repository>,
830 {
831 self.0.request.repository = std::option::Option::Some(v.into());
832 self
833 }
834
835 pub fn set_or_clear_repository<T>(mut self, v: std::option::Option<T>) -> Self
839 where
840 T: std::convert::Into<crate::model::Repository>,
841 {
842 self.0.request.repository = v.map(|x| x.into());
843 self
844 }
845
846 pub fn set_repository_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
850 self.0.request.repository_id = v.into();
851 self
852 }
853 }
854
855 #[doc(hidden)]
856 impl crate::RequestBuilder for CreateRepository {
857 fn request_options(&mut self) -> &mut crate::RequestOptions {
858 &mut self.0.options
859 }
860 }
861
862 #[derive(Clone, Debug)]
880 pub struct UpdateRepository(RequestBuilder<crate::model::UpdateRepositoryRequest>);
881
882 impl UpdateRepository {
883 pub(crate) fn new(
884 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
885 ) -> Self {
886 Self(RequestBuilder::new(stub))
887 }
888
889 pub fn with_request<V: Into<crate::model::UpdateRepositoryRequest>>(
891 mut self,
892 v: V,
893 ) -> Self {
894 self.0.request = v.into();
895 self
896 }
897
898 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
900 self.0.options = v.into();
901 self
902 }
903
904 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
911 (*self.0.stub)
912 .update_repository(self.0.request, self.0.options)
913 .await
914 .map(crate::Response::into_body)
915 }
916
917 pub fn poller(
919 self,
920 ) -> impl google_cloud_lro::Poller<crate::model::Repository, crate::model::OperationMetadata>
921 {
922 type Operation = google_cloud_lro::internal::Operation<
923 crate::model::Repository,
924 crate::model::OperationMetadata,
925 >;
926 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
927 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
928 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
929 if let Some(ref mut details) = poller_options.tracing {
930 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::update_repository::until_done";
931 }
932
933 let stub = self.0.stub.clone();
934 let mut options = self.0.options.clone();
935 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
936 let query = move |name| {
937 let stub = stub.clone();
938 let options = options.clone();
939 async {
940 let op = GetOperation::new(stub)
941 .set_name(name)
942 .with_options(options)
943 .send()
944 .await?;
945 Ok(Operation::new(op))
946 }
947 };
948
949 let start = move || async {
950 let op = self.send().await?;
951 Ok(Operation::new(op))
952 };
953
954 use google_cloud_lro::internal::PollerExt;
955 {
956 google_cloud_lro::internal::new_poller(
957 polling_error_policy,
958 polling_backoff_policy,
959 start,
960 query,
961 )
962 }
963 .with_options(poller_options)
964 }
965
966 pub fn set_update_mask<T>(mut self, v: T) -> Self
968 where
969 T: std::convert::Into<wkt::FieldMask>,
970 {
971 self.0.request.update_mask = std::option::Option::Some(v.into());
972 self
973 }
974
975 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
977 where
978 T: std::convert::Into<wkt::FieldMask>,
979 {
980 self.0.request.update_mask = v.map(|x| x.into());
981 self
982 }
983
984 pub fn set_repository<T>(mut self, v: T) -> Self
988 where
989 T: std::convert::Into<crate::model::Repository>,
990 {
991 self.0.request.repository = std::option::Option::Some(v.into());
992 self
993 }
994
995 pub fn set_or_clear_repository<T>(mut self, v: std::option::Option<T>) -> Self
999 where
1000 T: std::convert::Into<crate::model::Repository>,
1001 {
1002 self.0.request.repository = v.map(|x| x.into());
1003 self
1004 }
1005
1006 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
1008 self.0.request.validate_only = v.into();
1009 self
1010 }
1011 }
1012
1013 #[doc(hidden)]
1014 impl crate::RequestBuilder for UpdateRepository {
1015 fn request_options(&mut self) -> &mut crate::RequestOptions {
1016 &mut self.0.options
1017 }
1018 }
1019
1020 #[derive(Clone, Debug)]
1038 pub struct DeleteRepository(RequestBuilder<crate::model::DeleteRepositoryRequest>);
1039
1040 impl DeleteRepository {
1041 pub(crate) fn new(
1042 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
1043 ) -> Self {
1044 Self(RequestBuilder::new(stub))
1045 }
1046
1047 pub fn with_request<V: Into<crate::model::DeleteRepositoryRequest>>(
1049 mut self,
1050 v: V,
1051 ) -> Self {
1052 self.0.request = v.into();
1053 self
1054 }
1055
1056 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1058 self.0.options = v.into();
1059 self
1060 }
1061
1062 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1069 (*self.0.stub)
1070 .delete_repository(self.0.request, self.0.options)
1071 .await
1072 .map(crate::Response::into_body)
1073 }
1074
1075 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
1077 type Operation =
1078 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
1079 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1080 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1081 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
1082 if let Some(ref mut details) = poller_options.tracing {
1083 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::delete_repository::until_done";
1084 }
1085
1086 let stub = self.0.stub.clone();
1087 let mut options = self.0.options.clone();
1088 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1089 let query = move |name| {
1090 let stub = stub.clone();
1091 let options = options.clone();
1092 async {
1093 let op = GetOperation::new(stub)
1094 .set_name(name)
1095 .with_options(options)
1096 .send()
1097 .await?;
1098 Ok(Operation::new(op))
1099 }
1100 };
1101
1102 let start = move || async {
1103 let op = self.send().await?;
1104 Ok(Operation::new(op))
1105 };
1106
1107 use google_cloud_lro::internal::PollerExt;
1108 {
1109 google_cloud_lro::internal::new_unit_response_poller(
1110 polling_error_policy,
1111 polling_backoff_policy,
1112 start,
1113 query,
1114 )
1115 }
1116 .with_options(poller_options)
1117 }
1118
1119 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1123 self.0.request.name = v.into();
1124 self
1125 }
1126
1127 pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
1129 self.0.request.allow_missing = v.into();
1130 self
1131 }
1132 }
1133
1134 #[doc(hidden)]
1135 impl crate::RequestBuilder for DeleteRepository {
1136 fn request_options(&mut self) -> &mut crate::RequestOptions {
1137 &mut self.0.options
1138 }
1139 }
1140
1141 #[derive(Clone, Debug)]
1162 pub struct ListHooks(RequestBuilder<crate::model::ListHooksRequest>);
1163
1164 impl ListHooks {
1165 pub(crate) fn new(
1166 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
1167 ) -> Self {
1168 Self(RequestBuilder::new(stub))
1169 }
1170
1171 pub fn with_request<V: Into<crate::model::ListHooksRequest>>(mut self, v: V) -> Self {
1173 self.0.request = v.into();
1174 self
1175 }
1176
1177 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1179 self.0.options = v.into();
1180 self
1181 }
1182
1183 pub async fn send(self) -> Result<crate::model::ListHooksResponse> {
1185 (*self.0.stub)
1186 .list_hooks(self.0.request, self.0.options)
1187 .await
1188 .map(crate::Response::into_body)
1189 }
1190
1191 pub fn by_page(
1193 self,
1194 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListHooksResponse, crate::Error>
1195 {
1196 use std::clone::Clone;
1197 let token = self.0.request.page_token.clone();
1198 let execute = move |token: String| {
1199 let mut builder = self.clone();
1200 builder.0.request = builder.0.request.set_page_token(token);
1201 builder.send()
1202 };
1203 google_cloud_gax::paginator::internal::new_paginator(token, execute)
1204 }
1205
1206 pub fn by_item(
1208 self,
1209 ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::ListHooksResponse, crate::Error>
1210 {
1211 use google_cloud_gax::paginator::Paginator;
1212 self.by_page().items()
1213 }
1214
1215 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1219 self.0.request.parent = v.into();
1220 self
1221 }
1222
1223 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1225 self.0.request.page_size = v.into();
1226 self
1227 }
1228
1229 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1231 self.0.request.page_token = v.into();
1232 self
1233 }
1234 }
1235
1236 #[doc(hidden)]
1237 impl crate::RequestBuilder for ListHooks {
1238 fn request_options(&mut self) -> &mut crate::RequestOptions {
1239 &mut self.0.options
1240 }
1241 }
1242
1243 #[derive(Clone, Debug)]
1260 pub struct GetHook(RequestBuilder<crate::model::GetHookRequest>);
1261
1262 impl GetHook {
1263 pub(crate) fn new(
1264 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
1265 ) -> Self {
1266 Self(RequestBuilder::new(stub))
1267 }
1268
1269 pub fn with_request<V: Into<crate::model::GetHookRequest>>(mut self, v: V) -> Self {
1271 self.0.request = v.into();
1272 self
1273 }
1274
1275 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1277 self.0.options = v.into();
1278 self
1279 }
1280
1281 pub async fn send(self) -> Result<crate::model::Hook> {
1283 (*self.0.stub)
1284 .get_hook(self.0.request, self.0.options)
1285 .await
1286 .map(crate::Response::into_body)
1287 }
1288
1289 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1293 self.0.request.name = v.into();
1294 self
1295 }
1296 }
1297
1298 #[doc(hidden)]
1299 impl crate::RequestBuilder for GetHook {
1300 fn request_options(&mut self) -> &mut crate::RequestOptions {
1301 &mut self.0.options
1302 }
1303 }
1304
1305 #[derive(Clone, Debug)]
1323 pub struct CreateHook(RequestBuilder<crate::model::CreateHookRequest>);
1324
1325 impl CreateHook {
1326 pub(crate) fn new(
1327 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
1328 ) -> Self {
1329 Self(RequestBuilder::new(stub))
1330 }
1331
1332 pub fn with_request<V: Into<crate::model::CreateHookRequest>>(mut self, v: V) -> Self {
1334 self.0.request = v.into();
1335 self
1336 }
1337
1338 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1340 self.0.options = v.into();
1341 self
1342 }
1343
1344 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1351 (*self.0.stub)
1352 .create_hook(self.0.request, self.0.options)
1353 .await
1354 .map(crate::Response::into_body)
1355 }
1356
1357 pub fn poller(
1359 self,
1360 ) -> impl google_cloud_lro::Poller<crate::model::Hook, crate::model::OperationMetadata>
1361 {
1362 type Operation = google_cloud_lro::internal::Operation<
1363 crate::model::Hook,
1364 crate::model::OperationMetadata,
1365 >;
1366 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1367 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1368 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
1369 if let Some(ref mut details) = poller_options.tracing {
1370 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::create_hook::until_done";
1371 }
1372
1373 let stub = self.0.stub.clone();
1374 let mut options = self.0.options.clone();
1375 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1376 let query = move |name| {
1377 let stub = stub.clone();
1378 let options = options.clone();
1379 async {
1380 let op = GetOperation::new(stub)
1381 .set_name(name)
1382 .with_options(options)
1383 .send()
1384 .await?;
1385 Ok(Operation::new(op))
1386 }
1387 };
1388
1389 let start = move || async {
1390 let op = self.send().await?;
1391 Ok(Operation::new(op))
1392 };
1393
1394 use google_cloud_lro::internal::PollerExt;
1395 {
1396 google_cloud_lro::internal::new_poller(
1397 polling_error_policy,
1398 polling_backoff_policy,
1399 start,
1400 query,
1401 )
1402 }
1403 .with_options(poller_options)
1404 }
1405
1406 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1410 self.0.request.parent = v.into();
1411 self
1412 }
1413
1414 pub fn set_hook<T>(mut self, v: T) -> Self
1418 where
1419 T: std::convert::Into<crate::model::Hook>,
1420 {
1421 self.0.request.hook = std::option::Option::Some(v.into());
1422 self
1423 }
1424
1425 pub fn set_or_clear_hook<T>(mut self, v: std::option::Option<T>) -> Self
1429 where
1430 T: std::convert::Into<crate::model::Hook>,
1431 {
1432 self.0.request.hook = v.map(|x| x.into());
1433 self
1434 }
1435
1436 pub fn set_hook_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1440 self.0.request.hook_id = v.into();
1441 self
1442 }
1443 }
1444
1445 #[doc(hidden)]
1446 impl crate::RequestBuilder for CreateHook {
1447 fn request_options(&mut self) -> &mut crate::RequestOptions {
1448 &mut self.0.options
1449 }
1450 }
1451
1452 #[derive(Clone, Debug)]
1470 pub struct UpdateHook(RequestBuilder<crate::model::UpdateHookRequest>);
1471
1472 impl UpdateHook {
1473 pub(crate) fn new(
1474 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
1475 ) -> Self {
1476 Self(RequestBuilder::new(stub))
1477 }
1478
1479 pub fn with_request<V: Into<crate::model::UpdateHookRequest>>(mut self, v: V) -> Self {
1481 self.0.request = v.into();
1482 self
1483 }
1484
1485 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1487 self.0.options = v.into();
1488 self
1489 }
1490
1491 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1498 (*self.0.stub)
1499 .update_hook(self.0.request, self.0.options)
1500 .await
1501 .map(crate::Response::into_body)
1502 }
1503
1504 pub fn poller(
1506 self,
1507 ) -> impl google_cloud_lro::Poller<crate::model::Hook, crate::model::OperationMetadata>
1508 {
1509 type Operation = google_cloud_lro::internal::Operation<
1510 crate::model::Hook,
1511 crate::model::OperationMetadata,
1512 >;
1513 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1514 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1515 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
1516 if let Some(ref mut details) = poller_options.tracing {
1517 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::update_hook::until_done";
1518 }
1519
1520 let stub = self.0.stub.clone();
1521 let mut options = self.0.options.clone();
1522 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1523 let query = move |name| {
1524 let stub = stub.clone();
1525 let options = options.clone();
1526 async {
1527 let op = GetOperation::new(stub)
1528 .set_name(name)
1529 .with_options(options)
1530 .send()
1531 .await?;
1532 Ok(Operation::new(op))
1533 }
1534 };
1535
1536 let start = move || async {
1537 let op = self.send().await?;
1538 Ok(Operation::new(op))
1539 };
1540
1541 use google_cloud_lro::internal::PollerExt;
1542 {
1543 google_cloud_lro::internal::new_poller(
1544 polling_error_policy,
1545 polling_backoff_policy,
1546 start,
1547 query,
1548 )
1549 }
1550 .with_options(poller_options)
1551 }
1552
1553 pub fn set_update_mask<T>(mut self, v: T) -> Self
1555 where
1556 T: std::convert::Into<wkt::FieldMask>,
1557 {
1558 self.0.request.update_mask = std::option::Option::Some(v.into());
1559 self
1560 }
1561
1562 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1564 where
1565 T: std::convert::Into<wkt::FieldMask>,
1566 {
1567 self.0.request.update_mask = v.map(|x| x.into());
1568 self
1569 }
1570
1571 pub fn set_hook<T>(mut self, v: T) -> Self
1575 where
1576 T: std::convert::Into<crate::model::Hook>,
1577 {
1578 self.0.request.hook = std::option::Option::Some(v.into());
1579 self
1580 }
1581
1582 pub fn set_or_clear_hook<T>(mut self, v: std::option::Option<T>) -> Self
1586 where
1587 T: std::convert::Into<crate::model::Hook>,
1588 {
1589 self.0.request.hook = v.map(|x| x.into());
1590 self
1591 }
1592 }
1593
1594 #[doc(hidden)]
1595 impl crate::RequestBuilder for UpdateHook {
1596 fn request_options(&mut self) -> &mut crate::RequestOptions {
1597 &mut self.0.options
1598 }
1599 }
1600
1601 #[derive(Clone, Debug)]
1619 pub struct DeleteHook(RequestBuilder<crate::model::DeleteHookRequest>);
1620
1621 impl DeleteHook {
1622 pub(crate) fn new(
1623 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
1624 ) -> Self {
1625 Self(RequestBuilder::new(stub))
1626 }
1627
1628 pub fn with_request<V: Into<crate::model::DeleteHookRequest>>(mut self, v: V) -> Self {
1630 self.0.request = v.into();
1631 self
1632 }
1633
1634 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1636 self.0.options = v.into();
1637 self
1638 }
1639
1640 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
1647 (*self.0.stub)
1648 .delete_hook(self.0.request, self.0.options)
1649 .await
1650 .map(crate::Response::into_body)
1651 }
1652
1653 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
1655 type Operation =
1656 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
1657 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
1658 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
1659 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
1660 if let Some(ref mut details) = poller_options.tracing {
1661 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::delete_hook::until_done";
1662 }
1663
1664 let stub = self.0.stub.clone();
1665 let mut options = self.0.options.clone();
1666 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
1667 let query = move |name| {
1668 let stub = stub.clone();
1669 let options = options.clone();
1670 async {
1671 let op = GetOperation::new(stub)
1672 .set_name(name)
1673 .with_options(options)
1674 .send()
1675 .await?;
1676 Ok(Operation::new(op))
1677 }
1678 };
1679
1680 let start = move || async {
1681 let op = self.send().await?;
1682 Ok(Operation::new(op))
1683 };
1684
1685 use google_cloud_lro::internal::PollerExt;
1686 {
1687 google_cloud_lro::internal::new_unit_response_poller(
1688 polling_error_policy,
1689 polling_backoff_policy,
1690 start,
1691 query,
1692 )
1693 }
1694 .with_options(poller_options)
1695 }
1696
1697 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1701 self.0.request.name = v.into();
1702 self
1703 }
1704 }
1705
1706 #[doc(hidden)]
1707 impl crate::RequestBuilder for DeleteHook {
1708 fn request_options(&mut self) -> &mut crate::RequestOptions {
1709 &mut self.0.options
1710 }
1711 }
1712
1713 #[derive(Clone, Debug)]
1730 pub struct GetIamPolicyRepo(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
1731
1732 impl GetIamPolicyRepo {
1733 pub(crate) fn new(
1734 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
1735 ) -> Self {
1736 Self(RequestBuilder::new(stub))
1737 }
1738
1739 pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
1741 mut self,
1742 v: V,
1743 ) -> Self {
1744 self.0.request = v.into();
1745 self
1746 }
1747
1748 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1750 self.0.options = v.into();
1751 self
1752 }
1753
1754 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
1756 (*self.0.stub)
1757 .get_iam_policy_repo(self.0.request, self.0.options)
1758 .await
1759 .map(crate::Response::into_body)
1760 }
1761
1762 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1766 self.0.request.resource = v.into();
1767 self
1768 }
1769
1770 pub fn set_options<T>(mut self, v: T) -> Self
1772 where
1773 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
1774 {
1775 self.0.request.options = std::option::Option::Some(v.into());
1776 self
1777 }
1778
1779 pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
1781 where
1782 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
1783 {
1784 self.0.request.options = v.map(|x| x.into());
1785 self
1786 }
1787 }
1788
1789 #[doc(hidden)]
1790 impl crate::RequestBuilder for GetIamPolicyRepo {
1791 fn request_options(&mut self) -> &mut crate::RequestOptions {
1792 &mut self.0.options
1793 }
1794 }
1795
1796 #[derive(Clone, Debug)]
1813 pub struct SetIamPolicyRepo(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
1814
1815 impl SetIamPolicyRepo {
1816 pub(crate) fn new(
1817 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
1818 ) -> Self {
1819 Self(RequestBuilder::new(stub))
1820 }
1821
1822 pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
1824 mut self,
1825 v: V,
1826 ) -> Self {
1827 self.0.request = v.into();
1828 self
1829 }
1830
1831 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1833 self.0.options = v.into();
1834 self
1835 }
1836
1837 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
1839 (*self.0.stub)
1840 .set_iam_policy_repo(self.0.request, self.0.options)
1841 .await
1842 .map(crate::Response::into_body)
1843 }
1844
1845 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1849 self.0.request.resource = v.into();
1850 self
1851 }
1852
1853 pub fn set_policy<T>(mut self, v: T) -> Self
1857 where
1858 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
1859 {
1860 self.0.request.policy = std::option::Option::Some(v.into());
1861 self
1862 }
1863
1864 pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
1868 where
1869 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
1870 {
1871 self.0.request.policy = v.map(|x| x.into());
1872 self
1873 }
1874
1875 pub fn set_update_mask<T>(mut self, v: T) -> Self
1877 where
1878 T: std::convert::Into<wkt::FieldMask>,
1879 {
1880 self.0.request.update_mask = std::option::Option::Some(v.into());
1881 self
1882 }
1883
1884 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1886 where
1887 T: std::convert::Into<wkt::FieldMask>,
1888 {
1889 self.0.request.update_mask = v.map(|x| x.into());
1890 self
1891 }
1892 }
1893
1894 #[doc(hidden)]
1895 impl crate::RequestBuilder for SetIamPolicyRepo {
1896 fn request_options(&mut self) -> &mut crate::RequestOptions {
1897 &mut self.0.options
1898 }
1899 }
1900
1901 #[derive(Clone, Debug)]
1918 pub struct TestIamPermissionsRepo(
1919 RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
1920 );
1921
1922 impl TestIamPermissionsRepo {
1923 pub(crate) fn new(
1924 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
1925 ) -> Self {
1926 Self(RequestBuilder::new(stub))
1927 }
1928
1929 pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
1931 mut self,
1932 v: V,
1933 ) -> Self {
1934 self.0.request = v.into();
1935 self
1936 }
1937
1938 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
1940 self.0.options = v.into();
1941 self
1942 }
1943
1944 pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
1946 (*self.0.stub)
1947 .test_iam_permissions_repo(self.0.request, self.0.options)
1948 .await
1949 .map(crate::Response::into_body)
1950 }
1951
1952 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1956 self.0.request.resource = v.into();
1957 self
1958 }
1959
1960 pub fn set_permissions<T, V>(mut self, v: T) -> Self
1964 where
1965 T: std::iter::IntoIterator<Item = V>,
1966 V: std::convert::Into<std::string::String>,
1967 {
1968 use std::iter::Iterator;
1969 self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
1970 self
1971 }
1972 }
1973
1974 #[doc(hidden)]
1975 impl crate::RequestBuilder for TestIamPermissionsRepo {
1976 fn request_options(&mut self) -> &mut crate::RequestOptions {
1977 &mut self.0.options
1978 }
1979 }
1980
1981 #[derive(Clone, Debug)]
1999 pub struct CreateBranchRule(RequestBuilder<crate::model::CreateBranchRuleRequest>);
2000
2001 impl CreateBranchRule {
2002 pub(crate) fn new(
2003 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
2004 ) -> Self {
2005 Self(RequestBuilder::new(stub))
2006 }
2007
2008 pub fn with_request<V: Into<crate::model::CreateBranchRuleRequest>>(
2010 mut self,
2011 v: V,
2012 ) -> Self {
2013 self.0.request = v.into();
2014 self
2015 }
2016
2017 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2019 self.0.options = v.into();
2020 self
2021 }
2022
2023 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2030 (*self.0.stub)
2031 .create_branch_rule(self.0.request, self.0.options)
2032 .await
2033 .map(crate::Response::into_body)
2034 }
2035
2036 pub fn poller(
2038 self,
2039 ) -> impl google_cloud_lro::Poller<crate::model::BranchRule, crate::model::OperationMetadata>
2040 {
2041 type Operation = google_cloud_lro::internal::Operation<
2042 crate::model::BranchRule,
2043 crate::model::OperationMetadata,
2044 >;
2045 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2046 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2047 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2048 if let Some(ref mut details) = poller_options.tracing {
2049 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::create_branch_rule::until_done";
2050 }
2051
2052 let stub = self.0.stub.clone();
2053 let mut options = self.0.options.clone();
2054 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2055 let query = move |name| {
2056 let stub = stub.clone();
2057 let options = options.clone();
2058 async {
2059 let op = GetOperation::new(stub)
2060 .set_name(name)
2061 .with_options(options)
2062 .send()
2063 .await?;
2064 Ok(Operation::new(op))
2065 }
2066 };
2067
2068 let start = move || async {
2069 let op = self.send().await?;
2070 Ok(Operation::new(op))
2071 };
2072
2073 use google_cloud_lro::internal::PollerExt;
2074 {
2075 google_cloud_lro::internal::new_poller(
2076 polling_error_policy,
2077 polling_backoff_policy,
2078 start,
2079 query,
2080 )
2081 }
2082 .with_options(poller_options)
2083 }
2084
2085 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2089 self.0.request.parent = v.into();
2090 self
2091 }
2092
2093 pub fn set_branch_rule<T>(mut self, v: T) -> Self
2097 where
2098 T: std::convert::Into<crate::model::BranchRule>,
2099 {
2100 self.0.request.branch_rule = std::option::Option::Some(v.into());
2101 self
2102 }
2103
2104 pub fn set_or_clear_branch_rule<T>(mut self, v: std::option::Option<T>) -> Self
2108 where
2109 T: std::convert::Into<crate::model::BranchRule>,
2110 {
2111 self.0.request.branch_rule = v.map(|x| x.into());
2112 self
2113 }
2114
2115 pub fn set_branch_rule_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2119 self.0.request.branch_rule_id = v.into();
2120 self
2121 }
2122 }
2123
2124 #[doc(hidden)]
2125 impl crate::RequestBuilder for CreateBranchRule {
2126 fn request_options(&mut self) -> &mut crate::RequestOptions {
2127 &mut self.0.options
2128 }
2129 }
2130
2131 #[derive(Clone, Debug)]
2152 pub struct ListBranchRules(RequestBuilder<crate::model::ListBranchRulesRequest>);
2153
2154 impl ListBranchRules {
2155 pub(crate) fn new(
2156 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
2157 ) -> Self {
2158 Self(RequestBuilder::new(stub))
2159 }
2160
2161 pub fn with_request<V: Into<crate::model::ListBranchRulesRequest>>(mut self, v: V) -> Self {
2163 self.0.request = v.into();
2164 self
2165 }
2166
2167 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2169 self.0.options = v.into();
2170 self
2171 }
2172
2173 pub async fn send(self) -> Result<crate::model::ListBranchRulesResponse> {
2175 (*self.0.stub)
2176 .list_branch_rules(self.0.request, self.0.options)
2177 .await
2178 .map(crate::Response::into_body)
2179 }
2180
2181 pub fn by_page(
2183 self,
2184 ) -> impl google_cloud_gax::paginator::Paginator<
2185 crate::model::ListBranchRulesResponse,
2186 crate::Error,
2187 > {
2188 use std::clone::Clone;
2189 let token = self.0.request.page_token.clone();
2190 let execute = move |token: String| {
2191 let mut builder = self.clone();
2192 builder.0.request = builder.0.request.set_page_token(token);
2193 builder.send()
2194 };
2195 google_cloud_gax::paginator::internal::new_paginator(token, execute)
2196 }
2197
2198 pub fn by_item(
2200 self,
2201 ) -> impl google_cloud_gax::paginator::ItemPaginator<
2202 crate::model::ListBranchRulesResponse,
2203 crate::Error,
2204 > {
2205 use google_cloud_gax::paginator::Paginator;
2206 self.by_page().items()
2207 }
2208
2209 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2213 self.0.request.parent = v.into();
2214 self
2215 }
2216
2217 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2219 self.0.request.page_size = v.into();
2220 self
2221 }
2222
2223 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2225 self.0.request.page_token = v.into();
2226 self
2227 }
2228 }
2229
2230 #[doc(hidden)]
2231 impl crate::RequestBuilder for ListBranchRules {
2232 fn request_options(&mut self) -> &mut crate::RequestOptions {
2233 &mut self.0.options
2234 }
2235 }
2236
2237 #[derive(Clone, Debug)]
2254 pub struct GetBranchRule(RequestBuilder<crate::model::GetBranchRuleRequest>);
2255
2256 impl GetBranchRule {
2257 pub(crate) fn new(
2258 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
2259 ) -> Self {
2260 Self(RequestBuilder::new(stub))
2261 }
2262
2263 pub fn with_request<V: Into<crate::model::GetBranchRuleRequest>>(mut self, v: V) -> Self {
2265 self.0.request = v.into();
2266 self
2267 }
2268
2269 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2271 self.0.options = v.into();
2272 self
2273 }
2274
2275 pub async fn send(self) -> Result<crate::model::BranchRule> {
2277 (*self.0.stub)
2278 .get_branch_rule(self.0.request, self.0.options)
2279 .await
2280 .map(crate::Response::into_body)
2281 }
2282
2283 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2287 self.0.request.name = v.into();
2288 self
2289 }
2290 }
2291
2292 #[doc(hidden)]
2293 impl crate::RequestBuilder for GetBranchRule {
2294 fn request_options(&mut self) -> &mut crate::RequestOptions {
2295 &mut self.0.options
2296 }
2297 }
2298
2299 #[derive(Clone, Debug)]
2317 pub struct UpdateBranchRule(RequestBuilder<crate::model::UpdateBranchRuleRequest>);
2318
2319 impl UpdateBranchRule {
2320 pub(crate) fn new(
2321 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
2322 ) -> Self {
2323 Self(RequestBuilder::new(stub))
2324 }
2325
2326 pub fn with_request<V: Into<crate::model::UpdateBranchRuleRequest>>(
2328 mut self,
2329 v: V,
2330 ) -> Self {
2331 self.0.request = v.into();
2332 self
2333 }
2334
2335 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2337 self.0.options = v.into();
2338 self
2339 }
2340
2341 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2348 (*self.0.stub)
2349 .update_branch_rule(self.0.request, self.0.options)
2350 .await
2351 .map(crate::Response::into_body)
2352 }
2353
2354 pub fn poller(
2356 self,
2357 ) -> impl google_cloud_lro::Poller<crate::model::BranchRule, crate::model::OperationMetadata>
2358 {
2359 type Operation = google_cloud_lro::internal::Operation<
2360 crate::model::BranchRule,
2361 crate::model::OperationMetadata,
2362 >;
2363 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2364 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2365 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2366 if let Some(ref mut details) = poller_options.tracing {
2367 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::update_branch_rule::until_done";
2368 }
2369
2370 let stub = self.0.stub.clone();
2371 let mut options = self.0.options.clone();
2372 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2373 let query = move |name| {
2374 let stub = stub.clone();
2375 let options = options.clone();
2376 async {
2377 let op = GetOperation::new(stub)
2378 .set_name(name)
2379 .with_options(options)
2380 .send()
2381 .await?;
2382 Ok(Operation::new(op))
2383 }
2384 };
2385
2386 let start = move || async {
2387 let op = self.send().await?;
2388 Ok(Operation::new(op))
2389 };
2390
2391 use google_cloud_lro::internal::PollerExt;
2392 {
2393 google_cloud_lro::internal::new_poller(
2394 polling_error_policy,
2395 polling_backoff_policy,
2396 start,
2397 query,
2398 )
2399 }
2400 .with_options(poller_options)
2401 }
2402
2403 pub fn set_branch_rule<T>(mut self, v: T) -> Self
2407 where
2408 T: std::convert::Into<crate::model::BranchRule>,
2409 {
2410 self.0.request.branch_rule = std::option::Option::Some(v.into());
2411 self
2412 }
2413
2414 pub fn set_or_clear_branch_rule<T>(mut self, v: std::option::Option<T>) -> Self
2418 where
2419 T: std::convert::Into<crate::model::BranchRule>,
2420 {
2421 self.0.request.branch_rule = v.map(|x| x.into());
2422 self
2423 }
2424
2425 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2427 self.0.request.validate_only = v.into();
2428 self
2429 }
2430
2431 pub fn set_update_mask<T>(mut self, v: T) -> Self
2433 where
2434 T: std::convert::Into<wkt::FieldMask>,
2435 {
2436 self.0.request.update_mask = std::option::Option::Some(v.into());
2437 self
2438 }
2439
2440 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2442 where
2443 T: std::convert::Into<wkt::FieldMask>,
2444 {
2445 self.0.request.update_mask = v.map(|x| x.into());
2446 self
2447 }
2448 }
2449
2450 #[doc(hidden)]
2451 impl crate::RequestBuilder for UpdateBranchRule {
2452 fn request_options(&mut self) -> &mut crate::RequestOptions {
2453 &mut self.0.options
2454 }
2455 }
2456
2457 #[derive(Clone, Debug)]
2475 pub struct DeleteBranchRule(RequestBuilder<crate::model::DeleteBranchRuleRequest>);
2476
2477 impl DeleteBranchRule {
2478 pub(crate) fn new(
2479 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
2480 ) -> Self {
2481 Self(RequestBuilder::new(stub))
2482 }
2483
2484 pub fn with_request<V: Into<crate::model::DeleteBranchRuleRequest>>(
2486 mut self,
2487 v: V,
2488 ) -> Self {
2489 self.0.request = v.into();
2490 self
2491 }
2492
2493 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2495 self.0.options = v.into();
2496 self
2497 }
2498
2499 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2506 (*self.0.stub)
2507 .delete_branch_rule(self.0.request, self.0.options)
2508 .await
2509 .map(crate::Response::into_body)
2510 }
2511
2512 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
2514 type Operation =
2515 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
2516 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2517 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2518 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2519 if let Some(ref mut details) = poller_options.tracing {
2520 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::delete_branch_rule::until_done";
2521 }
2522
2523 let stub = self.0.stub.clone();
2524 let mut options = self.0.options.clone();
2525 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2526 let query = move |name| {
2527 let stub = stub.clone();
2528 let options = options.clone();
2529 async {
2530 let op = GetOperation::new(stub)
2531 .set_name(name)
2532 .with_options(options)
2533 .send()
2534 .await?;
2535 Ok(Operation::new(op))
2536 }
2537 };
2538
2539 let start = move || async {
2540 let op = self.send().await?;
2541 Ok(Operation::new(op))
2542 };
2543
2544 use google_cloud_lro::internal::PollerExt;
2545 {
2546 google_cloud_lro::internal::new_unit_response_poller(
2547 polling_error_policy,
2548 polling_backoff_policy,
2549 start,
2550 query,
2551 )
2552 }
2553 .with_options(poller_options)
2554 }
2555
2556 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2560 self.0.request.name = v.into();
2561 self
2562 }
2563
2564 pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
2566 self.0.request.allow_missing = v.into();
2567 self
2568 }
2569 }
2570
2571 #[doc(hidden)]
2572 impl crate::RequestBuilder for DeleteBranchRule {
2573 fn request_options(&mut self) -> &mut crate::RequestOptions {
2574 &mut self.0.options
2575 }
2576 }
2577
2578 #[derive(Clone, Debug)]
2596 pub struct CreatePullRequest(RequestBuilder<crate::model::CreatePullRequestRequest>);
2597
2598 impl CreatePullRequest {
2599 pub(crate) fn new(
2600 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
2601 ) -> Self {
2602 Self(RequestBuilder::new(stub))
2603 }
2604
2605 pub fn with_request<V: Into<crate::model::CreatePullRequestRequest>>(
2607 mut self,
2608 v: V,
2609 ) -> Self {
2610 self.0.request = v.into();
2611 self
2612 }
2613
2614 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2616 self.0.options = v.into();
2617 self
2618 }
2619
2620 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2627 (*self.0.stub)
2628 .create_pull_request(self.0.request, self.0.options)
2629 .await
2630 .map(crate::Response::into_body)
2631 }
2632
2633 pub fn poller(
2635 self,
2636 ) -> impl google_cloud_lro::Poller<crate::model::PullRequest, crate::model::OperationMetadata>
2637 {
2638 type Operation = google_cloud_lro::internal::Operation<
2639 crate::model::PullRequest,
2640 crate::model::OperationMetadata,
2641 >;
2642 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2643 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2644 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2645 if let Some(ref mut details) = poller_options.tracing {
2646 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::create_pull_request::until_done";
2647 }
2648
2649 let stub = self.0.stub.clone();
2650 let mut options = self.0.options.clone();
2651 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2652 let query = move |name| {
2653 let stub = stub.clone();
2654 let options = options.clone();
2655 async {
2656 let op = GetOperation::new(stub)
2657 .set_name(name)
2658 .with_options(options)
2659 .send()
2660 .await?;
2661 Ok(Operation::new(op))
2662 }
2663 };
2664
2665 let start = move || async {
2666 let op = self.send().await?;
2667 Ok(Operation::new(op))
2668 };
2669
2670 use google_cloud_lro::internal::PollerExt;
2671 {
2672 google_cloud_lro::internal::new_poller(
2673 polling_error_policy,
2674 polling_backoff_policy,
2675 start,
2676 query,
2677 )
2678 }
2679 .with_options(poller_options)
2680 }
2681
2682 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2686 self.0.request.parent = v.into();
2687 self
2688 }
2689
2690 pub fn set_pull_request<T>(mut self, v: T) -> Self
2694 where
2695 T: std::convert::Into<crate::model::PullRequest>,
2696 {
2697 self.0.request.pull_request = std::option::Option::Some(v.into());
2698 self
2699 }
2700
2701 pub fn set_or_clear_pull_request<T>(mut self, v: std::option::Option<T>) -> Self
2705 where
2706 T: std::convert::Into<crate::model::PullRequest>,
2707 {
2708 self.0.request.pull_request = v.map(|x| x.into());
2709 self
2710 }
2711 }
2712
2713 #[doc(hidden)]
2714 impl crate::RequestBuilder for CreatePullRequest {
2715 fn request_options(&mut self) -> &mut crate::RequestOptions {
2716 &mut self.0.options
2717 }
2718 }
2719
2720 #[derive(Clone, Debug)]
2737 pub struct GetPullRequest(RequestBuilder<crate::model::GetPullRequestRequest>);
2738
2739 impl GetPullRequest {
2740 pub(crate) fn new(
2741 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
2742 ) -> Self {
2743 Self(RequestBuilder::new(stub))
2744 }
2745
2746 pub fn with_request<V: Into<crate::model::GetPullRequestRequest>>(mut self, v: V) -> Self {
2748 self.0.request = v.into();
2749 self
2750 }
2751
2752 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2754 self.0.options = v.into();
2755 self
2756 }
2757
2758 pub async fn send(self) -> Result<crate::model::PullRequest> {
2760 (*self.0.stub)
2761 .get_pull_request(self.0.request, self.0.options)
2762 .await
2763 .map(crate::Response::into_body)
2764 }
2765
2766 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2770 self.0.request.name = v.into();
2771 self
2772 }
2773 }
2774
2775 #[doc(hidden)]
2776 impl crate::RequestBuilder for GetPullRequest {
2777 fn request_options(&mut self) -> &mut crate::RequestOptions {
2778 &mut self.0.options
2779 }
2780 }
2781
2782 #[derive(Clone, Debug)]
2803 pub struct ListPullRequests(RequestBuilder<crate::model::ListPullRequestsRequest>);
2804
2805 impl ListPullRequests {
2806 pub(crate) fn new(
2807 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
2808 ) -> Self {
2809 Self(RequestBuilder::new(stub))
2810 }
2811
2812 pub fn with_request<V: Into<crate::model::ListPullRequestsRequest>>(
2814 mut self,
2815 v: V,
2816 ) -> Self {
2817 self.0.request = v.into();
2818 self
2819 }
2820
2821 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2823 self.0.options = v.into();
2824 self
2825 }
2826
2827 pub async fn send(self) -> Result<crate::model::ListPullRequestsResponse> {
2829 (*self.0.stub)
2830 .list_pull_requests(self.0.request, self.0.options)
2831 .await
2832 .map(crate::Response::into_body)
2833 }
2834
2835 pub fn by_page(
2837 self,
2838 ) -> impl google_cloud_gax::paginator::Paginator<
2839 crate::model::ListPullRequestsResponse,
2840 crate::Error,
2841 > {
2842 use std::clone::Clone;
2843 let token = self.0.request.page_token.clone();
2844 let execute = move |token: String| {
2845 let mut builder = self.clone();
2846 builder.0.request = builder.0.request.set_page_token(token);
2847 builder.send()
2848 };
2849 google_cloud_gax::paginator::internal::new_paginator(token, execute)
2850 }
2851
2852 pub fn by_item(
2854 self,
2855 ) -> impl google_cloud_gax::paginator::ItemPaginator<
2856 crate::model::ListPullRequestsResponse,
2857 crate::Error,
2858 > {
2859 use google_cloud_gax::paginator::Paginator;
2860 self.by_page().items()
2861 }
2862
2863 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2867 self.0.request.parent = v.into();
2868 self
2869 }
2870
2871 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2873 self.0.request.page_size = v.into();
2874 self
2875 }
2876
2877 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2879 self.0.request.page_token = v.into();
2880 self
2881 }
2882 }
2883
2884 #[doc(hidden)]
2885 impl crate::RequestBuilder for ListPullRequests {
2886 fn request_options(&mut self) -> &mut crate::RequestOptions {
2887 &mut self.0.options
2888 }
2889 }
2890
2891 #[derive(Clone, Debug)]
2909 pub struct UpdatePullRequest(RequestBuilder<crate::model::UpdatePullRequestRequest>);
2910
2911 impl UpdatePullRequest {
2912 pub(crate) fn new(
2913 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
2914 ) -> Self {
2915 Self(RequestBuilder::new(stub))
2916 }
2917
2918 pub fn with_request<V: Into<crate::model::UpdatePullRequestRequest>>(
2920 mut self,
2921 v: V,
2922 ) -> Self {
2923 self.0.request = v.into();
2924 self
2925 }
2926
2927 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
2929 self.0.options = v.into();
2930 self
2931 }
2932
2933 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
2940 (*self.0.stub)
2941 .update_pull_request(self.0.request, self.0.options)
2942 .await
2943 .map(crate::Response::into_body)
2944 }
2945
2946 pub fn poller(
2948 self,
2949 ) -> impl google_cloud_lro::Poller<crate::model::PullRequest, crate::model::OperationMetadata>
2950 {
2951 type Operation = google_cloud_lro::internal::Operation<
2952 crate::model::PullRequest,
2953 crate::model::OperationMetadata,
2954 >;
2955 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2956 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2957 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
2958 if let Some(ref mut details) = poller_options.tracing {
2959 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::update_pull_request::until_done";
2960 }
2961
2962 let stub = self.0.stub.clone();
2963 let mut options = self.0.options.clone();
2964 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
2965 let query = move |name| {
2966 let stub = stub.clone();
2967 let options = options.clone();
2968 async {
2969 let op = GetOperation::new(stub)
2970 .set_name(name)
2971 .with_options(options)
2972 .send()
2973 .await?;
2974 Ok(Operation::new(op))
2975 }
2976 };
2977
2978 let start = move || async {
2979 let op = self.send().await?;
2980 Ok(Operation::new(op))
2981 };
2982
2983 use google_cloud_lro::internal::PollerExt;
2984 {
2985 google_cloud_lro::internal::new_poller(
2986 polling_error_policy,
2987 polling_backoff_policy,
2988 start,
2989 query,
2990 )
2991 }
2992 .with_options(poller_options)
2993 }
2994
2995 pub fn set_pull_request<T>(mut self, v: T) -> Self
2999 where
3000 T: std::convert::Into<crate::model::PullRequest>,
3001 {
3002 self.0.request.pull_request = std::option::Option::Some(v.into());
3003 self
3004 }
3005
3006 pub fn set_or_clear_pull_request<T>(mut self, v: std::option::Option<T>) -> Self
3010 where
3011 T: std::convert::Into<crate::model::PullRequest>,
3012 {
3013 self.0.request.pull_request = v.map(|x| x.into());
3014 self
3015 }
3016
3017 pub fn set_update_mask<T>(mut self, v: T) -> Self
3019 where
3020 T: std::convert::Into<wkt::FieldMask>,
3021 {
3022 self.0.request.update_mask = std::option::Option::Some(v.into());
3023 self
3024 }
3025
3026 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3028 where
3029 T: std::convert::Into<wkt::FieldMask>,
3030 {
3031 self.0.request.update_mask = v.map(|x| x.into());
3032 self
3033 }
3034 }
3035
3036 #[doc(hidden)]
3037 impl crate::RequestBuilder for UpdatePullRequest {
3038 fn request_options(&mut self) -> &mut crate::RequestOptions {
3039 &mut self.0.options
3040 }
3041 }
3042
3043 #[derive(Clone, Debug)]
3061 pub struct MergePullRequest(RequestBuilder<crate::model::MergePullRequestRequest>);
3062
3063 impl MergePullRequest {
3064 pub(crate) fn new(
3065 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
3066 ) -> Self {
3067 Self(RequestBuilder::new(stub))
3068 }
3069
3070 pub fn with_request<V: Into<crate::model::MergePullRequestRequest>>(
3072 mut self,
3073 v: V,
3074 ) -> Self {
3075 self.0.request = v.into();
3076 self
3077 }
3078
3079 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3081 self.0.options = v.into();
3082 self
3083 }
3084
3085 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3092 (*self.0.stub)
3093 .merge_pull_request(self.0.request, self.0.options)
3094 .await
3095 .map(crate::Response::into_body)
3096 }
3097
3098 pub fn poller(
3100 self,
3101 ) -> impl google_cloud_lro::Poller<crate::model::PullRequest, crate::model::OperationMetadata>
3102 {
3103 type Operation = google_cloud_lro::internal::Operation<
3104 crate::model::PullRequest,
3105 crate::model::OperationMetadata,
3106 >;
3107 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3108 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3109 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3110 if let Some(ref mut details) = poller_options.tracing {
3111 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::merge_pull_request::until_done";
3112 }
3113
3114 let stub = self.0.stub.clone();
3115 let mut options = self.0.options.clone();
3116 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3117 let query = move |name| {
3118 let stub = stub.clone();
3119 let options = options.clone();
3120 async {
3121 let op = GetOperation::new(stub)
3122 .set_name(name)
3123 .with_options(options)
3124 .send()
3125 .await?;
3126 Ok(Operation::new(op))
3127 }
3128 };
3129
3130 let start = move || async {
3131 let op = self.send().await?;
3132 Ok(Operation::new(op))
3133 };
3134
3135 use google_cloud_lro::internal::PollerExt;
3136 {
3137 google_cloud_lro::internal::new_poller(
3138 polling_error_policy,
3139 polling_backoff_policy,
3140 start,
3141 query,
3142 )
3143 }
3144 .with_options(poller_options)
3145 }
3146
3147 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3151 self.0.request.name = v.into();
3152 self
3153 }
3154 }
3155
3156 #[doc(hidden)]
3157 impl crate::RequestBuilder for MergePullRequest {
3158 fn request_options(&mut self) -> &mut crate::RequestOptions {
3159 &mut self.0.options
3160 }
3161 }
3162
3163 #[derive(Clone, Debug)]
3181 pub struct OpenPullRequest(RequestBuilder<crate::model::OpenPullRequestRequest>);
3182
3183 impl OpenPullRequest {
3184 pub(crate) fn new(
3185 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
3186 ) -> Self {
3187 Self(RequestBuilder::new(stub))
3188 }
3189
3190 pub fn with_request<V: Into<crate::model::OpenPullRequestRequest>>(mut self, v: V) -> Self {
3192 self.0.request = v.into();
3193 self
3194 }
3195
3196 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3198 self.0.options = v.into();
3199 self
3200 }
3201
3202 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3209 (*self.0.stub)
3210 .open_pull_request(self.0.request, self.0.options)
3211 .await
3212 .map(crate::Response::into_body)
3213 }
3214
3215 pub fn poller(
3217 self,
3218 ) -> impl google_cloud_lro::Poller<crate::model::PullRequest, crate::model::OperationMetadata>
3219 {
3220 type Operation = google_cloud_lro::internal::Operation<
3221 crate::model::PullRequest,
3222 crate::model::OperationMetadata,
3223 >;
3224 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3225 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3226 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3227 if let Some(ref mut details) = poller_options.tracing {
3228 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::open_pull_request::until_done";
3229 }
3230
3231 let stub = self.0.stub.clone();
3232 let mut options = self.0.options.clone();
3233 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3234 let query = move |name| {
3235 let stub = stub.clone();
3236 let options = options.clone();
3237 async {
3238 let op = GetOperation::new(stub)
3239 .set_name(name)
3240 .with_options(options)
3241 .send()
3242 .await?;
3243 Ok(Operation::new(op))
3244 }
3245 };
3246
3247 let start = move || async {
3248 let op = self.send().await?;
3249 Ok(Operation::new(op))
3250 };
3251
3252 use google_cloud_lro::internal::PollerExt;
3253 {
3254 google_cloud_lro::internal::new_poller(
3255 polling_error_policy,
3256 polling_backoff_policy,
3257 start,
3258 query,
3259 )
3260 }
3261 .with_options(poller_options)
3262 }
3263
3264 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3268 self.0.request.name = v.into();
3269 self
3270 }
3271 }
3272
3273 #[doc(hidden)]
3274 impl crate::RequestBuilder for OpenPullRequest {
3275 fn request_options(&mut self) -> &mut crate::RequestOptions {
3276 &mut self.0.options
3277 }
3278 }
3279
3280 #[derive(Clone, Debug)]
3298 pub struct ClosePullRequest(RequestBuilder<crate::model::ClosePullRequestRequest>);
3299
3300 impl ClosePullRequest {
3301 pub(crate) fn new(
3302 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
3303 ) -> Self {
3304 Self(RequestBuilder::new(stub))
3305 }
3306
3307 pub fn with_request<V: Into<crate::model::ClosePullRequestRequest>>(
3309 mut self,
3310 v: V,
3311 ) -> Self {
3312 self.0.request = v.into();
3313 self
3314 }
3315
3316 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3318 self.0.options = v.into();
3319 self
3320 }
3321
3322 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3329 (*self.0.stub)
3330 .close_pull_request(self.0.request, self.0.options)
3331 .await
3332 .map(crate::Response::into_body)
3333 }
3334
3335 pub fn poller(
3337 self,
3338 ) -> impl google_cloud_lro::Poller<crate::model::PullRequest, crate::model::OperationMetadata>
3339 {
3340 type Operation = google_cloud_lro::internal::Operation<
3341 crate::model::PullRequest,
3342 crate::model::OperationMetadata,
3343 >;
3344 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3345 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3346 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3347 if let Some(ref mut details) = poller_options.tracing {
3348 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::close_pull_request::until_done";
3349 }
3350
3351 let stub = self.0.stub.clone();
3352 let mut options = self.0.options.clone();
3353 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3354 let query = move |name| {
3355 let stub = stub.clone();
3356 let options = options.clone();
3357 async {
3358 let op = GetOperation::new(stub)
3359 .set_name(name)
3360 .with_options(options)
3361 .send()
3362 .await?;
3363 Ok(Operation::new(op))
3364 }
3365 };
3366
3367 let start = move || async {
3368 let op = self.send().await?;
3369 Ok(Operation::new(op))
3370 };
3371
3372 use google_cloud_lro::internal::PollerExt;
3373 {
3374 google_cloud_lro::internal::new_poller(
3375 polling_error_policy,
3376 polling_backoff_policy,
3377 start,
3378 query,
3379 )
3380 }
3381 .with_options(poller_options)
3382 }
3383
3384 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3388 self.0.request.name = v.into();
3389 self
3390 }
3391 }
3392
3393 #[doc(hidden)]
3394 impl crate::RequestBuilder for ClosePullRequest {
3395 fn request_options(&mut self) -> &mut crate::RequestOptions {
3396 &mut self.0.options
3397 }
3398 }
3399
3400 #[derive(Clone, Debug)]
3421 pub struct ListPullRequestFileDiffs(
3422 RequestBuilder<crate::model::ListPullRequestFileDiffsRequest>,
3423 );
3424
3425 impl ListPullRequestFileDiffs {
3426 pub(crate) fn new(
3427 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
3428 ) -> Self {
3429 Self(RequestBuilder::new(stub))
3430 }
3431
3432 pub fn with_request<V: Into<crate::model::ListPullRequestFileDiffsRequest>>(
3434 mut self,
3435 v: V,
3436 ) -> Self {
3437 self.0.request = v.into();
3438 self
3439 }
3440
3441 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3443 self.0.options = v.into();
3444 self
3445 }
3446
3447 pub async fn send(self) -> Result<crate::model::ListPullRequestFileDiffsResponse> {
3449 (*self.0.stub)
3450 .list_pull_request_file_diffs(self.0.request, self.0.options)
3451 .await
3452 .map(crate::Response::into_body)
3453 }
3454
3455 pub fn by_page(
3457 self,
3458 ) -> impl google_cloud_gax::paginator::Paginator<
3459 crate::model::ListPullRequestFileDiffsResponse,
3460 crate::Error,
3461 > {
3462 use std::clone::Clone;
3463 let token = self.0.request.page_token.clone();
3464 let execute = move |token: String| {
3465 let mut builder = self.clone();
3466 builder.0.request = builder.0.request.set_page_token(token);
3467 builder.send()
3468 };
3469 google_cloud_gax::paginator::internal::new_paginator(token, execute)
3470 }
3471
3472 pub fn by_item(
3474 self,
3475 ) -> impl google_cloud_gax::paginator::ItemPaginator<
3476 crate::model::ListPullRequestFileDiffsResponse,
3477 crate::Error,
3478 > {
3479 use google_cloud_gax::paginator::Paginator;
3480 self.by_page().items()
3481 }
3482
3483 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3487 self.0.request.name = v.into();
3488 self
3489 }
3490
3491 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3493 self.0.request.page_size = v.into();
3494 self
3495 }
3496
3497 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3499 self.0.request.page_token = v.into();
3500 self
3501 }
3502 }
3503
3504 #[doc(hidden)]
3505 impl crate::RequestBuilder for ListPullRequestFileDiffs {
3506 fn request_options(&mut self) -> &mut crate::RequestOptions {
3507 &mut self.0.options
3508 }
3509 }
3510
3511 #[derive(Clone, Debug)]
3532 pub struct FetchTree(RequestBuilder<crate::model::FetchTreeRequest>);
3533
3534 impl FetchTree {
3535 pub(crate) fn new(
3536 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
3537 ) -> Self {
3538 Self(RequestBuilder::new(stub))
3539 }
3540
3541 pub fn with_request<V: Into<crate::model::FetchTreeRequest>>(mut self, v: V) -> Self {
3543 self.0.request = v.into();
3544 self
3545 }
3546
3547 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3549 self.0.options = v.into();
3550 self
3551 }
3552
3553 pub async fn send(self) -> Result<crate::model::FetchTreeResponse> {
3555 (*self.0.stub)
3556 .fetch_tree(self.0.request, self.0.options)
3557 .await
3558 .map(crate::Response::into_body)
3559 }
3560
3561 pub fn by_page(
3563 self,
3564 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::FetchTreeResponse, crate::Error>
3565 {
3566 use std::clone::Clone;
3567 let token = self.0.request.page_token.clone();
3568 let execute = move |token: String| {
3569 let mut builder = self.clone();
3570 builder.0.request = builder.0.request.set_page_token(token);
3571 builder.send()
3572 };
3573 google_cloud_gax::paginator::internal::new_paginator(token, execute)
3574 }
3575
3576 pub fn by_item(
3578 self,
3579 ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::FetchTreeResponse, crate::Error>
3580 {
3581 use google_cloud_gax::paginator::Paginator;
3582 self.by_page().items()
3583 }
3584
3585 pub fn set_repository<T: Into<std::string::String>>(mut self, v: T) -> Self {
3589 self.0.request.repository = v.into();
3590 self
3591 }
3592
3593 pub fn set_ref<T: Into<std::string::String>>(mut self, v: T) -> Self {
3595 self.0.request.r#ref = v.into();
3596 self
3597 }
3598
3599 pub fn set_recursive<T: Into<bool>>(mut self, v: T) -> Self {
3601 self.0.request.recursive = v.into();
3602 self
3603 }
3604
3605 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3607 self.0.request.page_size = v.into();
3608 self
3609 }
3610
3611 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3613 self.0.request.page_token = v.into();
3614 self
3615 }
3616 }
3617
3618 #[doc(hidden)]
3619 impl crate::RequestBuilder for FetchTree {
3620 fn request_options(&mut self) -> &mut crate::RequestOptions {
3621 &mut self.0.options
3622 }
3623 }
3624
3625 #[derive(Clone, Debug)]
3642 pub struct FetchBlob(RequestBuilder<crate::model::FetchBlobRequest>);
3643
3644 impl FetchBlob {
3645 pub(crate) fn new(
3646 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
3647 ) -> Self {
3648 Self(RequestBuilder::new(stub))
3649 }
3650
3651 pub fn with_request<V: Into<crate::model::FetchBlobRequest>>(mut self, v: V) -> Self {
3653 self.0.request = v.into();
3654 self
3655 }
3656
3657 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3659 self.0.options = v.into();
3660 self
3661 }
3662
3663 pub async fn send(self) -> Result<crate::model::FetchBlobResponse> {
3665 (*self.0.stub)
3666 .fetch_blob(self.0.request, self.0.options)
3667 .await
3668 .map(crate::Response::into_body)
3669 }
3670
3671 pub fn set_repository<T: Into<std::string::String>>(mut self, v: T) -> Self {
3675 self.0.request.repository = v.into();
3676 self
3677 }
3678
3679 pub fn set_sha<T: Into<std::string::String>>(mut self, v: T) -> Self {
3683 self.0.request.sha = v.into();
3684 self
3685 }
3686 }
3687
3688 #[doc(hidden)]
3689 impl crate::RequestBuilder for FetchBlob {
3690 fn request_options(&mut self) -> &mut crate::RequestOptions {
3691 &mut self.0.options
3692 }
3693 }
3694
3695 #[derive(Clone, Debug)]
3713 pub struct CreateIssue(RequestBuilder<crate::model::CreateIssueRequest>);
3714
3715 impl CreateIssue {
3716 pub(crate) fn new(
3717 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
3718 ) -> Self {
3719 Self(RequestBuilder::new(stub))
3720 }
3721
3722 pub fn with_request<V: Into<crate::model::CreateIssueRequest>>(mut self, v: V) -> Self {
3724 self.0.request = v.into();
3725 self
3726 }
3727
3728 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3730 self.0.options = v.into();
3731 self
3732 }
3733
3734 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3741 (*self.0.stub)
3742 .create_issue(self.0.request, self.0.options)
3743 .await
3744 .map(crate::Response::into_body)
3745 }
3746
3747 pub fn poller(
3749 self,
3750 ) -> impl google_cloud_lro::Poller<crate::model::Issue, crate::model::OperationMetadata>
3751 {
3752 type Operation = google_cloud_lro::internal::Operation<
3753 crate::model::Issue,
3754 crate::model::OperationMetadata,
3755 >;
3756 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3757 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3758 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3759 if let Some(ref mut details) = poller_options.tracing {
3760 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::create_issue::until_done";
3761 }
3762
3763 let stub = self.0.stub.clone();
3764 let mut options = self.0.options.clone();
3765 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3766 let query = move |name| {
3767 let stub = stub.clone();
3768 let options = options.clone();
3769 async {
3770 let op = GetOperation::new(stub)
3771 .set_name(name)
3772 .with_options(options)
3773 .send()
3774 .await?;
3775 Ok(Operation::new(op))
3776 }
3777 };
3778
3779 let start = move || async {
3780 let op = self.send().await?;
3781 Ok(Operation::new(op))
3782 };
3783
3784 use google_cloud_lro::internal::PollerExt;
3785 {
3786 google_cloud_lro::internal::new_poller(
3787 polling_error_policy,
3788 polling_backoff_policy,
3789 start,
3790 query,
3791 )
3792 }
3793 .with_options(poller_options)
3794 }
3795
3796 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3800 self.0.request.parent = v.into();
3801 self
3802 }
3803
3804 pub fn set_issue<T>(mut self, v: T) -> Self
3808 where
3809 T: std::convert::Into<crate::model::Issue>,
3810 {
3811 self.0.request.issue = std::option::Option::Some(v.into());
3812 self
3813 }
3814
3815 pub fn set_or_clear_issue<T>(mut self, v: std::option::Option<T>) -> Self
3819 where
3820 T: std::convert::Into<crate::model::Issue>,
3821 {
3822 self.0.request.issue = v.map(|x| x.into());
3823 self
3824 }
3825 }
3826
3827 #[doc(hidden)]
3828 impl crate::RequestBuilder for CreateIssue {
3829 fn request_options(&mut self) -> &mut crate::RequestOptions {
3830 &mut self.0.options
3831 }
3832 }
3833
3834 #[derive(Clone, Debug)]
3851 pub struct GetIssue(RequestBuilder<crate::model::GetIssueRequest>);
3852
3853 impl GetIssue {
3854 pub(crate) fn new(
3855 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
3856 ) -> Self {
3857 Self(RequestBuilder::new(stub))
3858 }
3859
3860 pub fn with_request<V: Into<crate::model::GetIssueRequest>>(mut self, v: V) -> Self {
3862 self.0.request = v.into();
3863 self
3864 }
3865
3866 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3868 self.0.options = v.into();
3869 self
3870 }
3871
3872 pub async fn send(self) -> Result<crate::model::Issue> {
3874 (*self.0.stub)
3875 .get_issue(self.0.request, self.0.options)
3876 .await
3877 .map(crate::Response::into_body)
3878 }
3879
3880 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3884 self.0.request.name = v.into();
3885 self
3886 }
3887 }
3888
3889 #[doc(hidden)]
3890 impl crate::RequestBuilder for GetIssue {
3891 fn request_options(&mut self) -> &mut crate::RequestOptions {
3892 &mut self.0.options
3893 }
3894 }
3895
3896 #[derive(Clone, Debug)]
3917 pub struct ListIssues(RequestBuilder<crate::model::ListIssuesRequest>);
3918
3919 impl ListIssues {
3920 pub(crate) fn new(
3921 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
3922 ) -> Self {
3923 Self(RequestBuilder::new(stub))
3924 }
3925
3926 pub fn with_request<V: Into<crate::model::ListIssuesRequest>>(mut self, v: V) -> Self {
3928 self.0.request = v.into();
3929 self
3930 }
3931
3932 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3934 self.0.options = v.into();
3935 self
3936 }
3937
3938 pub async fn send(self) -> Result<crate::model::ListIssuesResponse> {
3940 (*self.0.stub)
3941 .list_issues(self.0.request, self.0.options)
3942 .await
3943 .map(crate::Response::into_body)
3944 }
3945
3946 pub fn by_page(
3948 self,
3949 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListIssuesResponse, crate::Error>
3950 {
3951 use std::clone::Clone;
3952 let token = self.0.request.page_token.clone();
3953 let execute = move |token: String| {
3954 let mut builder = self.clone();
3955 builder.0.request = builder.0.request.set_page_token(token);
3956 builder.send()
3957 };
3958 google_cloud_gax::paginator::internal::new_paginator(token, execute)
3959 }
3960
3961 pub fn by_item(
3963 self,
3964 ) -> impl google_cloud_gax::paginator::ItemPaginator<
3965 crate::model::ListIssuesResponse,
3966 crate::Error,
3967 > {
3968 use google_cloud_gax::paginator::Paginator;
3969 self.by_page().items()
3970 }
3971
3972 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3976 self.0.request.parent = v.into();
3977 self
3978 }
3979
3980 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3982 self.0.request.page_size = v.into();
3983 self
3984 }
3985
3986 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3988 self.0.request.page_token = v.into();
3989 self
3990 }
3991
3992 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3994 self.0.request.filter = v.into();
3995 self
3996 }
3997 }
3998
3999 #[doc(hidden)]
4000 impl crate::RequestBuilder for ListIssues {
4001 fn request_options(&mut self) -> &mut crate::RequestOptions {
4002 &mut self.0.options
4003 }
4004 }
4005
4006 #[derive(Clone, Debug)]
4024 pub struct UpdateIssue(RequestBuilder<crate::model::UpdateIssueRequest>);
4025
4026 impl UpdateIssue {
4027 pub(crate) fn new(
4028 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
4029 ) -> Self {
4030 Self(RequestBuilder::new(stub))
4031 }
4032
4033 pub fn with_request<V: Into<crate::model::UpdateIssueRequest>>(mut self, v: V) -> Self {
4035 self.0.request = v.into();
4036 self
4037 }
4038
4039 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4041 self.0.options = v.into();
4042 self
4043 }
4044
4045 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4052 (*self.0.stub)
4053 .update_issue(self.0.request, self.0.options)
4054 .await
4055 .map(crate::Response::into_body)
4056 }
4057
4058 pub fn poller(
4060 self,
4061 ) -> impl google_cloud_lro::Poller<crate::model::Issue, crate::model::OperationMetadata>
4062 {
4063 type Operation = google_cloud_lro::internal::Operation<
4064 crate::model::Issue,
4065 crate::model::OperationMetadata,
4066 >;
4067 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4068 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4069 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4070 if let Some(ref mut details) = poller_options.tracing {
4071 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::update_issue::until_done";
4072 }
4073
4074 let stub = self.0.stub.clone();
4075 let mut options = self.0.options.clone();
4076 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4077 let query = move |name| {
4078 let stub = stub.clone();
4079 let options = options.clone();
4080 async {
4081 let op = GetOperation::new(stub)
4082 .set_name(name)
4083 .with_options(options)
4084 .send()
4085 .await?;
4086 Ok(Operation::new(op))
4087 }
4088 };
4089
4090 let start = move || async {
4091 let op = self.send().await?;
4092 Ok(Operation::new(op))
4093 };
4094
4095 use google_cloud_lro::internal::PollerExt;
4096 {
4097 google_cloud_lro::internal::new_poller(
4098 polling_error_policy,
4099 polling_backoff_policy,
4100 start,
4101 query,
4102 )
4103 }
4104 .with_options(poller_options)
4105 }
4106
4107 pub fn set_issue<T>(mut self, v: T) -> Self
4111 where
4112 T: std::convert::Into<crate::model::Issue>,
4113 {
4114 self.0.request.issue = std::option::Option::Some(v.into());
4115 self
4116 }
4117
4118 pub fn set_or_clear_issue<T>(mut self, v: std::option::Option<T>) -> Self
4122 where
4123 T: std::convert::Into<crate::model::Issue>,
4124 {
4125 self.0.request.issue = v.map(|x| x.into());
4126 self
4127 }
4128
4129 pub fn set_update_mask<T>(mut self, v: T) -> Self
4131 where
4132 T: std::convert::Into<wkt::FieldMask>,
4133 {
4134 self.0.request.update_mask = std::option::Option::Some(v.into());
4135 self
4136 }
4137
4138 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4140 where
4141 T: std::convert::Into<wkt::FieldMask>,
4142 {
4143 self.0.request.update_mask = v.map(|x| x.into());
4144 self
4145 }
4146 }
4147
4148 #[doc(hidden)]
4149 impl crate::RequestBuilder for UpdateIssue {
4150 fn request_options(&mut self) -> &mut crate::RequestOptions {
4151 &mut self.0.options
4152 }
4153 }
4154
4155 #[derive(Clone, Debug)]
4173 pub struct DeleteIssue(RequestBuilder<crate::model::DeleteIssueRequest>);
4174
4175 impl DeleteIssue {
4176 pub(crate) fn new(
4177 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
4178 ) -> Self {
4179 Self(RequestBuilder::new(stub))
4180 }
4181
4182 pub fn with_request<V: Into<crate::model::DeleteIssueRequest>>(mut self, v: V) -> Self {
4184 self.0.request = v.into();
4185 self
4186 }
4187
4188 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4190 self.0.options = v.into();
4191 self
4192 }
4193
4194 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4201 (*self.0.stub)
4202 .delete_issue(self.0.request, self.0.options)
4203 .await
4204 .map(crate::Response::into_body)
4205 }
4206
4207 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
4209 type Operation =
4210 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
4211 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4212 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4213 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4214 if let Some(ref mut details) = poller_options.tracing {
4215 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::delete_issue::until_done";
4216 }
4217
4218 let stub = self.0.stub.clone();
4219 let mut options = self.0.options.clone();
4220 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4221 let query = move |name| {
4222 let stub = stub.clone();
4223 let options = options.clone();
4224 async {
4225 let op = GetOperation::new(stub)
4226 .set_name(name)
4227 .with_options(options)
4228 .send()
4229 .await?;
4230 Ok(Operation::new(op))
4231 }
4232 };
4233
4234 let start = move || async {
4235 let op = self.send().await?;
4236 Ok(Operation::new(op))
4237 };
4238
4239 use google_cloud_lro::internal::PollerExt;
4240 {
4241 google_cloud_lro::internal::new_unit_response_poller(
4242 polling_error_policy,
4243 polling_backoff_policy,
4244 start,
4245 query,
4246 )
4247 }
4248 .with_options(poller_options)
4249 }
4250
4251 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4255 self.0.request.name = v.into();
4256 self
4257 }
4258
4259 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
4261 self.0.request.etag = v.into();
4262 self
4263 }
4264 }
4265
4266 #[doc(hidden)]
4267 impl crate::RequestBuilder for DeleteIssue {
4268 fn request_options(&mut self) -> &mut crate::RequestOptions {
4269 &mut self.0.options
4270 }
4271 }
4272
4273 #[derive(Clone, Debug)]
4291 pub struct OpenIssue(RequestBuilder<crate::model::OpenIssueRequest>);
4292
4293 impl OpenIssue {
4294 pub(crate) fn new(
4295 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
4296 ) -> Self {
4297 Self(RequestBuilder::new(stub))
4298 }
4299
4300 pub fn with_request<V: Into<crate::model::OpenIssueRequest>>(mut self, v: V) -> Self {
4302 self.0.request = v.into();
4303 self
4304 }
4305
4306 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4308 self.0.options = v.into();
4309 self
4310 }
4311
4312 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4319 (*self.0.stub)
4320 .open_issue(self.0.request, self.0.options)
4321 .await
4322 .map(crate::Response::into_body)
4323 }
4324
4325 pub fn poller(
4327 self,
4328 ) -> impl google_cloud_lro::Poller<crate::model::Issue, crate::model::OperationMetadata>
4329 {
4330 type Operation = google_cloud_lro::internal::Operation<
4331 crate::model::Issue,
4332 crate::model::OperationMetadata,
4333 >;
4334 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4335 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4336 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4337 if let Some(ref mut details) = poller_options.tracing {
4338 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::open_issue::until_done";
4339 }
4340
4341 let stub = self.0.stub.clone();
4342 let mut options = self.0.options.clone();
4343 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4344 let query = move |name| {
4345 let stub = stub.clone();
4346 let options = options.clone();
4347 async {
4348 let op = GetOperation::new(stub)
4349 .set_name(name)
4350 .with_options(options)
4351 .send()
4352 .await?;
4353 Ok(Operation::new(op))
4354 }
4355 };
4356
4357 let start = move || async {
4358 let op = self.send().await?;
4359 Ok(Operation::new(op))
4360 };
4361
4362 use google_cloud_lro::internal::PollerExt;
4363 {
4364 google_cloud_lro::internal::new_poller(
4365 polling_error_policy,
4366 polling_backoff_policy,
4367 start,
4368 query,
4369 )
4370 }
4371 .with_options(poller_options)
4372 }
4373
4374 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4378 self.0.request.name = v.into();
4379 self
4380 }
4381
4382 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
4384 self.0.request.etag = v.into();
4385 self
4386 }
4387 }
4388
4389 #[doc(hidden)]
4390 impl crate::RequestBuilder for OpenIssue {
4391 fn request_options(&mut self) -> &mut crate::RequestOptions {
4392 &mut self.0.options
4393 }
4394 }
4395
4396 #[derive(Clone, Debug)]
4414 pub struct CloseIssue(RequestBuilder<crate::model::CloseIssueRequest>);
4415
4416 impl CloseIssue {
4417 pub(crate) fn new(
4418 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
4419 ) -> Self {
4420 Self(RequestBuilder::new(stub))
4421 }
4422
4423 pub fn with_request<V: Into<crate::model::CloseIssueRequest>>(mut self, v: V) -> Self {
4425 self.0.request = v.into();
4426 self
4427 }
4428
4429 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4431 self.0.options = v.into();
4432 self
4433 }
4434
4435 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4442 (*self.0.stub)
4443 .close_issue(self.0.request, self.0.options)
4444 .await
4445 .map(crate::Response::into_body)
4446 }
4447
4448 pub fn poller(
4450 self,
4451 ) -> impl google_cloud_lro::Poller<crate::model::Issue, crate::model::OperationMetadata>
4452 {
4453 type Operation = google_cloud_lro::internal::Operation<
4454 crate::model::Issue,
4455 crate::model::OperationMetadata,
4456 >;
4457 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4458 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4459 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4460 if let Some(ref mut details) = poller_options.tracing {
4461 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::close_issue::until_done";
4462 }
4463
4464 let stub = self.0.stub.clone();
4465 let mut options = self.0.options.clone();
4466 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4467 let query = move |name| {
4468 let stub = stub.clone();
4469 let options = options.clone();
4470 async {
4471 let op = GetOperation::new(stub)
4472 .set_name(name)
4473 .with_options(options)
4474 .send()
4475 .await?;
4476 Ok(Operation::new(op))
4477 }
4478 };
4479
4480 let start = move || async {
4481 let op = self.send().await?;
4482 Ok(Operation::new(op))
4483 };
4484
4485 use google_cloud_lro::internal::PollerExt;
4486 {
4487 google_cloud_lro::internal::new_poller(
4488 polling_error_policy,
4489 polling_backoff_policy,
4490 start,
4491 query,
4492 )
4493 }
4494 .with_options(poller_options)
4495 }
4496
4497 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4501 self.0.request.name = v.into();
4502 self
4503 }
4504
4505 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
4507 self.0.request.etag = v.into();
4508 self
4509 }
4510 }
4511
4512 #[doc(hidden)]
4513 impl crate::RequestBuilder for CloseIssue {
4514 fn request_options(&mut self) -> &mut crate::RequestOptions {
4515 &mut self.0.options
4516 }
4517 }
4518
4519 #[derive(Clone, Debug)]
4536 pub struct GetPullRequestComment(RequestBuilder<crate::model::GetPullRequestCommentRequest>);
4537
4538 impl GetPullRequestComment {
4539 pub(crate) fn new(
4540 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
4541 ) -> Self {
4542 Self(RequestBuilder::new(stub))
4543 }
4544
4545 pub fn with_request<V: Into<crate::model::GetPullRequestCommentRequest>>(
4547 mut self,
4548 v: V,
4549 ) -> Self {
4550 self.0.request = v.into();
4551 self
4552 }
4553
4554 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4556 self.0.options = v.into();
4557 self
4558 }
4559
4560 pub async fn send(self) -> Result<crate::model::PullRequestComment> {
4562 (*self.0.stub)
4563 .get_pull_request_comment(self.0.request, self.0.options)
4564 .await
4565 .map(crate::Response::into_body)
4566 }
4567
4568 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4572 self.0.request.name = v.into();
4573 self
4574 }
4575 }
4576
4577 #[doc(hidden)]
4578 impl crate::RequestBuilder for GetPullRequestComment {
4579 fn request_options(&mut self) -> &mut crate::RequestOptions {
4580 &mut self.0.options
4581 }
4582 }
4583
4584 #[derive(Clone, Debug)]
4605 pub struct ListPullRequestComments(
4606 RequestBuilder<crate::model::ListPullRequestCommentsRequest>,
4607 );
4608
4609 impl ListPullRequestComments {
4610 pub(crate) fn new(
4611 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
4612 ) -> Self {
4613 Self(RequestBuilder::new(stub))
4614 }
4615
4616 pub fn with_request<V: Into<crate::model::ListPullRequestCommentsRequest>>(
4618 mut self,
4619 v: V,
4620 ) -> Self {
4621 self.0.request = v.into();
4622 self
4623 }
4624
4625 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4627 self.0.options = v.into();
4628 self
4629 }
4630
4631 pub async fn send(self) -> Result<crate::model::ListPullRequestCommentsResponse> {
4633 (*self.0.stub)
4634 .list_pull_request_comments(self.0.request, self.0.options)
4635 .await
4636 .map(crate::Response::into_body)
4637 }
4638
4639 pub fn by_page(
4641 self,
4642 ) -> impl google_cloud_gax::paginator::Paginator<
4643 crate::model::ListPullRequestCommentsResponse,
4644 crate::Error,
4645 > {
4646 use std::clone::Clone;
4647 let token = self.0.request.page_token.clone();
4648 let execute = move |token: String| {
4649 let mut builder = self.clone();
4650 builder.0.request = builder.0.request.set_page_token(token);
4651 builder.send()
4652 };
4653 google_cloud_gax::paginator::internal::new_paginator(token, execute)
4654 }
4655
4656 pub fn by_item(
4658 self,
4659 ) -> impl google_cloud_gax::paginator::ItemPaginator<
4660 crate::model::ListPullRequestCommentsResponse,
4661 crate::Error,
4662 > {
4663 use google_cloud_gax::paginator::Paginator;
4664 self.by_page().items()
4665 }
4666
4667 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4671 self.0.request.parent = v.into();
4672 self
4673 }
4674
4675 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4677 self.0.request.page_size = v.into();
4678 self
4679 }
4680
4681 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4683 self.0.request.page_token = v.into();
4684 self
4685 }
4686 }
4687
4688 #[doc(hidden)]
4689 impl crate::RequestBuilder for ListPullRequestComments {
4690 fn request_options(&mut self) -> &mut crate::RequestOptions {
4691 &mut self.0.options
4692 }
4693 }
4694
4695 #[derive(Clone, Debug)]
4713 pub struct CreatePullRequestComment(
4714 RequestBuilder<crate::model::CreatePullRequestCommentRequest>,
4715 );
4716
4717 impl CreatePullRequestComment {
4718 pub(crate) fn new(
4719 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
4720 ) -> Self {
4721 Self(RequestBuilder::new(stub))
4722 }
4723
4724 pub fn with_request<V: Into<crate::model::CreatePullRequestCommentRequest>>(
4726 mut self,
4727 v: V,
4728 ) -> Self {
4729 self.0.request = v.into();
4730 self
4731 }
4732
4733 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4735 self.0.options = v.into();
4736 self
4737 }
4738
4739 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4746 (*self.0.stub)
4747 .create_pull_request_comment(self.0.request, self.0.options)
4748 .await
4749 .map(crate::Response::into_body)
4750 }
4751
4752 pub fn poller(
4754 self,
4755 ) -> impl google_cloud_lro::Poller<
4756 crate::model::PullRequestComment,
4757 crate::model::OperationMetadata,
4758 > {
4759 type Operation = google_cloud_lro::internal::Operation<
4760 crate::model::PullRequestComment,
4761 crate::model::OperationMetadata,
4762 >;
4763 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4764 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4765 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4766 if let Some(ref mut details) = poller_options.tracing {
4767 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::create_pull_request_comment::until_done";
4768 }
4769
4770 let stub = self.0.stub.clone();
4771 let mut options = self.0.options.clone();
4772 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4773 let query = move |name| {
4774 let stub = stub.clone();
4775 let options = options.clone();
4776 async {
4777 let op = GetOperation::new(stub)
4778 .set_name(name)
4779 .with_options(options)
4780 .send()
4781 .await?;
4782 Ok(Operation::new(op))
4783 }
4784 };
4785
4786 let start = move || async {
4787 let op = self.send().await?;
4788 Ok(Operation::new(op))
4789 };
4790
4791 use google_cloud_lro::internal::PollerExt;
4792 {
4793 google_cloud_lro::internal::new_poller(
4794 polling_error_policy,
4795 polling_backoff_policy,
4796 start,
4797 query,
4798 )
4799 }
4800 .with_options(poller_options)
4801 }
4802
4803 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4807 self.0.request.parent = v.into();
4808 self
4809 }
4810
4811 pub fn set_pull_request_comment<T>(mut self, v: T) -> Self
4815 where
4816 T: std::convert::Into<crate::model::PullRequestComment>,
4817 {
4818 self.0.request.pull_request_comment = std::option::Option::Some(v.into());
4819 self
4820 }
4821
4822 pub fn set_or_clear_pull_request_comment<T>(mut self, v: std::option::Option<T>) -> Self
4826 where
4827 T: std::convert::Into<crate::model::PullRequestComment>,
4828 {
4829 self.0.request.pull_request_comment = v.map(|x| x.into());
4830 self
4831 }
4832 }
4833
4834 #[doc(hidden)]
4835 impl crate::RequestBuilder for CreatePullRequestComment {
4836 fn request_options(&mut self) -> &mut crate::RequestOptions {
4837 &mut self.0.options
4838 }
4839 }
4840
4841 #[derive(Clone, Debug)]
4859 pub struct UpdatePullRequestComment(
4860 RequestBuilder<crate::model::UpdatePullRequestCommentRequest>,
4861 );
4862
4863 impl UpdatePullRequestComment {
4864 pub(crate) fn new(
4865 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
4866 ) -> Self {
4867 Self(RequestBuilder::new(stub))
4868 }
4869
4870 pub fn with_request<V: Into<crate::model::UpdatePullRequestCommentRequest>>(
4872 mut self,
4873 v: V,
4874 ) -> Self {
4875 self.0.request = v.into();
4876 self
4877 }
4878
4879 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4881 self.0.options = v.into();
4882 self
4883 }
4884
4885 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4892 (*self.0.stub)
4893 .update_pull_request_comment(self.0.request, self.0.options)
4894 .await
4895 .map(crate::Response::into_body)
4896 }
4897
4898 pub fn poller(
4900 self,
4901 ) -> impl google_cloud_lro::Poller<
4902 crate::model::PullRequestComment,
4903 crate::model::OperationMetadata,
4904 > {
4905 type Operation = google_cloud_lro::internal::Operation<
4906 crate::model::PullRequestComment,
4907 crate::model::OperationMetadata,
4908 >;
4909 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4910 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4911 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4912 if let Some(ref mut details) = poller_options.tracing {
4913 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::update_pull_request_comment::until_done";
4914 }
4915
4916 let stub = self.0.stub.clone();
4917 let mut options = self.0.options.clone();
4918 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4919 let query = move |name| {
4920 let stub = stub.clone();
4921 let options = options.clone();
4922 async {
4923 let op = GetOperation::new(stub)
4924 .set_name(name)
4925 .with_options(options)
4926 .send()
4927 .await?;
4928 Ok(Operation::new(op))
4929 }
4930 };
4931
4932 let start = move || async {
4933 let op = self.send().await?;
4934 Ok(Operation::new(op))
4935 };
4936
4937 use google_cloud_lro::internal::PollerExt;
4938 {
4939 google_cloud_lro::internal::new_poller(
4940 polling_error_policy,
4941 polling_backoff_policy,
4942 start,
4943 query,
4944 )
4945 }
4946 .with_options(poller_options)
4947 }
4948
4949 pub fn set_pull_request_comment<T>(mut self, v: T) -> Self
4953 where
4954 T: std::convert::Into<crate::model::PullRequestComment>,
4955 {
4956 self.0.request.pull_request_comment = std::option::Option::Some(v.into());
4957 self
4958 }
4959
4960 pub fn set_or_clear_pull_request_comment<T>(mut self, v: std::option::Option<T>) -> Self
4964 where
4965 T: std::convert::Into<crate::model::PullRequestComment>,
4966 {
4967 self.0.request.pull_request_comment = v.map(|x| x.into());
4968 self
4969 }
4970
4971 pub fn set_update_mask<T>(mut self, v: T) -> Self
4973 where
4974 T: std::convert::Into<wkt::FieldMask>,
4975 {
4976 self.0.request.update_mask = std::option::Option::Some(v.into());
4977 self
4978 }
4979
4980 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4982 where
4983 T: std::convert::Into<wkt::FieldMask>,
4984 {
4985 self.0.request.update_mask = v.map(|x| x.into());
4986 self
4987 }
4988 }
4989
4990 #[doc(hidden)]
4991 impl crate::RequestBuilder for UpdatePullRequestComment {
4992 fn request_options(&mut self) -> &mut crate::RequestOptions {
4993 &mut self.0.options
4994 }
4995 }
4996
4997 #[derive(Clone, Debug)]
5015 pub struct DeletePullRequestComment(
5016 RequestBuilder<crate::model::DeletePullRequestCommentRequest>,
5017 );
5018
5019 impl DeletePullRequestComment {
5020 pub(crate) fn new(
5021 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
5022 ) -> Self {
5023 Self(RequestBuilder::new(stub))
5024 }
5025
5026 pub fn with_request<V: Into<crate::model::DeletePullRequestCommentRequest>>(
5028 mut self,
5029 v: V,
5030 ) -> Self {
5031 self.0.request = v.into();
5032 self
5033 }
5034
5035 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5037 self.0.options = v.into();
5038 self
5039 }
5040
5041 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5048 (*self.0.stub)
5049 .delete_pull_request_comment(self.0.request, self.0.options)
5050 .await
5051 .map(crate::Response::into_body)
5052 }
5053
5054 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
5056 type Operation =
5057 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
5058 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5059 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5060 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5061 if let Some(ref mut details) = poller_options.tracing {
5062 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::delete_pull_request_comment::until_done";
5063 }
5064
5065 let stub = self.0.stub.clone();
5066 let mut options = self.0.options.clone();
5067 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5068 let query = move |name| {
5069 let stub = stub.clone();
5070 let options = options.clone();
5071 async {
5072 let op = GetOperation::new(stub)
5073 .set_name(name)
5074 .with_options(options)
5075 .send()
5076 .await?;
5077 Ok(Operation::new(op))
5078 }
5079 };
5080
5081 let start = move || async {
5082 let op = self.send().await?;
5083 Ok(Operation::new(op))
5084 };
5085
5086 use google_cloud_lro::internal::PollerExt;
5087 {
5088 google_cloud_lro::internal::new_unit_response_poller(
5089 polling_error_policy,
5090 polling_backoff_policy,
5091 start,
5092 query,
5093 )
5094 }
5095 .with_options(poller_options)
5096 }
5097
5098 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5102 self.0.request.name = v.into();
5103 self
5104 }
5105 }
5106
5107 #[doc(hidden)]
5108 impl crate::RequestBuilder for DeletePullRequestComment {
5109 fn request_options(&mut self) -> &mut crate::RequestOptions {
5110 &mut self.0.options
5111 }
5112 }
5113
5114 #[derive(Clone, Debug)]
5132 pub struct BatchCreatePullRequestComments(
5133 RequestBuilder<crate::model::BatchCreatePullRequestCommentsRequest>,
5134 );
5135
5136 impl BatchCreatePullRequestComments {
5137 pub(crate) fn new(
5138 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
5139 ) -> Self {
5140 Self(RequestBuilder::new(stub))
5141 }
5142
5143 pub fn with_request<V: Into<crate::model::BatchCreatePullRequestCommentsRequest>>(
5145 mut self,
5146 v: V,
5147 ) -> Self {
5148 self.0.request = v.into();
5149 self
5150 }
5151
5152 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5154 self.0.options = v.into();
5155 self
5156 }
5157
5158 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5165 (*self.0.stub)
5166 .batch_create_pull_request_comments(self.0.request, self.0.options)
5167 .await
5168 .map(crate::Response::into_body)
5169 }
5170
5171 pub fn poller(
5173 self,
5174 ) -> impl google_cloud_lro::Poller<
5175 crate::model::BatchCreatePullRequestCommentsResponse,
5176 crate::model::OperationMetadata,
5177 > {
5178 type Operation = google_cloud_lro::internal::Operation<
5179 crate::model::BatchCreatePullRequestCommentsResponse,
5180 crate::model::OperationMetadata,
5181 >;
5182 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5183 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5184 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5185 if let Some(ref mut details) = poller_options.tracing {
5186 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::batch_create_pull_request_comments::until_done";
5187 }
5188
5189 let stub = self.0.stub.clone();
5190 let mut options = self.0.options.clone();
5191 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5192 let query = move |name| {
5193 let stub = stub.clone();
5194 let options = options.clone();
5195 async {
5196 let op = GetOperation::new(stub)
5197 .set_name(name)
5198 .with_options(options)
5199 .send()
5200 .await?;
5201 Ok(Operation::new(op))
5202 }
5203 };
5204
5205 let start = move || async {
5206 let op = self.send().await?;
5207 Ok(Operation::new(op))
5208 };
5209
5210 use google_cloud_lro::internal::PollerExt;
5211 {
5212 google_cloud_lro::internal::new_poller(
5213 polling_error_policy,
5214 polling_backoff_policy,
5215 start,
5216 query,
5217 )
5218 }
5219 .with_options(poller_options)
5220 }
5221
5222 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5226 self.0.request.parent = v.into();
5227 self
5228 }
5229
5230 pub fn set_requests<T, V>(mut self, v: T) -> Self
5234 where
5235 T: std::iter::IntoIterator<Item = V>,
5236 V: std::convert::Into<crate::model::CreatePullRequestCommentRequest>,
5237 {
5238 use std::iter::Iterator;
5239 self.0.request.requests = v.into_iter().map(|i| i.into()).collect();
5240 self
5241 }
5242 }
5243
5244 #[doc(hidden)]
5245 impl crate::RequestBuilder for BatchCreatePullRequestComments {
5246 fn request_options(&mut self) -> &mut crate::RequestOptions {
5247 &mut self.0.options
5248 }
5249 }
5250
5251 #[derive(Clone, Debug)]
5269 pub struct ResolvePullRequestComments(
5270 RequestBuilder<crate::model::ResolvePullRequestCommentsRequest>,
5271 );
5272
5273 impl ResolvePullRequestComments {
5274 pub(crate) fn new(
5275 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
5276 ) -> Self {
5277 Self(RequestBuilder::new(stub))
5278 }
5279
5280 pub fn with_request<V: Into<crate::model::ResolvePullRequestCommentsRequest>>(
5282 mut self,
5283 v: V,
5284 ) -> Self {
5285 self.0.request = v.into();
5286 self
5287 }
5288
5289 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5291 self.0.options = v.into();
5292 self
5293 }
5294
5295 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5302 (*self.0.stub)
5303 .resolve_pull_request_comments(self.0.request, self.0.options)
5304 .await
5305 .map(crate::Response::into_body)
5306 }
5307
5308 pub fn poller(
5310 self,
5311 ) -> impl google_cloud_lro::Poller<
5312 crate::model::ResolvePullRequestCommentsResponse,
5313 crate::model::OperationMetadata,
5314 > {
5315 type Operation = google_cloud_lro::internal::Operation<
5316 crate::model::ResolvePullRequestCommentsResponse,
5317 crate::model::OperationMetadata,
5318 >;
5319 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5320 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5321 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5322 if let Some(ref mut details) = poller_options.tracing {
5323 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::resolve_pull_request_comments::until_done";
5324 }
5325
5326 let stub = self.0.stub.clone();
5327 let mut options = self.0.options.clone();
5328 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5329 let query = move |name| {
5330 let stub = stub.clone();
5331 let options = options.clone();
5332 async {
5333 let op = GetOperation::new(stub)
5334 .set_name(name)
5335 .with_options(options)
5336 .send()
5337 .await?;
5338 Ok(Operation::new(op))
5339 }
5340 };
5341
5342 let start = move || async {
5343 let op = self.send().await?;
5344 Ok(Operation::new(op))
5345 };
5346
5347 use google_cloud_lro::internal::PollerExt;
5348 {
5349 google_cloud_lro::internal::new_poller(
5350 polling_error_policy,
5351 polling_backoff_policy,
5352 start,
5353 query,
5354 )
5355 }
5356 .with_options(poller_options)
5357 }
5358
5359 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5363 self.0.request.parent = v.into();
5364 self
5365 }
5366
5367 pub fn set_names<T, V>(mut self, v: T) -> Self
5371 where
5372 T: std::iter::IntoIterator<Item = V>,
5373 V: std::convert::Into<std::string::String>,
5374 {
5375 use std::iter::Iterator;
5376 self.0.request.names = v.into_iter().map(|i| i.into()).collect();
5377 self
5378 }
5379
5380 pub fn set_auto_fill<T: Into<bool>>(mut self, v: T) -> Self {
5382 self.0.request.auto_fill = v.into();
5383 self
5384 }
5385 }
5386
5387 #[doc(hidden)]
5388 impl crate::RequestBuilder for ResolvePullRequestComments {
5389 fn request_options(&mut self) -> &mut crate::RequestOptions {
5390 &mut self.0.options
5391 }
5392 }
5393
5394 #[derive(Clone, Debug)]
5412 pub struct UnresolvePullRequestComments(
5413 RequestBuilder<crate::model::UnresolvePullRequestCommentsRequest>,
5414 );
5415
5416 impl UnresolvePullRequestComments {
5417 pub(crate) fn new(
5418 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
5419 ) -> Self {
5420 Self(RequestBuilder::new(stub))
5421 }
5422
5423 pub fn with_request<V: Into<crate::model::UnresolvePullRequestCommentsRequest>>(
5425 mut self,
5426 v: V,
5427 ) -> Self {
5428 self.0.request = v.into();
5429 self
5430 }
5431
5432 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5434 self.0.options = v.into();
5435 self
5436 }
5437
5438 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5445 (*self.0.stub)
5446 .unresolve_pull_request_comments(self.0.request, self.0.options)
5447 .await
5448 .map(crate::Response::into_body)
5449 }
5450
5451 pub fn poller(
5453 self,
5454 ) -> impl google_cloud_lro::Poller<
5455 crate::model::UnresolvePullRequestCommentsResponse,
5456 crate::model::OperationMetadata,
5457 > {
5458 type Operation = google_cloud_lro::internal::Operation<
5459 crate::model::UnresolvePullRequestCommentsResponse,
5460 crate::model::OperationMetadata,
5461 >;
5462 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5463 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5464 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5465 if let Some(ref mut details) = poller_options.tracing {
5466 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::unresolve_pull_request_comments::until_done";
5467 }
5468
5469 let stub = self.0.stub.clone();
5470 let mut options = self.0.options.clone();
5471 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5472 let query = move |name| {
5473 let stub = stub.clone();
5474 let options = options.clone();
5475 async {
5476 let op = GetOperation::new(stub)
5477 .set_name(name)
5478 .with_options(options)
5479 .send()
5480 .await?;
5481 Ok(Operation::new(op))
5482 }
5483 };
5484
5485 let start = move || async {
5486 let op = self.send().await?;
5487 Ok(Operation::new(op))
5488 };
5489
5490 use google_cloud_lro::internal::PollerExt;
5491 {
5492 google_cloud_lro::internal::new_poller(
5493 polling_error_policy,
5494 polling_backoff_policy,
5495 start,
5496 query,
5497 )
5498 }
5499 .with_options(poller_options)
5500 }
5501
5502 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5506 self.0.request.parent = v.into();
5507 self
5508 }
5509
5510 pub fn set_names<T, V>(mut self, v: T) -> Self
5514 where
5515 T: std::iter::IntoIterator<Item = V>,
5516 V: std::convert::Into<std::string::String>,
5517 {
5518 use std::iter::Iterator;
5519 self.0.request.names = v.into_iter().map(|i| i.into()).collect();
5520 self
5521 }
5522
5523 pub fn set_auto_fill<T: Into<bool>>(mut self, v: T) -> Self {
5525 self.0.request.auto_fill = v.into();
5526 self
5527 }
5528 }
5529
5530 #[doc(hidden)]
5531 impl crate::RequestBuilder for UnresolvePullRequestComments {
5532 fn request_options(&mut self) -> &mut crate::RequestOptions {
5533 &mut self.0.options
5534 }
5535 }
5536
5537 #[derive(Clone, Debug)]
5555 pub struct CreateIssueComment(RequestBuilder<crate::model::CreateIssueCommentRequest>);
5556
5557 impl CreateIssueComment {
5558 pub(crate) fn new(
5559 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
5560 ) -> Self {
5561 Self(RequestBuilder::new(stub))
5562 }
5563
5564 pub fn with_request<V: Into<crate::model::CreateIssueCommentRequest>>(
5566 mut self,
5567 v: V,
5568 ) -> Self {
5569 self.0.request = v.into();
5570 self
5571 }
5572
5573 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5575 self.0.options = v.into();
5576 self
5577 }
5578
5579 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5586 (*self.0.stub)
5587 .create_issue_comment(self.0.request, self.0.options)
5588 .await
5589 .map(crate::Response::into_body)
5590 }
5591
5592 pub fn poller(
5594 self,
5595 ) -> impl google_cloud_lro::Poller<crate::model::IssueComment, crate::model::OperationMetadata>
5596 {
5597 type Operation = google_cloud_lro::internal::Operation<
5598 crate::model::IssueComment,
5599 crate::model::OperationMetadata,
5600 >;
5601 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5602 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5603 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5604 if let Some(ref mut details) = poller_options.tracing {
5605 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::create_issue_comment::until_done";
5606 }
5607
5608 let stub = self.0.stub.clone();
5609 let mut options = self.0.options.clone();
5610 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5611 let query = move |name| {
5612 let stub = stub.clone();
5613 let options = options.clone();
5614 async {
5615 let op = GetOperation::new(stub)
5616 .set_name(name)
5617 .with_options(options)
5618 .send()
5619 .await?;
5620 Ok(Operation::new(op))
5621 }
5622 };
5623
5624 let start = move || async {
5625 let op = self.send().await?;
5626 Ok(Operation::new(op))
5627 };
5628
5629 use google_cloud_lro::internal::PollerExt;
5630 {
5631 google_cloud_lro::internal::new_poller(
5632 polling_error_policy,
5633 polling_backoff_policy,
5634 start,
5635 query,
5636 )
5637 }
5638 .with_options(poller_options)
5639 }
5640
5641 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5645 self.0.request.parent = v.into();
5646 self
5647 }
5648
5649 pub fn set_issue_comment<T>(mut self, v: T) -> Self
5653 where
5654 T: std::convert::Into<crate::model::IssueComment>,
5655 {
5656 self.0.request.issue_comment = std::option::Option::Some(v.into());
5657 self
5658 }
5659
5660 pub fn set_or_clear_issue_comment<T>(mut self, v: std::option::Option<T>) -> Self
5664 where
5665 T: std::convert::Into<crate::model::IssueComment>,
5666 {
5667 self.0.request.issue_comment = v.map(|x| x.into());
5668 self
5669 }
5670 }
5671
5672 #[doc(hidden)]
5673 impl crate::RequestBuilder for CreateIssueComment {
5674 fn request_options(&mut self) -> &mut crate::RequestOptions {
5675 &mut self.0.options
5676 }
5677 }
5678
5679 #[derive(Clone, Debug)]
5696 pub struct GetIssueComment(RequestBuilder<crate::model::GetIssueCommentRequest>);
5697
5698 impl GetIssueComment {
5699 pub(crate) fn new(
5700 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
5701 ) -> Self {
5702 Self(RequestBuilder::new(stub))
5703 }
5704
5705 pub fn with_request<V: Into<crate::model::GetIssueCommentRequest>>(mut self, v: V) -> Self {
5707 self.0.request = v.into();
5708 self
5709 }
5710
5711 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5713 self.0.options = v.into();
5714 self
5715 }
5716
5717 pub async fn send(self) -> Result<crate::model::IssueComment> {
5719 (*self.0.stub)
5720 .get_issue_comment(self.0.request, self.0.options)
5721 .await
5722 .map(crate::Response::into_body)
5723 }
5724
5725 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5729 self.0.request.name = v.into();
5730 self
5731 }
5732 }
5733
5734 #[doc(hidden)]
5735 impl crate::RequestBuilder for GetIssueComment {
5736 fn request_options(&mut self) -> &mut crate::RequestOptions {
5737 &mut self.0.options
5738 }
5739 }
5740
5741 #[derive(Clone, Debug)]
5762 pub struct ListIssueComments(RequestBuilder<crate::model::ListIssueCommentsRequest>);
5763
5764 impl ListIssueComments {
5765 pub(crate) fn new(
5766 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
5767 ) -> Self {
5768 Self(RequestBuilder::new(stub))
5769 }
5770
5771 pub fn with_request<V: Into<crate::model::ListIssueCommentsRequest>>(
5773 mut self,
5774 v: V,
5775 ) -> Self {
5776 self.0.request = v.into();
5777 self
5778 }
5779
5780 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5782 self.0.options = v.into();
5783 self
5784 }
5785
5786 pub async fn send(self) -> Result<crate::model::ListIssueCommentsResponse> {
5788 (*self.0.stub)
5789 .list_issue_comments(self.0.request, self.0.options)
5790 .await
5791 .map(crate::Response::into_body)
5792 }
5793
5794 pub fn by_page(
5796 self,
5797 ) -> impl google_cloud_gax::paginator::Paginator<
5798 crate::model::ListIssueCommentsResponse,
5799 crate::Error,
5800 > {
5801 use std::clone::Clone;
5802 let token = self.0.request.page_token.clone();
5803 let execute = move |token: String| {
5804 let mut builder = self.clone();
5805 builder.0.request = builder.0.request.set_page_token(token);
5806 builder.send()
5807 };
5808 google_cloud_gax::paginator::internal::new_paginator(token, execute)
5809 }
5810
5811 pub fn by_item(
5813 self,
5814 ) -> impl google_cloud_gax::paginator::ItemPaginator<
5815 crate::model::ListIssueCommentsResponse,
5816 crate::Error,
5817 > {
5818 use google_cloud_gax::paginator::Paginator;
5819 self.by_page().items()
5820 }
5821
5822 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5826 self.0.request.parent = v.into();
5827 self
5828 }
5829
5830 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5832 self.0.request.page_size = v.into();
5833 self
5834 }
5835
5836 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5838 self.0.request.page_token = v.into();
5839 self
5840 }
5841 }
5842
5843 #[doc(hidden)]
5844 impl crate::RequestBuilder for ListIssueComments {
5845 fn request_options(&mut self) -> &mut crate::RequestOptions {
5846 &mut self.0.options
5847 }
5848 }
5849
5850 #[derive(Clone, Debug)]
5868 pub struct UpdateIssueComment(RequestBuilder<crate::model::UpdateIssueCommentRequest>);
5869
5870 impl UpdateIssueComment {
5871 pub(crate) fn new(
5872 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
5873 ) -> Self {
5874 Self(RequestBuilder::new(stub))
5875 }
5876
5877 pub fn with_request<V: Into<crate::model::UpdateIssueCommentRequest>>(
5879 mut self,
5880 v: V,
5881 ) -> Self {
5882 self.0.request = v.into();
5883 self
5884 }
5885
5886 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5888 self.0.options = v.into();
5889 self
5890 }
5891
5892 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5899 (*self.0.stub)
5900 .update_issue_comment(self.0.request, self.0.options)
5901 .await
5902 .map(crate::Response::into_body)
5903 }
5904
5905 pub fn poller(
5907 self,
5908 ) -> impl google_cloud_lro::Poller<crate::model::IssueComment, crate::model::OperationMetadata>
5909 {
5910 type Operation = google_cloud_lro::internal::Operation<
5911 crate::model::IssueComment,
5912 crate::model::OperationMetadata,
5913 >;
5914 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5915 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5916 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5917 if let Some(ref mut details) = poller_options.tracing {
5918 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::update_issue_comment::until_done";
5919 }
5920
5921 let stub = self.0.stub.clone();
5922 let mut options = self.0.options.clone();
5923 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5924 let query = move |name| {
5925 let stub = stub.clone();
5926 let options = options.clone();
5927 async {
5928 let op = GetOperation::new(stub)
5929 .set_name(name)
5930 .with_options(options)
5931 .send()
5932 .await?;
5933 Ok(Operation::new(op))
5934 }
5935 };
5936
5937 let start = move || async {
5938 let op = self.send().await?;
5939 Ok(Operation::new(op))
5940 };
5941
5942 use google_cloud_lro::internal::PollerExt;
5943 {
5944 google_cloud_lro::internal::new_poller(
5945 polling_error_policy,
5946 polling_backoff_policy,
5947 start,
5948 query,
5949 )
5950 }
5951 .with_options(poller_options)
5952 }
5953
5954 pub fn set_issue_comment<T>(mut self, v: T) -> Self
5958 where
5959 T: std::convert::Into<crate::model::IssueComment>,
5960 {
5961 self.0.request.issue_comment = std::option::Option::Some(v.into());
5962 self
5963 }
5964
5965 pub fn set_or_clear_issue_comment<T>(mut self, v: std::option::Option<T>) -> Self
5969 where
5970 T: std::convert::Into<crate::model::IssueComment>,
5971 {
5972 self.0.request.issue_comment = v.map(|x| x.into());
5973 self
5974 }
5975
5976 pub fn set_update_mask<T>(mut self, v: T) -> Self
5978 where
5979 T: std::convert::Into<wkt::FieldMask>,
5980 {
5981 self.0.request.update_mask = std::option::Option::Some(v.into());
5982 self
5983 }
5984
5985 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5987 where
5988 T: std::convert::Into<wkt::FieldMask>,
5989 {
5990 self.0.request.update_mask = v.map(|x| x.into());
5991 self
5992 }
5993 }
5994
5995 #[doc(hidden)]
5996 impl crate::RequestBuilder for UpdateIssueComment {
5997 fn request_options(&mut self) -> &mut crate::RequestOptions {
5998 &mut self.0.options
5999 }
6000 }
6001
6002 #[derive(Clone, Debug)]
6020 pub struct DeleteIssueComment(RequestBuilder<crate::model::DeleteIssueCommentRequest>);
6021
6022 impl DeleteIssueComment {
6023 pub(crate) fn new(
6024 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
6025 ) -> Self {
6026 Self(RequestBuilder::new(stub))
6027 }
6028
6029 pub fn with_request<V: Into<crate::model::DeleteIssueCommentRequest>>(
6031 mut self,
6032 v: V,
6033 ) -> Self {
6034 self.0.request = v.into();
6035 self
6036 }
6037
6038 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6040 self.0.options = v.into();
6041 self
6042 }
6043
6044 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6051 (*self.0.stub)
6052 .delete_issue_comment(self.0.request, self.0.options)
6053 .await
6054 .map(crate::Response::into_body)
6055 }
6056
6057 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
6059 type Operation =
6060 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
6061 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6062 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6063 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
6064 if let Some(ref mut details) = poller_options.tracing {
6065 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::delete_issue_comment::until_done";
6066 }
6067
6068 let stub = self.0.stub.clone();
6069 let mut options = self.0.options.clone();
6070 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6071 let query = move |name| {
6072 let stub = stub.clone();
6073 let options = options.clone();
6074 async {
6075 let op = GetOperation::new(stub)
6076 .set_name(name)
6077 .with_options(options)
6078 .send()
6079 .await?;
6080 Ok(Operation::new(op))
6081 }
6082 };
6083
6084 let start = move || async {
6085 let op = self.send().await?;
6086 Ok(Operation::new(op))
6087 };
6088
6089 use google_cloud_lro::internal::PollerExt;
6090 {
6091 google_cloud_lro::internal::new_unit_response_poller(
6092 polling_error_policy,
6093 polling_backoff_policy,
6094 start,
6095 query,
6096 )
6097 }
6098 .with_options(poller_options)
6099 }
6100
6101 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6105 self.0.request.name = v.into();
6106 self
6107 }
6108 }
6109
6110 #[doc(hidden)]
6111 impl crate::RequestBuilder for DeleteIssueComment {
6112 fn request_options(&mut self) -> &mut crate::RequestOptions {
6113 &mut self.0.options
6114 }
6115 }
6116
6117 #[derive(Clone, Debug)]
6138 pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
6139
6140 impl ListLocations {
6141 pub(crate) fn new(
6142 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
6143 ) -> Self {
6144 Self(RequestBuilder::new(stub))
6145 }
6146
6147 pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
6149 mut self,
6150 v: V,
6151 ) -> Self {
6152 self.0.request = v.into();
6153 self
6154 }
6155
6156 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6158 self.0.options = v.into();
6159 self
6160 }
6161
6162 pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
6164 (*self.0.stub)
6165 .list_locations(self.0.request, self.0.options)
6166 .await
6167 .map(crate::Response::into_body)
6168 }
6169
6170 pub fn by_page(
6172 self,
6173 ) -> impl google_cloud_gax::paginator::Paginator<
6174 google_cloud_location::model::ListLocationsResponse,
6175 crate::Error,
6176 > {
6177 use std::clone::Clone;
6178 let token = self.0.request.page_token.clone();
6179 let execute = move |token: String| {
6180 let mut builder = self.clone();
6181 builder.0.request = builder.0.request.set_page_token(token);
6182 builder.send()
6183 };
6184 google_cloud_gax::paginator::internal::new_paginator(token, execute)
6185 }
6186
6187 pub fn by_item(
6189 self,
6190 ) -> impl google_cloud_gax::paginator::ItemPaginator<
6191 google_cloud_location::model::ListLocationsResponse,
6192 crate::Error,
6193 > {
6194 use google_cloud_gax::paginator::Paginator;
6195 self.by_page().items()
6196 }
6197
6198 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6200 self.0.request.name = v.into();
6201 self
6202 }
6203
6204 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6206 self.0.request.filter = v.into();
6207 self
6208 }
6209
6210 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6212 self.0.request.page_size = v.into();
6213 self
6214 }
6215
6216 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6218 self.0.request.page_token = v.into();
6219 self
6220 }
6221 }
6222
6223 #[doc(hidden)]
6224 impl crate::RequestBuilder for ListLocations {
6225 fn request_options(&mut self) -> &mut crate::RequestOptions {
6226 &mut self.0.options
6227 }
6228 }
6229
6230 #[derive(Clone, Debug)]
6247 pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
6248
6249 impl GetLocation {
6250 pub(crate) fn new(
6251 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
6252 ) -> Self {
6253 Self(RequestBuilder::new(stub))
6254 }
6255
6256 pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
6258 mut self,
6259 v: V,
6260 ) -> Self {
6261 self.0.request = v.into();
6262 self
6263 }
6264
6265 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6267 self.0.options = v.into();
6268 self
6269 }
6270
6271 pub async fn send(self) -> Result<google_cloud_location::model::Location> {
6273 (*self.0.stub)
6274 .get_location(self.0.request, self.0.options)
6275 .await
6276 .map(crate::Response::into_body)
6277 }
6278
6279 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6281 self.0.request.name = v.into();
6282 self
6283 }
6284 }
6285
6286 #[doc(hidden)]
6287 impl crate::RequestBuilder for GetLocation {
6288 fn request_options(&mut self) -> &mut crate::RequestOptions {
6289 &mut self.0.options
6290 }
6291 }
6292
6293 #[derive(Clone, Debug)]
6310 pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
6311
6312 impl SetIamPolicy {
6313 pub(crate) fn new(
6314 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
6315 ) -> Self {
6316 Self(RequestBuilder::new(stub))
6317 }
6318
6319 pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
6321 mut self,
6322 v: V,
6323 ) -> Self {
6324 self.0.request = v.into();
6325 self
6326 }
6327
6328 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6330 self.0.options = v.into();
6331 self
6332 }
6333
6334 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
6336 (*self.0.stub)
6337 .set_iam_policy(self.0.request, self.0.options)
6338 .await
6339 .map(crate::Response::into_body)
6340 }
6341
6342 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
6346 self.0.request.resource = v.into();
6347 self
6348 }
6349
6350 pub fn set_policy<T>(mut self, v: T) -> Self
6354 where
6355 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
6356 {
6357 self.0.request.policy = std::option::Option::Some(v.into());
6358 self
6359 }
6360
6361 pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
6365 where
6366 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
6367 {
6368 self.0.request.policy = v.map(|x| x.into());
6369 self
6370 }
6371
6372 pub fn set_update_mask<T>(mut self, v: T) -> Self
6374 where
6375 T: std::convert::Into<wkt::FieldMask>,
6376 {
6377 self.0.request.update_mask = std::option::Option::Some(v.into());
6378 self
6379 }
6380
6381 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6383 where
6384 T: std::convert::Into<wkt::FieldMask>,
6385 {
6386 self.0.request.update_mask = v.map(|x| x.into());
6387 self
6388 }
6389 }
6390
6391 #[doc(hidden)]
6392 impl crate::RequestBuilder for SetIamPolicy {
6393 fn request_options(&mut self) -> &mut crate::RequestOptions {
6394 &mut self.0.options
6395 }
6396 }
6397
6398 #[derive(Clone, Debug)]
6415 pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
6416
6417 impl GetIamPolicy {
6418 pub(crate) fn new(
6419 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
6420 ) -> Self {
6421 Self(RequestBuilder::new(stub))
6422 }
6423
6424 pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
6426 mut self,
6427 v: V,
6428 ) -> Self {
6429 self.0.request = v.into();
6430 self
6431 }
6432
6433 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6435 self.0.options = v.into();
6436 self
6437 }
6438
6439 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
6441 (*self.0.stub)
6442 .get_iam_policy(self.0.request, self.0.options)
6443 .await
6444 .map(crate::Response::into_body)
6445 }
6446
6447 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
6451 self.0.request.resource = v.into();
6452 self
6453 }
6454
6455 pub fn set_options<T>(mut self, v: T) -> Self
6457 where
6458 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
6459 {
6460 self.0.request.options = std::option::Option::Some(v.into());
6461 self
6462 }
6463
6464 pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
6466 where
6467 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
6468 {
6469 self.0.request.options = v.map(|x| x.into());
6470 self
6471 }
6472 }
6473
6474 #[doc(hidden)]
6475 impl crate::RequestBuilder for GetIamPolicy {
6476 fn request_options(&mut self) -> &mut crate::RequestOptions {
6477 &mut self.0.options
6478 }
6479 }
6480
6481 #[derive(Clone, Debug)]
6498 pub struct TestIamPermissions(
6499 RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
6500 );
6501
6502 impl TestIamPermissions {
6503 pub(crate) fn new(
6504 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
6505 ) -> Self {
6506 Self(RequestBuilder::new(stub))
6507 }
6508
6509 pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
6511 mut self,
6512 v: V,
6513 ) -> Self {
6514 self.0.request = v.into();
6515 self
6516 }
6517
6518 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6520 self.0.options = v.into();
6521 self
6522 }
6523
6524 pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
6526 (*self.0.stub)
6527 .test_iam_permissions(self.0.request, self.0.options)
6528 .await
6529 .map(crate::Response::into_body)
6530 }
6531
6532 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
6536 self.0.request.resource = v.into();
6537 self
6538 }
6539
6540 pub fn set_permissions<T, V>(mut self, v: T) -> Self
6544 where
6545 T: std::iter::IntoIterator<Item = V>,
6546 V: std::convert::Into<std::string::String>,
6547 {
6548 use std::iter::Iterator;
6549 self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
6550 self
6551 }
6552 }
6553
6554 #[doc(hidden)]
6555 impl crate::RequestBuilder for TestIamPermissions {
6556 fn request_options(&mut self) -> &mut crate::RequestOptions {
6557 &mut self.0.options
6558 }
6559 }
6560
6561 #[derive(Clone, Debug)]
6582 pub struct ListOperations(
6583 RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
6584 );
6585
6586 impl ListOperations {
6587 pub(crate) fn new(
6588 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
6589 ) -> Self {
6590 Self(RequestBuilder::new(stub))
6591 }
6592
6593 pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
6595 mut self,
6596 v: V,
6597 ) -> Self {
6598 self.0.request = v.into();
6599 self
6600 }
6601
6602 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6604 self.0.options = v.into();
6605 self
6606 }
6607
6608 pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
6610 (*self.0.stub)
6611 .list_operations(self.0.request, self.0.options)
6612 .await
6613 .map(crate::Response::into_body)
6614 }
6615
6616 pub fn by_page(
6618 self,
6619 ) -> impl google_cloud_gax::paginator::Paginator<
6620 google_cloud_longrunning::model::ListOperationsResponse,
6621 crate::Error,
6622 > {
6623 use std::clone::Clone;
6624 let token = self.0.request.page_token.clone();
6625 let execute = move |token: String| {
6626 let mut builder = self.clone();
6627 builder.0.request = builder.0.request.set_page_token(token);
6628 builder.send()
6629 };
6630 google_cloud_gax::paginator::internal::new_paginator(token, execute)
6631 }
6632
6633 pub fn by_item(
6635 self,
6636 ) -> impl google_cloud_gax::paginator::ItemPaginator<
6637 google_cloud_longrunning::model::ListOperationsResponse,
6638 crate::Error,
6639 > {
6640 use google_cloud_gax::paginator::Paginator;
6641 self.by_page().items()
6642 }
6643
6644 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6646 self.0.request.name = v.into();
6647 self
6648 }
6649
6650 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6652 self.0.request.filter = v.into();
6653 self
6654 }
6655
6656 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6658 self.0.request.page_size = v.into();
6659 self
6660 }
6661
6662 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6664 self.0.request.page_token = v.into();
6665 self
6666 }
6667
6668 pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
6670 self.0.request.return_partial_success = v.into();
6671 self
6672 }
6673 }
6674
6675 #[doc(hidden)]
6676 impl crate::RequestBuilder for ListOperations {
6677 fn request_options(&mut self) -> &mut crate::RequestOptions {
6678 &mut self.0.options
6679 }
6680 }
6681
6682 #[derive(Clone, Debug)]
6699 pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
6700
6701 impl GetOperation {
6702 pub(crate) fn new(
6703 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
6704 ) -> Self {
6705 Self(RequestBuilder::new(stub))
6706 }
6707
6708 pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
6710 mut self,
6711 v: V,
6712 ) -> Self {
6713 self.0.request = v.into();
6714 self
6715 }
6716
6717 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6719 self.0.options = v.into();
6720 self
6721 }
6722
6723 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6725 (*self.0.stub)
6726 .get_operation(self.0.request, self.0.options)
6727 .await
6728 .map(crate::Response::into_body)
6729 }
6730
6731 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6733 self.0.request.name = v.into();
6734 self
6735 }
6736 }
6737
6738 #[doc(hidden)]
6739 impl crate::RequestBuilder for GetOperation {
6740 fn request_options(&mut self) -> &mut crate::RequestOptions {
6741 &mut self.0.options
6742 }
6743 }
6744
6745 #[derive(Clone, Debug)]
6762 pub struct DeleteOperation(
6763 RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
6764 );
6765
6766 impl DeleteOperation {
6767 pub(crate) fn new(
6768 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
6769 ) -> Self {
6770 Self(RequestBuilder::new(stub))
6771 }
6772
6773 pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
6775 mut self,
6776 v: V,
6777 ) -> Self {
6778 self.0.request = v.into();
6779 self
6780 }
6781
6782 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6784 self.0.options = v.into();
6785 self
6786 }
6787
6788 pub async fn send(self) -> Result<()> {
6790 (*self.0.stub)
6791 .delete_operation(self.0.request, self.0.options)
6792 .await
6793 .map(crate::Response::into_body)
6794 }
6795
6796 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6798 self.0.request.name = v.into();
6799 self
6800 }
6801 }
6802
6803 #[doc(hidden)]
6804 impl crate::RequestBuilder for DeleteOperation {
6805 fn request_options(&mut self) -> &mut crate::RequestOptions {
6806 &mut self.0.options
6807 }
6808 }
6809
6810 #[derive(Clone, Debug)]
6827 pub struct CancelOperation(
6828 RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
6829 );
6830
6831 impl CancelOperation {
6832 pub(crate) fn new(
6833 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
6834 ) -> Self {
6835 Self(RequestBuilder::new(stub))
6836 }
6837
6838 pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
6840 mut self,
6841 v: V,
6842 ) -> Self {
6843 self.0.request = v.into();
6844 self
6845 }
6846
6847 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6849 self.0.options = v.into();
6850 self
6851 }
6852
6853 pub async fn send(self) -> Result<()> {
6855 (*self.0.stub)
6856 .cancel_operation(self.0.request, self.0.options)
6857 .await
6858 .map(crate::Response::into_body)
6859 }
6860
6861 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6863 self.0.request.name = v.into();
6864 self
6865 }
6866 }
6867
6868 #[doc(hidden)]
6869 impl crate::RequestBuilder for CancelOperation {
6870 fn request_options(&mut self) -> &mut crate::RequestOptions {
6871 &mut self.0.options
6872 }
6873 }
6874}