1pub mod developer_connect {
18 use crate::Result;
19 use std::sync::Arc;
20
21 #[derive(Clone, Debug)]
23 pub struct RequestBuilder<R: std::default::Default> {
24 stub: Arc<dyn crate::stubs::dynamic::DeveloperConnect>,
25 request: R,
26 options: gax::options::RequestOptions,
27 }
28
29 impl<R> RequestBuilder<R>
30 where
31 R: std::default::Default,
32 {
33 pub(crate) fn new(stub: Arc<dyn crate::stubs::dynamic::DeveloperConnect>) -> Self {
34 Self {
35 stub,
36 request: R::default(),
37 options: gax::options::RequestOptions::default(),
38 }
39 }
40 }
41
42 #[derive(Clone, Debug)]
44 pub struct ListConnections(RequestBuilder<crate::model::ListConnectionsRequest>);
45
46 impl ListConnections {
47 pub(crate) fn new(stub: Arc<dyn crate::stubs::dynamic::DeveloperConnect>) -> Self {
48 Self(RequestBuilder::new(stub))
49 }
50
51 pub fn with_request<V: Into<crate::model::ListConnectionsRequest>>(mut self, v: V) -> Self {
53 self.0.request = v.into();
54 self
55 }
56
57 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
59 self.0.options = v.into();
60 self
61 }
62
63 pub async fn send(self) -> Result<crate::model::ListConnectionsResponse> {
65 (*self.0.stub)
66 .list_connections(self.0.request, self.0.options)
67 .await
68 }
69
70 #[cfg(feature = "unstable-stream")]
72 pub async fn stream(
73 self,
74 ) -> gax::paginator::Paginator<crate::model::ListConnectionsResponse, gax::error::Error>
75 {
76 let token = gax::paginator::extract_token(&self.0.request.page_token);
77 let execute = move |token: String| {
78 let mut builder = self.clone();
79 builder.0.request = builder.0.request.set_page_token(token);
80 builder.send()
81 };
82 gax::paginator::Paginator::new(token, execute)
83 }
84
85 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
87 self.0.request.parent = v.into();
88 self
89 }
90
91 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
93 self.0.request.page_size = v.into();
94 self
95 }
96
97 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
99 self.0.request.page_token = v.into();
100 self
101 }
102
103 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
105 self.0.request.filter = v.into();
106 self
107 }
108
109 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
111 self.0.request.order_by = v.into();
112 self
113 }
114 }
115
116 impl gax::options::RequestBuilder for ListConnections {
117 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
118 &mut self.0.options
119 }
120 }
121
122 #[derive(Clone, Debug)]
124 pub struct GetConnection(RequestBuilder<crate::model::GetConnectionRequest>);
125
126 impl GetConnection {
127 pub(crate) fn new(stub: Arc<dyn crate::stubs::dynamic::DeveloperConnect>) -> Self {
128 Self(RequestBuilder::new(stub))
129 }
130
131 pub fn with_request<V: Into<crate::model::GetConnectionRequest>>(mut self, v: V) -> Self {
133 self.0.request = v.into();
134 self
135 }
136
137 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
139 self.0.options = v.into();
140 self
141 }
142
143 pub async fn send(self) -> Result<crate::model::Connection> {
145 (*self.0.stub)
146 .get_connection(self.0.request, self.0.options)
147 .await
148 }
149
150 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
152 self.0.request.name = v.into();
153 self
154 }
155 }
156
157 impl gax::options::RequestBuilder for GetConnection {
158 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
159 &mut self.0.options
160 }
161 }
162
163 #[derive(Clone, Debug)]
165 pub struct CreateConnection(RequestBuilder<crate::model::CreateConnectionRequest>);
166
167 impl CreateConnection {
168 pub(crate) fn new(stub: Arc<dyn crate::stubs::dynamic::DeveloperConnect>) -> Self {
169 Self(RequestBuilder::new(stub))
170 }
171
172 pub fn with_request<V: Into<crate::model::CreateConnectionRequest>>(
174 mut self,
175 v: V,
176 ) -> Self {
177 self.0.request = v.into();
178 self
179 }
180
181 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
183 self.0.options = v.into();
184 self
185 }
186
187 pub async fn send(self) -> Result<longrunning::model::Operation> {
194 (*self.0.stub)
195 .create_connection(self.0.request, self.0.options)
196 .await
197 }
198
199 pub fn poller(
201 self,
202 ) -> impl lro::Poller<crate::model::Connection, crate::model::OperationMetadata> {
203 type Operation =
204 lro::Operation<crate::model::Connection, crate::model::OperationMetadata>;
205 let polling_policy = self.0.stub.get_polling_policy(&self.0.options);
206 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
207
208 let stub = self.0.stub.clone();
209 let mut options = self.0.options.clone();
210 options.set_retry_policy(gax::retry_policy::NeverRetry);
211 let query = move |name| {
212 let stub = stub.clone();
213 let options = options.clone();
214 async {
215 let op = GetOperation::new(stub)
216 .set_name(name)
217 .with_options(options)
218 .send()
219 .await?;
220 Ok(Operation::new(op))
221 }
222 };
223
224 let start = move || async {
225 let op = self.send().await?;
226 Ok(Operation::new(op))
227 };
228
229 lro::new_poller(polling_policy, polling_backoff_policy, start, query)
230 }
231
232 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
234 self.0.request.parent = v.into();
235 self
236 }
237
238 pub fn set_connection_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
240 self.0.request.connection_id = v.into();
241 self
242 }
243
244 pub fn set_connection<T: Into<std::option::Option<crate::model::Connection>>>(
246 mut self,
247 v: T,
248 ) -> Self {
249 self.0.request.connection = v.into();
250 self
251 }
252
253 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
255 self.0.request.request_id = v.into();
256 self
257 }
258
259 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
261 self.0.request.validate_only = v.into();
262 self
263 }
264 }
265
266 impl gax::options::RequestBuilder for CreateConnection {
267 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
268 &mut self.0.options
269 }
270 }
271
272 #[derive(Clone, Debug)]
274 pub struct UpdateConnection(RequestBuilder<crate::model::UpdateConnectionRequest>);
275
276 impl UpdateConnection {
277 pub(crate) fn new(stub: Arc<dyn crate::stubs::dynamic::DeveloperConnect>) -> Self {
278 Self(RequestBuilder::new(stub))
279 }
280
281 pub fn with_request<V: Into<crate::model::UpdateConnectionRequest>>(
283 mut self,
284 v: V,
285 ) -> Self {
286 self.0.request = v.into();
287 self
288 }
289
290 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
292 self.0.options = v.into();
293 self
294 }
295
296 pub async fn send(self) -> Result<longrunning::model::Operation> {
303 (*self.0.stub)
304 .update_connection(self.0.request, self.0.options)
305 .await
306 }
307
308 pub fn poller(
310 self,
311 ) -> impl lro::Poller<crate::model::Connection, crate::model::OperationMetadata> {
312 type Operation =
313 lro::Operation<crate::model::Connection, crate::model::OperationMetadata>;
314 let polling_policy = self.0.stub.get_polling_policy(&self.0.options);
315 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
316
317 let stub = self.0.stub.clone();
318 let mut options = self.0.options.clone();
319 options.set_retry_policy(gax::retry_policy::NeverRetry);
320 let query = move |name| {
321 let stub = stub.clone();
322 let options = options.clone();
323 async {
324 let op = GetOperation::new(stub)
325 .set_name(name)
326 .with_options(options)
327 .send()
328 .await?;
329 Ok(Operation::new(op))
330 }
331 };
332
333 let start = move || async {
334 let op = self.send().await?;
335 Ok(Operation::new(op))
336 };
337
338 lro::new_poller(polling_policy, polling_backoff_policy, start, query)
339 }
340
341 pub fn set_update_mask<T: Into<std::option::Option<wkt::FieldMask>>>(
343 mut self,
344 v: T,
345 ) -> Self {
346 self.0.request.update_mask = v.into();
347 self
348 }
349
350 pub fn set_connection<T: Into<std::option::Option<crate::model::Connection>>>(
352 mut self,
353 v: T,
354 ) -> Self {
355 self.0.request.connection = v.into();
356 self
357 }
358
359 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
361 self.0.request.request_id = v.into();
362 self
363 }
364
365 pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
367 self.0.request.allow_missing = v.into();
368 self
369 }
370
371 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
373 self.0.request.validate_only = v.into();
374 self
375 }
376 }
377
378 impl gax::options::RequestBuilder for UpdateConnection {
379 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
380 &mut self.0.options
381 }
382 }
383
384 #[derive(Clone, Debug)]
386 pub struct DeleteConnection(RequestBuilder<crate::model::DeleteConnectionRequest>);
387
388 impl DeleteConnection {
389 pub(crate) fn new(stub: Arc<dyn crate::stubs::dynamic::DeveloperConnect>) -> Self {
390 Self(RequestBuilder::new(stub))
391 }
392
393 pub fn with_request<V: Into<crate::model::DeleteConnectionRequest>>(
395 mut self,
396 v: V,
397 ) -> Self {
398 self.0.request = v.into();
399 self
400 }
401
402 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
404 self.0.options = v.into();
405 self
406 }
407
408 pub async fn send(self) -> Result<longrunning::model::Operation> {
415 (*self.0.stub)
416 .delete_connection(self.0.request, self.0.options)
417 .await
418 }
419
420 pub fn poller(self) -> impl lro::Poller<wkt::Empty, crate::model::OperationMetadata> {
422 type Operation = lro::Operation<wkt::Empty, crate::model::OperationMetadata>;
423 let polling_policy = self.0.stub.get_polling_policy(&self.0.options);
424 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
425
426 let stub = self.0.stub.clone();
427 let mut options = self.0.options.clone();
428 options.set_retry_policy(gax::retry_policy::NeverRetry);
429 let query = move |name| {
430 let stub = stub.clone();
431 let options = options.clone();
432 async {
433 let op = GetOperation::new(stub)
434 .set_name(name)
435 .with_options(options)
436 .send()
437 .await?;
438 Ok(Operation::new(op))
439 }
440 };
441
442 let start = move || async {
443 let op = self.send().await?;
444 Ok(Operation::new(op))
445 };
446
447 lro::new_poller(polling_policy, polling_backoff_policy, start, query)
448 }
449
450 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
452 self.0.request.name = v.into();
453 self
454 }
455
456 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
458 self.0.request.request_id = v.into();
459 self
460 }
461
462 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
464 self.0.request.validate_only = v.into();
465 self
466 }
467
468 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
470 self.0.request.etag = v.into();
471 self
472 }
473 }
474
475 impl gax::options::RequestBuilder for DeleteConnection {
476 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
477 &mut self.0.options
478 }
479 }
480
481 #[derive(Clone, Debug)]
483 pub struct CreateGitRepositoryLink(
484 RequestBuilder<crate::model::CreateGitRepositoryLinkRequest>,
485 );
486
487 impl CreateGitRepositoryLink {
488 pub(crate) fn new(stub: Arc<dyn crate::stubs::dynamic::DeveloperConnect>) -> Self {
489 Self(RequestBuilder::new(stub))
490 }
491
492 pub fn with_request<V: Into<crate::model::CreateGitRepositoryLinkRequest>>(
494 mut self,
495 v: V,
496 ) -> Self {
497 self.0.request = v.into();
498 self
499 }
500
501 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
503 self.0.options = v.into();
504 self
505 }
506
507 pub async fn send(self) -> Result<longrunning::model::Operation> {
514 (*self.0.stub)
515 .create_git_repository_link(self.0.request, self.0.options)
516 .await
517 }
518
519 pub fn poller(
521 self,
522 ) -> impl lro::Poller<crate::model::GitRepositoryLink, crate::model::OperationMetadata>
523 {
524 type Operation =
525 lro::Operation<crate::model::GitRepositoryLink, crate::model::OperationMetadata>;
526 let polling_policy = self.0.stub.get_polling_policy(&self.0.options);
527 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
528
529 let stub = self.0.stub.clone();
530 let mut options = self.0.options.clone();
531 options.set_retry_policy(gax::retry_policy::NeverRetry);
532 let query = move |name| {
533 let stub = stub.clone();
534 let options = options.clone();
535 async {
536 let op = GetOperation::new(stub)
537 .set_name(name)
538 .with_options(options)
539 .send()
540 .await?;
541 Ok(Operation::new(op))
542 }
543 };
544
545 let start = move || async {
546 let op = self.send().await?;
547 Ok(Operation::new(op))
548 };
549
550 lro::new_poller(polling_policy, polling_backoff_policy, start, query)
551 }
552
553 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
555 self.0.request.parent = v.into();
556 self
557 }
558
559 pub fn set_git_repository_link<
561 T: Into<std::option::Option<crate::model::GitRepositoryLink>>,
562 >(
563 mut self,
564 v: T,
565 ) -> Self {
566 self.0.request.git_repository_link = v.into();
567 self
568 }
569
570 pub fn set_git_repository_link_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
572 self.0.request.git_repository_link_id = v.into();
573 self
574 }
575
576 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
578 self.0.request.request_id = v.into();
579 self
580 }
581
582 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
584 self.0.request.validate_only = v.into();
585 self
586 }
587 }
588
589 impl gax::options::RequestBuilder for CreateGitRepositoryLink {
590 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
591 &mut self.0.options
592 }
593 }
594
595 #[derive(Clone, Debug)]
597 pub struct DeleteGitRepositoryLink(
598 RequestBuilder<crate::model::DeleteGitRepositoryLinkRequest>,
599 );
600
601 impl DeleteGitRepositoryLink {
602 pub(crate) fn new(stub: Arc<dyn crate::stubs::dynamic::DeveloperConnect>) -> Self {
603 Self(RequestBuilder::new(stub))
604 }
605
606 pub fn with_request<V: Into<crate::model::DeleteGitRepositoryLinkRequest>>(
608 mut self,
609 v: V,
610 ) -> Self {
611 self.0.request = v.into();
612 self
613 }
614
615 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
617 self.0.options = v.into();
618 self
619 }
620
621 pub async fn send(self) -> Result<longrunning::model::Operation> {
628 (*self.0.stub)
629 .delete_git_repository_link(self.0.request, self.0.options)
630 .await
631 }
632
633 pub fn poller(self) -> impl lro::Poller<wkt::Empty, crate::model::OperationMetadata> {
635 type Operation = lro::Operation<wkt::Empty, crate::model::OperationMetadata>;
636 let polling_policy = self.0.stub.get_polling_policy(&self.0.options);
637 let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
638
639 let stub = self.0.stub.clone();
640 let mut options = self.0.options.clone();
641 options.set_retry_policy(gax::retry_policy::NeverRetry);
642 let query = move |name| {
643 let stub = stub.clone();
644 let options = options.clone();
645 async {
646 let op = GetOperation::new(stub)
647 .set_name(name)
648 .with_options(options)
649 .send()
650 .await?;
651 Ok(Operation::new(op))
652 }
653 };
654
655 let start = move || async {
656 let op = self.send().await?;
657 Ok(Operation::new(op))
658 };
659
660 lro::new_poller(polling_policy, polling_backoff_policy, start, query)
661 }
662
663 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
665 self.0.request.name = v.into();
666 self
667 }
668
669 pub fn set_request_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
671 self.0.request.request_id = v.into();
672 self
673 }
674
675 pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
677 self.0.request.validate_only = v.into();
678 self
679 }
680
681 pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
683 self.0.request.etag = v.into();
684 self
685 }
686 }
687
688 impl gax::options::RequestBuilder for DeleteGitRepositoryLink {
689 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
690 &mut self.0.options
691 }
692 }
693
694 #[derive(Clone, Debug)]
696 pub struct ListGitRepositoryLinks(RequestBuilder<crate::model::ListGitRepositoryLinksRequest>);
697
698 impl ListGitRepositoryLinks {
699 pub(crate) fn new(stub: Arc<dyn crate::stubs::dynamic::DeveloperConnect>) -> Self {
700 Self(RequestBuilder::new(stub))
701 }
702
703 pub fn with_request<V: Into<crate::model::ListGitRepositoryLinksRequest>>(
705 mut self,
706 v: V,
707 ) -> Self {
708 self.0.request = v.into();
709 self
710 }
711
712 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
714 self.0.options = v.into();
715 self
716 }
717
718 pub async fn send(self) -> Result<crate::model::ListGitRepositoryLinksResponse> {
720 (*self.0.stub)
721 .list_git_repository_links(self.0.request, self.0.options)
722 .await
723 }
724
725 #[cfg(feature = "unstable-stream")]
727 pub async fn stream(
728 self,
729 ) -> gax::paginator::Paginator<
730 crate::model::ListGitRepositoryLinksResponse,
731 gax::error::Error,
732 > {
733 let token = gax::paginator::extract_token(&self.0.request.page_token);
734 let execute = move |token: String| {
735 let mut builder = self.clone();
736 builder.0.request = builder.0.request.set_page_token(token);
737 builder.send()
738 };
739 gax::paginator::Paginator::new(token, execute)
740 }
741
742 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
744 self.0.request.parent = v.into();
745 self
746 }
747
748 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
750 self.0.request.page_size = v.into();
751 self
752 }
753
754 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
756 self.0.request.page_token = v.into();
757 self
758 }
759
760 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
762 self.0.request.filter = v.into();
763 self
764 }
765
766 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
768 self.0.request.order_by = v.into();
769 self
770 }
771 }
772
773 impl gax::options::RequestBuilder for ListGitRepositoryLinks {
774 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
775 &mut self.0.options
776 }
777 }
778
779 #[derive(Clone, Debug)]
781 pub struct GetGitRepositoryLink(RequestBuilder<crate::model::GetGitRepositoryLinkRequest>);
782
783 impl GetGitRepositoryLink {
784 pub(crate) fn new(stub: Arc<dyn crate::stubs::dynamic::DeveloperConnect>) -> Self {
785 Self(RequestBuilder::new(stub))
786 }
787
788 pub fn with_request<V: Into<crate::model::GetGitRepositoryLinkRequest>>(
790 mut self,
791 v: V,
792 ) -> Self {
793 self.0.request = v.into();
794 self
795 }
796
797 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
799 self.0.options = v.into();
800 self
801 }
802
803 pub async fn send(self) -> Result<crate::model::GitRepositoryLink> {
805 (*self.0.stub)
806 .get_git_repository_link(self.0.request, self.0.options)
807 .await
808 }
809
810 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
812 self.0.request.name = v.into();
813 self
814 }
815 }
816
817 impl gax::options::RequestBuilder for GetGitRepositoryLink {
818 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
819 &mut self.0.options
820 }
821 }
822
823 #[derive(Clone, Debug)]
825 pub struct FetchReadWriteToken(RequestBuilder<crate::model::FetchReadWriteTokenRequest>);
826
827 impl FetchReadWriteToken {
828 pub(crate) fn new(stub: Arc<dyn crate::stubs::dynamic::DeveloperConnect>) -> Self {
829 Self(RequestBuilder::new(stub))
830 }
831
832 pub fn with_request<V: Into<crate::model::FetchReadWriteTokenRequest>>(
834 mut self,
835 v: V,
836 ) -> Self {
837 self.0.request = v.into();
838 self
839 }
840
841 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
843 self.0.options = v.into();
844 self
845 }
846
847 pub async fn send(self) -> Result<crate::model::FetchReadWriteTokenResponse> {
849 (*self.0.stub)
850 .fetch_read_write_token(self.0.request, self.0.options)
851 .await
852 }
853
854 pub fn set_git_repository_link<T: Into<std::string::String>>(mut self, v: T) -> Self {
856 self.0.request.git_repository_link = v.into();
857 self
858 }
859 }
860
861 impl gax::options::RequestBuilder for FetchReadWriteToken {
862 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
863 &mut self.0.options
864 }
865 }
866
867 #[derive(Clone, Debug)]
869 pub struct FetchReadToken(RequestBuilder<crate::model::FetchReadTokenRequest>);
870
871 impl FetchReadToken {
872 pub(crate) fn new(stub: Arc<dyn crate::stubs::dynamic::DeveloperConnect>) -> Self {
873 Self(RequestBuilder::new(stub))
874 }
875
876 pub fn with_request<V: Into<crate::model::FetchReadTokenRequest>>(mut self, v: V) -> Self {
878 self.0.request = v.into();
879 self
880 }
881
882 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
884 self.0.options = v.into();
885 self
886 }
887
888 pub async fn send(self) -> Result<crate::model::FetchReadTokenResponse> {
890 (*self.0.stub)
891 .fetch_read_token(self.0.request, self.0.options)
892 .await
893 }
894
895 pub fn set_git_repository_link<T: Into<std::string::String>>(mut self, v: T) -> Self {
897 self.0.request.git_repository_link = v.into();
898 self
899 }
900 }
901
902 impl gax::options::RequestBuilder for FetchReadToken {
903 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
904 &mut self.0.options
905 }
906 }
907
908 #[derive(Clone, Debug)]
910 pub struct FetchLinkableGitRepositories(
911 RequestBuilder<crate::model::FetchLinkableGitRepositoriesRequest>,
912 );
913
914 impl FetchLinkableGitRepositories {
915 pub(crate) fn new(stub: Arc<dyn crate::stubs::dynamic::DeveloperConnect>) -> Self {
916 Self(RequestBuilder::new(stub))
917 }
918
919 pub fn with_request<V: Into<crate::model::FetchLinkableGitRepositoriesRequest>>(
921 mut self,
922 v: V,
923 ) -> Self {
924 self.0.request = v.into();
925 self
926 }
927
928 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
930 self.0.options = v.into();
931 self
932 }
933
934 pub async fn send(self) -> Result<crate::model::FetchLinkableGitRepositoriesResponse> {
936 (*self.0.stub)
937 .fetch_linkable_git_repositories(self.0.request, self.0.options)
938 .await
939 }
940
941 #[cfg(feature = "unstable-stream")]
943 pub async fn stream(
944 self,
945 ) -> gax::paginator::Paginator<
946 crate::model::FetchLinkableGitRepositoriesResponse,
947 gax::error::Error,
948 > {
949 let token = gax::paginator::extract_token(&self.0.request.page_token);
950 let execute = move |token: String| {
951 let mut builder = self.clone();
952 builder.0.request = builder.0.request.set_page_token(token);
953 builder.send()
954 };
955 gax::paginator::Paginator::new(token, execute)
956 }
957
958 pub fn set_connection<T: Into<std::string::String>>(mut self, v: T) -> Self {
960 self.0.request.connection = v.into();
961 self
962 }
963
964 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
966 self.0.request.page_size = v.into();
967 self
968 }
969
970 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
972 self.0.request.page_token = v.into();
973 self
974 }
975 }
976
977 impl gax::options::RequestBuilder for FetchLinkableGitRepositories {
978 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
979 &mut self.0.options
980 }
981 }
982
983 #[derive(Clone, Debug)]
985 pub struct FetchGitHubInstallations(
986 RequestBuilder<crate::model::FetchGitHubInstallationsRequest>,
987 );
988
989 impl FetchGitHubInstallations {
990 pub(crate) fn new(stub: Arc<dyn crate::stubs::dynamic::DeveloperConnect>) -> Self {
991 Self(RequestBuilder::new(stub))
992 }
993
994 pub fn with_request<V: Into<crate::model::FetchGitHubInstallationsRequest>>(
996 mut self,
997 v: V,
998 ) -> Self {
999 self.0.request = v.into();
1000 self
1001 }
1002
1003 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1005 self.0.options = v.into();
1006 self
1007 }
1008
1009 pub async fn send(self) -> Result<crate::model::FetchGitHubInstallationsResponse> {
1011 (*self.0.stub)
1012 .fetch_git_hub_installations(self.0.request, self.0.options)
1013 .await
1014 }
1015
1016 pub fn set_connection<T: Into<std::string::String>>(mut self, v: T) -> Self {
1018 self.0.request.connection = v.into();
1019 self
1020 }
1021 }
1022
1023 impl gax::options::RequestBuilder for FetchGitHubInstallations {
1024 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1025 &mut self.0.options
1026 }
1027 }
1028
1029 #[derive(Clone, Debug)]
1031 pub struct FetchGitRefs(RequestBuilder<crate::model::FetchGitRefsRequest>);
1032
1033 impl FetchGitRefs {
1034 pub(crate) fn new(stub: Arc<dyn crate::stubs::dynamic::DeveloperConnect>) -> Self {
1035 Self(RequestBuilder::new(stub))
1036 }
1037
1038 pub fn with_request<V: Into<crate::model::FetchGitRefsRequest>>(mut self, v: V) -> Self {
1040 self.0.request = v.into();
1041 self
1042 }
1043
1044 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1046 self.0.options = v.into();
1047 self
1048 }
1049
1050 pub async fn send(self) -> Result<crate::model::FetchGitRefsResponse> {
1052 (*self.0.stub)
1053 .fetch_git_refs(self.0.request, self.0.options)
1054 .await
1055 }
1056
1057 pub fn set_git_repository_link<T: Into<std::string::String>>(mut self, v: T) -> Self {
1059 self.0.request.git_repository_link = v.into();
1060 self
1061 }
1062
1063 pub fn set_ref_type<T: Into<crate::model::fetch_git_refs_request::RefType>>(
1065 mut self,
1066 v: T,
1067 ) -> Self {
1068 self.0.request.ref_type = v.into();
1069 self
1070 }
1071
1072 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1074 self.0.request.page_size = v.into();
1075 self
1076 }
1077
1078 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1080 self.0.request.page_token = v.into();
1081 self
1082 }
1083 }
1084
1085 impl gax::options::RequestBuilder for FetchGitRefs {
1086 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1087 &mut self.0.options
1088 }
1089 }
1090
1091 #[derive(Clone, Debug)]
1093 pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
1094
1095 impl ListLocations {
1096 pub(crate) fn new(stub: Arc<dyn crate::stubs::dynamic::DeveloperConnect>) -> Self {
1097 Self(RequestBuilder::new(stub))
1098 }
1099
1100 pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
1102 mut self,
1103 v: V,
1104 ) -> Self {
1105 self.0.request = v.into();
1106 self
1107 }
1108
1109 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1111 self.0.options = v.into();
1112 self
1113 }
1114
1115 pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
1117 (*self.0.stub)
1118 .list_locations(self.0.request, self.0.options)
1119 .await
1120 }
1121
1122 #[cfg(feature = "unstable-stream")]
1124 pub async fn stream(
1125 self,
1126 ) -> gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
1127 {
1128 let token = gax::paginator::extract_token(&self.0.request.page_token);
1129 let execute = move |token: String| {
1130 let mut builder = self.clone();
1131 builder.0.request = builder.0.request.set_page_token(token);
1132 builder.send()
1133 };
1134 gax::paginator::Paginator::new(token, execute)
1135 }
1136
1137 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1139 self.0.request.name = v.into();
1140 self
1141 }
1142
1143 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1145 self.0.request.filter = v.into();
1146 self
1147 }
1148
1149 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1151 self.0.request.page_size = v.into();
1152 self
1153 }
1154
1155 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1157 self.0.request.page_token = v.into();
1158 self
1159 }
1160 }
1161
1162 impl gax::options::RequestBuilder for ListLocations {
1163 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1164 &mut self.0.options
1165 }
1166 }
1167
1168 #[derive(Clone, Debug)]
1170 pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
1171
1172 impl GetLocation {
1173 pub(crate) fn new(stub: Arc<dyn crate::stubs::dynamic::DeveloperConnect>) -> Self {
1174 Self(RequestBuilder::new(stub))
1175 }
1176
1177 pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
1179 self.0.request = v.into();
1180 self
1181 }
1182
1183 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1185 self.0.options = v.into();
1186 self
1187 }
1188
1189 pub async fn send(self) -> Result<location::model::Location> {
1191 (*self.0.stub)
1192 .get_location(self.0.request, self.0.options)
1193 .await
1194 }
1195
1196 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1198 self.0.request.name = v.into();
1199 self
1200 }
1201 }
1202
1203 impl gax::options::RequestBuilder for GetLocation {
1204 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1205 &mut self.0.options
1206 }
1207 }
1208
1209 #[derive(Clone, Debug)]
1211 pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
1212
1213 impl ListOperations {
1214 pub(crate) fn new(stub: Arc<dyn crate::stubs::dynamic::DeveloperConnect>) -> Self {
1215 Self(RequestBuilder::new(stub))
1216 }
1217
1218 pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
1220 mut self,
1221 v: V,
1222 ) -> Self {
1223 self.0.request = v.into();
1224 self
1225 }
1226
1227 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1229 self.0.options = v.into();
1230 self
1231 }
1232
1233 pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
1235 (*self.0.stub)
1236 .list_operations(self.0.request, self.0.options)
1237 .await
1238 }
1239
1240 #[cfg(feature = "unstable-stream")]
1242 pub async fn stream(
1243 self,
1244 ) -> gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
1245 {
1246 let token = gax::paginator::extract_token(&self.0.request.page_token);
1247 let execute = move |token: String| {
1248 let mut builder = self.clone();
1249 builder.0.request = builder.0.request.set_page_token(token);
1250 builder.send()
1251 };
1252 gax::paginator::Paginator::new(token, execute)
1253 }
1254
1255 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1257 self.0.request.name = v.into();
1258 self
1259 }
1260
1261 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1263 self.0.request.filter = v.into();
1264 self
1265 }
1266
1267 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1269 self.0.request.page_size = v.into();
1270 self
1271 }
1272
1273 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1275 self.0.request.page_token = v.into();
1276 self
1277 }
1278 }
1279
1280 impl gax::options::RequestBuilder for ListOperations {
1281 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1282 &mut self.0.options
1283 }
1284 }
1285
1286 #[derive(Clone, Debug)]
1288 pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
1289
1290 impl GetOperation {
1291 pub(crate) fn new(stub: Arc<dyn crate::stubs::dynamic::DeveloperConnect>) -> Self {
1292 Self(RequestBuilder::new(stub))
1293 }
1294
1295 pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
1297 mut self,
1298 v: V,
1299 ) -> Self {
1300 self.0.request = v.into();
1301 self
1302 }
1303
1304 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1306 self.0.options = v.into();
1307 self
1308 }
1309
1310 pub async fn send(self) -> Result<longrunning::model::Operation> {
1312 (*self.0.stub)
1313 .get_operation(self.0.request, self.0.options)
1314 .await
1315 }
1316
1317 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1319 self.0.request.name = v.into();
1320 self
1321 }
1322 }
1323
1324 impl gax::options::RequestBuilder for GetOperation {
1325 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1326 &mut self.0.options
1327 }
1328 }
1329
1330 #[derive(Clone, Debug)]
1332 pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
1333
1334 impl DeleteOperation {
1335 pub(crate) fn new(stub: Arc<dyn crate::stubs::dynamic::DeveloperConnect>) -> Self {
1336 Self(RequestBuilder::new(stub))
1337 }
1338
1339 pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
1341 mut self,
1342 v: V,
1343 ) -> Self {
1344 self.0.request = v.into();
1345 self
1346 }
1347
1348 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1350 self.0.options = v.into();
1351 self
1352 }
1353
1354 pub async fn send(self) -> Result<wkt::Empty> {
1356 (*self.0.stub)
1357 .delete_operation(self.0.request, self.0.options)
1358 .await
1359 }
1360
1361 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1363 self.0.request.name = v.into();
1364 self
1365 }
1366 }
1367
1368 impl gax::options::RequestBuilder for DeleteOperation {
1369 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1370 &mut self.0.options
1371 }
1372 }
1373
1374 #[derive(Clone, Debug)]
1376 pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
1377
1378 impl CancelOperation {
1379 pub(crate) fn new(stub: Arc<dyn crate::stubs::dynamic::DeveloperConnect>) -> Self {
1380 Self(RequestBuilder::new(stub))
1381 }
1382
1383 pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
1385 mut self,
1386 v: V,
1387 ) -> Self {
1388 self.0.request = v.into();
1389 self
1390 }
1391
1392 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1394 self.0.options = v.into();
1395 self
1396 }
1397
1398 pub async fn send(self) -> Result<wkt::Empty> {
1400 (*self.0.stub)
1401 .cancel_operation(self.0.request, self.0.options)
1402 .await
1403 }
1404
1405 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1407 self.0.request.name = v.into();
1408 self
1409 }
1410 }
1411
1412 impl gax::options::RequestBuilder for CancelOperation {
1413 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1414 &mut self.0.options
1415 }
1416 }
1417}