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)]
3716 pub struct FetchRefs(RequestBuilder<crate::model::FetchRefsRequest>);
3717
3718 impl FetchRefs {
3719 pub(crate) fn new(
3720 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
3721 ) -> Self {
3722 Self(RequestBuilder::new(stub))
3723 }
3724
3725 pub fn with_request<V: Into<crate::model::FetchRefsRequest>>(mut self, v: V) -> Self {
3727 self.0.request = v.into();
3728 self
3729 }
3730
3731 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3733 self.0.options = v.into();
3734 self
3735 }
3736
3737 pub async fn send(self) -> Result<crate::model::FetchRefsResponse> {
3739 (*self.0.stub)
3740 .fetch_refs(self.0.request, self.0.options)
3741 .await
3742 .map(crate::Response::into_body)
3743 }
3744
3745 pub fn by_page(
3747 self,
3748 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::FetchRefsResponse, crate::Error>
3749 {
3750 use std::clone::Clone;
3751 let token = self.0.request.page_token.clone();
3752 let execute = move |token: String| {
3753 let mut builder = self.clone();
3754 builder.0.request = builder.0.request.set_page_token(token);
3755 builder.send()
3756 };
3757 google_cloud_gax::paginator::internal::new_paginator(token, execute)
3758 }
3759
3760 pub fn by_item(
3762 self,
3763 ) -> impl google_cloud_gax::paginator::ItemPaginator<crate::model::FetchRefsResponse, crate::Error>
3764 {
3765 use google_cloud_gax::paginator::Paginator;
3766 self.by_page().items()
3767 }
3768
3769 pub fn set_repository<T: Into<std::string::String>>(mut self, v: T) -> Self {
3773 self.0.request.repository = v.into();
3774 self
3775 }
3776
3777 pub fn set_type<T: Into<crate::model::r#ref::RefType>>(mut self, v: T) -> Self {
3779 self.0.request.r#type = v.into();
3780 self
3781 }
3782
3783 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3785 self.0.request.page_size = v.into();
3786 self
3787 }
3788
3789 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3791 self.0.request.page_token = v.into();
3792 self
3793 }
3794 }
3795
3796 #[doc(hidden)]
3797 impl crate::RequestBuilder for FetchRefs {
3798 fn request_options(&mut self) -> &mut crate::RequestOptions {
3799 &mut self.0.options
3800 }
3801 }
3802
3803 #[derive(Clone, Debug)]
3821 pub struct CreateIssue(RequestBuilder<crate::model::CreateIssueRequest>);
3822
3823 impl CreateIssue {
3824 pub(crate) fn new(
3825 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
3826 ) -> Self {
3827 Self(RequestBuilder::new(stub))
3828 }
3829
3830 pub fn with_request<V: Into<crate::model::CreateIssueRequest>>(mut self, v: V) -> Self {
3832 self.0.request = v.into();
3833 self
3834 }
3835
3836 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3838 self.0.options = v.into();
3839 self
3840 }
3841
3842 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
3849 (*self.0.stub)
3850 .create_issue(self.0.request, self.0.options)
3851 .await
3852 .map(crate::Response::into_body)
3853 }
3854
3855 pub fn poller(
3857 self,
3858 ) -> impl google_cloud_lro::Poller<crate::model::Issue, crate::model::OperationMetadata>
3859 {
3860 type Operation = google_cloud_lro::internal::Operation<
3861 crate::model::Issue,
3862 crate::model::OperationMetadata,
3863 >;
3864 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3865 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3866 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
3867 if let Some(ref mut details) = poller_options.tracing {
3868 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::create_issue::until_done";
3869 }
3870
3871 let stub = self.0.stub.clone();
3872 let mut options = self.0.options.clone();
3873 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
3874 let query = move |name| {
3875 let stub = stub.clone();
3876 let options = options.clone();
3877 async {
3878 let op = GetOperation::new(stub)
3879 .set_name(name)
3880 .with_options(options)
3881 .send()
3882 .await?;
3883 Ok(Operation::new(op))
3884 }
3885 };
3886
3887 let start = move || async {
3888 let op = self.send().await?;
3889 Ok(Operation::new(op))
3890 };
3891
3892 use google_cloud_lro::internal::PollerExt;
3893 {
3894 google_cloud_lro::internal::new_poller(
3895 polling_error_policy,
3896 polling_backoff_policy,
3897 start,
3898 query,
3899 )
3900 }
3901 .with_options(poller_options)
3902 }
3903
3904 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3908 self.0.request.parent = v.into();
3909 self
3910 }
3911
3912 pub fn set_issue<T>(mut self, v: T) -> Self
3916 where
3917 T: std::convert::Into<crate::model::Issue>,
3918 {
3919 self.0.request.issue = std::option::Option::Some(v.into());
3920 self
3921 }
3922
3923 pub fn set_or_clear_issue<T>(mut self, v: std::option::Option<T>) -> Self
3927 where
3928 T: std::convert::Into<crate::model::Issue>,
3929 {
3930 self.0.request.issue = v.map(|x| x.into());
3931 self
3932 }
3933 }
3934
3935 #[doc(hidden)]
3936 impl crate::RequestBuilder for CreateIssue {
3937 fn request_options(&mut self) -> &mut crate::RequestOptions {
3938 &mut self.0.options
3939 }
3940 }
3941
3942 #[derive(Clone, Debug)]
3959 pub struct GetIssue(RequestBuilder<crate::model::GetIssueRequest>);
3960
3961 impl GetIssue {
3962 pub(crate) fn new(
3963 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
3964 ) -> Self {
3965 Self(RequestBuilder::new(stub))
3966 }
3967
3968 pub fn with_request<V: Into<crate::model::GetIssueRequest>>(mut self, v: V) -> Self {
3970 self.0.request = v.into();
3971 self
3972 }
3973
3974 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
3976 self.0.options = v.into();
3977 self
3978 }
3979
3980 pub async fn send(self) -> Result<crate::model::Issue> {
3982 (*self.0.stub)
3983 .get_issue(self.0.request, self.0.options)
3984 .await
3985 .map(crate::Response::into_body)
3986 }
3987
3988 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3992 self.0.request.name = v.into();
3993 self
3994 }
3995 }
3996
3997 #[doc(hidden)]
3998 impl crate::RequestBuilder for GetIssue {
3999 fn request_options(&mut self) -> &mut crate::RequestOptions {
4000 &mut self.0.options
4001 }
4002 }
4003
4004 #[derive(Clone, Debug)]
4025 pub struct ListIssues(RequestBuilder<crate::model::ListIssuesRequest>);
4026
4027 impl ListIssues {
4028 pub(crate) fn new(
4029 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
4030 ) -> Self {
4031 Self(RequestBuilder::new(stub))
4032 }
4033
4034 pub fn with_request<V: Into<crate::model::ListIssuesRequest>>(mut self, v: V) -> Self {
4036 self.0.request = v.into();
4037 self
4038 }
4039
4040 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4042 self.0.options = v.into();
4043 self
4044 }
4045
4046 pub async fn send(self) -> Result<crate::model::ListIssuesResponse> {
4048 (*self.0.stub)
4049 .list_issues(self.0.request, self.0.options)
4050 .await
4051 .map(crate::Response::into_body)
4052 }
4053
4054 pub fn by_page(
4056 self,
4057 ) -> impl google_cloud_gax::paginator::Paginator<crate::model::ListIssuesResponse, crate::Error>
4058 {
4059 use std::clone::Clone;
4060 let token = self.0.request.page_token.clone();
4061 let execute = move |token: String| {
4062 let mut builder = self.clone();
4063 builder.0.request = builder.0.request.set_page_token(token);
4064 builder.send()
4065 };
4066 google_cloud_gax::paginator::internal::new_paginator(token, execute)
4067 }
4068
4069 pub fn by_item(
4071 self,
4072 ) -> impl google_cloud_gax::paginator::ItemPaginator<
4073 crate::model::ListIssuesResponse,
4074 crate::Error,
4075 > {
4076 use google_cloud_gax::paginator::Paginator;
4077 self.by_page().items()
4078 }
4079
4080 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4084 self.0.request.parent = v.into();
4085 self
4086 }
4087
4088 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4090 self.0.request.page_size = v.into();
4091 self
4092 }
4093
4094 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4096 self.0.request.page_token = v.into();
4097 self
4098 }
4099
4100 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4102 self.0.request.filter = v.into();
4103 self
4104 }
4105 }
4106
4107 #[doc(hidden)]
4108 impl crate::RequestBuilder for ListIssues {
4109 fn request_options(&mut self) -> &mut crate::RequestOptions {
4110 &mut self.0.options
4111 }
4112 }
4113
4114 #[derive(Clone, Debug)]
4132 pub struct UpdateIssue(RequestBuilder<crate::model::UpdateIssueRequest>);
4133
4134 impl UpdateIssue {
4135 pub(crate) fn new(
4136 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
4137 ) -> Self {
4138 Self(RequestBuilder::new(stub))
4139 }
4140
4141 pub fn with_request<V: Into<crate::model::UpdateIssueRequest>>(mut self, v: V) -> Self {
4143 self.0.request = v.into();
4144 self
4145 }
4146
4147 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4149 self.0.options = v.into();
4150 self
4151 }
4152
4153 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4160 (*self.0.stub)
4161 .update_issue(self.0.request, self.0.options)
4162 .await
4163 .map(crate::Response::into_body)
4164 }
4165
4166 pub fn poller(
4168 self,
4169 ) -> impl google_cloud_lro::Poller<crate::model::Issue, crate::model::OperationMetadata>
4170 {
4171 type Operation = google_cloud_lro::internal::Operation<
4172 crate::model::Issue,
4173 crate::model::OperationMetadata,
4174 >;
4175 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4176 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4177 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4178 if let Some(ref mut details) = poller_options.tracing {
4179 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::update_issue::until_done";
4180 }
4181
4182 let stub = self.0.stub.clone();
4183 let mut options = self.0.options.clone();
4184 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4185 let query = move |name| {
4186 let stub = stub.clone();
4187 let options = options.clone();
4188 async {
4189 let op = GetOperation::new(stub)
4190 .set_name(name)
4191 .with_options(options)
4192 .send()
4193 .await?;
4194 Ok(Operation::new(op))
4195 }
4196 };
4197
4198 let start = move || async {
4199 let op = self.send().await?;
4200 Ok(Operation::new(op))
4201 };
4202
4203 use google_cloud_lro::internal::PollerExt;
4204 {
4205 google_cloud_lro::internal::new_poller(
4206 polling_error_policy,
4207 polling_backoff_policy,
4208 start,
4209 query,
4210 )
4211 }
4212 .with_options(poller_options)
4213 }
4214
4215 pub fn set_issue<T>(mut self, v: T) -> Self
4219 where
4220 T: std::convert::Into<crate::model::Issue>,
4221 {
4222 self.0.request.issue = std::option::Option::Some(v.into());
4223 self
4224 }
4225
4226 pub fn set_or_clear_issue<T>(mut self, v: std::option::Option<T>) -> Self
4230 where
4231 T: std::convert::Into<crate::model::Issue>,
4232 {
4233 self.0.request.issue = v.map(|x| x.into());
4234 self
4235 }
4236
4237 pub fn set_update_mask<T>(mut self, v: T) -> Self
4239 where
4240 T: std::convert::Into<wkt::FieldMask>,
4241 {
4242 self.0.request.update_mask = std::option::Option::Some(v.into());
4243 self
4244 }
4245
4246 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4248 where
4249 T: std::convert::Into<wkt::FieldMask>,
4250 {
4251 self.0.request.update_mask = v.map(|x| x.into());
4252 self
4253 }
4254 }
4255
4256 #[doc(hidden)]
4257 impl crate::RequestBuilder for UpdateIssue {
4258 fn request_options(&mut self) -> &mut crate::RequestOptions {
4259 &mut self.0.options
4260 }
4261 }
4262
4263 #[derive(Clone, Debug)]
4281 pub struct DeleteIssue(RequestBuilder<crate::model::DeleteIssueRequest>);
4282
4283 impl DeleteIssue {
4284 pub(crate) fn new(
4285 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
4286 ) -> Self {
4287 Self(RequestBuilder::new(stub))
4288 }
4289
4290 pub fn with_request<V: Into<crate::model::DeleteIssueRequest>>(mut self, v: V) -> Self {
4292 self.0.request = v.into();
4293 self
4294 }
4295
4296 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4298 self.0.options = v.into();
4299 self
4300 }
4301
4302 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4309 (*self.0.stub)
4310 .delete_issue(self.0.request, self.0.options)
4311 .await
4312 .map(crate::Response::into_body)
4313 }
4314
4315 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
4317 type Operation =
4318 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
4319 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4320 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4321 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4322 if let Some(ref mut details) = poller_options.tracing {
4323 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::delete_issue::until_done";
4324 }
4325
4326 let stub = self.0.stub.clone();
4327 let mut options = self.0.options.clone();
4328 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4329 let query = move |name| {
4330 let stub = stub.clone();
4331 let options = options.clone();
4332 async {
4333 let op = GetOperation::new(stub)
4334 .set_name(name)
4335 .with_options(options)
4336 .send()
4337 .await?;
4338 Ok(Operation::new(op))
4339 }
4340 };
4341
4342 let start = move || async {
4343 let op = self.send().await?;
4344 Ok(Operation::new(op))
4345 };
4346
4347 use google_cloud_lro::internal::PollerExt;
4348 {
4349 google_cloud_lro::internal::new_unit_response_poller(
4350 polling_error_policy,
4351 polling_backoff_policy,
4352 start,
4353 query,
4354 )
4355 }
4356 .with_options(poller_options)
4357 }
4358
4359 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4363 self.0.request.name = v.into();
4364 self
4365 }
4366
4367 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
4369 self.0.request.etag = v.into();
4370 self
4371 }
4372 }
4373
4374 #[doc(hidden)]
4375 impl crate::RequestBuilder for DeleteIssue {
4376 fn request_options(&mut self) -> &mut crate::RequestOptions {
4377 &mut self.0.options
4378 }
4379 }
4380
4381 #[derive(Clone, Debug)]
4399 pub struct OpenIssue(RequestBuilder<crate::model::OpenIssueRequest>);
4400
4401 impl OpenIssue {
4402 pub(crate) fn new(
4403 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
4404 ) -> Self {
4405 Self(RequestBuilder::new(stub))
4406 }
4407
4408 pub fn with_request<V: Into<crate::model::OpenIssueRequest>>(mut self, v: V) -> Self {
4410 self.0.request = v.into();
4411 self
4412 }
4413
4414 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4416 self.0.options = v.into();
4417 self
4418 }
4419
4420 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4427 (*self.0.stub)
4428 .open_issue(self.0.request, self.0.options)
4429 .await
4430 .map(crate::Response::into_body)
4431 }
4432
4433 pub fn poller(
4435 self,
4436 ) -> impl google_cloud_lro::Poller<crate::model::Issue, crate::model::OperationMetadata>
4437 {
4438 type Operation = google_cloud_lro::internal::Operation<
4439 crate::model::Issue,
4440 crate::model::OperationMetadata,
4441 >;
4442 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4443 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4444 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4445 if let Some(ref mut details) = poller_options.tracing {
4446 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::open_issue::until_done";
4447 }
4448
4449 let stub = self.0.stub.clone();
4450 let mut options = self.0.options.clone();
4451 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4452 let query = move |name| {
4453 let stub = stub.clone();
4454 let options = options.clone();
4455 async {
4456 let op = GetOperation::new(stub)
4457 .set_name(name)
4458 .with_options(options)
4459 .send()
4460 .await?;
4461 Ok(Operation::new(op))
4462 }
4463 };
4464
4465 let start = move || async {
4466 let op = self.send().await?;
4467 Ok(Operation::new(op))
4468 };
4469
4470 use google_cloud_lro::internal::PollerExt;
4471 {
4472 google_cloud_lro::internal::new_poller(
4473 polling_error_policy,
4474 polling_backoff_policy,
4475 start,
4476 query,
4477 )
4478 }
4479 .with_options(poller_options)
4480 }
4481
4482 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4486 self.0.request.name = v.into();
4487 self
4488 }
4489
4490 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
4492 self.0.request.etag = v.into();
4493 self
4494 }
4495 }
4496
4497 #[doc(hidden)]
4498 impl crate::RequestBuilder for OpenIssue {
4499 fn request_options(&mut self) -> &mut crate::RequestOptions {
4500 &mut self.0.options
4501 }
4502 }
4503
4504 #[derive(Clone, Debug)]
4522 pub struct CloseIssue(RequestBuilder<crate::model::CloseIssueRequest>);
4523
4524 impl CloseIssue {
4525 pub(crate) fn new(
4526 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
4527 ) -> Self {
4528 Self(RequestBuilder::new(stub))
4529 }
4530
4531 pub fn with_request<V: Into<crate::model::CloseIssueRequest>>(mut self, v: V) -> Self {
4533 self.0.request = v.into();
4534 self
4535 }
4536
4537 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4539 self.0.options = v.into();
4540 self
4541 }
4542
4543 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4550 (*self.0.stub)
4551 .close_issue(self.0.request, self.0.options)
4552 .await
4553 .map(crate::Response::into_body)
4554 }
4555
4556 pub fn poller(
4558 self,
4559 ) -> impl google_cloud_lro::Poller<crate::model::Issue, crate::model::OperationMetadata>
4560 {
4561 type Operation = google_cloud_lro::internal::Operation<
4562 crate::model::Issue,
4563 crate::model::OperationMetadata,
4564 >;
4565 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4566 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4567 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4568 if let Some(ref mut details) = poller_options.tracing {
4569 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::close_issue::until_done";
4570 }
4571
4572 let stub = self.0.stub.clone();
4573 let mut options = self.0.options.clone();
4574 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4575 let query = move |name| {
4576 let stub = stub.clone();
4577 let options = options.clone();
4578 async {
4579 let op = GetOperation::new(stub)
4580 .set_name(name)
4581 .with_options(options)
4582 .send()
4583 .await?;
4584 Ok(Operation::new(op))
4585 }
4586 };
4587
4588 let start = move || async {
4589 let op = self.send().await?;
4590 Ok(Operation::new(op))
4591 };
4592
4593 use google_cloud_lro::internal::PollerExt;
4594 {
4595 google_cloud_lro::internal::new_poller(
4596 polling_error_policy,
4597 polling_backoff_policy,
4598 start,
4599 query,
4600 )
4601 }
4602 .with_options(poller_options)
4603 }
4604
4605 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4609 self.0.request.name = v.into();
4610 self
4611 }
4612
4613 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
4615 self.0.request.etag = v.into();
4616 self
4617 }
4618 }
4619
4620 #[doc(hidden)]
4621 impl crate::RequestBuilder for CloseIssue {
4622 fn request_options(&mut self) -> &mut crate::RequestOptions {
4623 &mut self.0.options
4624 }
4625 }
4626
4627 #[derive(Clone, Debug)]
4644 pub struct GetPullRequestComment(RequestBuilder<crate::model::GetPullRequestCommentRequest>);
4645
4646 impl GetPullRequestComment {
4647 pub(crate) fn new(
4648 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
4649 ) -> Self {
4650 Self(RequestBuilder::new(stub))
4651 }
4652
4653 pub fn with_request<V: Into<crate::model::GetPullRequestCommentRequest>>(
4655 mut self,
4656 v: V,
4657 ) -> Self {
4658 self.0.request = v.into();
4659 self
4660 }
4661
4662 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4664 self.0.options = v.into();
4665 self
4666 }
4667
4668 pub async fn send(self) -> Result<crate::model::PullRequestComment> {
4670 (*self.0.stub)
4671 .get_pull_request_comment(self.0.request, self.0.options)
4672 .await
4673 .map(crate::Response::into_body)
4674 }
4675
4676 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4680 self.0.request.name = v.into();
4681 self
4682 }
4683 }
4684
4685 #[doc(hidden)]
4686 impl crate::RequestBuilder for GetPullRequestComment {
4687 fn request_options(&mut self) -> &mut crate::RequestOptions {
4688 &mut self.0.options
4689 }
4690 }
4691
4692 #[derive(Clone, Debug)]
4713 pub struct ListPullRequestComments(
4714 RequestBuilder<crate::model::ListPullRequestCommentsRequest>,
4715 );
4716
4717 impl ListPullRequestComments {
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::ListPullRequestCommentsRequest>>(
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<crate::model::ListPullRequestCommentsResponse> {
4741 (*self.0.stub)
4742 .list_pull_request_comments(self.0.request, self.0.options)
4743 .await
4744 .map(crate::Response::into_body)
4745 }
4746
4747 pub fn by_page(
4749 self,
4750 ) -> impl google_cloud_gax::paginator::Paginator<
4751 crate::model::ListPullRequestCommentsResponse,
4752 crate::Error,
4753 > {
4754 use std::clone::Clone;
4755 let token = self.0.request.page_token.clone();
4756 let execute = move |token: String| {
4757 let mut builder = self.clone();
4758 builder.0.request = builder.0.request.set_page_token(token);
4759 builder.send()
4760 };
4761 google_cloud_gax::paginator::internal::new_paginator(token, execute)
4762 }
4763
4764 pub fn by_item(
4766 self,
4767 ) -> impl google_cloud_gax::paginator::ItemPaginator<
4768 crate::model::ListPullRequestCommentsResponse,
4769 crate::Error,
4770 > {
4771 use google_cloud_gax::paginator::Paginator;
4772 self.by_page().items()
4773 }
4774
4775 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4779 self.0.request.parent = v.into();
4780 self
4781 }
4782
4783 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4785 self.0.request.page_size = v.into();
4786 self
4787 }
4788
4789 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4791 self.0.request.page_token = v.into();
4792 self
4793 }
4794 }
4795
4796 #[doc(hidden)]
4797 impl crate::RequestBuilder for ListPullRequestComments {
4798 fn request_options(&mut self) -> &mut crate::RequestOptions {
4799 &mut self.0.options
4800 }
4801 }
4802
4803 #[derive(Clone, Debug)]
4821 pub struct CreatePullRequestComment(
4822 RequestBuilder<crate::model::CreatePullRequestCommentRequest>,
4823 );
4824
4825 impl CreatePullRequestComment {
4826 pub(crate) fn new(
4827 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
4828 ) -> Self {
4829 Self(RequestBuilder::new(stub))
4830 }
4831
4832 pub fn with_request<V: Into<crate::model::CreatePullRequestCommentRequest>>(
4834 mut self,
4835 v: V,
4836 ) -> Self {
4837 self.0.request = v.into();
4838 self
4839 }
4840
4841 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4843 self.0.options = v.into();
4844 self
4845 }
4846
4847 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
4854 (*self.0.stub)
4855 .create_pull_request_comment(self.0.request, self.0.options)
4856 .await
4857 .map(crate::Response::into_body)
4858 }
4859
4860 pub fn poller(
4862 self,
4863 ) -> impl google_cloud_lro::Poller<
4864 crate::model::PullRequestComment,
4865 crate::model::OperationMetadata,
4866 > {
4867 type Operation = google_cloud_lro::internal::Operation<
4868 crate::model::PullRequestComment,
4869 crate::model::OperationMetadata,
4870 >;
4871 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4872 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4873 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
4874 if let Some(ref mut details) = poller_options.tracing {
4875 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::create_pull_request_comment::until_done";
4876 }
4877
4878 let stub = self.0.stub.clone();
4879 let mut options = self.0.options.clone();
4880 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
4881 let query = move |name| {
4882 let stub = stub.clone();
4883 let options = options.clone();
4884 async {
4885 let op = GetOperation::new(stub)
4886 .set_name(name)
4887 .with_options(options)
4888 .send()
4889 .await?;
4890 Ok(Operation::new(op))
4891 }
4892 };
4893
4894 let start = move || async {
4895 let op = self.send().await?;
4896 Ok(Operation::new(op))
4897 };
4898
4899 use google_cloud_lro::internal::PollerExt;
4900 {
4901 google_cloud_lro::internal::new_poller(
4902 polling_error_policy,
4903 polling_backoff_policy,
4904 start,
4905 query,
4906 )
4907 }
4908 .with_options(poller_options)
4909 }
4910
4911 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4915 self.0.request.parent = v.into();
4916 self
4917 }
4918
4919 pub fn set_pull_request_comment<T>(mut self, v: T) -> Self
4923 where
4924 T: std::convert::Into<crate::model::PullRequestComment>,
4925 {
4926 self.0.request.pull_request_comment = std::option::Option::Some(v.into());
4927 self
4928 }
4929
4930 pub fn set_or_clear_pull_request_comment<T>(mut self, v: std::option::Option<T>) -> Self
4934 where
4935 T: std::convert::Into<crate::model::PullRequestComment>,
4936 {
4937 self.0.request.pull_request_comment = v.map(|x| x.into());
4938 self
4939 }
4940 }
4941
4942 #[doc(hidden)]
4943 impl crate::RequestBuilder for CreatePullRequestComment {
4944 fn request_options(&mut self) -> &mut crate::RequestOptions {
4945 &mut self.0.options
4946 }
4947 }
4948
4949 #[derive(Clone, Debug)]
4967 pub struct UpdatePullRequestComment(
4968 RequestBuilder<crate::model::UpdatePullRequestCommentRequest>,
4969 );
4970
4971 impl UpdatePullRequestComment {
4972 pub(crate) fn new(
4973 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
4974 ) -> Self {
4975 Self(RequestBuilder::new(stub))
4976 }
4977
4978 pub fn with_request<V: Into<crate::model::UpdatePullRequestCommentRequest>>(
4980 mut self,
4981 v: V,
4982 ) -> Self {
4983 self.0.request = v.into();
4984 self
4985 }
4986
4987 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
4989 self.0.options = v.into();
4990 self
4991 }
4992
4993 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5000 (*self.0.stub)
5001 .update_pull_request_comment(self.0.request, self.0.options)
5002 .await
5003 .map(crate::Response::into_body)
5004 }
5005
5006 pub fn poller(
5008 self,
5009 ) -> impl google_cloud_lro::Poller<
5010 crate::model::PullRequestComment,
5011 crate::model::OperationMetadata,
5012 > {
5013 type Operation = google_cloud_lro::internal::Operation<
5014 crate::model::PullRequestComment,
5015 crate::model::OperationMetadata,
5016 >;
5017 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5018 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5019 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5020 if let Some(ref mut details) = poller_options.tracing {
5021 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::update_pull_request_comment::until_done";
5022 }
5023
5024 let stub = self.0.stub.clone();
5025 let mut options = self.0.options.clone();
5026 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5027 let query = move |name| {
5028 let stub = stub.clone();
5029 let options = options.clone();
5030 async {
5031 let op = GetOperation::new(stub)
5032 .set_name(name)
5033 .with_options(options)
5034 .send()
5035 .await?;
5036 Ok(Operation::new(op))
5037 }
5038 };
5039
5040 let start = move || async {
5041 let op = self.send().await?;
5042 Ok(Operation::new(op))
5043 };
5044
5045 use google_cloud_lro::internal::PollerExt;
5046 {
5047 google_cloud_lro::internal::new_poller(
5048 polling_error_policy,
5049 polling_backoff_policy,
5050 start,
5051 query,
5052 )
5053 }
5054 .with_options(poller_options)
5055 }
5056
5057 pub fn set_pull_request_comment<T>(mut self, v: T) -> Self
5061 where
5062 T: std::convert::Into<crate::model::PullRequestComment>,
5063 {
5064 self.0.request.pull_request_comment = std::option::Option::Some(v.into());
5065 self
5066 }
5067
5068 pub fn set_or_clear_pull_request_comment<T>(mut self, v: std::option::Option<T>) -> Self
5072 where
5073 T: std::convert::Into<crate::model::PullRequestComment>,
5074 {
5075 self.0.request.pull_request_comment = v.map(|x| x.into());
5076 self
5077 }
5078
5079 pub fn set_update_mask<T>(mut self, v: T) -> Self
5081 where
5082 T: std::convert::Into<wkt::FieldMask>,
5083 {
5084 self.0.request.update_mask = std::option::Option::Some(v.into());
5085 self
5086 }
5087
5088 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5090 where
5091 T: std::convert::Into<wkt::FieldMask>,
5092 {
5093 self.0.request.update_mask = v.map(|x| x.into());
5094 self
5095 }
5096 }
5097
5098 #[doc(hidden)]
5099 impl crate::RequestBuilder for UpdatePullRequestComment {
5100 fn request_options(&mut self) -> &mut crate::RequestOptions {
5101 &mut self.0.options
5102 }
5103 }
5104
5105 #[derive(Clone, Debug)]
5123 pub struct DeletePullRequestComment(
5124 RequestBuilder<crate::model::DeletePullRequestCommentRequest>,
5125 );
5126
5127 impl DeletePullRequestComment {
5128 pub(crate) fn new(
5129 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
5130 ) -> Self {
5131 Self(RequestBuilder::new(stub))
5132 }
5133
5134 pub fn with_request<V: Into<crate::model::DeletePullRequestCommentRequest>>(
5136 mut self,
5137 v: V,
5138 ) -> Self {
5139 self.0.request = v.into();
5140 self
5141 }
5142
5143 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5145 self.0.options = v.into();
5146 self
5147 }
5148
5149 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5156 (*self.0.stub)
5157 .delete_pull_request_comment(self.0.request, self.0.options)
5158 .await
5159 .map(crate::Response::into_body)
5160 }
5161
5162 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
5164 type Operation =
5165 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
5166 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5167 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5168 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5169 if let Some(ref mut details) = poller_options.tracing {
5170 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::delete_pull_request_comment::until_done";
5171 }
5172
5173 let stub = self.0.stub.clone();
5174 let mut options = self.0.options.clone();
5175 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5176 let query = move |name| {
5177 let stub = stub.clone();
5178 let options = options.clone();
5179 async {
5180 let op = GetOperation::new(stub)
5181 .set_name(name)
5182 .with_options(options)
5183 .send()
5184 .await?;
5185 Ok(Operation::new(op))
5186 }
5187 };
5188
5189 let start = move || async {
5190 let op = self.send().await?;
5191 Ok(Operation::new(op))
5192 };
5193
5194 use google_cloud_lro::internal::PollerExt;
5195 {
5196 google_cloud_lro::internal::new_unit_response_poller(
5197 polling_error_policy,
5198 polling_backoff_policy,
5199 start,
5200 query,
5201 )
5202 }
5203 .with_options(poller_options)
5204 }
5205
5206 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5210 self.0.request.name = v.into();
5211 self
5212 }
5213 }
5214
5215 #[doc(hidden)]
5216 impl crate::RequestBuilder for DeletePullRequestComment {
5217 fn request_options(&mut self) -> &mut crate::RequestOptions {
5218 &mut self.0.options
5219 }
5220 }
5221
5222 #[derive(Clone, Debug)]
5240 pub struct BatchCreatePullRequestComments(
5241 RequestBuilder<crate::model::BatchCreatePullRequestCommentsRequest>,
5242 );
5243
5244 impl BatchCreatePullRequestComments {
5245 pub(crate) fn new(
5246 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
5247 ) -> Self {
5248 Self(RequestBuilder::new(stub))
5249 }
5250
5251 pub fn with_request<V: Into<crate::model::BatchCreatePullRequestCommentsRequest>>(
5253 mut self,
5254 v: V,
5255 ) -> Self {
5256 self.0.request = v.into();
5257 self
5258 }
5259
5260 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5262 self.0.options = v.into();
5263 self
5264 }
5265
5266 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5273 (*self.0.stub)
5274 .batch_create_pull_request_comments(self.0.request, self.0.options)
5275 .await
5276 .map(crate::Response::into_body)
5277 }
5278
5279 pub fn poller(
5281 self,
5282 ) -> impl google_cloud_lro::Poller<
5283 crate::model::BatchCreatePullRequestCommentsResponse,
5284 crate::model::OperationMetadata,
5285 > {
5286 type Operation = google_cloud_lro::internal::Operation<
5287 crate::model::BatchCreatePullRequestCommentsResponse,
5288 crate::model::OperationMetadata,
5289 >;
5290 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5291 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5292 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5293 if let Some(ref mut details) = poller_options.tracing {
5294 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::batch_create_pull_request_comments::until_done";
5295 }
5296
5297 let stub = self.0.stub.clone();
5298 let mut options = self.0.options.clone();
5299 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5300 let query = move |name| {
5301 let stub = stub.clone();
5302 let options = options.clone();
5303 async {
5304 let op = GetOperation::new(stub)
5305 .set_name(name)
5306 .with_options(options)
5307 .send()
5308 .await?;
5309 Ok(Operation::new(op))
5310 }
5311 };
5312
5313 let start = move || async {
5314 let op = self.send().await?;
5315 Ok(Operation::new(op))
5316 };
5317
5318 use google_cloud_lro::internal::PollerExt;
5319 {
5320 google_cloud_lro::internal::new_poller(
5321 polling_error_policy,
5322 polling_backoff_policy,
5323 start,
5324 query,
5325 )
5326 }
5327 .with_options(poller_options)
5328 }
5329
5330 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5334 self.0.request.parent = v.into();
5335 self
5336 }
5337
5338 pub fn set_requests<T, V>(mut self, v: T) -> Self
5342 where
5343 T: std::iter::IntoIterator<Item = V>,
5344 V: std::convert::Into<crate::model::CreatePullRequestCommentRequest>,
5345 {
5346 use std::iter::Iterator;
5347 self.0.request.requests = v.into_iter().map(|i| i.into()).collect();
5348 self
5349 }
5350 }
5351
5352 #[doc(hidden)]
5353 impl crate::RequestBuilder for BatchCreatePullRequestComments {
5354 fn request_options(&mut self) -> &mut crate::RequestOptions {
5355 &mut self.0.options
5356 }
5357 }
5358
5359 #[derive(Clone, Debug)]
5377 pub struct ResolvePullRequestComments(
5378 RequestBuilder<crate::model::ResolvePullRequestCommentsRequest>,
5379 );
5380
5381 impl ResolvePullRequestComments {
5382 pub(crate) fn new(
5383 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
5384 ) -> Self {
5385 Self(RequestBuilder::new(stub))
5386 }
5387
5388 pub fn with_request<V: Into<crate::model::ResolvePullRequestCommentsRequest>>(
5390 mut self,
5391 v: V,
5392 ) -> Self {
5393 self.0.request = v.into();
5394 self
5395 }
5396
5397 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5399 self.0.options = v.into();
5400 self
5401 }
5402
5403 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5410 (*self.0.stub)
5411 .resolve_pull_request_comments(self.0.request, self.0.options)
5412 .await
5413 .map(crate::Response::into_body)
5414 }
5415
5416 pub fn poller(
5418 self,
5419 ) -> impl google_cloud_lro::Poller<
5420 crate::model::ResolvePullRequestCommentsResponse,
5421 crate::model::OperationMetadata,
5422 > {
5423 type Operation = google_cloud_lro::internal::Operation<
5424 crate::model::ResolvePullRequestCommentsResponse,
5425 crate::model::OperationMetadata,
5426 >;
5427 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5428 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5429 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5430 if let Some(ref mut details) = poller_options.tracing {
5431 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::resolve_pull_request_comments::until_done";
5432 }
5433
5434 let stub = self.0.stub.clone();
5435 let mut options = self.0.options.clone();
5436 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5437 let query = move |name| {
5438 let stub = stub.clone();
5439 let options = options.clone();
5440 async {
5441 let op = GetOperation::new(stub)
5442 .set_name(name)
5443 .with_options(options)
5444 .send()
5445 .await?;
5446 Ok(Operation::new(op))
5447 }
5448 };
5449
5450 let start = move || async {
5451 let op = self.send().await?;
5452 Ok(Operation::new(op))
5453 };
5454
5455 use google_cloud_lro::internal::PollerExt;
5456 {
5457 google_cloud_lro::internal::new_poller(
5458 polling_error_policy,
5459 polling_backoff_policy,
5460 start,
5461 query,
5462 )
5463 }
5464 .with_options(poller_options)
5465 }
5466
5467 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5471 self.0.request.parent = v.into();
5472 self
5473 }
5474
5475 pub fn set_names<T, V>(mut self, v: T) -> Self
5479 where
5480 T: std::iter::IntoIterator<Item = V>,
5481 V: std::convert::Into<std::string::String>,
5482 {
5483 use std::iter::Iterator;
5484 self.0.request.names = v.into_iter().map(|i| i.into()).collect();
5485 self
5486 }
5487
5488 pub fn set_auto_fill<T: Into<bool>>(mut self, v: T) -> Self {
5490 self.0.request.auto_fill = v.into();
5491 self
5492 }
5493 }
5494
5495 #[doc(hidden)]
5496 impl crate::RequestBuilder for ResolvePullRequestComments {
5497 fn request_options(&mut self) -> &mut crate::RequestOptions {
5498 &mut self.0.options
5499 }
5500 }
5501
5502 #[derive(Clone, Debug)]
5520 pub struct UnresolvePullRequestComments(
5521 RequestBuilder<crate::model::UnresolvePullRequestCommentsRequest>,
5522 );
5523
5524 impl UnresolvePullRequestComments {
5525 pub(crate) fn new(
5526 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
5527 ) -> Self {
5528 Self(RequestBuilder::new(stub))
5529 }
5530
5531 pub fn with_request<V: Into<crate::model::UnresolvePullRequestCommentsRequest>>(
5533 mut self,
5534 v: V,
5535 ) -> Self {
5536 self.0.request = v.into();
5537 self
5538 }
5539
5540 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5542 self.0.options = v.into();
5543 self
5544 }
5545
5546 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5553 (*self.0.stub)
5554 .unresolve_pull_request_comments(self.0.request, self.0.options)
5555 .await
5556 .map(crate::Response::into_body)
5557 }
5558
5559 pub fn poller(
5561 self,
5562 ) -> impl google_cloud_lro::Poller<
5563 crate::model::UnresolvePullRequestCommentsResponse,
5564 crate::model::OperationMetadata,
5565 > {
5566 type Operation = google_cloud_lro::internal::Operation<
5567 crate::model::UnresolvePullRequestCommentsResponse,
5568 crate::model::OperationMetadata,
5569 >;
5570 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5571 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5572 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5573 if let Some(ref mut details) = poller_options.tracing {
5574 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::unresolve_pull_request_comments::until_done";
5575 }
5576
5577 let stub = self.0.stub.clone();
5578 let mut options = self.0.options.clone();
5579 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5580 let query = move |name| {
5581 let stub = stub.clone();
5582 let options = options.clone();
5583 async {
5584 let op = GetOperation::new(stub)
5585 .set_name(name)
5586 .with_options(options)
5587 .send()
5588 .await?;
5589 Ok(Operation::new(op))
5590 }
5591 };
5592
5593 let start = move || async {
5594 let op = self.send().await?;
5595 Ok(Operation::new(op))
5596 };
5597
5598 use google_cloud_lro::internal::PollerExt;
5599 {
5600 google_cloud_lro::internal::new_poller(
5601 polling_error_policy,
5602 polling_backoff_policy,
5603 start,
5604 query,
5605 )
5606 }
5607 .with_options(poller_options)
5608 }
5609
5610 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5614 self.0.request.parent = v.into();
5615 self
5616 }
5617
5618 pub fn set_names<T, V>(mut self, v: T) -> Self
5622 where
5623 T: std::iter::IntoIterator<Item = V>,
5624 V: std::convert::Into<std::string::String>,
5625 {
5626 use std::iter::Iterator;
5627 self.0.request.names = v.into_iter().map(|i| i.into()).collect();
5628 self
5629 }
5630
5631 pub fn set_auto_fill<T: Into<bool>>(mut self, v: T) -> Self {
5633 self.0.request.auto_fill = v.into();
5634 self
5635 }
5636 }
5637
5638 #[doc(hidden)]
5639 impl crate::RequestBuilder for UnresolvePullRequestComments {
5640 fn request_options(&mut self) -> &mut crate::RequestOptions {
5641 &mut self.0.options
5642 }
5643 }
5644
5645 #[derive(Clone, Debug)]
5663 pub struct CreateIssueComment(RequestBuilder<crate::model::CreateIssueCommentRequest>);
5664
5665 impl CreateIssueComment {
5666 pub(crate) fn new(
5667 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
5668 ) -> Self {
5669 Self(RequestBuilder::new(stub))
5670 }
5671
5672 pub fn with_request<V: Into<crate::model::CreateIssueCommentRequest>>(
5674 mut self,
5675 v: V,
5676 ) -> Self {
5677 self.0.request = v.into();
5678 self
5679 }
5680
5681 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5683 self.0.options = v.into();
5684 self
5685 }
5686
5687 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
5694 (*self.0.stub)
5695 .create_issue_comment(self.0.request, self.0.options)
5696 .await
5697 .map(crate::Response::into_body)
5698 }
5699
5700 pub fn poller(
5702 self,
5703 ) -> impl google_cloud_lro::Poller<crate::model::IssueComment, crate::model::OperationMetadata>
5704 {
5705 type Operation = google_cloud_lro::internal::Operation<
5706 crate::model::IssueComment,
5707 crate::model::OperationMetadata,
5708 >;
5709 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
5710 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
5711 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
5712 if let Some(ref mut details) = poller_options.tracing {
5713 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::create_issue_comment::until_done";
5714 }
5715
5716 let stub = self.0.stub.clone();
5717 let mut options = self.0.options.clone();
5718 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
5719 let query = move |name| {
5720 let stub = stub.clone();
5721 let options = options.clone();
5722 async {
5723 let op = GetOperation::new(stub)
5724 .set_name(name)
5725 .with_options(options)
5726 .send()
5727 .await?;
5728 Ok(Operation::new(op))
5729 }
5730 };
5731
5732 let start = move || async {
5733 let op = self.send().await?;
5734 Ok(Operation::new(op))
5735 };
5736
5737 use google_cloud_lro::internal::PollerExt;
5738 {
5739 google_cloud_lro::internal::new_poller(
5740 polling_error_policy,
5741 polling_backoff_policy,
5742 start,
5743 query,
5744 )
5745 }
5746 .with_options(poller_options)
5747 }
5748
5749 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5753 self.0.request.parent = v.into();
5754 self
5755 }
5756
5757 pub fn set_issue_comment<T>(mut self, v: T) -> Self
5761 where
5762 T: std::convert::Into<crate::model::IssueComment>,
5763 {
5764 self.0.request.issue_comment = std::option::Option::Some(v.into());
5765 self
5766 }
5767
5768 pub fn set_or_clear_issue_comment<T>(mut self, v: std::option::Option<T>) -> Self
5772 where
5773 T: std::convert::Into<crate::model::IssueComment>,
5774 {
5775 self.0.request.issue_comment = v.map(|x| x.into());
5776 self
5777 }
5778 }
5779
5780 #[doc(hidden)]
5781 impl crate::RequestBuilder for CreateIssueComment {
5782 fn request_options(&mut self) -> &mut crate::RequestOptions {
5783 &mut self.0.options
5784 }
5785 }
5786
5787 #[derive(Clone, Debug)]
5804 pub struct GetIssueComment(RequestBuilder<crate::model::GetIssueCommentRequest>);
5805
5806 impl GetIssueComment {
5807 pub(crate) fn new(
5808 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
5809 ) -> Self {
5810 Self(RequestBuilder::new(stub))
5811 }
5812
5813 pub fn with_request<V: Into<crate::model::GetIssueCommentRequest>>(mut self, v: V) -> Self {
5815 self.0.request = v.into();
5816 self
5817 }
5818
5819 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5821 self.0.options = v.into();
5822 self
5823 }
5824
5825 pub async fn send(self) -> Result<crate::model::IssueComment> {
5827 (*self.0.stub)
5828 .get_issue_comment(self.0.request, self.0.options)
5829 .await
5830 .map(crate::Response::into_body)
5831 }
5832
5833 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5837 self.0.request.name = v.into();
5838 self
5839 }
5840 }
5841
5842 #[doc(hidden)]
5843 impl crate::RequestBuilder for GetIssueComment {
5844 fn request_options(&mut self) -> &mut crate::RequestOptions {
5845 &mut self.0.options
5846 }
5847 }
5848
5849 #[derive(Clone, Debug)]
5870 pub struct ListIssueComments(RequestBuilder<crate::model::ListIssueCommentsRequest>);
5871
5872 impl ListIssueComments {
5873 pub(crate) fn new(
5874 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
5875 ) -> Self {
5876 Self(RequestBuilder::new(stub))
5877 }
5878
5879 pub fn with_request<V: Into<crate::model::ListIssueCommentsRequest>>(
5881 mut self,
5882 v: V,
5883 ) -> Self {
5884 self.0.request = v.into();
5885 self
5886 }
5887
5888 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5890 self.0.options = v.into();
5891 self
5892 }
5893
5894 pub async fn send(self) -> Result<crate::model::ListIssueCommentsResponse> {
5896 (*self.0.stub)
5897 .list_issue_comments(self.0.request, self.0.options)
5898 .await
5899 .map(crate::Response::into_body)
5900 }
5901
5902 pub fn by_page(
5904 self,
5905 ) -> impl google_cloud_gax::paginator::Paginator<
5906 crate::model::ListIssueCommentsResponse,
5907 crate::Error,
5908 > {
5909 use std::clone::Clone;
5910 let token = self.0.request.page_token.clone();
5911 let execute = move |token: String| {
5912 let mut builder = self.clone();
5913 builder.0.request = builder.0.request.set_page_token(token);
5914 builder.send()
5915 };
5916 google_cloud_gax::paginator::internal::new_paginator(token, execute)
5917 }
5918
5919 pub fn by_item(
5921 self,
5922 ) -> impl google_cloud_gax::paginator::ItemPaginator<
5923 crate::model::ListIssueCommentsResponse,
5924 crate::Error,
5925 > {
5926 use google_cloud_gax::paginator::Paginator;
5927 self.by_page().items()
5928 }
5929
5930 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5934 self.0.request.parent = v.into();
5935 self
5936 }
5937
5938 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5940 self.0.request.page_size = v.into();
5941 self
5942 }
5943
5944 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5946 self.0.request.page_token = v.into();
5947 self
5948 }
5949 }
5950
5951 #[doc(hidden)]
5952 impl crate::RequestBuilder for ListIssueComments {
5953 fn request_options(&mut self) -> &mut crate::RequestOptions {
5954 &mut self.0.options
5955 }
5956 }
5957
5958 #[derive(Clone, Debug)]
5976 pub struct UpdateIssueComment(RequestBuilder<crate::model::UpdateIssueCommentRequest>);
5977
5978 impl UpdateIssueComment {
5979 pub(crate) fn new(
5980 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
5981 ) -> Self {
5982 Self(RequestBuilder::new(stub))
5983 }
5984
5985 pub fn with_request<V: Into<crate::model::UpdateIssueCommentRequest>>(
5987 mut self,
5988 v: V,
5989 ) -> Self {
5990 self.0.request = v.into();
5991 self
5992 }
5993
5994 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
5996 self.0.options = v.into();
5997 self
5998 }
5999
6000 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6007 (*self.0.stub)
6008 .update_issue_comment(self.0.request, self.0.options)
6009 .await
6010 .map(crate::Response::into_body)
6011 }
6012
6013 pub fn poller(
6015 self,
6016 ) -> impl google_cloud_lro::Poller<crate::model::IssueComment, crate::model::OperationMetadata>
6017 {
6018 type Operation = google_cloud_lro::internal::Operation<
6019 crate::model::IssueComment,
6020 crate::model::OperationMetadata,
6021 >;
6022 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6023 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6024 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
6025 if let Some(ref mut details) = poller_options.tracing {
6026 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::update_issue_comment::until_done";
6027 }
6028
6029 let stub = self.0.stub.clone();
6030 let mut options = self.0.options.clone();
6031 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6032 let query = move |name| {
6033 let stub = stub.clone();
6034 let options = options.clone();
6035 async {
6036 let op = GetOperation::new(stub)
6037 .set_name(name)
6038 .with_options(options)
6039 .send()
6040 .await?;
6041 Ok(Operation::new(op))
6042 }
6043 };
6044
6045 let start = move || async {
6046 let op = self.send().await?;
6047 Ok(Operation::new(op))
6048 };
6049
6050 use google_cloud_lro::internal::PollerExt;
6051 {
6052 google_cloud_lro::internal::new_poller(
6053 polling_error_policy,
6054 polling_backoff_policy,
6055 start,
6056 query,
6057 )
6058 }
6059 .with_options(poller_options)
6060 }
6061
6062 pub fn set_issue_comment<T>(mut self, v: T) -> Self
6066 where
6067 T: std::convert::Into<crate::model::IssueComment>,
6068 {
6069 self.0.request.issue_comment = std::option::Option::Some(v.into());
6070 self
6071 }
6072
6073 pub fn set_or_clear_issue_comment<T>(mut self, v: std::option::Option<T>) -> Self
6077 where
6078 T: std::convert::Into<crate::model::IssueComment>,
6079 {
6080 self.0.request.issue_comment = v.map(|x| x.into());
6081 self
6082 }
6083
6084 pub fn set_update_mask<T>(mut self, v: T) -> Self
6086 where
6087 T: std::convert::Into<wkt::FieldMask>,
6088 {
6089 self.0.request.update_mask = std::option::Option::Some(v.into());
6090 self
6091 }
6092
6093 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6095 where
6096 T: std::convert::Into<wkt::FieldMask>,
6097 {
6098 self.0.request.update_mask = v.map(|x| x.into());
6099 self
6100 }
6101 }
6102
6103 #[doc(hidden)]
6104 impl crate::RequestBuilder for UpdateIssueComment {
6105 fn request_options(&mut self) -> &mut crate::RequestOptions {
6106 &mut self.0.options
6107 }
6108 }
6109
6110 #[derive(Clone, Debug)]
6128 pub struct DeleteIssueComment(RequestBuilder<crate::model::DeleteIssueCommentRequest>);
6129
6130 impl DeleteIssueComment {
6131 pub(crate) fn new(
6132 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
6133 ) -> Self {
6134 Self(RequestBuilder::new(stub))
6135 }
6136
6137 pub fn with_request<V: Into<crate::model::DeleteIssueCommentRequest>>(
6139 mut self,
6140 v: V,
6141 ) -> Self {
6142 self.0.request = v.into();
6143 self
6144 }
6145
6146 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6148 self.0.options = v.into();
6149 self
6150 }
6151
6152 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6159 (*self.0.stub)
6160 .delete_issue_comment(self.0.request, self.0.options)
6161 .await
6162 .map(crate::Response::into_body)
6163 }
6164
6165 pub fn poller(self) -> impl google_cloud_lro::Poller<(), crate::model::OperationMetadata> {
6167 type Operation =
6168 google_cloud_lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
6169 let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6170 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6171 let mut poller_options = self.0.stub.get_poller_options(&self.0.options);
6172 if let Some(ref mut details) = poller_options.tracing {
6173 details.method_name = "google_cloud_securesourcemanager_v1::client::SecureSourceManager::delete_issue_comment::until_done";
6174 }
6175
6176 let stub = self.0.stub.clone();
6177 let mut options = self.0.options.clone();
6178 options.set_retry_policy(google_cloud_gax::retry_policy::NeverRetry);
6179 let query = move |name| {
6180 let stub = stub.clone();
6181 let options = options.clone();
6182 async {
6183 let op = GetOperation::new(stub)
6184 .set_name(name)
6185 .with_options(options)
6186 .send()
6187 .await?;
6188 Ok(Operation::new(op))
6189 }
6190 };
6191
6192 let start = move || async {
6193 let op = self.send().await?;
6194 Ok(Operation::new(op))
6195 };
6196
6197 use google_cloud_lro::internal::PollerExt;
6198 {
6199 google_cloud_lro::internal::new_unit_response_poller(
6200 polling_error_policy,
6201 polling_backoff_policy,
6202 start,
6203 query,
6204 )
6205 }
6206 .with_options(poller_options)
6207 }
6208
6209 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6213 self.0.request.name = v.into();
6214 self
6215 }
6216 }
6217
6218 #[doc(hidden)]
6219 impl crate::RequestBuilder for DeleteIssueComment {
6220 fn request_options(&mut self) -> &mut crate::RequestOptions {
6221 &mut self.0.options
6222 }
6223 }
6224
6225 #[derive(Clone, Debug)]
6246 pub struct ListLocations(RequestBuilder<google_cloud_location::model::ListLocationsRequest>);
6247
6248 impl ListLocations {
6249 pub(crate) fn new(
6250 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
6251 ) -> Self {
6252 Self(RequestBuilder::new(stub))
6253 }
6254
6255 pub fn with_request<V: Into<google_cloud_location::model::ListLocationsRequest>>(
6257 mut self,
6258 v: V,
6259 ) -> Self {
6260 self.0.request = v.into();
6261 self
6262 }
6263
6264 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6266 self.0.options = v.into();
6267 self
6268 }
6269
6270 pub async fn send(self) -> Result<google_cloud_location::model::ListLocationsResponse> {
6272 (*self.0.stub)
6273 .list_locations(self.0.request, self.0.options)
6274 .await
6275 .map(crate::Response::into_body)
6276 }
6277
6278 pub fn by_page(
6280 self,
6281 ) -> impl google_cloud_gax::paginator::Paginator<
6282 google_cloud_location::model::ListLocationsResponse,
6283 crate::Error,
6284 > {
6285 use std::clone::Clone;
6286 let token = self.0.request.page_token.clone();
6287 let execute = move |token: String| {
6288 let mut builder = self.clone();
6289 builder.0.request = builder.0.request.set_page_token(token);
6290 builder.send()
6291 };
6292 google_cloud_gax::paginator::internal::new_paginator(token, execute)
6293 }
6294
6295 pub fn by_item(
6297 self,
6298 ) -> impl google_cloud_gax::paginator::ItemPaginator<
6299 google_cloud_location::model::ListLocationsResponse,
6300 crate::Error,
6301 > {
6302 use google_cloud_gax::paginator::Paginator;
6303 self.by_page().items()
6304 }
6305
6306 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6308 self.0.request.name = v.into();
6309 self
6310 }
6311
6312 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6314 self.0.request.filter = v.into();
6315 self
6316 }
6317
6318 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6320 self.0.request.page_size = v.into();
6321 self
6322 }
6323
6324 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6326 self.0.request.page_token = v.into();
6327 self
6328 }
6329 }
6330
6331 #[doc(hidden)]
6332 impl crate::RequestBuilder for ListLocations {
6333 fn request_options(&mut self) -> &mut crate::RequestOptions {
6334 &mut self.0.options
6335 }
6336 }
6337
6338 #[derive(Clone, Debug)]
6355 pub struct GetLocation(RequestBuilder<google_cloud_location::model::GetLocationRequest>);
6356
6357 impl GetLocation {
6358 pub(crate) fn new(
6359 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
6360 ) -> Self {
6361 Self(RequestBuilder::new(stub))
6362 }
6363
6364 pub fn with_request<V: Into<google_cloud_location::model::GetLocationRequest>>(
6366 mut self,
6367 v: V,
6368 ) -> Self {
6369 self.0.request = v.into();
6370 self
6371 }
6372
6373 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6375 self.0.options = v.into();
6376 self
6377 }
6378
6379 pub async fn send(self) -> Result<google_cloud_location::model::Location> {
6381 (*self.0.stub)
6382 .get_location(self.0.request, self.0.options)
6383 .await
6384 .map(crate::Response::into_body)
6385 }
6386
6387 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6389 self.0.request.name = v.into();
6390 self
6391 }
6392 }
6393
6394 #[doc(hidden)]
6395 impl crate::RequestBuilder for GetLocation {
6396 fn request_options(&mut self) -> &mut crate::RequestOptions {
6397 &mut self.0.options
6398 }
6399 }
6400
6401 #[derive(Clone, Debug)]
6418 pub struct SetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::SetIamPolicyRequest>);
6419
6420 impl SetIamPolicy {
6421 pub(crate) fn new(
6422 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
6423 ) -> Self {
6424 Self(RequestBuilder::new(stub))
6425 }
6426
6427 pub fn with_request<V: Into<google_cloud_iam_v1::model::SetIamPolicyRequest>>(
6429 mut self,
6430 v: V,
6431 ) -> Self {
6432 self.0.request = v.into();
6433 self
6434 }
6435
6436 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6438 self.0.options = v.into();
6439 self
6440 }
6441
6442 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
6444 (*self.0.stub)
6445 .set_iam_policy(self.0.request, self.0.options)
6446 .await
6447 .map(crate::Response::into_body)
6448 }
6449
6450 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
6454 self.0.request.resource = v.into();
6455 self
6456 }
6457
6458 pub fn set_policy<T>(mut self, v: T) -> Self
6462 where
6463 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
6464 {
6465 self.0.request.policy = std::option::Option::Some(v.into());
6466 self
6467 }
6468
6469 pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
6473 where
6474 T: std::convert::Into<google_cloud_iam_v1::model::Policy>,
6475 {
6476 self.0.request.policy = v.map(|x| x.into());
6477 self
6478 }
6479
6480 pub fn set_update_mask<T>(mut self, v: T) -> Self
6482 where
6483 T: std::convert::Into<wkt::FieldMask>,
6484 {
6485 self.0.request.update_mask = std::option::Option::Some(v.into());
6486 self
6487 }
6488
6489 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6491 where
6492 T: std::convert::Into<wkt::FieldMask>,
6493 {
6494 self.0.request.update_mask = v.map(|x| x.into());
6495 self
6496 }
6497 }
6498
6499 #[doc(hidden)]
6500 impl crate::RequestBuilder for SetIamPolicy {
6501 fn request_options(&mut self) -> &mut crate::RequestOptions {
6502 &mut self.0.options
6503 }
6504 }
6505
6506 #[derive(Clone, Debug)]
6523 pub struct GetIamPolicy(RequestBuilder<google_cloud_iam_v1::model::GetIamPolicyRequest>);
6524
6525 impl GetIamPolicy {
6526 pub(crate) fn new(
6527 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
6528 ) -> Self {
6529 Self(RequestBuilder::new(stub))
6530 }
6531
6532 pub fn with_request<V: Into<google_cloud_iam_v1::model::GetIamPolicyRequest>>(
6534 mut self,
6535 v: V,
6536 ) -> Self {
6537 self.0.request = v.into();
6538 self
6539 }
6540
6541 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6543 self.0.options = v.into();
6544 self
6545 }
6546
6547 pub async fn send(self) -> Result<google_cloud_iam_v1::model::Policy> {
6549 (*self.0.stub)
6550 .get_iam_policy(self.0.request, self.0.options)
6551 .await
6552 .map(crate::Response::into_body)
6553 }
6554
6555 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
6559 self.0.request.resource = v.into();
6560 self
6561 }
6562
6563 pub fn set_options<T>(mut self, v: T) -> Self
6565 where
6566 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
6567 {
6568 self.0.request.options = std::option::Option::Some(v.into());
6569 self
6570 }
6571
6572 pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
6574 where
6575 T: std::convert::Into<google_cloud_iam_v1::model::GetPolicyOptions>,
6576 {
6577 self.0.request.options = v.map(|x| x.into());
6578 self
6579 }
6580 }
6581
6582 #[doc(hidden)]
6583 impl crate::RequestBuilder for GetIamPolicy {
6584 fn request_options(&mut self) -> &mut crate::RequestOptions {
6585 &mut self.0.options
6586 }
6587 }
6588
6589 #[derive(Clone, Debug)]
6606 pub struct TestIamPermissions(
6607 RequestBuilder<google_cloud_iam_v1::model::TestIamPermissionsRequest>,
6608 );
6609
6610 impl TestIamPermissions {
6611 pub(crate) fn new(
6612 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
6613 ) -> Self {
6614 Self(RequestBuilder::new(stub))
6615 }
6616
6617 pub fn with_request<V: Into<google_cloud_iam_v1::model::TestIamPermissionsRequest>>(
6619 mut self,
6620 v: V,
6621 ) -> Self {
6622 self.0.request = v.into();
6623 self
6624 }
6625
6626 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6628 self.0.options = v.into();
6629 self
6630 }
6631
6632 pub async fn send(self) -> Result<google_cloud_iam_v1::model::TestIamPermissionsResponse> {
6634 (*self.0.stub)
6635 .test_iam_permissions(self.0.request, self.0.options)
6636 .await
6637 .map(crate::Response::into_body)
6638 }
6639
6640 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
6644 self.0.request.resource = v.into();
6645 self
6646 }
6647
6648 pub fn set_permissions<T, V>(mut self, v: T) -> Self
6652 where
6653 T: std::iter::IntoIterator<Item = V>,
6654 V: std::convert::Into<std::string::String>,
6655 {
6656 use std::iter::Iterator;
6657 self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
6658 self
6659 }
6660 }
6661
6662 #[doc(hidden)]
6663 impl crate::RequestBuilder for TestIamPermissions {
6664 fn request_options(&mut self) -> &mut crate::RequestOptions {
6665 &mut self.0.options
6666 }
6667 }
6668
6669 #[derive(Clone, Debug)]
6690 pub struct ListOperations(
6691 RequestBuilder<google_cloud_longrunning::model::ListOperationsRequest>,
6692 );
6693
6694 impl ListOperations {
6695 pub(crate) fn new(
6696 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
6697 ) -> Self {
6698 Self(RequestBuilder::new(stub))
6699 }
6700
6701 pub fn with_request<V: Into<google_cloud_longrunning::model::ListOperationsRequest>>(
6703 mut self,
6704 v: V,
6705 ) -> Self {
6706 self.0.request = v.into();
6707 self
6708 }
6709
6710 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6712 self.0.options = v.into();
6713 self
6714 }
6715
6716 pub async fn send(self) -> Result<google_cloud_longrunning::model::ListOperationsResponse> {
6718 (*self.0.stub)
6719 .list_operations(self.0.request, self.0.options)
6720 .await
6721 .map(crate::Response::into_body)
6722 }
6723
6724 pub fn by_page(
6726 self,
6727 ) -> impl google_cloud_gax::paginator::Paginator<
6728 google_cloud_longrunning::model::ListOperationsResponse,
6729 crate::Error,
6730 > {
6731 use std::clone::Clone;
6732 let token = self.0.request.page_token.clone();
6733 let execute = move |token: String| {
6734 let mut builder = self.clone();
6735 builder.0.request = builder.0.request.set_page_token(token);
6736 builder.send()
6737 };
6738 google_cloud_gax::paginator::internal::new_paginator(token, execute)
6739 }
6740
6741 pub fn by_item(
6743 self,
6744 ) -> impl google_cloud_gax::paginator::ItemPaginator<
6745 google_cloud_longrunning::model::ListOperationsResponse,
6746 crate::Error,
6747 > {
6748 use google_cloud_gax::paginator::Paginator;
6749 self.by_page().items()
6750 }
6751
6752 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6754 self.0.request.name = v.into();
6755 self
6756 }
6757
6758 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6760 self.0.request.filter = v.into();
6761 self
6762 }
6763
6764 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6766 self.0.request.page_size = v.into();
6767 self
6768 }
6769
6770 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6772 self.0.request.page_token = v.into();
6773 self
6774 }
6775
6776 pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
6778 self.0.request.return_partial_success = v.into();
6779 self
6780 }
6781 }
6782
6783 #[doc(hidden)]
6784 impl crate::RequestBuilder for ListOperations {
6785 fn request_options(&mut self) -> &mut crate::RequestOptions {
6786 &mut self.0.options
6787 }
6788 }
6789
6790 #[derive(Clone, Debug)]
6807 pub struct GetOperation(RequestBuilder<google_cloud_longrunning::model::GetOperationRequest>);
6808
6809 impl GetOperation {
6810 pub(crate) fn new(
6811 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
6812 ) -> Self {
6813 Self(RequestBuilder::new(stub))
6814 }
6815
6816 pub fn with_request<V: Into<google_cloud_longrunning::model::GetOperationRequest>>(
6818 mut self,
6819 v: V,
6820 ) -> Self {
6821 self.0.request = v.into();
6822 self
6823 }
6824
6825 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6827 self.0.options = v.into();
6828 self
6829 }
6830
6831 pub async fn send(self) -> Result<google_cloud_longrunning::model::Operation> {
6833 (*self.0.stub)
6834 .get_operation(self.0.request, self.0.options)
6835 .await
6836 .map(crate::Response::into_body)
6837 }
6838
6839 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6841 self.0.request.name = v.into();
6842 self
6843 }
6844 }
6845
6846 #[doc(hidden)]
6847 impl crate::RequestBuilder for GetOperation {
6848 fn request_options(&mut self) -> &mut crate::RequestOptions {
6849 &mut self.0.options
6850 }
6851 }
6852
6853 #[derive(Clone, Debug)]
6870 pub struct DeleteOperation(
6871 RequestBuilder<google_cloud_longrunning::model::DeleteOperationRequest>,
6872 );
6873
6874 impl DeleteOperation {
6875 pub(crate) fn new(
6876 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
6877 ) -> Self {
6878 Self(RequestBuilder::new(stub))
6879 }
6880
6881 pub fn with_request<V: Into<google_cloud_longrunning::model::DeleteOperationRequest>>(
6883 mut self,
6884 v: V,
6885 ) -> Self {
6886 self.0.request = v.into();
6887 self
6888 }
6889
6890 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6892 self.0.options = v.into();
6893 self
6894 }
6895
6896 pub async fn send(self) -> Result<()> {
6898 (*self.0.stub)
6899 .delete_operation(self.0.request, self.0.options)
6900 .await
6901 .map(crate::Response::into_body)
6902 }
6903
6904 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6906 self.0.request.name = v.into();
6907 self
6908 }
6909 }
6910
6911 #[doc(hidden)]
6912 impl crate::RequestBuilder for DeleteOperation {
6913 fn request_options(&mut self) -> &mut crate::RequestOptions {
6914 &mut self.0.options
6915 }
6916 }
6917
6918 #[derive(Clone, Debug)]
6935 pub struct CancelOperation(
6936 RequestBuilder<google_cloud_longrunning::model::CancelOperationRequest>,
6937 );
6938
6939 impl CancelOperation {
6940 pub(crate) fn new(
6941 stub: std::sync::Arc<dyn super::super::stub::dynamic::SecureSourceManager>,
6942 ) -> Self {
6943 Self(RequestBuilder::new(stub))
6944 }
6945
6946 pub fn with_request<V: Into<google_cloud_longrunning::model::CancelOperationRequest>>(
6948 mut self,
6949 v: V,
6950 ) -> Self {
6951 self.0.request = v.into();
6952 self
6953 }
6954
6955 pub fn with_options<V: Into<crate::RequestOptions>>(mut self, v: V) -> Self {
6957 self.0.options = v.into();
6958 self
6959 }
6960
6961 pub async fn send(self) -> Result<()> {
6963 (*self.0.stub)
6964 .cancel_operation(self.0.request, self.0.options)
6965 .await
6966 .map(crate::Response::into_body)
6967 }
6968
6969 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6971 self.0.request.name = v.into();
6972 self
6973 }
6974 }
6975
6976 #[doc(hidden)]
6977 impl crate::RequestBuilder for CancelOperation {
6978 fn request_options(&mut self) -> &mut crate::RequestOptions {
6979 &mut self.0.options
6980 }
6981 }
6982}