1pub mod dataform {
18 use crate::Result;
19
20 pub type ClientBuilder =
34 gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
35
36 pub(crate) mod client {
37 use super::super::super::client::Dataform;
38 pub struct Factory;
39 impl gax::client_builder::internal::ClientFactory for Factory {
40 type Client = Dataform;
41 type Credentials = gaxi::options::Credentials;
42 async fn build(
43 self,
44 config: gaxi::options::ClientConfig,
45 ) -> gax::client_builder::Result<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::Dataform>,
55 request: R,
56 options: gax::options::RequestOptions,
57 }
58
59 impl<R> RequestBuilder<R>
60 where
61 R: std::default::Default,
62 {
63 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
64 Self {
65 stub,
66 request: R::default(),
67 options: gax::options::RequestOptions::default(),
68 }
69 }
70 }
71
72 #[derive(Clone, Debug)]
93 pub struct ListRepositories(RequestBuilder<crate::model::ListRepositoriesRequest>);
94
95 impl ListRepositories {
96 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
97 Self(RequestBuilder::new(stub))
98 }
99
100 pub fn with_request<V: Into<crate::model::ListRepositoriesRequest>>(
102 mut self,
103 v: V,
104 ) -> Self {
105 self.0.request = v.into();
106 self
107 }
108
109 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
111 self.0.options = v.into();
112 self
113 }
114
115 pub async fn send(self) -> Result<crate::model::ListRepositoriesResponse> {
117 (*self.0.stub)
118 .list_repositories(self.0.request, self.0.options)
119 .await
120 .map(gax::response::Response::into_body)
121 }
122
123 pub fn by_page(
125 self,
126 ) -> impl gax::paginator::Paginator<crate::model::ListRepositoriesResponse, gax::error::Error>
127 {
128 use std::clone::Clone;
129 let token = self.0.request.page_token.clone();
130 let execute = move |token: String| {
131 let mut builder = self.clone();
132 builder.0.request = builder.0.request.set_page_token(token);
133 builder.send()
134 };
135 gax::paginator::internal::new_paginator(token, execute)
136 }
137
138 pub fn by_item(
140 self,
141 ) -> impl gax::paginator::ItemPaginator<crate::model::ListRepositoriesResponse, gax::error::Error>
142 {
143 use gax::paginator::Paginator;
144 self.by_page().items()
145 }
146
147 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
151 self.0.request.parent = v.into();
152 self
153 }
154
155 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
157 self.0.request.page_size = v.into();
158 self
159 }
160
161 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
163 self.0.request.page_token = v.into();
164 self
165 }
166
167 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
169 self.0.request.order_by = v.into();
170 self
171 }
172
173 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
175 self.0.request.filter = v.into();
176 self
177 }
178 }
179
180 #[doc(hidden)]
181 impl gax::options::internal::RequestBuilder for ListRepositories {
182 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
183 &mut self.0.options
184 }
185 }
186
187 #[derive(Clone, Debug)]
204 pub struct GetRepository(RequestBuilder<crate::model::GetRepositoryRequest>);
205
206 impl GetRepository {
207 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
208 Self(RequestBuilder::new(stub))
209 }
210
211 pub fn with_request<V: Into<crate::model::GetRepositoryRequest>>(mut self, v: V) -> Self {
213 self.0.request = v.into();
214 self
215 }
216
217 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
219 self.0.options = v.into();
220 self
221 }
222
223 pub async fn send(self) -> Result<crate::model::Repository> {
225 (*self.0.stub)
226 .get_repository(self.0.request, self.0.options)
227 .await
228 .map(gax::response::Response::into_body)
229 }
230
231 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
235 self.0.request.name = v.into();
236 self
237 }
238 }
239
240 #[doc(hidden)]
241 impl gax::options::internal::RequestBuilder for GetRepository {
242 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
243 &mut self.0.options
244 }
245 }
246
247 #[derive(Clone, Debug)]
264 pub struct CreateRepository(RequestBuilder<crate::model::CreateRepositoryRequest>);
265
266 impl CreateRepository {
267 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
268 Self(RequestBuilder::new(stub))
269 }
270
271 pub fn with_request<V: Into<crate::model::CreateRepositoryRequest>>(
273 mut self,
274 v: V,
275 ) -> Self {
276 self.0.request = v.into();
277 self
278 }
279
280 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
282 self.0.options = v.into();
283 self
284 }
285
286 pub async fn send(self) -> Result<crate::model::Repository> {
288 (*self.0.stub)
289 .create_repository(self.0.request, self.0.options)
290 .await
291 .map(gax::response::Response::into_body)
292 }
293
294 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
298 self.0.request.parent = v.into();
299 self
300 }
301
302 pub fn set_repository<T>(mut self, v: T) -> Self
306 where
307 T: std::convert::Into<crate::model::Repository>,
308 {
309 self.0.request.repository = std::option::Option::Some(v.into());
310 self
311 }
312
313 pub fn set_or_clear_repository<T>(mut self, v: std::option::Option<T>) -> Self
317 where
318 T: std::convert::Into<crate::model::Repository>,
319 {
320 self.0.request.repository = v.map(|x| x.into());
321 self
322 }
323
324 pub fn set_repository_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
328 self.0.request.repository_id = v.into();
329 self
330 }
331 }
332
333 #[doc(hidden)]
334 impl gax::options::internal::RequestBuilder for CreateRepository {
335 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
336 &mut self.0.options
337 }
338 }
339
340 #[derive(Clone, Debug)]
357 pub struct UpdateRepository(RequestBuilder<crate::model::UpdateRepositoryRequest>);
358
359 impl UpdateRepository {
360 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
361 Self(RequestBuilder::new(stub))
362 }
363
364 pub fn with_request<V: Into<crate::model::UpdateRepositoryRequest>>(
366 mut self,
367 v: V,
368 ) -> Self {
369 self.0.request = v.into();
370 self
371 }
372
373 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
375 self.0.options = v.into();
376 self
377 }
378
379 pub async fn send(self) -> Result<crate::model::Repository> {
381 (*self.0.stub)
382 .update_repository(self.0.request, self.0.options)
383 .await
384 .map(gax::response::Response::into_body)
385 }
386
387 pub fn set_update_mask<T>(mut self, v: T) -> Self
389 where
390 T: std::convert::Into<wkt::FieldMask>,
391 {
392 self.0.request.update_mask = std::option::Option::Some(v.into());
393 self
394 }
395
396 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
398 where
399 T: std::convert::Into<wkt::FieldMask>,
400 {
401 self.0.request.update_mask = v.map(|x| x.into());
402 self
403 }
404
405 pub fn set_repository<T>(mut self, v: T) -> Self
409 where
410 T: std::convert::Into<crate::model::Repository>,
411 {
412 self.0.request.repository = std::option::Option::Some(v.into());
413 self
414 }
415
416 pub fn set_or_clear_repository<T>(mut self, v: std::option::Option<T>) -> Self
420 where
421 T: std::convert::Into<crate::model::Repository>,
422 {
423 self.0.request.repository = v.map(|x| x.into());
424 self
425 }
426 }
427
428 #[doc(hidden)]
429 impl gax::options::internal::RequestBuilder for UpdateRepository {
430 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
431 &mut self.0.options
432 }
433 }
434
435 #[derive(Clone, Debug)]
452 pub struct DeleteRepository(RequestBuilder<crate::model::DeleteRepositoryRequest>);
453
454 impl DeleteRepository {
455 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
456 Self(RequestBuilder::new(stub))
457 }
458
459 pub fn with_request<V: Into<crate::model::DeleteRepositoryRequest>>(
461 mut self,
462 v: V,
463 ) -> Self {
464 self.0.request = v.into();
465 self
466 }
467
468 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
470 self.0.options = v.into();
471 self
472 }
473
474 pub async fn send(self) -> Result<()> {
476 (*self.0.stub)
477 .delete_repository(self.0.request, self.0.options)
478 .await
479 .map(gax::response::Response::into_body)
480 }
481
482 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
486 self.0.request.name = v.into();
487 self
488 }
489
490 pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
492 self.0.request.force = v.into();
493 self
494 }
495 }
496
497 #[doc(hidden)]
498 impl gax::options::internal::RequestBuilder for DeleteRepository {
499 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
500 &mut self.0.options
501 }
502 }
503
504 #[derive(Clone, Debug)]
521 pub struct CommitRepositoryChanges(
522 RequestBuilder<crate::model::CommitRepositoryChangesRequest>,
523 );
524
525 impl CommitRepositoryChanges {
526 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
527 Self(RequestBuilder::new(stub))
528 }
529
530 pub fn with_request<V: Into<crate::model::CommitRepositoryChangesRequest>>(
532 mut self,
533 v: V,
534 ) -> Self {
535 self.0.request = v.into();
536 self
537 }
538
539 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
541 self.0.options = v.into();
542 self
543 }
544
545 pub async fn send(self) -> Result<crate::model::CommitRepositoryChangesResponse> {
547 (*self.0.stub)
548 .commit_repository_changes(self.0.request, self.0.options)
549 .await
550 .map(gax::response::Response::into_body)
551 }
552
553 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
557 self.0.request.name = v.into();
558 self
559 }
560
561 pub fn set_commit_metadata<T>(mut self, v: T) -> Self
565 where
566 T: std::convert::Into<crate::model::CommitMetadata>,
567 {
568 self.0.request.commit_metadata = std::option::Option::Some(v.into());
569 self
570 }
571
572 pub fn set_or_clear_commit_metadata<T>(mut self, v: std::option::Option<T>) -> Self
576 where
577 T: std::convert::Into<crate::model::CommitMetadata>,
578 {
579 self.0.request.commit_metadata = v.map(|x| x.into());
580 self
581 }
582
583 pub fn set_required_head_commit_sha<T: Into<std::string::String>>(mut self, v: T) -> Self {
585 self.0.request.required_head_commit_sha = v.into();
586 self
587 }
588
589 pub fn set_file_operations<T, K, V>(mut self, v: T) -> Self
591 where
592 T: std::iter::IntoIterator<Item = (K, V)>,
593 K: std::convert::Into<std::string::String>,
594 V: std::convert::Into<crate::model::commit_repository_changes_request::FileOperation>,
595 {
596 self.0.request.file_operations =
597 v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
598 self
599 }
600 }
601
602 #[doc(hidden)]
603 impl gax::options::internal::RequestBuilder for CommitRepositoryChanges {
604 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
605 &mut self.0.options
606 }
607 }
608
609 #[derive(Clone, Debug)]
626 pub struct ReadRepositoryFile(RequestBuilder<crate::model::ReadRepositoryFileRequest>);
627
628 impl ReadRepositoryFile {
629 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
630 Self(RequestBuilder::new(stub))
631 }
632
633 pub fn with_request<V: Into<crate::model::ReadRepositoryFileRequest>>(
635 mut self,
636 v: V,
637 ) -> Self {
638 self.0.request = v.into();
639 self
640 }
641
642 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
644 self.0.options = v.into();
645 self
646 }
647
648 pub async fn send(self) -> Result<crate::model::ReadRepositoryFileResponse> {
650 (*self.0.stub)
651 .read_repository_file(self.0.request, self.0.options)
652 .await
653 .map(gax::response::Response::into_body)
654 }
655
656 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
660 self.0.request.name = v.into();
661 self
662 }
663
664 pub fn set_commit_sha<T: Into<std::string::String>>(mut self, v: T) -> Self {
666 self.0.request.commit_sha = v.into();
667 self
668 }
669
670 pub fn set_path<T: Into<std::string::String>>(mut self, v: T) -> Self {
674 self.0.request.path = v.into();
675 self
676 }
677 }
678
679 #[doc(hidden)]
680 impl gax::options::internal::RequestBuilder for ReadRepositoryFile {
681 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
682 &mut self.0.options
683 }
684 }
685
686 #[derive(Clone, Debug)]
707 pub struct QueryRepositoryDirectoryContents(
708 RequestBuilder<crate::model::QueryRepositoryDirectoryContentsRequest>,
709 );
710
711 impl QueryRepositoryDirectoryContents {
712 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
713 Self(RequestBuilder::new(stub))
714 }
715
716 pub fn with_request<V: Into<crate::model::QueryRepositoryDirectoryContentsRequest>>(
718 mut self,
719 v: V,
720 ) -> Self {
721 self.0.request = v.into();
722 self
723 }
724
725 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
727 self.0.options = v.into();
728 self
729 }
730
731 pub async fn send(self) -> Result<crate::model::QueryRepositoryDirectoryContentsResponse> {
733 (*self.0.stub)
734 .query_repository_directory_contents(self.0.request, self.0.options)
735 .await
736 .map(gax::response::Response::into_body)
737 }
738
739 pub fn by_page(
741 self,
742 ) -> impl gax::paginator::Paginator<
743 crate::model::QueryRepositoryDirectoryContentsResponse,
744 gax::error::Error,
745 > {
746 use std::clone::Clone;
747 let token = self.0.request.page_token.clone();
748 let execute = move |token: String| {
749 let mut builder = self.clone();
750 builder.0.request = builder.0.request.set_page_token(token);
751 builder.send()
752 };
753 gax::paginator::internal::new_paginator(token, execute)
754 }
755
756 pub fn by_item(
758 self,
759 ) -> impl gax::paginator::ItemPaginator<
760 crate::model::QueryRepositoryDirectoryContentsResponse,
761 gax::error::Error,
762 > {
763 use gax::paginator::Paginator;
764 self.by_page().items()
765 }
766
767 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
771 self.0.request.name = v.into();
772 self
773 }
774
775 pub fn set_commit_sha<T: Into<std::string::String>>(mut self, v: T) -> Self {
777 self.0.request.commit_sha = v.into();
778 self
779 }
780
781 pub fn set_path<T: Into<std::string::String>>(mut self, v: T) -> Self {
783 self.0.request.path = v.into();
784 self
785 }
786
787 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
789 self.0.request.page_size = v.into();
790 self
791 }
792
793 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
795 self.0.request.page_token = v.into();
796 self
797 }
798 }
799
800 #[doc(hidden)]
801 impl gax::options::internal::RequestBuilder for QueryRepositoryDirectoryContents {
802 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
803 &mut self.0.options
804 }
805 }
806
807 #[derive(Clone, Debug)]
828 pub struct FetchRepositoryHistory(RequestBuilder<crate::model::FetchRepositoryHistoryRequest>);
829
830 impl FetchRepositoryHistory {
831 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
832 Self(RequestBuilder::new(stub))
833 }
834
835 pub fn with_request<V: Into<crate::model::FetchRepositoryHistoryRequest>>(
837 mut self,
838 v: V,
839 ) -> Self {
840 self.0.request = v.into();
841 self
842 }
843
844 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
846 self.0.options = v.into();
847 self
848 }
849
850 pub async fn send(self) -> Result<crate::model::FetchRepositoryHistoryResponse> {
852 (*self.0.stub)
853 .fetch_repository_history(self.0.request, self.0.options)
854 .await
855 .map(gax::response::Response::into_body)
856 }
857
858 pub fn by_page(
860 self,
861 ) -> impl gax::paginator::Paginator<
862 crate::model::FetchRepositoryHistoryResponse,
863 gax::error::Error,
864 > {
865 use std::clone::Clone;
866 let token = self.0.request.page_token.clone();
867 let execute = move |token: String| {
868 let mut builder = self.clone();
869 builder.0.request = builder.0.request.set_page_token(token);
870 builder.send()
871 };
872 gax::paginator::internal::new_paginator(token, execute)
873 }
874
875 pub fn by_item(
877 self,
878 ) -> impl gax::paginator::ItemPaginator<
879 crate::model::FetchRepositoryHistoryResponse,
880 gax::error::Error,
881 > {
882 use gax::paginator::Paginator;
883 self.by_page().items()
884 }
885
886 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
890 self.0.request.name = v.into();
891 self
892 }
893
894 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
896 self.0.request.page_size = v.into();
897 self
898 }
899
900 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
902 self.0.request.page_token = v.into();
903 self
904 }
905 }
906
907 #[doc(hidden)]
908 impl gax::options::internal::RequestBuilder for FetchRepositoryHistory {
909 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
910 &mut self.0.options
911 }
912 }
913
914 #[derive(Clone, Debug)]
931 pub struct ComputeRepositoryAccessTokenStatus(
932 RequestBuilder<crate::model::ComputeRepositoryAccessTokenStatusRequest>,
933 );
934
935 impl ComputeRepositoryAccessTokenStatus {
936 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
937 Self(RequestBuilder::new(stub))
938 }
939
940 pub fn with_request<V: Into<crate::model::ComputeRepositoryAccessTokenStatusRequest>>(
942 mut self,
943 v: V,
944 ) -> Self {
945 self.0.request = v.into();
946 self
947 }
948
949 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
951 self.0.options = v.into();
952 self
953 }
954
955 pub async fn send(
957 self,
958 ) -> Result<crate::model::ComputeRepositoryAccessTokenStatusResponse> {
959 (*self.0.stub)
960 .compute_repository_access_token_status(self.0.request, self.0.options)
961 .await
962 .map(gax::response::Response::into_body)
963 }
964
965 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
969 self.0.request.name = v.into();
970 self
971 }
972 }
973
974 #[doc(hidden)]
975 impl gax::options::internal::RequestBuilder for ComputeRepositoryAccessTokenStatus {
976 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
977 &mut self.0.options
978 }
979 }
980
981 #[derive(Clone, Debug)]
998 pub struct FetchRemoteBranches(RequestBuilder<crate::model::FetchRemoteBranchesRequest>);
999
1000 impl FetchRemoteBranches {
1001 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
1002 Self(RequestBuilder::new(stub))
1003 }
1004
1005 pub fn with_request<V: Into<crate::model::FetchRemoteBranchesRequest>>(
1007 mut self,
1008 v: V,
1009 ) -> Self {
1010 self.0.request = v.into();
1011 self
1012 }
1013
1014 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1016 self.0.options = v.into();
1017 self
1018 }
1019
1020 pub async fn send(self) -> Result<crate::model::FetchRemoteBranchesResponse> {
1022 (*self.0.stub)
1023 .fetch_remote_branches(self.0.request, self.0.options)
1024 .await
1025 .map(gax::response::Response::into_body)
1026 }
1027
1028 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1032 self.0.request.name = v.into();
1033 self
1034 }
1035 }
1036
1037 #[doc(hidden)]
1038 impl gax::options::internal::RequestBuilder for FetchRemoteBranches {
1039 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1040 &mut self.0.options
1041 }
1042 }
1043
1044 #[derive(Clone, Debug)]
1065 pub struct ListWorkspaces(RequestBuilder<crate::model::ListWorkspacesRequest>);
1066
1067 impl ListWorkspaces {
1068 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
1069 Self(RequestBuilder::new(stub))
1070 }
1071
1072 pub fn with_request<V: Into<crate::model::ListWorkspacesRequest>>(mut self, v: V) -> Self {
1074 self.0.request = v.into();
1075 self
1076 }
1077
1078 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1080 self.0.options = v.into();
1081 self
1082 }
1083
1084 pub async fn send(self) -> Result<crate::model::ListWorkspacesResponse> {
1086 (*self.0.stub)
1087 .list_workspaces(self.0.request, self.0.options)
1088 .await
1089 .map(gax::response::Response::into_body)
1090 }
1091
1092 pub fn by_page(
1094 self,
1095 ) -> impl gax::paginator::Paginator<crate::model::ListWorkspacesResponse, gax::error::Error>
1096 {
1097 use std::clone::Clone;
1098 let token = self.0.request.page_token.clone();
1099 let execute = move |token: String| {
1100 let mut builder = self.clone();
1101 builder.0.request = builder.0.request.set_page_token(token);
1102 builder.send()
1103 };
1104 gax::paginator::internal::new_paginator(token, execute)
1105 }
1106
1107 pub fn by_item(
1109 self,
1110 ) -> impl gax::paginator::ItemPaginator<crate::model::ListWorkspacesResponse, gax::error::Error>
1111 {
1112 use gax::paginator::Paginator;
1113 self.by_page().items()
1114 }
1115
1116 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1120 self.0.request.parent = v.into();
1121 self
1122 }
1123
1124 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1126 self.0.request.page_size = v.into();
1127 self
1128 }
1129
1130 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1132 self.0.request.page_token = v.into();
1133 self
1134 }
1135
1136 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1138 self.0.request.order_by = v.into();
1139 self
1140 }
1141
1142 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1144 self.0.request.filter = v.into();
1145 self
1146 }
1147 }
1148
1149 #[doc(hidden)]
1150 impl gax::options::internal::RequestBuilder for ListWorkspaces {
1151 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1152 &mut self.0.options
1153 }
1154 }
1155
1156 #[derive(Clone, Debug)]
1173 pub struct GetWorkspace(RequestBuilder<crate::model::GetWorkspaceRequest>);
1174
1175 impl GetWorkspace {
1176 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
1177 Self(RequestBuilder::new(stub))
1178 }
1179
1180 pub fn with_request<V: Into<crate::model::GetWorkspaceRequest>>(mut self, v: V) -> Self {
1182 self.0.request = v.into();
1183 self
1184 }
1185
1186 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1188 self.0.options = v.into();
1189 self
1190 }
1191
1192 pub async fn send(self) -> Result<crate::model::Workspace> {
1194 (*self.0.stub)
1195 .get_workspace(self.0.request, self.0.options)
1196 .await
1197 .map(gax::response::Response::into_body)
1198 }
1199
1200 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1204 self.0.request.name = v.into();
1205 self
1206 }
1207 }
1208
1209 #[doc(hidden)]
1210 impl gax::options::internal::RequestBuilder for GetWorkspace {
1211 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1212 &mut self.0.options
1213 }
1214 }
1215
1216 #[derive(Clone, Debug)]
1233 pub struct CreateWorkspace(RequestBuilder<crate::model::CreateWorkspaceRequest>);
1234
1235 impl CreateWorkspace {
1236 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
1237 Self(RequestBuilder::new(stub))
1238 }
1239
1240 pub fn with_request<V: Into<crate::model::CreateWorkspaceRequest>>(mut self, v: V) -> Self {
1242 self.0.request = v.into();
1243 self
1244 }
1245
1246 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1248 self.0.options = v.into();
1249 self
1250 }
1251
1252 pub async fn send(self) -> Result<crate::model::Workspace> {
1254 (*self.0.stub)
1255 .create_workspace(self.0.request, self.0.options)
1256 .await
1257 .map(gax::response::Response::into_body)
1258 }
1259
1260 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1264 self.0.request.parent = v.into();
1265 self
1266 }
1267
1268 pub fn set_workspace<T>(mut self, v: T) -> Self
1272 where
1273 T: std::convert::Into<crate::model::Workspace>,
1274 {
1275 self.0.request.workspace = std::option::Option::Some(v.into());
1276 self
1277 }
1278
1279 pub fn set_or_clear_workspace<T>(mut self, v: std::option::Option<T>) -> Self
1283 where
1284 T: std::convert::Into<crate::model::Workspace>,
1285 {
1286 self.0.request.workspace = v.map(|x| x.into());
1287 self
1288 }
1289
1290 pub fn set_workspace_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1294 self.0.request.workspace_id = v.into();
1295 self
1296 }
1297 }
1298
1299 #[doc(hidden)]
1300 impl gax::options::internal::RequestBuilder for CreateWorkspace {
1301 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1302 &mut self.0.options
1303 }
1304 }
1305
1306 #[derive(Clone, Debug)]
1323 pub struct DeleteWorkspace(RequestBuilder<crate::model::DeleteWorkspaceRequest>);
1324
1325 impl DeleteWorkspace {
1326 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
1327 Self(RequestBuilder::new(stub))
1328 }
1329
1330 pub fn with_request<V: Into<crate::model::DeleteWorkspaceRequest>>(mut self, v: V) -> Self {
1332 self.0.request = v.into();
1333 self
1334 }
1335
1336 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1338 self.0.options = v.into();
1339 self
1340 }
1341
1342 pub async fn send(self) -> Result<()> {
1344 (*self.0.stub)
1345 .delete_workspace(self.0.request, self.0.options)
1346 .await
1347 .map(gax::response::Response::into_body)
1348 }
1349
1350 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1354 self.0.request.name = v.into();
1355 self
1356 }
1357 }
1358
1359 #[doc(hidden)]
1360 impl gax::options::internal::RequestBuilder for DeleteWorkspace {
1361 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1362 &mut self.0.options
1363 }
1364 }
1365
1366 #[derive(Clone, Debug)]
1383 pub struct InstallNpmPackages(RequestBuilder<crate::model::InstallNpmPackagesRequest>);
1384
1385 impl InstallNpmPackages {
1386 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
1387 Self(RequestBuilder::new(stub))
1388 }
1389
1390 pub fn with_request<V: Into<crate::model::InstallNpmPackagesRequest>>(
1392 mut self,
1393 v: V,
1394 ) -> Self {
1395 self.0.request = v.into();
1396 self
1397 }
1398
1399 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1401 self.0.options = v.into();
1402 self
1403 }
1404
1405 pub async fn send(self) -> Result<crate::model::InstallNpmPackagesResponse> {
1407 (*self.0.stub)
1408 .install_npm_packages(self.0.request, self.0.options)
1409 .await
1410 .map(gax::response::Response::into_body)
1411 }
1412
1413 pub fn set_workspace<T: Into<std::string::String>>(mut self, v: T) -> Self {
1417 self.0.request.workspace = v.into();
1418 self
1419 }
1420 }
1421
1422 #[doc(hidden)]
1423 impl gax::options::internal::RequestBuilder for InstallNpmPackages {
1424 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1425 &mut self.0.options
1426 }
1427 }
1428
1429 #[derive(Clone, Debug)]
1446 pub struct PullGitCommits(RequestBuilder<crate::model::PullGitCommitsRequest>);
1447
1448 impl PullGitCommits {
1449 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
1450 Self(RequestBuilder::new(stub))
1451 }
1452
1453 pub fn with_request<V: Into<crate::model::PullGitCommitsRequest>>(mut self, v: V) -> Self {
1455 self.0.request = v.into();
1456 self
1457 }
1458
1459 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1461 self.0.options = v.into();
1462 self
1463 }
1464
1465 pub async fn send(self) -> Result<crate::model::PullGitCommitsResponse> {
1467 (*self.0.stub)
1468 .pull_git_commits(self.0.request, self.0.options)
1469 .await
1470 .map(gax::response::Response::into_body)
1471 }
1472
1473 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1477 self.0.request.name = v.into();
1478 self
1479 }
1480
1481 pub fn set_remote_branch<T: Into<std::string::String>>(mut self, v: T) -> Self {
1483 self.0.request.remote_branch = v.into();
1484 self
1485 }
1486
1487 pub fn set_author<T>(mut self, v: T) -> Self
1491 where
1492 T: std::convert::Into<crate::model::CommitAuthor>,
1493 {
1494 self.0.request.author = std::option::Option::Some(v.into());
1495 self
1496 }
1497
1498 pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
1502 where
1503 T: std::convert::Into<crate::model::CommitAuthor>,
1504 {
1505 self.0.request.author = v.map(|x| x.into());
1506 self
1507 }
1508 }
1509
1510 #[doc(hidden)]
1511 impl gax::options::internal::RequestBuilder for PullGitCommits {
1512 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1513 &mut self.0.options
1514 }
1515 }
1516
1517 #[derive(Clone, Debug)]
1534 pub struct PushGitCommits(RequestBuilder<crate::model::PushGitCommitsRequest>);
1535
1536 impl PushGitCommits {
1537 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
1538 Self(RequestBuilder::new(stub))
1539 }
1540
1541 pub fn with_request<V: Into<crate::model::PushGitCommitsRequest>>(mut self, v: V) -> Self {
1543 self.0.request = v.into();
1544 self
1545 }
1546
1547 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1549 self.0.options = v.into();
1550 self
1551 }
1552
1553 pub async fn send(self) -> Result<crate::model::PushGitCommitsResponse> {
1555 (*self.0.stub)
1556 .push_git_commits(self.0.request, self.0.options)
1557 .await
1558 .map(gax::response::Response::into_body)
1559 }
1560
1561 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1565 self.0.request.name = v.into();
1566 self
1567 }
1568
1569 pub fn set_remote_branch<T: Into<std::string::String>>(mut self, v: T) -> Self {
1571 self.0.request.remote_branch = v.into();
1572 self
1573 }
1574 }
1575
1576 #[doc(hidden)]
1577 impl gax::options::internal::RequestBuilder for PushGitCommits {
1578 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1579 &mut self.0.options
1580 }
1581 }
1582
1583 #[derive(Clone, Debug)]
1600 pub struct FetchFileGitStatuses(RequestBuilder<crate::model::FetchFileGitStatusesRequest>);
1601
1602 impl FetchFileGitStatuses {
1603 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
1604 Self(RequestBuilder::new(stub))
1605 }
1606
1607 pub fn with_request<V: Into<crate::model::FetchFileGitStatusesRequest>>(
1609 mut self,
1610 v: V,
1611 ) -> Self {
1612 self.0.request = v.into();
1613 self
1614 }
1615
1616 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1618 self.0.options = v.into();
1619 self
1620 }
1621
1622 pub async fn send(self) -> Result<crate::model::FetchFileGitStatusesResponse> {
1624 (*self.0.stub)
1625 .fetch_file_git_statuses(self.0.request, self.0.options)
1626 .await
1627 .map(gax::response::Response::into_body)
1628 }
1629
1630 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1634 self.0.request.name = v.into();
1635 self
1636 }
1637 }
1638
1639 #[doc(hidden)]
1640 impl gax::options::internal::RequestBuilder for FetchFileGitStatuses {
1641 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1642 &mut self.0.options
1643 }
1644 }
1645
1646 #[derive(Clone, Debug)]
1663 pub struct FetchGitAheadBehind(RequestBuilder<crate::model::FetchGitAheadBehindRequest>);
1664
1665 impl FetchGitAheadBehind {
1666 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
1667 Self(RequestBuilder::new(stub))
1668 }
1669
1670 pub fn with_request<V: Into<crate::model::FetchGitAheadBehindRequest>>(
1672 mut self,
1673 v: V,
1674 ) -> Self {
1675 self.0.request = v.into();
1676 self
1677 }
1678
1679 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1681 self.0.options = v.into();
1682 self
1683 }
1684
1685 pub async fn send(self) -> Result<crate::model::FetchGitAheadBehindResponse> {
1687 (*self.0.stub)
1688 .fetch_git_ahead_behind(self.0.request, self.0.options)
1689 .await
1690 .map(gax::response::Response::into_body)
1691 }
1692
1693 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1697 self.0.request.name = v.into();
1698 self
1699 }
1700
1701 pub fn set_remote_branch<T: Into<std::string::String>>(mut self, v: T) -> Self {
1703 self.0.request.remote_branch = v.into();
1704 self
1705 }
1706 }
1707
1708 #[doc(hidden)]
1709 impl gax::options::internal::RequestBuilder for FetchGitAheadBehind {
1710 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1711 &mut self.0.options
1712 }
1713 }
1714
1715 #[derive(Clone, Debug)]
1732 pub struct CommitWorkspaceChanges(RequestBuilder<crate::model::CommitWorkspaceChangesRequest>);
1733
1734 impl CommitWorkspaceChanges {
1735 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
1736 Self(RequestBuilder::new(stub))
1737 }
1738
1739 pub fn with_request<V: Into<crate::model::CommitWorkspaceChangesRequest>>(
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<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1750 self.0.options = v.into();
1751 self
1752 }
1753
1754 pub async fn send(self) -> Result<crate::model::CommitWorkspaceChangesResponse> {
1756 (*self.0.stub)
1757 .commit_workspace_changes(self.0.request, self.0.options)
1758 .await
1759 .map(gax::response::Response::into_body)
1760 }
1761
1762 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1766 self.0.request.name = v.into();
1767 self
1768 }
1769
1770 pub fn set_author<T>(mut self, v: T) -> Self
1774 where
1775 T: std::convert::Into<crate::model::CommitAuthor>,
1776 {
1777 self.0.request.author = std::option::Option::Some(v.into());
1778 self
1779 }
1780
1781 pub fn set_or_clear_author<T>(mut self, v: std::option::Option<T>) -> Self
1785 where
1786 T: std::convert::Into<crate::model::CommitAuthor>,
1787 {
1788 self.0.request.author = v.map(|x| x.into());
1789 self
1790 }
1791
1792 pub fn set_commit_message<T: Into<std::string::String>>(mut self, v: T) -> Self {
1794 self.0.request.commit_message = v.into();
1795 self
1796 }
1797
1798 pub fn set_paths<T, V>(mut self, v: T) -> Self
1800 where
1801 T: std::iter::IntoIterator<Item = V>,
1802 V: std::convert::Into<std::string::String>,
1803 {
1804 use std::iter::Iterator;
1805 self.0.request.paths = v.into_iter().map(|i| i.into()).collect();
1806 self
1807 }
1808 }
1809
1810 #[doc(hidden)]
1811 impl gax::options::internal::RequestBuilder for CommitWorkspaceChanges {
1812 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1813 &mut self.0.options
1814 }
1815 }
1816
1817 #[derive(Clone, Debug)]
1834 pub struct ResetWorkspaceChanges(RequestBuilder<crate::model::ResetWorkspaceChangesRequest>);
1835
1836 impl ResetWorkspaceChanges {
1837 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
1838 Self(RequestBuilder::new(stub))
1839 }
1840
1841 pub fn with_request<V: Into<crate::model::ResetWorkspaceChangesRequest>>(
1843 mut self,
1844 v: V,
1845 ) -> Self {
1846 self.0.request = v.into();
1847 self
1848 }
1849
1850 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1852 self.0.options = v.into();
1853 self
1854 }
1855
1856 pub async fn send(self) -> Result<crate::model::ResetWorkspaceChangesResponse> {
1858 (*self.0.stub)
1859 .reset_workspace_changes(self.0.request, self.0.options)
1860 .await
1861 .map(gax::response::Response::into_body)
1862 }
1863
1864 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1868 self.0.request.name = v.into();
1869 self
1870 }
1871
1872 pub fn set_paths<T, V>(mut self, v: T) -> Self
1874 where
1875 T: std::iter::IntoIterator<Item = V>,
1876 V: std::convert::Into<std::string::String>,
1877 {
1878 use std::iter::Iterator;
1879 self.0.request.paths = v.into_iter().map(|i| i.into()).collect();
1880 self
1881 }
1882
1883 pub fn set_clean<T: Into<bool>>(mut self, v: T) -> Self {
1885 self.0.request.clean = v.into();
1886 self
1887 }
1888 }
1889
1890 #[doc(hidden)]
1891 impl gax::options::internal::RequestBuilder for ResetWorkspaceChanges {
1892 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1893 &mut self.0.options
1894 }
1895 }
1896
1897 #[derive(Clone, Debug)]
1914 pub struct FetchFileDiff(RequestBuilder<crate::model::FetchFileDiffRequest>);
1915
1916 impl FetchFileDiff {
1917 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
1918 Self(RequestBuilder::new(stub))
1919 }
1920
1921 pub fn with_request<V: Into<crate::model::FetchFileDiffRequest>>(mut self, v: V) -> Self {
1923 self.0.request = v.into();
1924 self
1925 }
1926
1927 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1929 self.0.options = v.into();
1930 self
1931 }
1932
1933 pub async fn send(self) -> Result<crate::model::FetchFileDiffResponse> {
1935 (*self.0.stub)
1936 .fetch_file_diff(self.0.request, self.0.options)
1937 .await
1938 .map(gax::response::Response::into_body)
1939 }
1940
1941 pub fn set_workspace<T: Into<std::string::String>>(mut self, v: T) -> Self {
1945 self.0.request.workspace = v.into();
1946 self
1947 }
1948
1949 pub fn set_path<T: Into<std::string::String>>(mut self, v: T) -> Self {
1953 self.0.request.path = v.into();
1954 self
1955 }
1956 }
1957
1958 #[doc(hidden)]
1959 impl gax::options::internal::RequestBuilder for FetchFileDiff {
1960 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1961 &mut self.0.options
1962 }
1963 }
1964
1965 #[derive(Clone, Debug)]
1986 pub struct QueryDirectoryContents(RequestBuilder<crate::model::QueryDirectoryContentsRequest>);
1987
1988 impl QueryDirectoryContents {
1989 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
1990 Self(RequestBuilder::new(stub))
1991 }
1992
1993 pub fn with_request<V: Into<crate::model::QueryDirectoryContentsRequest>>(
1995 mut self,
1996 v: V,
1997 ) -> Self {
1998 self.0.request = v.into();
1999 self
2000 }
2001
2002 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2004 self.0.options = v.into();
2005 self
2006 }
2007
2008 pub async fn send(self) -> Result<crate::model::QueryDirectoryContentsResponse> {
2010 (*self.0.stub)
2011 .query_directory_contents(self.0.request, self.0.options)
2012 .await
2013 .map(gax::response::Response::into_body)
2014 }
2015
2016 pub fn by_page(
2018 self,
2019 ) -> impl gax::paginator::Paginator<
2020 crate::model::QueryDirectoryContentsResponse,
2021 gax::error::Error,
2022 > {
2023 use std::clone::Clone;
2024 let token = self.0.request.page_token.clone();
2025 let execute = move |token: String| {
2026 let mut builder = self.clone();
2027 builder.0.request = builder.0.request.set_page_token(token);
2028 builder.send()
2029 };
2030 gax::paginator::internal::new_paginator(token, execute)
2031 }
2032
2033 pub fn by_item(
2035 self,
2036 ) -> impl gax::paginator::ItemPaginator<
2037 crate::model::QueryDirectoryContentsResponse,
2038 gax::error::Error,
2039 > {
2040 use gax::paginator::Paginator;
2041 self.by_page().items()
2042 }
2043
2044 pub fn set_workspace<T: Into<std::string::String>>(mut self, v: T) -> Self {
2048 self.0.request.workspace = v.into();
2049 self
2050 }
2051
2052 pub fn set_path<T: Into<std::string::String>>(mut self, v: T) -> Self {
2054 self.0.request.path = v.into();
2055 self
2056 }
2057
2058 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2060 self.0.request.page_size = v.into();
2061 self
2062 }
2063
2064 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2066 self.0.request.page_token = v.into();
2067 self
2068 }
2069 }
2070
2071 #[doc(hidden)]
2072 impl gax::options::internal::RequestBuilder for QueryDirectoryContents {
2073 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2074 &mut self.0.options
2075 }
2076 }
2077
2078 #[derive(Clone, Debug)]
2099 pub struct SearchFiles(RequestBuilder<crate::model::SearchFilesRequest>);
2100
2101 impl SearchFiles {
2102 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
2103 Self(RequestBuilder::new(stub))
2104 }
2105
2106 pub fn with_request<V: Into<crate::model::SearchFilesRequest>>(mut self, v: V) -> Self {
2108 self.0.request = v.into();
2109 self
2110 }
2111
2112 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2114 self.0.options = v.into();
2115 self
2116 }
2117
2118 pub async fn send(self) -> Result<crate::model::SearchFilesResponse> {
2120 (*self.0.stub)
2121 .search_files(self.0.request, self.0.options)
2122 .await
2123 .map(gax::response::Response::into_body)
2124 }
2125
2126 pub fn by_page(
2128 self,
2129 ) -> impl gax::paginator::Paginator<crate::model::SearchFilesResponse, gax::error::Error>
2130 {
2131 use std::clone::Clone;
2132 let token = self.0.request.page_token.clone();
2133 let execute = move |token: String| {
2134 let mut builder = self.clone();
2135 builder.0.request = builder.0.request.set_page_token(token);
2136 builder.send()
2137 };
2138 gax::paginator::internal::new_paginator(token, execute)
2139 }
2140
2141 pub fn by_item(
2143 self,
2144 ) -> impl gax::paginator::ItemPaginator<crate::model::SearchFilesResponse, gax::error::Error>
2145 {
2146 use gax::paginator::Paginator;
2147 self.by_page().items()
2148 }
2149
2150 pub fn set_workspace<T: Into<std::string::String>>(mut self, v: T) -> Self {
2154 self.0.request.workspace = v.into();
2155 self
2156 }
2157
2158 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2160 self.0.request.page_size = v.into();
2161 self
2162 }
2163
2164 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2166 self.0.request.page_token = v.into();
2167 self
2168 }
2169
2170 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2172 self.0.request.filter = v.into();
2173 self
2174 }
2175 }
2176
2177 #[doc(hidden)]
2178 impl gax::options::internal::RequestBuilder for SearchFiles {
2179 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2180 &mut self.0.options
2181 }
2182 }
2183
2184 #[derive(Clone, Debug)]
2201 pub struct MakeDirectory(RequestBuilder<crate::model::MakeDirectoryRequest>);
2202
2203 impl MakeDirectory {
2204 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
2205 Self(RequestBuilder::new(stub))
2206 }
2207
2208 pub fn with_request<V: Into<crate::model::MakeDirectoryRequest>>(mut self, v: V) -> Self {
2210 self.0.request = v.into();
2211 self
2212 }
2213
2214 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2216 self.0.options = v.into();
2217 self
2218 }
2219
2220 pub async fn send(self) -> Result<crate::model::MakeDirectoryResponse> {
2222 (*self.0.stub)
2223 .make_directory(self.0.request, self.0.options)
2224 .await
2225 .map(gax::response::Response::into_body)
2226 }
2227
2228 pub fn set_workspace<T: Into<std::string::String>>(mut self, v: T) -> Self {
2232 self.0.request.workspace = v.into();
2233 self
2234 }
2235
2236 pub fn set_path<T: Into<std::string::String>>(mut self, v: T) -> Self {
2240 self.0.request.path = v.into();
2241 self
2242 }
2243 }
2244
2245 #[doc(hidden)]
2246 impl gax::options::internal::RequestBuilder for MakeDirectory {
2247 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2248 &mut self.0.options
2249 }
2250 }
2251
2252 #[derive(Clone, Debug)]
2269 pub struct RemoveDirectory(RequestBuilder<crate::model::RemoveDirectoryRequest>);
2270
2271 impl RemoveDirectory {
2272 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
2273 Self(RequestBuilder::new(stub))
2274 }
2275
2276 pub fn with_request<V: Into<crate::model::RemoveDirectoryRequest>>(mut self, v: V) -> Self {
2278 self.0.request = v.into();
2279 self
2280 }
2281
2282 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2284 self.0.options = v.into();
2285 self
2286 }
2287
2288 pub async fn send(self) -> Result<crate::model::RemoveDirectoryResponse> {
2290 (*self.0.stub)
2291 .remove_directory(self.0.request, self.0.options)
2292 .await
2293 .map(gax::response::Response::into_body)
2294 }
2295
2296 pub fn set_workspace<T: Into<std::string::String>>(mut self, v: T) -> Self {
2300 self.0.request.workspace = v.into();
2301 self
2302 }
2303
2304 pub fn set_path<T: Into<std::string::String>>(mut self, v: T) -> Self {
2308 self.0.request.path = v.into();
2309 self
2310 }
2311 }
2312
2313 #[doc(hidden)]
2314 impl gax::options::internal::RequestBuilder for RemoveDirectory {
2315 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2316 &mut self.0.options
2317 }
2318 }
2319
2320 #[derive(Clone, Debug)]
2337 pub struct MoveDirectory(RequestBuilder<crate::model::MoveDirectoryRequest>);
2338
2339 impl MoveDirectory {
2340 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
2341 Self(RequestBuilder::new(stub))
2342 }
2343
2344 pub fn with_request<V: Into<crate::model::MoveDirectoryRequest>>(mut self, v: V) -> Self {
2346 self.0.request = v.into();
2347 self
2348 }
2349
2350 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2352 self.0.options = v.into();
2353 self
2354 }
2355
2356 pub async fn send(self) -> Result<crate::model::MoveDirectoryResponse> {
2358 (*self.0.stub)
2359 .move_directory(self.0.request, self.0.options)
2360 .await
2361 .map(gax::response::Response::into_body)
2362 }
2363
2364 pub fn set_workspace<T: Into<std::string::String>>(mut self, v: T) -> Self {
2368 self.0.request.workspace = v.into();
2369 self
2370 }
2371
2372 pub fn set_path<T: Into<std::string::String>>(mut self, v: T) -> Self {
2376 self.0.request.path = v.into();
2377 self
2378 }
2379
2380 pub fn set_new_path<T: Into<std::string::String>>(mut self, v: T) -> Self {
2384 self.0.request.new_path = v.into();
2385 self
2386 }
2387 }
2388
2389 #[doc(hidden)]
2390 impl gax::options::internal::RequestBuilder for MoveDirectory {
2391 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2392 &mut self.0.options
2393 }
2394 }
2395
2396 #[derive(Clone, Debug)]
2413 pub struct ReadFile(RequestBuilder<crate::model::ReadFileRequest>);
2414
2415 impl ReadFile {
2416 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
2417 Self(RequestBuilder::new(stub))
2418 }
2419
2420 pub fn with_request<V: Into<crate::model::ReadFileRequest>>(mut self, v: V) -> Self {
2422 self.0.request = v.into();
2423 self
2424 }
2425
2426 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2428 self.0.options = v.into();
2429 self
2430 }
2431
2432 pub async fn send(self) -> Result<crate::model::ReadFileResponse> {
2434 (*self.0.stub)
2435 .read_file(self.0.request, self.0.options)
2436 .await
2437 .map(gax::response::Response::into_body)
2438 }
2439
2440 pub fn set_workspace<T: Into<std::string::String>>(mut self, v: T) -> Self {
2444 self.0.request.workspace = v.into();
2445 self
2446 }
2447
2448 pub fn set_path<T: Into<std::string::String>>(mut self, v: T) -> Self {
2452 self.0.request.path = v.into();
2453 self
2454 }
2455
2456 pub fn set_revision<T: Into<std::string::String>>(mut self, v: T) -> Self {
2458 self.0.request.revision = v.into();
2459 self
2460 }
2461 }
2462
2463 #[doc(hidden)]
2464 impl gax::options::internal::RequestBuilder for ReadFile {
2465 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2466 &mut self.0.options
2467 }
2468 }
2469
2470 #[derive(Clone, Debug)]
2487 pub struct RemoveFile(RequestBuilder<crate::model::RemoveFileRequest>);
2488
2489 impl RemoveFile {
2490 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
2491 Self(RequestBuilder::new(stub))
2492 }
2493
2494 pub fn with_request<V: Into<crate::model::RemoveFileRequest>>(mut self, v: V) -> Self {
2496 self.0.request = v.into();
2497 self
2498 }
2499
2500 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2502 self.0.options = v.into();
2503 self
2504 }
2505
2506 pub async fn send(self) -> Result<crate::model::RemoveFileResponse> {
2508 (*self.0.stub)
2509 .remove_file(self.0.request, self.0.options)
2510 .await
2511 .map(gax::response::Response::into_body)
2512 }
2513
2514 pub fn set_workspace<T: Into<std::string::String>>(mut self, v: T) -> Self {
2518 self.0.request.workspace = v.into();
2519 self
2520 }
2521
2522 pub fn set_path<T: Into<std::string::String>>(mut self, v: T) -> Self {
2526 self.0.request.path = v.into();
2527 self
2528 }
2529 }
2530
2531 #[doc(hidden)]
2532 impl gax::options::internal::RequestBuilder for RemoveFile {
2533 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2534 &mut self.0.options
2535 }
2536 }
2537
2538 #[derive(Clone, Debug)]
2555 pub struct MoveFile(RequestBuilder<crate::model::MoveFileRequest>);
2556
2557 impl MoveFile {
2558 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
2559 Self(RequestBuilder::new(stub))
2560 }
2561
2562 pub fn with_request<V: Into<crate::model::MoveFileRequest>>(mut self, v: V) -> Self {
2564 self.0.request = v.into();
2565 self
2566 }
2567
2568 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2570 self.0.options = v.into();
2571 self
2572 }
2573
2574 pub async fn send(self) -> Result<crate::model::MoveFileResponse> {
2576 (*self.0.stub)
2577 .move_file(self.0.request, self.0.options)
2578 .await
2579 .map(gax::response::Response::into_body)
2580 }
2581
2582 pub fn set_workspace<T: Into<std::string::String>>(mut self, v: T) -> Self {
2586 self.0.request.workspace = v.into();
2587 self
2588 }
2589
2590 pub fn set_path<T: Into<std::string::String>>(mut self, v: T) -> Self {
2594 self.0.request.path = v.into();
2595 self
2596 }
2597
2598 pub fn set_new_path<T: Into<std::string::String>>(mut self, v: T) -> Self {
2602 self.0.request.new_path = v.into();
2603 self
2604 }
2605 }
2606
2607 #[doc(hidden)]
2608 impl gax::options::internal::RequestBuilder for MoveFile {
2609 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2610 &mut self.0.options
2611 }
2612 }
2613
2614 #[derive(Clone, Debug)]
2631 pub struct WriteFile(RequestBuilder<crate::model::WriteFileRequest>);
2632
2633 impl WriteFile {
2634 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
2635 Self(RequestBuilder::new(stub))
2636 }
2637
2638 pub fn with_request<V: Into<crate::model::WriteFileRequest>>(mut self, v: V) -> Self {
2640 self.0.request = v.into();
2641 self
2642 }
2643
2644 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2646 self.0.options = v.into();
2647 self
2648 }
2649
2650 pub async fn send(self) -> Result<crate::model::WriteFileResponse> {
2652 (*self.0.stub)
2653 .write_file(self.0.request, self.0.options)
2654 .await
2655 .map(gax::response::Response::into_body)
2656 }
2657
2658 pub fn set_workspace<T: Into<std::string::String>>(mut self, v: T) -> Self {
2662 self.0.request.workspace = v.into();
2663 self
2664 }
2665
2666 pub fn set_path<T: Into<std::string::String>>(mut self, v: T) -> Self {
2670 self.0.request.path = v.into();
2671 self
2672 }
2673
2674 pub fn set_contents<T: Into<::bytes::Bytes>>(mut self, v: T) -> Self {
2678 self.0.request.contents = v.into();
2679 self
2680 }
2681 }
2682
2683 #[doc(hidden)]
2684 impl gax::options::internal::RequestBuilder for WriteFile {
2685 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2686 &mut self.0.options
2687 }
2688 }
2689
2690 #[derive(Clone, Debug)]
2711 pub struct ListReleaseConfigs(RequestBuilder<crate::model::ListReleaseConfigsRequest>);
2712
2713 impl ListReleaseConfigs {
2714 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
2715 Self(RequestBuilder::new(stub))
2716 }
2717
2718 pub fn with_request<V: Into<crate::model::ListReleaseConfigsRequest>>(
2720 mut self,
2721 v: V,
2722 ) -> Self {
2723 self.0.request = v.into();
2724 self
2725 }
2726
2727 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2729 self.0.options = v.into();
2730 self
2731 }
2732
2733 pub async fn send(self) -> Result<crate::model::ListReleaseConfigsResponse> {
2735 (*self.0.stub)
2736 .list_release_configs(self.0.request, self.0.options)
2737 .await
2738 .map(gax::response::Response::into_body)
2739 }
2740
2741 pub fn by_page(
2743 self,
2744 ) -> impl gax::paginator::Paginator<crate::model::ListReleaseConfigsResponse, gax::error::Error>
2745 {
2746 use std::clone::Clone;
2747 let token = self.0.request.page_token.clone();
2748 let execute = move |token: String| {
2749 let mut builder = self.clone();
2750 builder.0.request = builder.0.request.set_page_token(token);
2751 builder.send()
2752 };
2753 gax::paginator::internal::new_paginator(token, execute)
2754 }
2755
2756 pub fn by_item(
2758 self,
2759 ) -> impl gax::paginator::ItemPaginator<
2760 crate::model::ListReleaseConfigsResponse,
2761 gax::error::Error,
2762 > {
2763 use gax::paginator::Paginator;
2764 self.by_page().items()
2765 }
2766
2767 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2771 self.0.request.parent = v.into();
2772 self
2773 }
2774
2775 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2777 self.0.request.page_size = v.into();
2778 self
2779 }
2780
2781 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2783 self.0.request.page_token = v.into();
2784 self
2785 }
2786 }
2787
2788 #[doc(hidden)]
2789 impl gax::options::internal::RequestBuilder for ListReleaseConfigs {
2790 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2791 &mut self.0.options
2792 }
2793 }
2794
2795 #[derive(Clone, Debug)]
2812 pub struct GetReleaseConfig(RequestBuilder<crate::model::GetReleaseConfigRequest>);
2813
2814 impl GetReleaseConfig {
2815 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
2816 Self(RequestBuilder::new(stub))
2817 }
2818
2819 pub fn with_request<V: Into<crate::model::GetReleaseConfigRequest>>(
2821 mut self,
2822 v: V,
2823 ) -> Self {
2824 self.0.request = v.into();
2825 self
2826 }
2827
2828 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2830 self.0.options = v.into();
2831 self
2832 }
2833
2834 pub async fn send(self) -> Result<crate::model::ReleaseConfig> {
2836 (*self.0.stub)
2837 .get_release_config(self.0.request, self.0.options)
2838 .await
2839 .map(gax::response::Response::into_body)
2840 }
2841
2842 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2846 self.0.request.name = v.into();
2847 self
2848 }
2849 }
2850
2851 #[doc(hidden)]
2852 impl gax::options::internal::RequestBuilder for GetReleaseConfig {
2853 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2854 &mut self.0.options
2855 }
2856 }
2857
2858 #[derive(Clone, Debug)]
2875 pub struct CreateReleaseConfig(RequestBuilder<crate::model::CreateReleaseConfigRequest>);
2876
2877 impl CreateReleaseConfig {
2878 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
2879 Self(RequestBuilder::new(stub))
2880 }
2881
2882 pub fn with_request<V: Into<crate::model::CreateReleaseConfigRequest>>(
2884 mut self,
2885 v: V,
2886 ) -> Self {
2887 self.0.request = v.into();
2888 self
2889 }
2890
2891 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2893 self.0.options = v.into();
2894 self
2895 }
2896
2897 pub async fn send(self) -> Result<crate::model::ReleaseConfig> {
2899 (*self.0.stub)
2900 .create_release_config(self.0.request, self.0.options)
2901 .await
2902 .map(gax::response::Response::into_body)
2903 }
2904
2905 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2909 self.0.request.parent = v.into();
2910 self
2911 }
2912
2913 pub fn set_release_config<T>(mut self, v: T) -> Self
2917 where
2918 T: std::convert::Into<crate::model::ReleaseConfig>,
2919 {
2920 self.0.request.release_config = std::option::Option::Some(v.into());
2921 self
2922 }
2923
2924 pub fn set_or_clear_release_config<T>(mut self, v: std::option::Option<T>) -> Self
2928 where
2929 T: std::convert::Into<crate::model::ReleaseConfig>,
2930 {
2931 self.0.request.release_config = v.map(|x| x.into());
2932 self
2933 }
2934
2935 pub fn set_release_config_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2939 self.0.request.release_config_id = v.into();
2940 self
2941 }
2942 }
2943
2944 #[doc(hidden)]
2945 impl gax::options::internal::RequestBuilder for CreateReleaseConfig {
2946 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2947 &mut self.0.options
2948 }
2949 }
2950
2951 #[derive(Clone, Debug)]
2968 pub struct UpdateReleaseConfig(RequestBuilder<crate::model::UpdateReleaseConfigRequest>);
2969
2970 impl UpdateReleaseConfig {
2971 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
2972 Self(RequestBuilder::new(stub))
2973 }
2974
2975 pub fn with_request<V: Into<crate::model::UpdateReleaseConfigRequest>>(
2977 mut self,
2978 v: V,
2979 ) -> Self {
2980 self.0.request = v.into();
2981 self
2982 }
2983
2984 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2986 self.0.options = v.into();
2987 self
2988 }
2989
2990 pub async fn send(self) -> Result<crate::model::ReleaseConfig> {
2992 (*self.0.stub)
2993 .update_release_config(self.0.request, self.0.options)
2994 .await
2995 .map(gax::response::Response::into_body)
2996 }
2997
2998 pub fn set_update_mask<T>(mut self, v: T) -> Self
3000 where
3001 T: std::convert::Into<wkt::FieldMask>,
3002 {
3003 self.0.request.update_mask = std::option::Option::Some(v.into());
3004 self
3005 }
3006
3007 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3009 where
3010 T: std::convert::Into<wkt::FieldMask>,
3011 {
3012 self.0.request.update_mask = v.map(|x| x.into());
3013 self
3014 }
3015
3016 pub fn set_release_config<T>(mut self, v: T) -> Self
3020 where
3021 T: std::convert::Into<crate::model::ReleaseConfig>,
3022 {
3023 self.0.request.release_config = std::option::Option::Some(v.into());
3024 self
3025 }
3026
3027 pub fn set_or_clear_release_config<T>(mut self, v: std::option::Option<T>) -> Self
3031 where
3032 T: std::convert::Into<crate::model::ReleaseConfig>,
3033 {
3034 self.0.request.release_config = v.map(|x| x.into());
3035 self
3036 }
3037 }
3038
3039 #[doc(hidden)]
3040 impl gax::options::internal::RequestBuilder for UpdateReleaseConfig {
3041 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3042 &mut self.0.options
3043 }
3044 }
3045
3046 #[derive(Clone, Debug)]
3063 pub struct DeleteReleaseConfig(RequestBuilder<crate::model::DeleteReleaseConfigRequest>);
3064
3065 impl DeleteReleaseConfig {
3066 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
3067 Self(RequestBuilder::new(stub))
3068 }
3069
3070 pub fn with_request<V: Into<crate::model::DeleteReleaseConfigRequest>>(
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<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3081 self.0.options = v.into();
3082 self
3083 }
3084
3085 pub async fn send(self) -> Result<()> {
3087 (*self.0.stub)
3088 .delete_release_config(self.0.request, self.0.options)
3089 .await
3090 .map(gax::response::Response::into_body)
3091 }
3092
3093 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3097 self.0.request.name = v.into();
3098 self
3099 }
3100 }
3101
3102 #[doc(hidden)]
3103 impl gax::options::internal::RequestBuilder for DeleteReleaseConfig {
3104 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3105 &mut self.0.options
3106 }
3107 }
3108
3109 #[derive(Clone, Debug)]
3130 pub struct ListCompilationResults(RequestBuilder<crate::model::ListCompilationResultsRequest>);
3131
3132 impl ListCompilationResults {
3133 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
3134 Self(RequestBuilder::new(stub))
3135 }
3136
3137 pub fn with_request<V: Into<crate::model::ListCompilationResultsRequest>>(
3139 mut self,
3140 v: V,
3141 ) -> Self {
3142 self.0.request = v.into();
3143 self
3144 }
3145
3146 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3148 self.0.options = v.into();
3149 self
3150 }
3151
3152 pub async fn send(self) -> Result<crate::model::ListCompilationResultsResponse> {
3154 (*self.0.stub)
3155 .list_compilation_results(self.0.request, self.0.options)
3156 .await
3157 .map(gax::response::Response::into_body)
3158 }
3159
3160 pub fn by_page(
3162 self,
3163 ) -> impl gax::paginator::Paginator<
3164 crate::model::ListCompilationResultsResponse,
3165 gax::error::Error,
3166 > {
3167 use std::clone::Clone;
3168 let token = self.0.request.page_token.clone();
3169 let execute = move |token: String| {
3170 let mut builder = self.clone();
3171 builder.0.request = builder.0.request.set_page_token(token);
3172 builder.send()
3173 };
3174 gax::paginator::internal::new_paginator(token, execute)
3175 }
3176
3177 pub fn by_item(
3179 self,
3180 ) -> impl gax::paginator::ItemPaginator<
3181 crate::model::ListCompilationResultsResponse,
3182 gax::error::Error,
3183 > {
3184 use gax::paginator::Paginator;
3185 self.by_page().items()
3186 }
3187
3188 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3192 self.0.request.parent = v.into();
3193 self
3194 }
3195
3196 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3198 self.0.request.page_size = v.into();
3199 self
3200 }
3201
3202 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3204 self.0.request.page_token = v.into();
3205 self
3206 }
3207
3208 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3210 self.0.request.order_by = v.into();
3211 self
3212 }
3213
3214 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3216 self.0.request.filter = v.into();
3217 self
3218 }
3219 }
3220
3221 #[doc(hidden)]
3222 impl gax::options::internal::RequestBuilder for ListCompilationResults {
3223 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3224 &mut self.0.options
3225 }
3226 }
3227
3228 #[derive(Clone, Debug)]
3245 pub struct GetCompilationResult(RequestBuilder<crate::model::GetCompilationResultRequest>);
3246
3247 impl GetCompilationResult {
3248 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
3249 Self(RequestBuilder::new(stub))
3250 }
3251
3252 pub fn with_request<V: Into<crate::model::GetCompilationResultRequest>>(
3254 mut self,
3255 v: V,
3256 ) -> Self {
3257 self.0.request = v.into();
3258 self
3259 }
3260
3261 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3263 self.0.options = v.into();
3264 self
3265 }
3266
3267 pub async fn send(self) -> Result<crate::model::CompilationResult> {
3269 (*self.0.stub)
3270 .get_compilation_result(self.0.request, self.0.options)
3271 .await
3272 .map(gax::response::Response::into_body)
3273 }
3274
3275 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3279 self.0.request.name = v.into();
3280 self
3281 }
3282 }
3283
3284 #[doc(hidden)]
3285 impl gax::options::internal::RequestBuilder for GetCompilationResult {
3286 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3287 &mut self.0.options
3288 }
3289 }
3290
3291 #[derive(Clone, Debug)]
3308 pub struct CreateCompilationResult(
3309 RequestBuilder<crate::model::CreateCompilationResultRequest>,
3310 );
3311
3312 impl CreateCompilationResult {
3313 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
3314 Self(RequestBuilder::new(stub))
3315 }
3316
3317 pub fn with_request<V: Into<crate::model::CreateCompilationResultRequest>>(
3319 mut self,
3320 v: V,
3321 ) -> Self {
3322 self.0.request = v.into();
3323 self
3324 }
3325
3326 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3328 self.0.options = v.into();
3329 self
3330 }
3331
3332 pub async fn send(self) -> Result<crate::model::CompilationResult> {
3334 (*self.0.stub)
3335 .create_compilation_result(self.0.request, self.0.options)
3336 .await
3337 .map(gax::response::Response::into_body)
3338 }
3339
3340 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3344 self.0.request.parent = v.into();
3345 self
3346 }
3347
3348 pub fn set_compilation_result<T>(mut self, v: T) -> Self
3352 where
3353 T: std::convert::Into<crate::model::CompilationResult>,
3354 {
3355 self.0.request.compilation_result = std::option::Option::Some(v.into());
3356 self
3357 }
3358
3359 pub fn set_or_clear_compilation_result<T>(mut self, v: std::option::Option<T>) -> Self
3363 where
3364 T: std::convert::Into<crate::model::CompilationResult>,
3365 {
3366 self.0.request.compilation_result = v.map(|x| x.into());
3367 self
3368 }
3369 }
3370
3371 #[doc(hidden)]
3372 impl gax::options::internal::RequestBuilder for CreateCompilationResult {
3373 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3374 &mut self.0.options
3375 }
3376 }
3377
3378 #[derive(Clone, Debug)]
3399 pub struct QueryCompilationResultActions(
3400 RequestBuilder<crate::model::QueryCompilationResultActionsRequest>,
3401 );
3402
3403 impl QueryCompilationResultActions {
3404 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
3405 Self(RequestBuilder::new(stub))
3406 }
3407
3408 pub fn with_request<V: Into<crate::model::QueryCompilationResultActionsRequest>>(
3410 mut self,
3411 v: V,
3412 ) -> Self {
3413 self.0.request = v.into();
3414 self
3415 }
3416
3417 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3419 self.0.options = v.into();
3420 self
3421 }
3422
3423 pub async fn send(self) -> Result<crate::model::QueryCompilationResultActionsResponse> {
3425 (*self.0.stub)
3426 .query_compilation_result_actions(self.0.request, self.0.options)
3427 .await
3428 .map(gax::response::Response::into_body)
3429 }
3430
3431 pub fn by_page(
3433 self,
3434 ) -> impl gax::paginator::Paginator<
3435 crate::model::QueryCompilationResultActionsResponse,
3436 gax::error::Error,
3437 > {
3438 use std::clone::Clone;
3439 let token = self.0.request.page_token.clone();
3440 let execute = move |token: String| {
3441 let mut builder = self.clone();
3442 builder.0.request = builder.0.request.set_page_token(token);
3443 builder.send()
3444 };
3445 gax::paginator::internal::new_paginator(token, execute)
3446 }
3447
3448 pub fn by_item(
3450 self,
3451 ) -> impl gax::paginator::ItemPaginator<
3452 crate::model::QueryCompilationResultActionsResponse,
3453 gax::error::Error,
3454 > {
3455 use gax::paginator::Paginator;
3456 self.by_page().items()
3457 }
3458
3459 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3463 self.0.request.name = v.into();
3464 self
3465 }
3466
3467 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3469 self.0.request.page_size = v.into();
3470 self
3471 }
3472
3473 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3475 self.0.request.page_token = v.into();
3476 self
3477 }
3478
3479 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3481 self.0.request.filter = v.into();
3482 self
3483 }
3484 }
3485
3486 #[doc(hidden)]
3487 impl gax::options::internal::RequestBuilder for QueryCompilationResultActions {
3488 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3489 &mut self.0.options
3490 }
3491 }
3492
3493 #[derive(Clone, Debug)]
3514 pub struct ListWorkflowConfigs(RequestBuilder<crate::model::ListWorkflowConfigsRequest>);
3515
3516 impl ListWorkflowConfigs {
3517 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
3518 Self(RequestBuilder::new(stub))
3519 }
3520
3521 pub fn with_request<V: Into<crate::model::ListWorkflowConfigsRequest>>(
3523 mut self,
3524 v: V,
3525 ) -> Self {
3526 self.0.request = v.into();
3527 self
3528 }
3529
3530 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3532 self.0.options = v.into();
3533 self
3534 }
3535
3536 pub async fn send(self) -> Result<crate::model::ListWorkflowConfigsResponse> {
3538 (*self.0.stub)
3539 .list_workflow_configs(self.0.request, self.0.options)
3540 .await
3541 .map(gax::response::Response::into_body)
3542 }
3543
3544 pub fn by_page(
3546 self,
3547 ) -> impl gax::paginator::Paginator<crate::model::ListWorkflowConfigsResponse, gax::error::Error>
3548 {
3549 use std::clone::Clone;
3550 let token = self.0.request.page_token.clone();
3551 let execute = move |token: String| {
3552 let mut builder = self.clone();
3553 builder.0.request = builder.0.request.set_page_token(token);
3554 builder.send()
3555 };
3556 gax::paginator::internal::new_paginator(token, execute)
3557 }
3558
3559 pub fn by_item(
3561 self,
3562 ) -> impl gax::paginator::ItemPaginator<
3563 crate::model::ListWorkflowConfigsResponse,
3564 gax::error::Error,
3565 > {
3566 use gax::paginator::Paginator;
3567 self.by_page().items()
3568 }
3569
3570 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3574 self.0.request.parent = v.into();
3575 self
3576 }
3577
3578 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3580 self.0.request.page_size = v.into();
3581 self
3582 }
3583
3584 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3586 self.0.request.page_token = v.into();
3587 self
3588 }
3589 }
3590
3591 #[doc(hidden)]
3592 impl gax::options::internal::RequestBuilder for ListWorkflowConfigs {
3593 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3594 &mut self.0.options
3595 }
3596 }
3597
3598 #[derive(Clone, Debug)]
3615 pub struct GetWorkflowConfig(RequestBuilder<crate::model::GetWorkflowConfigRequest>);
3616
3617 impl GetWorkflowConfig {
3618 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
3619 Self(RequestBuilder::new(stub))
3620 }
3621
3622 pub fn with_request<V: Into<crate::model::GetWorkflowConfigRequest>>(
3624 mut self,
3625 v: V,
3626 ) -> Self {
3627 self.0.request = v.into();
3628 self
3629 }
3630
3631 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3633 self.0.options = v.into();
3634 self
3635 }
3636
3637 pub async fn send(self) -> Result<crate::model::WorkflowConfig> {
3639 (*self.0.stub)
3640 .get_workflow_config(self.0.request, self.0.options)
3641 .await
3642 .map(gax::response::Response::into_body)
3643 }
3644
3645 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3649 self.0.request.name = v.into();
3650 self
3651 }
3652 }
3653
3654 #[doc(hidden)]
3655 impl gax::options::internal::RequestBuilder for GetWorkflowConfig {
3656 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3657 &mut self.0.options
3658 }
3659 }
3660
3661 #[derive(Clone, Debug)]
3678 pub struct CreateWorkflowConfig(RequestBuilder<crate::model::CreateWorkflowConfigRequest>);
3679
3680 impl CreateWorkflowConfig {
3681 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
3682 Self(RequestBuilder::new(stub))
3683 }
3684
3685 pub fn with_request<V: Into<crate::model::CreateWorkflowConfigRequest>>(
3687 mut self,
3688 v: V,
3689 ) -> Self {
3690 self.0.request = v.into();
3691 self
3692 }
3693
3694 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3696 self.0.options = v.into();
3697 self
3698 }
3699
3700 pub async fn send(self) -> Result<crate::model::WorkflowConfig> {
3702 (*self.0.stub)
3703 .create_workflow_config(self.0.request, self.0.options)
3704 .await
3705 .map(gax::response::Response::into_body)
3706 }
3707
3708 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3712 self.0.request.parent = v.into();
3713 self
3714 }
3715
3716 pub fn set_workflow_config<T>(mut self, v: T) -> Self
3720 where
3721 T: std::convert::Into<crate::model::WorkflowConfig>,
3722 {
3723 self.0.request.workflow_config = std::option::Option::Some(v.into());
3724 self
3725 }
3726
3727 pub fn set_or_clear_workflow_config<T>(mut self, v: std::option::Option<T>) -> Self
3731 where
3732 T: std::convert::Into<crate::model::WorkflowConfig>,
3733 {
3734 self.0.request.workflow_config = v.map(|x| x.into());
3735 self
3736 }
3737
3738 pub fn set_workflow_config_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3742 self.0.request.workflow_config_id = v.into();
3743 self
3744 }
3745 }
3746
3747 #[doc(hidden)]
3748 impl gax::options::internal::RequestBuilder for CreateWorkflowConfig {
3749 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3750 &mut self.0.options
3751 }
3752 }
3753
3754 #[derive(Clone, Debug)]
3771 pub struct UpdateWorkflowConfig(RequestBuilder<crate::model::UpdateWorkflowConfigRequest>);
3772
3773 impl UpdateWorkflowConfig {
3774 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
3775 Self(RequestBuilder::new(stub))
3776 }
3777
3778 pub fn with_request<V: Into<crate::model::UpdateWorkflowConfigRequest>>(
3780 mut self,
3781 v: V,
3782 ) -> Self {
3783 self.0.request = v.into();
3784 self
3785 }
3786
3787 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3789 self.0.options = v.into();
3790 self
3791 }
3792
3793 pub async fn send(self) -> Result<crate::model::WorkflowConfig> {
3795 (*self.0.stub)
3796 .update_workflow_config(self.0.request, self.0.options)
3797 .await
3798 .map(gax::response::Response::into_body)
3799 }
3800
3801 pub fn set_update_mask<T>(mut self, v: T) -> Self
3803 where
3804 T: std::convert::Into<wkt::FieldMask>,
3805 {
3806 self.0.request.update_mask = std::option::Option::Some(v.into());
3807 self
3808 }
3809
3810 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3812 where
3813 T: std::convert::Into<wkt::FieldMask>,
3814 {
3815 self.0.request.update_mask = v.map(|x| x.into());
3816 self
3817 }
3818
3819 pub fn set_workflow_config<T>(mut self, v: T) -> Self
3823 where
3824 T: std::convert::Into<crate::model::WorkflowConfig>,
3825 {
3826 self.0.request.workflow_config = std::option::Option::Some(v.into());
3827 self
3828 }
3829
3830 pub fn set_or_clear_workflow_config<T>(mut self, v: std::option::Option<T>) -> Self
3834 where
3835 T: std::convert::Into<crate::model::WorkflowConfig>,
3836 {
3837 self.0.request.workflow_config = v.map(|x| x.into());
3838 self
3839 }
3840 }
3841
3842 #[doc(hidden)]
3843 impl gax::options::internal::RequestBuilder for UpdateWorkflowConfig {
3844 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3845 &mut self.0.options
3846 }
3847 }
3848
3849 #[derive(Clone, Debug)]
3866 pub struct DeleteWorkflowConfig(RequestBuilder<crate::model::DeleteWorkflowConfigRequest>);
3867
3868 impl DeleteWorkflowConfig {
3869 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
3870 Self(RequestBuilder::new(stub))
3871 }
3872
3873 pub fn with_request<V: Into<crate::model::DeleteWorkflowConfigRequest>>(
3875 mut self,
3876 v: V,
3877 ) -> Self {
3878 self.0.request = v.into();
3879 self
3880 }
3881
3882 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3884 self.0.options = v.into();
3885 self
3886 }
3887
3888 pub async fn send(self) -> Result<()> {
3890 (*self.0.stub)
3891 .delete_workflow_config(self.0.request, self.0.options)
3892 .await
3893 .map(gax::response::Response::into_body)
3894 }
3895
3896 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3900 self.0.request.name = v.into();
3901 self
3902 }
3903 }
3904
3905 #[doc(hidden)]
3906 impl gax::options::internal::RequestBuilder for DeleteWorkflowConfig {
3907 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3908 &mut self.0.options
3909 }
3910 }
3911
3912 #[derive(Clone, Debug)]
3933 pub struct ListWorkflowInvocations(
3934 RequestBuilder<crate::model::ListWorkflowInvocationsRequest>,
3935 );
3936
3937 impl ListWorkflowInvocations {
3938 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
3939 Self(RequestBuilder::new(stub))
3940 }
3941
3942 pub fn with_request<V: Into<crate::model::ListWorkflowInvocationsRequest>>(
3944 mut self,
3945 v: V,
3946 ) -> Self {
3947 self.0.request = v.into();
3948 self
3949 }
3950
3951 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3953 self.0.options = v.into();
3954 self
3955 }
3956
3957 pub async fn send(self) -> Result<crate::model::ListWorkflowInvocationsResponse> {
3959 (*self.0.stub)
3960 .list_workflow_invocations(self.0.request, self.0.options)
3961 .await
3962 .map(gax::response::Response::into_body)
3963 }
3964
3965 pub fn by_page(
3967 self,
3968 ) -> impl gax::paginator::Paginator<
3969 crate::model::ListWorkflowInvocationsResponse,
3970 gax::error::Error,
3971 > {
3972 use std::clone::Clone;
3973 let token = self.0.request.page_token.clone();
3974 let execute = move |token: String| {
3975 let mut builder = self.clone();
3976 builder.0.request = builder.0.request.set_page_token(token);
3977 builder.send()
3978 };
3979 gax::paginator::internal::new_paginator(token, execute)
3980 }
3981
3982 pub fn by_item(
3984 self,
3985 ) -> impl gax::paginator::ItemPaginator<
3986 crate::model::ListWorkflowInvocationsResponse,
3987 gax::error::Error,
3988 > {
3989 use gax::paginator::Paginator;
3990 self.by_page().items()
3991 }
3992
3993 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3997 self.0.request.parent = v.into();
3998 self
3999 }
4000
4001 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4003 self.0.request.page_size = v.into();
4004 self
4005 }
4006
4007 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4009 self.0.request.page_token = v.into();
4010 self
4011 }
4012
4013 pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
4015 self.0.request.order_by = v.into();
4016 self
4017 }
4018
4019 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4021 self.0.request.filter = v.into();
4022 self
4023 }
4024 }
4025
4026 #[doc(hidden)]
4027 impl gax::options::internal::RequestBuilder for ListWorkflowInvocations {
4028 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4029 &mut self.0.options
4030 }
4031 }
4032
4033 #[derive(Clone, Debug)]
4050 pub struct GetWorkflowInvocation(RequestBuilder<crate::model::GetWorkflowInvocationRequest>);
4051
4052 impl GetWorkflowInvocation {
4053 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
4054 Self(RequestBuilder::new(stub))
4055 }
4056
4057 pub fn with_request<V: Into<crate::model::GetWorkflowInvocationRequest>>(
4059 mut self,
4060 v: V,
4061 ) -> Self {
4062 self.0.request = v.into();
4063 self
4064 }
4065
4066 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4068 self.0.options = v.into();
4069 self
4070 }
4071
4072 pub async fn send(self) -> Result<crate::model::WorkflowInvocation> {
4074 (*self.0.stub)
4075 .get_workflow_invocation(self.0.request, self.0.options)
4076 .await
4077 .map(gax::response::Response::into_body)
4078 }
4079
4080 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4084 self.0.request.name = v.into();
4085 self
4086 }
4087 }
4088
4089 #[doc(hidden)]
4090 impl gax::options::internal::RequestBuilder for GetWorkflowInvocation {
4091 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4092 &mut self.0.options
4093 }
4094 }
4095
4096 #[derive(Clone, Debug)]
4113 pub struct CreateWorkflowInvocation(
4114 RequestBuilder<crate::model::CreateWorkflowInvocationRequest>,
4115 );
4116
4117 impl CreateWorkflowInvocation {
4118 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
4119 Self(RequestBuilder::new(stub))
4120 }
4121
4122 pub fn with_request<V: Into<crate::model::CreateWorkflowInvocationRequest>>(
4124 mut self,
4125 v: V,
4126 ) -> Self {
4127 self.0.request = v.into();
4128 self
4129 }
4130
4131 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4133 self.0.options = v.into();
4134 self
4135 }
4136
4137 pub async fn send(self) -> Result<crate::model::WorkflowInvocation> {
4139 (*self.0.stub)
4140 .create_workflow_invocation(self.0.request, self.0.options)
4141 .await
4142 .map(gax::response::Response::into_body)
4143 }
4144
4145 pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4149 self.0.request.parent = v.into();
4150 self
4151 }
4152
4153 pub fn set_workflow_invocation<T>(mut self, v: T) -> Self
4157 where
4158 T: std::convert::Into<crate::model::WorkflowInvocation>,
4159 {
4160 self.0.request.workflow_invocation = std::option::Option::Some(v.into());
4161 self
4162 }
4163
4164 pub fn set_or_clear_workflow_invocation<T>(mut self, v: std::option::Option<T>) -> Self
4168 where
4169 T: std::convert::Into<crate::model::WorkflowInvocation>,
4170 {
4171 self.0.request.workflow_invocation = v.map(|x| x.into());
4172 self
4173 }
4174 }
4175
4176 #[doc(hidden)]
4177 impl gax::options::internal::RequestBuilder for CreateWorkflowInvocation {
4178 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4179 &mut self.0.options
4180 }
4181 }
4182
4183 #[derive(Clone, Debug)]
4200 pub struct DeleteWorkflowInvocation(
4201 RequestBuilder<crate::model::DeleteWorkflowInvocationRequest>,
4202 );
4203
4204 impl DeleteWorkflowInvocation {
4205 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
4206 Self(RequestBuilder::new(stub))
4207 }
4208
4209 pub fn with_request<V: Into<crate::model::DeleteWorkflowInvocationRequest>>(
4211 mut self,
4212 v: V,
4213 ) -> Self {
4214 self.0.request = v.into();
4215 self
4216 }
4217
4218 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4220 self.0.options = v.into();
4221 self
4222 }
4223
4224 pub async fn send(self) -> Result<()> {
4226 (*self.0.stub)
4227 .delete_workflow_invocation(self.0.request, self.0.options)
4228 .await
4229 .map(gax::response::Response::into_body)
4230 }
4231
4232 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4236 self.0.request.name = v.into();
4237 self
4238 }
4239 }
4240
4241 #[doc(hidden)]
4242 impl gax::options::internal::RequestBuilder for DeleteWorkflowInvocation {
4243 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4244 &mut self.0.options
4245 }
4246 }
4247
4248 #[derive(Clone, Debug)]
4265 pub struct CancelWorkflowInvocation(
4266 RequestBuilder<crate::model::CancelWorkflowInvocationRequest>,
4267 );
4268
4269 impl CancelWorkflowInvocation {
4270 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
4271 Self(RequestBuilder::new(stub))
4272 }
4273
4274 pub fn with_request<V: Into<crate::model::CancelWorkflowInvocationRequest>>(
4276 mut self,
4277 v: V,
4278 ) -> Self {
4279 self.0.request = v.into();
4280 self
4281 }
4282
4283 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4285 self.0.options = v.into();
4286 self
4287 }
4288
4289 pub async fn send(self) -> Result<crate::model::CancelWorkflowInvocationResponse> {
4291 (*self.0.stub)
4292 .cancel_workflow_invocation(self.0.request, self.0.options)
4293 .await
4294 .map(gax::response::Response::into_body)
4295 }
4296
4297 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4301 self.0.request.name = v.into();
4302 self
4303 }
4304 }
4305
4306 #[doc(hidden)]
4307 impl gax::options::internal::RequestBuilder for CancelWorkflowInvocation {
4308 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4309 &mut self.0.options
4310 }
4311 }
4312
4313 #[derive(Clone, Debug)]
4334 pub struct QueryWorkflowInvocationActions(
4335 RequestBuilder<crate::model::QueryWorkflowInvocationActionsRequest>,
4336 );
4337
4338 impl QueryWorkflowInvocationActions {
4339 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
4340 Self(RequestBuilder::new(stub))
4341 }
4342
4343 pub fn with_request<V: Into<crate::model::QueryWorkflowInvocationActionsRequest>>(
4345 mut self,
4346 v: V,
4347 ) -> Self {
4348 self.0.request = v.into();
4349 self
4350 }
4351
4352 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4354 self.0.options = v.into();
4355 self
4356 }
4357
4358 pub async fn send(self) -> Result<crate::model::QueryWorkflowInvocationActionsResponse> {
4360 (*self.0.stub)
4361 .query_workflow_invocation_actions(self.0.request, self.0.options)
4362 .await
4363 .map(gax::response::Response::into_body)
4364 }
4365
4366 pub fn by_page(
4368 self,
4369 ) -> impl gax::paginator::Paginator<
4370 crate::model::QueryWorkflowInvocationActionsResponse,
4371 gax::error::Error,
4372 > {
4373 use std::clone::Clone;
4374 let token = self.0.request.page_token.clone();
4375 let execute = move |token: String| {
4376 let mut builder = self.clone();
4377 builder.0.request = builder.0.request.set_page_token(token);
4378 builder.send()
4379 };
4380 gax::paginator::internal::new_paginator(token, execute)
4381 }
4382
4383 pub fn by_item(
4385 self,
4386 ) -> impl gax::paginator::ItemPaginator<
4387 crate::model::QueryWorkflowInvocationActionsResponse,
4388 gax::error::Error,
4389 > {
4390 use gax::paginator::Paginator;
4391 self.by_page().items()
4392 }
4393
4394 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4398 self.0.request.name = v.into();
4399 self
4400 }
4401
4402 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4404 self.0.request.page_size = v.into();
4405 self
4406 }
4407
4408 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4410 self.0.request.page_token = v.into();
4411 self
4412 }
4413 }
4414
4415 #[doc(hidden)]
4416 impl gax::options::internal::RequestBuilder for QueryWorkflowInvocationActions {
4417 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4418 &mut self.0.options
4419 }
4420 }
4421
4422 #[derive(Clone, Debug)]
4439 pub struct GetConfig(RequestBuilder<crate::model::GetConfigRequest>);
4440
4441 impl GetConfig {
4442 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
4443 Self(RequestBuilder::new(stub))
4444 }
4445
4446 pub fn with_request<V: Into<crate::model::GetConfigRequest>>(mut self, v: V) -> Self {
4448 self.0.request = v.into();
4449 self
4450 }
4451
4452 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4454 self.0.options = v.into();
4455 self
4456 }
4457
4458 pub async fn send(self) -> Result<crate::model::Config> {
4460 (*self.0.stub)
4461 .get_config(self.0.request, self.0.options)
4462 .await
4463 .map(gax::response::Response::into_body)
4464 }
4465
4466 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4470 self.0.request.name = v.into();
4471 self
4472 }
4473 }
4474
4475 #[doc(hidden)]
4476 impl gax::options::internal::RequestBuilder for GetConfig {
4477 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4478 &mut self.0.options
4479 }
4480 }
4481
4482 #[derive(Clone, Debug)]
4499 pub struct UpdateConfig(RequestBuilder<crate::model::UpdateConfigRequest>);
4500
4501 impl UpdateConfig {
4502 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
4503 Self(RequestBuilder::new(stub))
4504 }
4505
4506 pub fn with_request<V: Into<crate::model::UpdateConfigRequest>>(mut self, v: V) -> Self {
4508 self.0.request = v.into();
4509 self
4510 }
4511
4512 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4514 self.0.options = v.into();
4515 self
4516 }
4517
4518 pub async fn send(self) -> Result<crate::model::Config> {
4520 (*self.0.stub)
4521 .update_config(self.0.request, self.0.options)
4522 .await
4523 .map(gax::response::Response::into_body)
4524 }
4525
4526 pub fn set_config<T>(mut self, v: T) -> Self
4530 where
4531 T: std::convert::Into<crate::model::Config>,
4532 {
4533 self.0.request.config = std::option::Option::Some(v.into());
4534 self
4535 }
4536
4537 pub fn set_or_clear_config<T>(mut self, v: std::option::Option<T>) -> Self
4541 where
4542 T: std::convert::Into<crate::model::Config>,
4543 {
4544 self.0.request.config = v.map(|x| x.into());
4545 self
4546 }
4547
4548 pub fn set_update_mask<T>(mut self, v: T) -> Self
4550 where
4551 T: std::convert::Into<wkt::FieldMask>,
4552 {
4553 self.0.request.update_mask = std::option::Option::Some(v.into());
4554 self
4555 }
4556
4557 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4559 where
4560 T: std::convert::Into<wkt::FieldMask>,
4561 {
4562 self.0.request.update_mask = v.map(|x| x.into());
4563 self
4564 }
4565 }
4566
4567 #[doc(hidden)]
4568 impl gax::options::internal::RequestBuilder for UpdateConfig {
4569 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4570 &mut self.0.options
4571 }
4572 }
4573
4574 #[derive(Clone, Debug)]
4595 pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
4596
4597 impl ListLocations {
4598 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
4599 Self(RequestBuilder::new(stub))
4600 }
4601
4602 pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
4604 mut self,
4605 v: V,
4606 ) -> Self {
4607 self.0.request = v.into();
4608 self
4609 }
4610
4611 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4613 self.0.options = v.into();
4614 self
4615 }
4616
4617 pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
4619 (*self.0.stub)
4620 .list_locations(self.0.request, self.0.options)
4621 .await
4622 .map(gax::response::Response::into_body)
4623 }
4624
4625 pub fn by_page(
4627 self,
4628 ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
4629 {
4630 use std::clone::Clone;
4631 let token = self.0.request.page_token.clone();
4632 let execute = move |token: String| {
4633 let mut builder = self.clone();
4634 builder.0.request = builder.0.request.set_page_token(token);
4635 builder.send()
4636 };
4637 gax::paginator::internal::new_paginator(token, execute)
4638 }
4639
4640 pub fn by_item(
4642 self,
4643 ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
4644 {
4645 use gax::paginator::Paginator;
4646 self.by_page().items()
4647 }
4648
4649 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4651 self.0.request.name = v.into();
4652 self
4653 }
4654
4655 pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4657 self.0.request.filter = v.into();
4658 self
4659 }
4660
4661 pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4663 self.0.request.page_size = v.into();
4664 self
4665 }
4666
4667 pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4669 self.0.request.page_token = v.into();
4670 self
4671 }
4672 }
4673
4674 #[doc(hidden)]
4675 impl gax::options::internal::RequestBuilder for ListLocations {
4676 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4677 &mut self.0.options
4678 }
4679 }
4680
4681 #[derive(Clone, Debug)]
4698 pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
4699
4700 impl GetLocation {
4701 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
4702 Self(RequestBuilder::new(stub))
4703 }
4704
4705 pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
4707 self.0.request = v.into();
4708 self
4709 }
4710
4711 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4713 self.0.options = v.into();
4714 self
4715 }
4716
4717 pub async fn send(self) -> Result<location::model::Location> {
4719 (*self.0.stub)
4720 .get_location(self.0.request, self.0.options)
4721 .await
4722 .map(gax::response::Response::into_body)
4723 }
4724
4725 pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4727 self.0.request.name = v.into();
4728 self
4729 }
4730 }
4731
4732 #[doc(hidden)]
4733 impl gax::options::internal::RequestBuilder for GetLocation {
4734 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4735 &mut self.0.options
4736 }
4737 }
4738
4739 #[derive(Clone, Debug)]
4756 pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
4757
4758 impl SetIamPolicy {
4759 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
4760 Self(RequestBuilder::new(stub))
4761 }
4762
4763 pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
4765 self.0.request = v.into();
4766 self
4767 }
4768
4769 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4771 self.0.options = v.into();
4772 self
4773 }
4774
4775 pub async fn send(self) -> Result<iam_v1::model::Policy> {
4777 (*self.0.stub)
4778 .set_iam_policy(self.0.request, self.0.options)
4779 .await
4780 .map(gax::response::Response::into_body)
4781 }
4782
4783 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
4787 self.0.request.resource = v.into();
4788 self
4789 }
4790
4791 pub fn set_policy<T>(mut self, v: T) -> Self
4795 where
4796 T: std::convert::Into<iam_v1::model::Policy>,
4797 {
4798 self.0.request.policy = std::option::Option::Some(v.into());
4799 self
4800 }
4801
4802 pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
4806 where
4807 T: std::convert::Into<iam_v1::model::Policy>,
4808 {
4809 self.0.request.policy = v.map(|x| x.into());
4810 self
4811 }
4812
4813 pub fn set_update_mask<T>(mut self, v: T) -> Self
4815 where
4816 T: std::convert::Into<wkt::FieldMask>,
4817 {
4818 self.0.request.update_mask = std::option::Option::Some(v.into());
4819 self
4820 }
4821
4822 pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4824 where
4825 T: std::convert::Into<wkt::FieldMask>,
4826 {
4827 self.0.request.update_mask = v.map(|x| x.into());
4828 self
4829 }
4830 }
4831
4832 #[doc(hidden)]
4833 impl gax::options::internal::RequestBuilder for SetIamPolicy {
4834 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4835 &mut self.0.options
4836 }
4837 }
4838
4839 #[derive(Clone, Debug)]
4856 pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
4857
4858 impl GetIamPolicy {
4859 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
4860 Self(RequestBuilder::new(stub))
4861 }
4862
4863 pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
4865 self.0.request = v.into();
4866 self
4867 }
4868
4869 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4871 self.0.options = v.into();
4872 self
4873 }
4874
4875 pub async fn send(self) -> Result<iam_v1::model::Policy> {
4877 (*self.0.stub)
4878 .get_iam_policy(self.0.request, self.0.options)
4879 .await
4880 .map(gax::response::Response::into_body)
4881 }
4882
4883 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
4887 self.0.request.resource = v.into();
4888 self
4889 }
4890
4891 pub fn set_options<T>(mut self, v: T) -> Self
4893 where
4894 T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
4895 {
4896 self.0.request.options = std::option::Option::Some(v.into());
4897 self
4898 }
4899
4900 pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
4902 where
4903 T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
4904 {
4905 self.0.request.options = v.map(|x| x.into());
4906 self
4907 }
4908 }
4909
4910 #[doc(hidden)]
4911 impl gax::options::internal::RequestBuilder for GetIamPolicy {
4912 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4913 &mut self.0.options
4914 }
4915 }
4916
4917 #[derive(Clone, Debug)]
4934 pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
4935
4936 impl TestIamPermissions {
4937 pub(crate) fn new(stub: std::sync::Arc<dyn super::super::stub::dynamic::Dataform>) -> Self {
4938 Self(RequestBuilder::new(stub))
4939 }
4940
4941 pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
4943 mut self,
4944 v: V,
4945 ) -> Self {
4946 self.0.request = v.into();
4947 self
4948 }
4949
4950 pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4952 self.0.options = v.into();
4953 self
4954 }
4955
4956 pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
4958 (*self.0.stub)
4959 .test_iam_permissions(self.0.request, self.0.options)
4960 .await
4961 .map(gax::response::Response::into_body)
4962 }
4963
4964 pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
4968 self.0.request.resource = v.into();
4969 self
4970 }
4971
4972 pub fn set_permissions<T, V>(mut self, v: T) -> Self
4976 where
4977 T: std::iter::IntoIterator<Item = V>,
4978 V: std::convert::Into<std::string::String>,
4979 {
4980 use std::iter::Iterator;
4981 self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
4982 self
4983 }
4984 }
4985
4986 #[doc(hidden)]
4987 impl gax::options::internal::RequestBuilder for TestIamPermissions {
4988 fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4989 &mut self.0.options
4990 }
4991 }
4992}