google_cloud_dataform_v1/
builder.rs

1// Copyright 2025 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14//
15// Code generated by sidekick. DO NOT EDIT.
16
17pub mod dataform {
18    use crate::Result;
19
20    /// A builder for [Dataform][crate::client::Dataform].
21    ///
22    /// ```
23    /// # async fn sample() -> gax::client_builder::Result<()> {
24    /// # use google_cloud_dataform_v1::*;
25    /// # use builder::dataform::ClientBuilder;
26    /// # use client::Dataform;
27    /// let builder : ClientBuilder = Dataform::builder();
28    /// let client = builder
29    ///     .with_endpoint("https://dataform.googleapis.com")
30    ///     .build().await?;
31    /// # Ok(()) }
32    /// ```
33    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    /// Common implementation for [crate::client::Dataform] request builders.
52    #[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    /// The request builder for [Dataform::list_repositories][crate::client::Dataform::list_repositories] calls.
73    ///
74    /// # Example
75    /// ```
76    /// # use google_cloud_dataform_v1::builder::dataform::ListRepositories;
77    /// # async fn sample() -> gax::Result<()> {
78    /// use gax::paginator::ItemPaginator;
79    ///
80    /// let builder = prepare_request_builder();
81    /// let mut items = builder.by_item();
82    /// while let Some(result) = items.next().await {
83    ///   let item = result?;
84    /// }
85    /// # Ok(()) }
86    ///
87    /// fn prepare_request_builder() -> ListRepositories {
88    ///   # panic!();
89    ///   // ... details omitted ...
90    /// }
91    /// ```
92    #[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        /// Sets the full request, replacing any prior values.
101        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        /// Sets all the options, replacing any prior values.
110        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        /// Sends the request.
116        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        /// Streams each page in the collection.
124        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        /// Streams each item in the collection.
139        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        /// Sets the value of [parent][crate::model::ListRepositoriesRequest::parent].
148        ///
149        /// This is a **required** field for requests.
150        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        /// Sets the value of [page_size][crate::model::ListRepositoriesRequest::page_size].
156        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        /// Sets the value of [page_token][crate::model::ListRepositoriesRequest::page_token].
162        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        /// Sets the value of [order_by][crate::model::ListRepositoriesRequest::order_by].
168        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        /// Sets the value of [filter][crate::model::ListRepositoriesRequest::filter].
174        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    /// The request builder for [Dataform::get_repository][crate::client::Dataform::get_repository] calls.
188    ///
189    /// # Example
190    /// ```
191    /// # use google_cloud_dataform_v1::builder::dataform::GetRepository;
192    /// # async fn sample() -> gax::Result<()> {
193    ///
194    /// let builder = prepare_request_builder();
195    /// let response = builder.send().await?;
196    /// # Ok(()) }
197    ///
198    /// fn prepare_request_builder() -> GetRepository {
199    ///   # panic!();
200    ///   // ... details omitted ...
201    /// }
202    /// ```
203    #[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        /// Sets the full request, replacing any prior values.
212        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        /// Sets all the options, replacing any prior values.
218        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        /// Sends the request.
224        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        /// Sets the value of [name][crate::model::GetRepositoryRequest::name].
232        ///
233        /// This is a **required** field for requests.
234        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    /// The request builder for [Dataform::create_repository][crate::client::Dataform::create_repository] calls.
248    ///
249    /// # Example
250    /// ```
251    /// # use google_cloud_dataform_v1::builder::dataform::CreateRepository;
252    /// # async fn sample() -> gax::Result<()> {
253    ///
254    /// let builder = prepare_request_builder();
255    /// let response = builder.send().await?;
256    /// # Ok(()) }
257    ///
258    /// fn prepare_request_builder() -> CreateRepository {
259    ///   # panic!();
260    ///   // ... details omitted ...
261    /// }
262    /// ```
263    #[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        /// Sets the full request, replacing any prior values.
272        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        /// Sets all the options, replacing any prior values.
281        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        /// Sends the request.
287        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        /// Sets the value of [parent][crate::model::CreateRepositoryRequest::parent].
295        ///
296        /// This is a **required** field for requests.
297        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        /// Sets the value of [repository][crate::model::CreateRepositoryRequest::repository].
303        ///
304        /// This is a **required** field for requests.
305        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        /// Sets or clears the value of [repository][crate::model::CreateRepositoryRequest::repository].
314        ///
315        /// This is a **required** field for requests.
316        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        /// Sets the value of [repository_id][crate::model::CreateRepositoryRequest::repository_id].
325        ///
326        /// This is a **required** field for requests.
327        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    /// The request builder for [Dataform::update_repository][crate::client::Dataform::update_repository] calls.
341    ///
342    /// # Example
343    /// ```
344    /// # use google_cloud_dataform_v1::builder::dataform::UpdateRepository;
345    /// # async fn sample() -> gax::Result<()> {
346    ///
347    /// let builder = prepare_request_builder();
348    /// let response = builder.send().await?;
349    /// # Ok(()) }
350    ///
351    /// fn prepare_request_builder() -> UpdateRepository {
352    ///   # panic!();
353    ///   // ... details omitted ...
354    /// }
355    /// ```
356    #[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        /// Sets the full request, replacing any prior values.
365        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        /// Sets all the options, replacing any prior values.
374        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        /// Sends the request.
380        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        /// Sets the value of [update_mask][crate::model::UpdateRepositoryRequest::update_mask].
388        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        /// Sets or clears the value of [update_mask][crate::model::UpdateRepositoryRequest::update_mask].
397        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        /// Sets the value of [repository][crate::model::UpdateRepositoryRequest::repository].
406        ///
407        /// This is a **required** field for requests.
408        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        /// Sets or clears the value of [repository][crate::model::UpdateRepositoryRequest::repository].
417        ///
418        /// This is a **required** field for requests.
419        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    /// The request builder for [Dataform::delete_repository][crate::client::Dataform::delete_repository] calls.
436    ///
437    /// # Example
438    /// ```
439    /// # use google_cloud_dataform_v1::builder::dataform::DeleteRepository;
440    /// # async fn sample() -> gax::Result<()> {
441    ///
442    /// let builder = prepare_request_builder();
443    /// let response = builder.send().await?;
444    /// # Ok(()) }
445    ///
446    /// fn prepare_request_builder() -> DeleteRepository {
447    ///   # panic!();
448    ///   // ... details omitted ...
449    /// }
450    /// ```
451    #[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        /// Sets the full request, replacing any prior values.
460        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        /// Sets all the options, replacing any prior values.
469        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        /// Sends the request.
475        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        /// Sets the value of [name][crate::model::DeleteRepositoryRequest::name].
483        ///
484        /// This is a **required** field for requests.
485        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        /// Sets the value of [force][crate::model::DeleteRepositoryRequest::force].
491        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    /// The request builder for [Dataform::commit_repository_changes][crate::client::Dataform::commit_repository_changes] calls.
505    ///
506    /// # Example
507    /// ```
508    /// # use google_cloud_dataform_v1::builder::dataform::CommitRepositoryChanges;
509    /// # async fn sample() -> gax::Result<()> {
510    ///
511    /// let builder = prepare_request_builder();
512    /// let response = builder.send().await?;
513    /// # Ok(()) }
514    ///
515    /// fn prepare_request_builder() -> CommitRepositoryChanges {
516    ///   # panic!();
517    ///   // ... details omitted ...
518    /// }
519    /// ```
520    #[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        /// Sets the full request, replacing any prior values.
531        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        /// Sets all the options, replacing any prior values.
540        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        /// Sends the request.
546        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        /// Sets the value of [name][crate::model::CommitRepositoryChangesRequest::name].
554        ///
555        /// This is a **required** field for requests.
556        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        /// Sets the value of [commit_metadata][crate::model::CommitRepositoryChangesRequest::commit_metadata].
562        ///
563        /// This is a **required** field for requests.
564        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        /// Sets or clears the value of [commit_metadata][crate::model::CommitRepositoryChangesRequest::commit_metadata].
573        ///
574        /// This is a **required** field for requests.
575        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        /// Sets the value of [required_head_commit_sha][crate::model::CommitRepositoryChangesRequest::required_head_commit_sha].
584        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        /// Sets the value of [file_operations][crate::model::CommitRepositoryChangesRequest::file_operations].
590        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    /// The request builder for [Dataform::read_repository_file][crate::client::Dataform::read_repository_file] calls.
610    ///
611    /// # Example
612    /// ```
613    /// # use google_cloud_dataform_v1::builder::dataform::ReadRepositoryFile;
614    /// # async fn sample() -> gax::Result<()> {
615    ///
616    /// let builder = prepare_request_builder();
617    /// let response = builder.send().await?;
618    /// # Ok(()) }
619    ///
620    /// fn prepare_request_builder() -> ReadRepositoryFile {
621    ///   # panic!();
622    ///   // ... details omitted ...
623    /// }
624    /// ```
625    #[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        /// Sets the full request, replacing any prior values.
634        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        /// Sets all the options, replacing any prior values.
643        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        /// Sends the request.
649        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        /// Sets the value of [name][crate::model::ReadRepositoryFileRequest::name].
657        ///
658        /// This is a **required** field for requests.
659        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        /// Sets the value of [commit_sha][crate::model::ReadRepositoryFileRequest::commit_sha].
665        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        /// Sets the value of [path][crate::model::ReadRepositoryFileRequest::path].
671        ///
672        /// This is a **required** field for requests.
673        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    /// The request builder for [Dataform::query_repository_directory_contents][crate::client::Dataform::query_repository_directory_contents] calls.
687    ///
688    /// # Example
689    /// ```
690    /// # use google_cloud_dataform_v1::builder::dataform::QueryRepositoryDirectoryContents;
691    /// # async fn sample() -> gax::Result<()> {
692    /// use gax::paginator::ItemPaginator;
693    ///
694    /// let builder = prepare_request_builder();
695    /// let mut items = builder.by_item();
696    /// while let Some(result) = items.next().await {
697    ///   let item = result?;
698    /// }
699    /// # Ok(()) }
700    ///
701    /// fn prepare_request_builder() -> QueryRepositoryDirectoryContents {
702    ///   # panic!();
703    ///   // ... details omitted ...
704    /// }
705    /// ```
706    #[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        /// Sets the full request, replacing any prior values.
717        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        /// Sets all the options, replacing any prior values.
726        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        /// Sends the request.
732        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        /// Streams each page in the collection.
740        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        /// Streams each item in the collection.
757        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        /// Sets the value of [name][crate::model::QueryRepositoryDirectoryContentsRequest::name].
768        ///
769        /// This is a **required** field for requests.
770        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        /// Sets the value of [commit_sha][crate::model::QueryRepositoryDirectoryContentsRequest::commit_sha].
776        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        /// Sets the value of [path][crate::model::QueryRepositoryDirectoryContentsRequest::path].
782        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        /// Sets the value of [page_size][crate::model::QueryRepositoryDirectoryContentsRequest::page_size].
788        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        /// Sets the value of [page_token][crate::model::QueryRepositoryDirectoryContentsRequest::page_token].
794        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    /// The request builder for [Dataform::fetch_repository_history][crate::client::Dataform::fetch_repository_history] calls.
808    ///
809    /// # Example
810    /// ```
811    /// # use google_cloud_dataform_v1::builder::dataform::FetchRepositoryHistory;
812    /// # async fn sample() -> gax::Result<()> {
813    /// use gax::paginator::ItemPaginator;
814    ///
815    /// let builder = prepare_request_builder();
816    /// let mut items = builder.by_item();
817    /// while let Some(result) = items.next().await {
818    ///   let item = result?;
819    /// }
820    /// # Ok(()) }
821    ///
822    /// fn prepare_request_builder() -> FetchRepositoryHistory {
823    ///   # panic!();
824    ///   // ... details omitted ...
825    /// }
826    /// ```
827    #[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        /// Sets the full request, replacing any prior values.
836        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        /// Sets all the options, replacing any prior values.
845        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        /// Sends the request.
851        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        /// Streams each page in the collection.
859        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        /// Streams each item in the collection.
876        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        /// Sets the value of [name][crate::model::FetchRepositoryHistoryRequest::name].
887        ///
888        /// This is a **required** field for requests.
889        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        /// Sets the value of [page_size][crate::model::FetchRepositoryHistoryRequest::page_size].
895        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        /// Sets the value of [page_token][crate::model::FetchRepositoryHistoryRequest::page_token].
901        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    /// The request builder for [Dataform::compute_repository_access_token_status][crate::client::Dataform::compute_repository_access_token_status] calls.
915    ///
916    /// # Example
917    /// ```
918    /// # use google_cloud_dataform_v1::builder::dataform::ComputeRepositoryAccessTokenStatus;
919    /// # async fn sample() -> gax::Result<()> {
920    ///
921    /// let builder = prepare_request_builder();
922    /// let response = builder.send().await?;
923    /// # Ok(()) }
924    ///
925    /// fn prepare_request_builder() -> ComputeRepositoryAccessTokenStatus {
926    ///   # panic!();
927    ///   // ... details omitted ...
928    /// }
929    /// ```
930    #[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        /// Sets the full request, replacing any prior values.
941        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        /// Sets all the options, replacing any prior values.
950        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        /// Sends the request.
956        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        /// Sets the value of [name][crate::model::ComputeRepositoryAccessTokenStatusRequest::name].
966        ///
967        /// This is a **required** field for requests.
968        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    /// The request builder for [Dataform::fetch_remote_branches][crate::client::Dataform::fetch_remote_branches] calls.
982    ///
983    /// # Example
984    /// ```
985    /// # use google_cloud_dataform_v1::builder::dataform::FetchRemoteBranches;
986    /// # async fn sample() -> gax::Result<()> {
987    ///
988    /// let builder = prepare_request_builder();
989    /// let response = builder.send().await?;
990    /// # Ok(()) }
991    ///
992    /// fn prepare_request_builder() -> FetchRemoteBranches {
993    ///   # panic!();
994    ///   // ... details omitted ...
995    /// }
996    /// ```
997    #[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        /// Sets the full request, replacing any prior values.
1006        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        /// Sets all the options, replacing any prior values.
1015        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        /// Sends the request.
1021        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        /// Sets the value of [name][crate::model::FetchRemoteBranchesRequest::name].
1029        ///
1030        /// This is a **required** field for requests.
1031        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    /// The request builder for [Dataform::list_workspaces][crate::client::Dataform::list_workspaces] calls.
1045    ///
1046    /// # Example
1047    /// ```
1048    /// # use google_cloud_dataform_v1::builder::dataform::ListWorkspaces;
1049    /// # async fn sample() -> gax::Result<()> {
1050    /// use gax::paginator::ItemPaginator;
1051    ///
1052    /// let builder = prepare_request_builder();
1053    /// let mut items = builder.by_item();
1054    /// while let Some(result) = items.next().await {
1055    ///   let item = result?;
1056    /// }
1057    /// # Ok(()) }
1058    ///
1059    /// fn prepare_request_builder() -> ListWorkspaces {
1060    ///   # panic!();
1061    ///   // ... details omitted ...
1062    /// }
1063    /// ```
1064    #[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        /// Sets the full request, replacing any prior values.
1073        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        /// Sets all the options, replacing any prior values.
1079        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        /// Sends the request.
1085        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        /// Streams each page in the collection.
1093        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        /// Streams each item in the collection.
1108        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        /// Sets the value of [parent][crate::model::ListWorkspacesRequest::parent].
1117        ///
1118        /// This is a **required** field for requests.
1119        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        /// Sets the value of [page_size][crate::model::ListWorkspacesRequest::page_size].
1125        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        /// Sets the value of [page_token][crate::model::ListWorkspacesRequest::page_token].
1131        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        /// Sets the value of [order_by][crate::model::ListWorkspacesRequest::order_by].
1137        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        /// Sets the value of [filter][crate::model::ListWorkspacesRequest::filter].
1143        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    /// The request builder for [Dataform::get_workspace][crate::client::Dataform::get_workspace] calls.
1157    ///
1158    /// # Example
1159    /// ```
1160    /// # use google_cloud_dataform_v1::builder::dataform::GetWorkspace;
1161    /// # async fn sample() -> gax::Result<()> {
1162    ///
1163    /// let builder = prepare_request_builder();
1164    /// let response = builder.send().await?;
1165    /// # Ok(()) }
1166    ///
1167    /// fn prepare_request_builder() -> GetWorkspace {
1168    ///   # panic!();
1169    ///   // ... details omitted ...
1170    /// }
1171    /// ```
1172    #[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        /// Sets the full request, replacing any prior values.
1181        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        /// Sets all the options, replacing any prior values.
1187        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        /// Sends the request.
1193        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        /// Sets the value of [name][crate::model::GetWorkspaceRequest::name].
1201        ///
1202        /// This is a **required** field for requests.
1203        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    /// The request builder for [Dataform::create_workspace][crate::client::Dataform::create_workspace] calls.
1217    ///
1218    /// # Example
1219    /// ```
1220    /// # use google_cloud_dataform_v1::builder::dataform::CreateWorkspace;
1221    /// # async fn sample() -> gax::Result<()> {
1222    ///
1223    /// let builder = prepare_request_builder();
1224    /// let response = builder.send().await?;
1225    /// # Ok(()) }
1226    ///
1227    /// fn prepare_request_builder() -> CreateWorkspace {
1228    ///   # panic!();
1229    ///   // ... details omitted ...
1230    /// }
1231    /// ```
1232    #[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        /// Sets the full request, replacing any prior values.
1241        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        /// Sets all the options, replacing any prior values.
1247        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        /// Sends the request.
1253        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        /// Sets the value of [parent][crate::model::CreateWorkspaceRequest::parent].
1261        ///
1262        /// This is a **required** field for requests.
1263        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        /// Sets the value of [workspace][crate::model::CreateWorkspaceRequest::workspace].
1269        ///
1270        /// This is a **required** field for requests.
1271        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        /// Sets or clears the value of [workspace][crate::model::CreateWorkspaceRequest::workspace].
1280        ///
1281        /// This is a **required** field for requests.
1282        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        /// Sets the value of [workspace_id][crate::model::CreateWorkspaceRequest::workspace_id].
1291        ///
1292        /// This is a **required** field for requests.
1293        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    /// The request builder for [Dataform::delete_workspace][crate::client::Dataform::delete_workspace] calls.
1307    ///
1308    /// # Example
1309    /// ```
1310    /// # use google_cloud_dataform_v1::builder::dataform::DeleteWorkspace;
1311    /// # async fn sample() -> gax::Result<()> {
1312    ///
1313    /// let builder = prepare_request_builder();
1314    /// let response = builder.send().await?;
1315    /// # Ok(()) }
1316    ///
1317    /// fn prepare_request_builder() -> DeleteWorkspace {
1318    ///   # panic!();
1319    ///   // ... details omitted ...
1320    /// }
1321    /// ```
1322    #[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        /// Sets the full request, replacing any prior values.
1331        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        /// Sets all the options, replacing any prior values.
1337        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        /// Sends the request.
1343        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        /// Sets the value of [name][crate::model::DeleteWorkspaceRequest::name].
1351        ///
1352        /// This is a **required** field for requests.
1353        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    /// The request builder for [Dataform::install_npm_packages][crate::client::Dataform::install_npm_packages] calls.
1367    ///
1368    /// # Example
1369    /// ```
1370    /// # use google_cloud_dataform_v1::builder::dataform::InstallNpmPackages;
1371    /// # async fn sample() -> gax::Result<()> {
1372    ///
1373    /// let builder = prepare_request_builder();
1374    /// let response = builder.send().await?;
1375    /// # Ok(()) }
1376    ///
1377    /// fn prepare_request_builder() -> InstallNpmPackages {
1378    ///   # panic!();
1379    ///   // ... details omitted ...
1380    /// }
1381    /// ```
1382    #[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        /// Sets the full request, replacing any prior values.
1391        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        /// Sets all the options, replacing any prior values.
1400        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        /// Sends the request.
1406        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        /// Sets the value of [workspace][crate::model::InstallNpmPackagesRequest::workspace].
1414        ///
1415        /// This is a **required** field for requests.
1416        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    /// The request builder for [Dataform::pull_git_commits][crate::client::Dataform::pull_git_commits] calls.
1430    ///
1431    /// # Example
1432    /// ```
1433    /// # use google_cloud_dataform_v1::builder::dataform::PullGitCommits;
1434    /// # async fn sample() -> gax::Result<()> {
1435    ///
1436    /// let builder = prepare_request_builder();
1437    /// let response = builder.send().await?;
1438    /// # Ok(()) }
1439    ///
1440    /// fn prepare_request_builder() -> PullGitCommits {
1441    ///   # panic!();
1442    ///   // ... details omitted ...
1443    /// }
1444    /// ```
1445    #[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        /// Sets the full request, replacing any prior values.
1454        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        /// Sets all the options, replacing any prior values.
1460        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        /// Sends the request.
1466        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        /// Sets the value of [name][crate::model::PullGitCommitsRequest::name].
1474        ///
1475        /// This is a **required** field for requests.
1476        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        /// Sets the value of [remote_branch][crate::model::PullGitCommitsRequest::remote_branch].
1482        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        /// Sets the value of [author][crate::model::PullGitCommitsRequest::author].
1488        ///
1489        /// This is a **required** field for requests.
1490        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        /// Sets or clears the value of [author][crate::model::PullGitCommitsRequest::author].
1499        ///
1500        /// This is a **required** field for requests.
1501        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    /// The request builder for [Dataform::push_git_commits][crate::client::Dataform::push_git_commits] calls.
1518    ///
1519    /// # Example
1520    /// ```
1521    /// # use google_cloud_dataform_v1::builder::dataform::PushGitCommits;
1522    /// # async fn sample() -> gax::Result<()> {
1523    ///
1524    /// let builder = prepare_request_builder();
1525    /// let response = builder.send().await?;
1526    /// # Ok(()) }
1527    ///
1528    /// fn prepare_request_builder() -> PushGitCommits {
1529    ///   # panic!();
1530    ///   // ... details omitted ...
1531    /// }
1532    /// ```
1533    #[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        /// Sets the full request, replacing any prior values.
1542        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        /// Sets all the options, replacing any prior values.
1548        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        /// Sends the request.
1554        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        /// Sets the value of [name][crate::model::PushGitCommitsRequest::name].
1562        ///
1563        /// This is a **required** field for requests.
1564        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        /// Sets the value of [remote_branch][crate::model::PushGitCommitsRequest::remote_branch].
1570        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    /// The request builder for [Dataform::fetch_file_git_statuses][crate::client::Dataform::fetch_file_git_statuses] calls.
1584    ///
1585    /// # Example
1586    /// ```
1587    /// # use google_cloud_dataform_v1::builder::dataform::FetchFileGitStatuses;
1588    /// # async fn sample() -> gax::Result<()> {
1589    ///
1590    /// let builder = prepare_request_builder();
1591    /// let response = builder.send().await?;
1592    /// # Ok(()) }
1593    ///
1594    /// fn prepare_request_builder() -> FetchFileGitStatuses {
1595    ///   # panic!();
1596    ///   // ... details omitted ...
1597    /// }
1598    /// ```
1599    #[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        /// Sets the full request, replacing any prior values.
1608        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        /// Sets all the options, replacing any prior values.
1617        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        /// Sends the request.
1623        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        /// Sets the value of [name][crate::model::FetchFileGitStatusesRequest::name].
1631        ///
1632        /// This is a **required** field for requests.
1633        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    /// The request builder for [Dataform::fetch_git_ahead_behind][crate::client::Dataform::fetch_git_ahead_behind] calls.
1647    ///
1648    /// # Example
1649    /// ```
1650    /// # use google_cloud_dataform_v1::builder::dataform::FetchGitAheadBehind;
1651    /// # async fn sample() -> gax::Result<()> {
1652    ///
1653    /// let builder = prepare_request_builder();
1654    /// let response = builder.send().await?;
1655    /// # Ok(()) }
1656    ///
1657    /// fn prepare_request_builder() -> FetchGitAheadBehind {
1658    ///   # panic!();
1659    ///   // ... details omitted ...
1660    /// }
1661    /// ```
1662    #[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        /// Sets the full request, replacing any prior values.
1671        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        /// Sets all the options, replacing any prior values.
1680        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        /// Sends the request.
1686        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        /// Sets the value of [name][crate::model::FetchGitAheadBehindRequest::name].
1694        ///
1695        /// This is a **required** field for requests.
1696        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        /// Sets the value of [remote_branch][crate::model::FetchGitAheadBehindRequest::remote_branch].
1702        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    /// The request builder for [Dataform::commit_workspace_changes][crate::client::Dataform::commit_workspace_changes] calls.
1716    ///
1717    /// # Example
1718    /// ```
1719    /// # use google_cloud_dataform_v1::builder::dataform::CommitWorkspaceChanges;
1720    /// # async fn sample() -> gax::Result<()> {
1721    ///
1722    /// let builder = prepare_request_builder();
1723    /// let response = builder.send().await?;
1724    /// # Ok(()) }
1725    ///
1726    /// fn prepare_request_builder() -> CommitWorkspaceChanges {
1727    ///   # panic!();
1728    ///   // ... details omitted ...
1729    /// }
1730    /// ```
1731    #[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        /// Sets the full request, replacing any prior values.
1740        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        /// Sets all the options, replacing any prior values.
1749        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        /// Sends the request.
1755        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        /// Sets the value of [name][crate::model::CommitWorkspaceChangesRequest::name].
1763        ///
1764        /// This is a **required** field for requests.
1765        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        /// Sets the value of [author][crate::model::CommitWorkspaceChangesRequest::author].
1771        ///
1772        /// This is a **required** field for requests.
1773        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        /// Sets or clears the value of [author][crate::model::CommitWorkspaceChangesRequest::author].
1782        ///
1783        /// This is a **required** field for requests.
1784        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        /// Sets the value of [commit_message][crate::model::CommitWorkspaceChangesRequest::commit_message].
1793        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        /// Sets the value of [paths][crate::model::CommitWorkspaceChangesRequest::paths].
1799        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    /// The request builder for [Dataform::reset_workspace_changes][crate::client::Dataform::reset_workspace_changes] calls.
1818    ///
1819    /// # Example
1820    /// ```
1821    /// # use google_cloud_dataform_v1::builder::dataform::ResetWorkspaceChanges;
1822    /// # async fn sample() -> gax::Result<()> {
1823    ///
1824    /// let builder = prepare_request_builder();
1825    /// let response = builder.send().await?;
1826    /// # Ok(()) }
1827    ///
1828    /// fn prepare_request_builder() -> ResetWorkspaceChanges {
1829    ///   # panic!();
1830    ///   // ... details omitted ...
1831    /// }
1832    /// ```
1833    #[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        /// Sets the full request, replacing any prior values.
1842        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        /// Sets all the options, replacing any prior values.
1851        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        /// Sends the request.
1857        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        /// Sets the value of [name][crate::model::ResetWorkspaceChangesRequest::name].
1865        ///
1866        /// This is a **required** field for requests.
1867        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        /// Sets the value of [paths][crate::model::ResetWorkspaceChangesRequest::paths].
1873        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        /// Sets the value of [clean][crate::model::ResetWorkspaceChangesRequest::clean].
1884        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    /// The request builder for [Dataform::fetch_file_diff][crate::client::Dataform::fetch_file_diff] calls.
1898    ///
1899    /// # Example
1900    /// ```
1901    /// # use google_cloud_dataform_v1::builder::dataform::FetchFileDiff;
1902    /// # async fn sample() -> gax::Result<()> {
1903    ///
1904    /// let builder = prepare_request_builder();
1905    /// let response = builder.send().await?;
1906    /// # Ok(()) }
1907    ///
1908    /// fn prepare_request_builder() -> FetchFileDiff {
1909    ///   # panic!();
1910    ///   // ... details omitted ...
1911    /// }
1912    /// ```
1913    #[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        /// Sets the full request, replacing any prior values.
1922        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        /// Sets all the options, replacing any prior values.
1928        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        /// Sends the request.
1934        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        /// Sets the value of [workspace][crate::model::FetchFileDiffRequest::workspace].
1942        ///
1943        /// This is a **required** field for requests.
1944        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        /// Sets the value of [path][crate::model::FetchFileDiffRequest::path].
1950        ///
1951        /// This is a **required** field for requests.
1952        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    /// The request builder for [Dataform::query_directory_contents][crate::client::Dataform::query_directory_contents] calls.
1966    ///
1967    /// # Example
1968    /// ```
1969    /// # use google_cloud_dataform_v1::builder::dataform::QueryDirectoryContents;
1970    /// # async fn sample() -> gax::Result<()> {
1971    /// use gax::paginator::ItemPaginator;
1972    ///
1973    /// let builder = prepare_request_builder();
1974    /// let mut items = builder.by_item();
1975    /// while let Some(result) = items.next().await {
1976    ///   let item = result?;
1977    /// }
1978    /// # Ok(()) }
1979    ///
1980    /// fn prepare_request_builder() -> QueryDirectoryContents {
1981    ///   # panic!();
1982    ///   // ... details omitted ...
1983    /// }
1984    /// ```
1985    #[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        /// Sets the full request, replacing any prior values.
1994        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        /// Sets all the options, replacing any prior values.
2003        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        /// Sends the request.
2009        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        /// Streams each page in the collection.
2017        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        /// Streams each item in the collection.
2034        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        /// Sets the value of [workspace][crate::model::QueryDirectoryContentsRequest::workspace].
2045        ///
2046        /// This is a **required** field for requests.
2047        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        /// Sets the value of [path][crate::model::QueryDirectoryContentsRequest::path].
2053        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        /// Sets the value of [page_size][crate::model::QueryDirectoryContentsRequest::page_size].
2059        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        /// Sets the value of [page_token][crate::model::QueryDirectoryContentsRequest::page_token].
2065        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    /// The request builder for [Dataform::search_files][crate::client::Dataform::search_files] calls.
2079    ///
2080    /// # Example
2081    /// ```
2082    /// # use google_cloud_dataform_v1::builder::dataform::SearchFiles;
2083    /// # async fn sample() -> gax::Result<()> {
2084    /// use gax::paginator::ItemPaginator;
2085    ///
2086    /// let builder = prepare_request_builder();
2087    /// let mut items = builder.by_item();
2088    /// while let Some(result) = items.next().await {
2089    ///   let item = result?;
2090    /// }
2091    /// # Ok(()) }
2092    ///
2093    /// fn prepare_request_builder() -> SearchFiles {
2094    ///   # panic!();
2095    ///   // ... details omitted ...
2096    /// }
2097    /// ```
2098    #[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        /// Sets the full request, replacing any prior values.
2107        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        /// Sets all the options, replacing any prior values.
2113        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        /// Sends the request.
2119        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        /// Streams each page in the collection.
2127        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        /// Streams each item in the collection.
2142        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        /// Sets the value of [workspace][crate::model::SearchFilesRequest::workspace].
2151        ///
2152        /// This is a **required** field for requests.
2153        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        /// Sets the value of [page_size][crate::model::SearchFilesRequest::page_size].
2159        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        /// Sets the value of [page_token][crate::model::SearchFilesRequest::page_token].
2165        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        /// Sets the value of [filter][crate::model::SearchFilesRequest::filter].
2171        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    /// The request builder for [Dataform::make_directory][crate::client::Dataform::make_directory] calls.
2185    ///
2186    /// # Example
2187    /// ```
2188    /// # use google_cloud_dataform_v1::builder::dataform::MakeDirectory;
2189    /// # async fn sample() -> gax::Result<()> {
2190    ///
2191    /// let builder = prepare_request_builder();
2192    /// let response = builder.send().await?;
2193    /// # Ok(()) }
2194    ///
2195    /// fn prepare_request_builder() -> MakeDirectory {
2196    ///   # panic!();
2197    ///   // ... details omitted ...
2198    /// }
2199    /// ```
2200    #[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        /// Sets the full request, replacing any prior values.
2209        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        /// Sets all the options, replacing any prior values.
2215        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        /// Sends the request.
2221        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        /// Sets the value of [workspace][crate::model::MakeDirectoryRequest::workspace].
2229        ///
2230        /// This is a **required** field for requests.
2231        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        /// Sets the value of [path][crate::model::MakeDirectoryRequest::path].
2237        ///
2238        /// This is a **required** field for requests.
2239        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    /// The request builder for [Dataform::remove_directory][crate::client::Dataform::remove_directory] calls.
2253    ///
2254    /// # Example
2255    /// ```
2256    /// # use google_cloud_dataform_v1::builder::dataform::RemoveDirectory;
2257    /// # async fn sample() -> gax::Result<()> {
2258    ///
2259    /// let builder = prepare_request_builder();
2260    /// let response = builder.send().await?;
2261    /// # Ok(()) }
2262    ///
2263    /// fn prepare_request_builder() -> RemoveDirectory {
2264    ///   # panic!();
2265    ///   // ... details omitted ...
2266    /// }
2267    /// ```
2268    #[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        /// Sets the full request, replacing any prior values.
2277        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        /// Sets all the options, replacing any prior values.
2283        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        /// Sends the request.
2289        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        /// Sets the value of [workspace][crate::model::RemoveDirectoryRequest::workspace].
2297        ///
2298        /// This is a **required** field for requests.
2299        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        /// Sets the value of [path][crate::model::RemoveDirectoryRequest::path].
2305        ///
2306        /// This is a **required** field for requests.
2307        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    /// The request builder for [Dataform::move_directory][crate::client::Dataform::move_directory] calls.
2321    ///
2322    /// # Example
2323    /// ```
2324    /// # use google_cloud_dataform_v1::builder::dataform::MoveDirectory;
2325    /// # async fn sample() -> gax::Result<()> {
2326    ///
2327    /// let builder = prepare_request_builder();
2328    /// let response = builder.send().await?;
2329    /// # Ok(()) }
2330    ///
2331    /// fn prepare_request_builder() -> MoveDirectory {
2332    ///   # panic!();
2333    ///   // ... details omitted ...
2334    /// }
2335    /// ```
2336    #[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        /// Sets the full request, replacing any prior values.
2345        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        /// Sets all the options, replacing any prior values.
2351        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        /// Sends the request.
2357        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        /// Sets the value of [workspace][crate::model::MoveDirectoryRequest::workspace].
2365        ///
2366        /// This is a **required** field for requests.
2367        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        /// Sets the value of [path][crate::model::MoveDirectoryRequest::path].
2373        ///
2374        /// This is a **required** field for requests.
2375        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        /// Sets the value of [new_path][crate::model::MoveDirectoryRequest::new_path].
2381        ///
2382        /// This is a **required** field for requests.
2383        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    /// The request builder for [Dataform::read_file][crate::client::Dataform::read_file] calls.
2397    ///
2398    /// # Example
2399    /// ```
2400    /// # use google_cloud_dataform_v1::builder::dataform::ReadFile;
2401    /// # async fn sample() -> gax::Result<()> {
2402    ///
2403    /// let builder = prepare_request_builder();
2404    /// let response = builder.send().await?;
2405    /// # Ok(()) }
2406    ///
2407    /// fn prepare_request_builder() -> ReadFile {
2408    ///   # panic!();
2409    ///   // ... details omitted ...
2410    /// }
2411    /// ```
2412    #[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        /// Sets the full request, replacing any prior values.
2421        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        /// Sets all the options, replacing any prior values.
2427        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        /// Sends the request.
2433        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        /// Sets the value of [workspace][crate::model::ReadFileRequest::workspace].
2441        ///
2442        /// This is a **required** field for requests.
2443        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        /// Sets the value of [path][crate::model::ReadFileRequest::path].
2449        ///
2450        /// This is a **required** field for requests.
2451        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        /// Sets the value of [revision][crate::model::ReadFileRequest::revision].
2457        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    /// The request builder for [Dataform::remove_file][crate::client::Dataform::remove_file] calls.
2471    ///
2472    /// # Example
2473    /// ```
2474    /// # use google_cloud_dataform_v1::builder::dataform::RemoveFile;
2475    /// # async fn sample() -> gax::Result<()> {
2476    ///
2477    /// let builder = prepare_request_builder();
2478    /// let response = builder.send().await?;
2479    /// # Ok(()) }
2480    ///
2481    /// fn prepare_request_builder() -> RemoveFile {
2482    ///   # panic!();
2483    ///   // ... details omitted ...
2484    /// }
2485    /// ```
2486    #[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        /// Sets the full request, replacing any prior values.
2495        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        /// Sets all the options, replacing any prior values.
2501        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        /// Sends the request.
2507        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        /// Sets the value of [workspace][crate::model::RemoveFileRequest::workspace].
2515        ///
2516        /// This is a **required** field for requests.
2517        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        /// Sets the value of [path][crate::model::RemoveFileRequest::path].
2523        ///
2524        /// This is a **required** field for requests.
2525        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    /// The request builder for [Dataform::move_file][crate::client::Dataform::move_file] calls.
2539    ///
2540    /// # Example
2541    /// ```
2542    /// # use google_cloud_dataform_v1::builder::dataform::MoveFile;
2543    /// # async fn sample() -> gax::Result<()> {
2544    ///
2545    /// let builder = prepare_request_builder();
2546    /// let response = builder.send().await?;
2547    /// # Ok(()) }
2548    ///
2549    /// fn prepare_request_builder() -> MoveFile {
2550    ///   # panic!();
2551    ///   // ... details omitted ...
2552    /// }
2553    /// ```
2554    #[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        /// Sets the full request, replacing any prior values.
2563        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        /// Sets all the options, replacing any prior values.
2569        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        /// Sends the request.
2575        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        /// Sets the value of [workspace][crate::model::MoveFileRequest::workspace].
2583        ///
2584        /// This is a **required** field for requests.
2585        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        /// Sets the value of [path][crate::model::MoveFileRequest::path].
2591        ///
2592        /// This is a **required** field for requests.
2593        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        /// Sets the value of [new_path][crate::model::MoveFileRequest::new_path].
2599        ///
2600        /// This is a **required** field for requests.
2601        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    /// The request builder for [Dataform::write_file][crate::client::Dataform::write_file] calls.
2615    ///
2616    /// # Example
2617    /// ```
2618    /// # use google_cloud_dataform_v1::builder::dataform::WriteFile;
2619    /// # async fn sample() -> gax::Result<()> {
2620    ///
2621    /// let builder = prepare_request_builder();
2622    /// let response = builder.send().await?;
2623    /// # Ok(()) }
2624    ///
2625    /// fn prepare_request_builder() -> WriteFile {
2626    ///   # panic!();
2627    ///   // ... details omitted ...
2628    /// }
2629    /// ```
2630    #[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        /// Sets the full request, replacing any prior values.
2639        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        /// Sets all the options, replacing any prior values.
2645        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        /// Sends the request.
2651        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        /// Sets the value of [workspace][crate::model::WriteFileRequest::workspace].
2659        ///
2660        /// This is a **required** field for requests.
2661        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        /// Sets the value of [path][crate::model::WriteFileRequest::path].
2667        ///
2668        /// This is a **required** field for requests.
2669        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        /// Sets the value of [contents][crate::model::WriteFileRequest::contents].
2675        ///
2676        /// This is a **required** field for requests.
2677        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    /// The request builder for [Dataform::list_release_configs][crate::client::Dataform::list_release_configs] calls.
2691    ///
2692    /// # Example
2693    /// ```
2694    /// # use google_cloud_dataform_v1::builder::dataform::ListReleaseConfigs;
2695    /// # async fn sample() -> gax::Result<()> {
2696    /// use gax::paginator::ItemPaginator;
2697    ///
2698    /// let builder = prepare_request_builder();
2699    /// let mut items = builder.by_item();
2700    /// while let Some(result) = items.next().await {
2701    ///   let item = result?;
2702    /// }
2703    /// # Ok(()) }
2704    ///
2705    /// fn prepare_request_builder() -> ListReleaseConfigs {
2706    ///   # panic!();
2707    ///   // ... details omitted ...
2708    /// }
2709    /// ```
2710    #[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        /// Sets the full request, replacing any prior values.
2719        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        /// Sets all the options, replacing any prior values.
2728        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        /// Sends the request.
2734        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        /// Streams each page in the collection.
2742        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        /// Streams each item in the collection.
2757        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        /// Sets the value of [parent][crate::model::ListReleaseConfigsRequest::parent].
2768        ///
2769        /// This is a **required** field for requests.
2770        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        /// Sets the value of [page_size][crate::model::ListReleaseConfigsRequest::page_size].
2776        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        /// Sets the value of [page_token][crate::model::ListReleaseConfigsRequest::page_token].
2782        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    /// The request builder for [Dataform::get_release_config][crate::client::Dataform::get_release_config] calls.
2796    ///
2797    /// # Example
2798    /// ```
2799    /// # use google_cloud_dataform_v1::builder::dataform::GetReleaseConfig;
2800    /// # async fn sample() -> gax::Result<()> {
2801    ///
2802    /// let builder = prepare_request_builder();
2803    /// let response = builder.send().await?;
2804    /// # Ok(()) }
2805    ///
2806    /// fn prepare_request_builder() -> GetReleaseConfig {
2807    ///   # panic!();
2808    ///   // ... details omitted ...
2809    /// }
2810    /// ```
2811    #[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        /// Sets the full request, replacing any prior values.
2820        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        /// Sets all the options, replacing any prior values.
2829        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        /// Sends the request.
2835        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        /// Sets the value of [name][crate::model::GetReleaseConfigRequest::name].
2843        ///
2844        /// This is a **required** field for requests.
2845        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    /// The request builder for [Dataform::create_release_config][crate::client::Dataform::create_release_config] calls.
2859    ///
2860    /// # Example
2861    /// ```
2862    /// # use google_cloud_dataform_v1::builder::dataform::CreateReleaseConfig;
2863    /// # async fn sample() -> gax::Result<()> {
2864    ///
2865    /// let builder = prepare_request_builder();
2866    /// let response = builder.send().await?;
2867    /// # Ok(()) }
2868    ///
2869    /// fn prepare_request_builder() -> CreateReleaseConfig {
2870    ///   # panic!();
2871    ///   // ... details omitted ...
2872    /// }
2873    /// ```
2874    #[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        /// Sets the full request, replacing any prior values.
2883        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        /// Sets all the options, replacing any prior values.
2892        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        /// Sends the request.
2898        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        /// Sets the value of [parent][crate::model::CreateReleaseConfigRequest::parent].
2906        ///
2907        /// This is a **required** field for requests.
2908        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        /// Sets the value of [release_config][crate::model::CreateReleaseConfigRequest::release_config].
2914        ///
2915        /// This is a **required** field for requests.
2916        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        /// Sets or clears the value of [release_config][crate::model::CreateReleaseConfigRequest::release_config].
2925        ///
2926        /// This is a **required** field for requests.
2927        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        /// Sets the value of [release_config_id][crate::model::CreateReleaseConfigRequest::release_config_id].
2936        ///
2937        /// This is a **required** field for requests.
2938        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    /// The request builder for [Dataform::update_release_config][crate::client::Dataform::update_release_config] calls.
2952    ///
2953    /// # Example
2954    /// ```
2955    /// # use google_cloud_dataform_v1::builder::dataform::UpdateReleaseConfig;
2956    /// # async fn sample() -> gax::Result<()> {
2957    ///
2958    /// let builder = prepare_request_builder();
2959    /// let response = builder.send().await?;
2960    /// # Ok(()) }
2961    ///
2962    /// fn prepare_request_builder() -> UpdateReleaseConfig {
2963    ///   # panic!();
2964    ///   // ... details omitted ...
2965    /// }
2966    /// ```
2967    #[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        /// Sets the full request, replacing any prior values.
2976        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        /// Sets all the options, replacing any prior values.
2985        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        /// Sends the request.
2991        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        /// Sets the value of [update_mask][crate::model::UpdateReleaseConfigRequest::update_mask].
2999        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        /// Sets or clears the value of [update_mask][crate::model::UpdateReleaseConfigRequest::update_mask].
3008        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        /// Sets the value of [release_config][crate::model::UpdateReleaseConfigRequest::release_config].
3017        ///
3018        /// This is a **required** field for requests.
3019        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        /// Sets or clears the value of [release_config][crate::model::UpdateReleaseConfigRequest::release_config].
3028        ///
3029        /// This is a **required** field for requests.
3030        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    /// The request builder for [Dataform::delete_release_config][crate::client::Dataform::delete_release_config] calls.
3047    ///
3048    /// # Example
3049    /// ```
3050    /// # use google_cloud_dataform_v1::builder::dataform::DeleteReleaseConfig;
3051    /// # async fn sample() -> gax::Result<()> {
3052    ///
3053    /// let builder = prepare_request_builder();
3054    /// let response = builder.send().await?;
3055    /// # Ok(()) }
3056    ///
3057    /// fn prepare_request_builder() -> DeleteReleaseConfig {
3058    ///   # panic!();
3059    ///   // ... details omitted ...
3060    /// }
3061    /// ```
3062    #[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        /// Sets the full request, replacing any prior values.
3071        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        /// Sets all the options, replacing any prior values.
3080        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        /// Sends the request.
3086        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        /// Sets the value of [name][crate::model::DeleteReleaseConfigRequest::name].
3094        ///
3095        /// This is a **required** field for requests.
3096        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    /// The request builder for [Dataform::list_compilation_results][crate::client::Dataform::list_compilation_results] calls.
3110    ///
3111    /// # Example
3112    /// ```
3113    /// # use google_cloud_dataform_v1::builder::dataform::ListCompilationResults;
3114    /// # async fn sample() -> gax::Result<()> {
3115    /// use gax::paginator::ItemPaginator;
3116    ///
3117    /// let builder = prepare_request_builder();
3118    /// let mut items = builder.by_item();
3119    /// while let Some(result) = items.next().await {
3120    ///   let item = result?;
3121    /// }
3122    /// # Ok(()) }
3123    ///
3124    /// fn prepare_request_builder() -> ListCompilationResults {
3125    ///   # panic!();
3126    ///   // ... details omitted ...
3127    /// }
3128    /// ```
3129    #[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        /// Sets the full request, replacing any prior values.
3138        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        /// Sets all the options, replacing any prior values.
3147        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        /// Sends the request.
3153        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        /// Streams each page in the collection.
3161        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        /// Streams each item in the collection.
3178        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        /// Sets the value of [parent][crate::model::ListCompilationResultsRequest::parent].
3189        ///
3190        /// This is a **required** field for requests.
3191        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        /// Sets the value of [page_size][crate::model::ListCompilationResultsRequest::page_size].
3197        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        /// Sets the value of [page_token][crate::model::ListCompilationResultsRequest::page_token].
3203        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        /// Sets the value of [order_by][crate::model::ListCompilationResultsRequest::order_by].
3209        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        /// Sets the value of [filter][crate::model::ListCompilationResultsRequest::filter].
3215        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    /// The request builder for [Dataform::get_compilation_result][crate::client::Dataform::get_compilation_result] calls.
3229    ///
3230    /// # Example
3231    /// ```
3232    /// # use google_cloud_dataform_v1::builder::dataform::GetCompilationResult;
3233    /// # async fn sample() -> gax::Result<()> {
3234    ///
3235    /// let builder = prepare_request_builder();
3236    /// let response = builder.send().await?;
3237    /// # Ok(()) }
3238    ///
3239    /// fn prepare_request_builder() -> GetCompilationResult {
3240    ///   # panic!();
3241    ///   // ... details omitted ...
3242    /// }
3243    /// ```
3244    #[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        /// Sets the full request, replacing any prior values.
3253        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        /// Sets all the options, replacing any prior values.
3262        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        /// Sends the request.
3268        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        /// Sets the value of [name][crate::model::GetCompilationResultRequest::name].
3276        ///
3277        /// This is a **required** field for requests.
3278        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    /// The request builder for [Dataform::create_compilation_result][crate::client::Dataform::create_compilation_result] calls.
3292    ///
3293    /// # Example
3294    /// ```
3295    /// # use google_cloud_dataform_v1::builder::dataform::CreateCompilationResult;
3296    /// # async fn sample() -> gax::Result<()> {
3297    ///
3298    /// let builder = prepare_request_builder();
3299    /// let response = builder.send().await?;
3300    /// # Ok(()) }
3301    ///
3302    /// fn prepare_request_builder() -> CreateCompilationResult {
3303    ///   # panic!();
3304    ///   // ... details omitted ...
3305    /// }
3306    /// ```
3307    #[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        /// Sets the full request, replacing any prior values.
3318        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        /// Sets all the options, replacing any prior values.
3327        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        /// Sends the request.
3333        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        /// Sets the value of [parent][crate::model::CreateCompilationResultRequest::parent].
3341        ///
3342        /// This is a **required** field for requests.
3343        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        /// Sets the value of [compilation_result][crate::model::CreateCompilationResultRequest::compilation_result].
3349        ///
3350        /// This is a **required** field for requests.
3351        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        /// Sets or clears the value of [compilation_result][crate::model::CreateCompilationResultRequest::compilation_result].
3360        ///
3361        /// This is a **required** field for requests.
3362        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    /// The request builder for [Dataform::query_compilation_result_actions][crate::client::Dataform::query_compilation_result_actions] calls.
3379    ///
3380    /// # Example
3381    /// ```
3382    /// # use google_cloud_dataform_v1::builder::dataform::QueryCompilationResultActions;
3383    /// # async fn sample() -> gax::Result<()> {
3384    /// use gax::paginator::ItemPaginator;
3385    ///
3386    /// let builder = prepare_request_builder();
3387    /// let mut items = builder.by_item();
3388    /// while let Some(result) = items.next().await {
3389    ///   let item = result?;
3390    /// }
3391    /// # Ok(()) }
3392    ///
3393    /// fn prepare_request_builder() -> QueryCompilationResultActions {
3394    ///   # panic!();
3395    ///   // ... details omitted ...
3396    /// }
3397    /// ```
3398    #[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        /// Sets the full request, replacing any prior values.
3409        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        /// Sets all the options, replacing any prior values.
3418        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        /// Sends the request.
3424        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        /// Streams each page in the collection.
3432        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        /// Streams each item in the collection.
3449        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        /// Sets the value of [name][crate::model::QueryCompilationResultActionsRequest::name].
3460        ///
3461        /// This is a **required** field for requests.
3462        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        /// Sets the value of [page_size][crate::model::QueryCompilationResultActionsRequest::page_size].
3468        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        /// Sets the value of [page_token][crate::model::QueryCompilationResultActionsRequest::page_token].
3474        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        /// Sets the value of [filter][crate::model::QueryCompilationResultActionsRequest::filter].
3480        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    /// The request builder for [Dataform::list_workflow_configs][crate::client::Dataform::list_workflow_configs] calls.
3494    ///
3495    /// # Example
3496    /// ```
3497    /// # use google_cloud_dataform_v1::builder::dataform::ListWorkflowConfigs;
3498    /// # async fn sample() -> gax::Result<()> {
3499    /// use gax::paginator::ItemPaginator;
3500    ///
3501    /// let builder = prepare_request_builder();
3502    /// let mut items = builder.by_item();
3503    /// while let Some(result) = items.next().await {
3504    ///   let item = result?;
3505    /// }
3506    /// # Ok(()) }
3507    ///
3508    /// fn prepare_request_builder() -> ListWorkflowConfigs {
3509    ///   # panic!();
3510    ///   // ... details omitted ...
3511    /// }
3512    /// ```
3513    #[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        /// Sets the full request, replacing any prior values.
3522        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        /// Sets all the options, replacing any prior values.
3531        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        /// Sends the request.
3537        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        /// Streams each page in the collection.
3545        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        /// Streams each item in the collection.
3560        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        /// Sets the value of [parent][crate::model::ListWorkflowConfigsRequest::parent].
3571        ///
3572        /// This is a **required** field for requests.
3573        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        /// Sets the value of [page_size][crate::model::ListWorkflowConfigsRequest::page_size].
3579        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        /// Sets the value of [page_token][crate::model::ListWorkflowConfigsRequest::page_token].
3585        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    /// The request builder for [Dataform::get_workflow_config][crate::client::Dataform::get_workflow_config] calls.
3599    ///
3600    /// # Example
3601    /// ```
3602    /// # use google_cloud_dataform_v1::builder::dataform::GetWorkflowConfig;
3603    /// # async fn sample() -> gax::Result<()> {
3604    ///
3605    /// let builder = prepare_request_builder();
3606    /// let response = builder.send().await?;
3607    /// # Ok(()) }
3608    ///
3609    /// fn prepare_request_builder() -> GetWorkflowConfig {
3610    ///   # panic!();
3611    ///   // ... details omitted ...
3612    /// }
3613    /// ```
3614    #[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        /// Sets the full request, replacing any prior values.
3623        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        /// Sets all the options, replacing any prior values.
3632        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        /// Sends the request.
3638        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        /// Sets the value of [name][crate::model::GetWorkflowConfigRequest::name].
3646        ///
3647        /// This is a **required** field for requests.
3648        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    /// The request builder for [Dataform::create_workflow_config][crate::client::Dataform::create_workflow_config] calls.
3662    ///
3663    /// # Example
3664    /// ```
3665    /// # use google_cloud_dataform_v1::builder::dataform::CreateWorkflowConfig;
3666    /// # async fn sample() -> gax::Result<()> {
3667    ///
3668    /// let builder = prepare_request_builder();
3669    /// let response = builder.send().await?;
3670    /// # Ok(()) }
3671    ///
3672    /// fn prepare_request_builder() -> CreateWorkflowConfig {
3673    ///   # panic!();
3674    ///   // ... details omitted ...
3675    /// }
3676    /// ```
3677    #[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        /// Sets the full request, replacing any prior values.
3686        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        /// Sets all the options, replacing any prior values.
3695        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        /// Sends the request.
3701        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        /// Sets the value of [parent][crate::model::CreateWorkflowConfigRequest::parent].
3709        ///
3710        /// This is a **required** field for requests.
3711        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        /// Sets the value of [workflow_config][crate::model::CreateWorkflowConfigRequest::workflow_config].
3717        ///
3718        /// This is a **required** field for requests.
3719        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        /// Sets or clears the value of [workflow_config][crate::model::CreateWorkflowConfigRequest::workflow_config].
3728        ///
3729        /// This is a **required** field for requests.
3730        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        /// Sets the value of [workflow_config_id][crate::model::CreateWorkflowConfigRequest::workflow_config_id].
3739        ///
3740        /// This is a **required** field for requests.
3741        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    /// The request builder for [Dataform::update_workflow_config][crate::client::Dataform::update_workflow_config] calls.
3755    ///
3756    /// # Example
3757    /// ```
3758    /// # use google_cloud_dataform_v1::builder::dataform::UpdateWorkflowConfig;
3759    /// # async fn sample() -> gax::Result<()> {
3760    ///
3761    /// let builder = prepare_request_builder();
3762    /// let response = builder.send().await?;
3763    /// # Ok(()) }
3764    ///
3765    /// fn prepare_request_builder() -> UpdateWorkflowConfig {
3766    ///   # panic!();
3767    ///   // ... details omitted ...
3768    /// }
3769    /// ```
3770    #[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        /// Sets the full request, replacing any prior values.
3779        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        /// Sets all the options, replacing any prior values.
3788        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        /// Sends the request.
3794        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        /// Sets the value of [update_mask][crate::model::UpdateWorkflowConfigRequest::update_mask].
3802        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        /// Sets or clears the value of [update_mask][crate::model::UpdateWorkflowConfigRequest::update_mask].
3811        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        /// Sets the value of [workflow_config][crate::model::UpdateWorkflowConfigRequest::workflow_config].
3820        ///
3821        /// This is a **required** field for requests.
3822        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        /// Sets or clears the value of [workflow_config][crate::model::UpdateWorkflowConfigRequest::workflow_config].
3831        ///
3832        /// This is a **required** field for requests.
3833        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    /// The request builder for [Dataform::delete_workflow_config][crate::client::Dataform::delete_workflow_config] calls.
3850    ///
3851    /// # Example
3852    /// ```
3853    /// # use google_cloud_dataform_v1::builder::dataform::DeleteWorkflowConfig;
3854    /// # async fn sample() -> gax::Result<()> {
3855    ///
3856    /// let builder = prepare_request_builder();
3857    /// let response = builder.send().await?;
3858    /// # Ok(()) }
3859    ///
3860    /// fn prepare_request_builder() -> DeleteWorkflowConfig {
3861    ///   # panic!();
3862    ///   // ... details omitted ...
3863    /// }
3864    /// ```
3865    #[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        /// Sets the full request, replacing any prior values.
3874        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        /// Sets all the options, replacing any prior values.
3883        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        /// Sends the request.
3889        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        /// Sets the value of [name][crate::model::DeleteWorkflowConfigRequest::name].
3897        ///
3898        /// This is a **required** field for requests.
3899        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    /// The request builder for [Dataform::list_workflow_invocations][crate::client::Dataform::list_workflow_invocations] calls.
3913    ///
3914    /// # Example
3915    /// ```
3916    /// # use google_cloud_dataform_v1::builder::dataform::ListWorkflowInvocations;
3917    /// # async fn sample() -> gax::Result<()> {
3918    /// use gax::paginator::ItemPaginator;
3919    ///
3920    /// let builder = prepare_request_builder();
3921    /// let mut items = builder.by_item();
3922    /// while let Some(result) = items.next().await {
3923    ///   let item = result?;
3924    /// }
3925    /// # Ok(()) }
3926    ///
3927    /// fn prepare_request_builder() -> ListWorkflowInvocations {
3928    ///   # panic!();
3929    ///   // ... details omitted ...
3930    /// }
3931    /// ```
3932    #[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        /// Sets the full request, replacing any prior values.
3943        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        /// Sets all the options, replacing any prior values.
3952        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        /// Sends the request.
3958        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        /// Streams each page in the collection.
3966        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        /// Streams each item in the collection.
3983        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        /// Sets the value of [parent][crate::model::ListWorkflowInvocationsRequest::parent].
3994        ///
3995        /// This is a **required** field for requests.
3996        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        /// Sets the value of [page_size][crate::model::ListWorkflowInvocationsRequest::page_size].
4002        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        /// Sets the value of [page_token][crate::model::ListWorkflowInvocationsRequest::page_token].
4008        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        /// Sets the value of [order_by][crate::model::ListWorkflowInvocationsRequest::order_by].
4014        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        /// Sets the value of [filter][crate::model::ListWorkflowInvocationsRequest::filter].
4020        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    /// The request builder for [Dataform::get_workflow_invocation][crate::client::Dataform::get_workflow_invocation] calls.
4034    ///
4035    /// # Example
4036    /// ```
4037    /// # use google_cloud_dataform_v1::builder::dataform::GetWorkflowInvocation;
4038    /// # async fn sample() -> gax::Result<()> {
4039    ///
4040    /// let builder = prepare_request_builder();
4041    /// let response = builder.send().await?;
4042    /// # Ok(()) }
4043    ///
4044    /// fn prepare_request_builder() -> GetWorkflowInvocation {
4045    ///   # panic!();
4046    ///   // ... details omitted ...
4047    /// }
4048    /// ```
4049    #[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        /// Sets the full request, replacing any prior values.
4058        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        /// Sets all the options, replacing any prior values.
4067        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        /// Sends the request.
4073        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        /// Sets the value of [name][crate::model::GetWorkflowInvocationRequest::name].
4081        ///
4082        /// This is a **required** field for requests.
4083        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    /// The request builder for [Dataform::create_workflow_invocation][crate::client::Dataform::create_workflow_invocation] calls.
4097    ///
4098    /// # Example
4099    /// ```
4100    /// # use google_cloud_dataform_v1::builder::dataform::CreateWorkflowInvocation;
4101    /// # async fn sample() -> gax::Result<()> {
4102    ///
4103    /// let builder = prepare_request_builder();
4104    /// let response = builder.send().await?;
4105    /// # Ok(()) }
4106    ///
4107    /// fn prepare_request_builder() -> CreateWorkflowInvocation {
4108    ///   # panic!();
4109    ///   // ... details omitted ...
4110    /// }
4111    /// ```
4112    #[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        /// Sets the full request, replacing any prior values.
4123        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        /// Sets all the options, replacing any prior values.
4132        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        /// Sends the request.
4138        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        /// Sets the value of [parent][crate::model::CreateWorkflowInvocationRequest::parent].
4146        ///
4147        /// This is a **required** field for requests.
4148        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        /// Sets the value of [workflow_invocation][crate::model::CreateWorkflowInvocationRequest::workflow_invocation].
4154        ///
4155        /// This is a **required** field for requests.
4156        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        /// Sets or clears the value of [workflow_invocation][crate::model::CreateWorkflowInvocationRequest::workflow_invocation].
4165        ///
4166        /// This is a **required** field for requests.
4167        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    /// The request builder for [Dataform::delete_workflow_invocation][crate::client::Dataform::delete_workflow_invocation] calls.
4184    ///
4185    /// # Example
4186    /// ```
4187    /// # use google_cloud_dataform_v1::builder::dataform::DeleteWorkflowInvocation;
4188    /// # async fn sample() -> gax::Result<()> {
4189    ///
4190    /// let builder = prepare_request_builder();
4191    /// let response = builder.send().await?;
4192    /// # Ok(()) }
4193    ///
4194    /// fn prepare_request_builder() -> DeleteWorkflowInvocation {
4195    ///   # panic!();
4196    ///   // ... details omitted ...
4197    /// }
4198    /// ```
4199    #[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        /// Sets the full request, replacing any prior values.
4210        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        /// Sets all the options, replacing any prior values.
4219        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        /// Sends the request.
4225        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        /// Sets the value of [name][crate::model::DeleteWorkflowInvocationRequest::name].
4233        ///
4234        /// This is a **required** field for requests.
4235        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    /// The request builder for [Dataform::cancel_workflow_invocation][crate::client::Dataform::cancel_workflow_invocation] calls.
4249    ///
4250    /// # Example
4251    /// ```
4252    /// # use google_cloud_dataform_v1::builder::dataform::CancelWorkflowInvocation;
4253    /// # async fn sample() -> gax::Result<()> {
4254    ///
4255    /// let builder = prepare_request_builder();
4256    /// let response = builder.send().await?;
4257    /// # Ok(()) }
4258    ///
4259    /// fn prepare_request_builder() -> CancelWorkflowInvocation {
4260    ///   # panic!();
4261    ///   // ... details omitted ...
4262    /// }
4263    /// ```
4264    #[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        /// Sets the full request, replacing any prior values.
4275        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        /// Sets all the options, replacing any prior values.
4284        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        /// Sends the request.
4290        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        /// Sets the value of [name][crate::model::CancelWorkflowInvocationRequest::name].
4298        ///
4299        /// This is a **required** field for requests.
4300        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    /// The request builder for [Dataform::query_workflow_invocation_actions][crate::client::Dataform::query_workflow_invocation_actions] calls.
4314    ///
4315    /// # Example
4316    /// ```
4317    /// # use google_cloud_dataform_v1::builder::dataform::QueryWorkflowInvocationActions;
4318    /// # async fn sample() -> gax::Result<()> {
4319    /// use gax::paginator::ItemPaginator;
4320    ///
4321    /// let builder = prepare_request_builder();
4322    /// let mut items = builder.by_item();
4323    /// while let Some(result) = items.next().await {
4324    ///   let item = result?;
4325    /// }
4326    /// # Ok(()) }
4327    ///
4328    /// fn prepare_request_builder() -> QueryWorkflowInvocationActions {
4329    ///   # panic!();
4330    ///   // ... details omitted ...
4331    /// }
4332    /// ```
4333    #[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        /// Sets the full request, replacing any prior values.
4344        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        /// Sets all the options, replacing any prior values.
4353        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        /// Sends the request.
4359        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        /// Streams each page in the collection.
4367        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        /// Streams each item in the collection.
4384        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        /// Sets the value of [name][crate::model::QueryWorkflowInvocationActionsRequest::name].
4395        ///
4396        /// This is a **required** field for requests.
4397        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        /// Sets the value of [page_size][crate::model::QueryWorkflowInvocationActionsRequest::page_size].
4403        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        /// Sets the value of [page_token][crate::model::QueryWorkflowInvocationActionsRequest::page_token].
4409        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    /// The request builder for [Dataform::get_config][crate::client::Dataform::get_config] calls.
4423    ///
4424    /// # Example
4425    /// ```
4426    /// # use google_cloud_dataform_v1::builder::dataform::GetConfig;
4427    /// # async fn sample() -> gax::Result<()> {
4428    ///
4429    /// let builder = prepare_request_builder();
4430    /// let response = builder.send().await?;
4431    /// # Ok(()) }
4432    ///
4433    /// fn prepare_request_builder() -> GetConfig {
4434    ///   # panic!();
4435    ///   // ... details omitted ...
4436    /// }
4437    /// ```
4438    #[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        /// Sets the full request, replacing any prior values.
4447        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        /// Sets all the options, replacing any prior values.
4453        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        /// Sends the request.
4459        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        /// Sets the value of [name][crate::model::GetConfigRequest::name].
4467        ///
4468        /// This is a **required** field for requests.
4469        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    /// The request builder for [Dataform::update_config][crate::client::Dataform::update_config] calls.
4483    ///
4484    /// # Example
4485    /// ```
4486    /// # use google_cloud_dataform_v1::builder::dataform::UpdateConfig;
4487    /// # async fn sample() -> gax::Result<()> {
4488    ///
4489    /// let builder = prepare_request_builder();
4490    /// let response = builder.send().await?;
4491    /// # Ok(()) }
4492    ///
4493    /// fn prepare_request_builder() -> UpdateConfig {
4494    ///   # panic!();
4495    ///   // ... details omitted ...
4496    /// }
4497    /// ```
4498    #[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        /// Sets the full request, replacing any prior values.
4507        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        /// Sets all the options, replacing any prior values.
4513        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        /// Sends the request.
4519        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        /// Sets the value of [config][crate::model::UpdateConfigRequest::config].
4527        ///
4528        /// This is a **required** field for requests.
4529        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        /// Sets or clears the value of [config][crate::model::UpdateConfigRequest::config].
4538        ///
4539        /// This is a **required** field for requests.
4540        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        /// Sets the value of [update_mask][crate::model::UpdateConfigRequest::update_mask].
4549        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        /// Sets or clears the value of [update_mask][crate::model::UpdateConfigRequest::update_mask].
4558        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    /// The request builder for [Dataform::list_locations][crate::client::Dataform::list_locations] calls.
4575    ///
4576    /// # Example
4577    /// ```
4578    /// # use google_cloud_dataform_v1::builder::dataform::ListLocations;
4579    /// # async fn sample() -> gax::Result<()> {
4580    /// use gax::paginator::ItemPaginator;
4581    ///
4582    /// let builder = prepare_request_builder();
4583    /// let mut items = builder.by_item();
4584    /// while let Some(result) = items.next().await {
4585    ///   let item = result?;
4586    /// }
4587    /// # Ok(()) }
4588    ///
4589    /// fn prepare_request_builder() -> ListLocations {
4590    ///   # panic!();
4591    ///   // ... details omitted ...
4592    /// }
4593    /// ```
4594    #[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        /// Sets the full request, replacing any prior values.
4603        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        /// Sets all the options, replacing any prior values.
4612        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        /// Sends the request.
4618        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        /// Streams each page in the collection.
4626        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        /// Streams each item in the collection.
4641        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        /// Sets the value of [name][location::model::ListLocationsRequest::name].
4650        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        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
4656        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        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
4662        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        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
4668        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    /// The request builder for [Dataform::get_location][crate::client::Dataform::get_location] calls.
4682    ///
4683    /// # Example
4684    /// ```
4685    /// # use google_cloud_dataform_v1::builder::dataform::GetLocation;
4686    /// # async fn sample() -> gax::Result<()> {
4687    ///
4688    /// let builder = prepare_request_builder();
4689    /// let response = builder.send().await?;
4690    /// # Ok(()) }
4691    ///
4692    /// fn prepare_request_builder() -> GetLocation {
4693    ///   # panic!();
4694    ///   // ... details omitted ...
4695    /// }
4696    /// ```
4697    #[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        /// Sets the full request, replacing any prior values.
4706        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        /// Sets all the options, replacing any prior values.
4712        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        /// Sends the request.
4718        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        /// Sets the value of [name][location::model::GetLocationRequest::name].
4726        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    /// The request builder for [Dataform::set_iam_policy][crate::client::Dataform::set_iam_policy] calls.
4740    ///
4741    /// # Example
4742    /// ```
4743    /// # use google_cloud_dataform_v1::builder::dataform::SetIamPolicy;
4744    /// # async fn sample() -> gax::Result<()> {
4745    ///
4746    /// let builder = prepare_request_builder();
4747    /// let response = builder.send().await?;
4748    /// # Ok(()) }
4749    ///
4750    /// fn prepare_request_builder() -> SetIamPolicy {
4751    ///   # panic!();
4752    ///   // ... details omitted ...
4753    /// }
4754    /// ```
4755    #[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        /// Sets the full request, replacing any prior values.
4764        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        /// Sets all the options, replacing any prior values.
4770        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        /// Sends the request.
4776        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        /// Sets the value of [resource][iam_v1::model::SetIamPolicyRequest::resource].
4784        ///
4785        /// This is a **required** field for requests.
4786        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        /// Sets the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
4792        ///
4793        /// This is a **required** field for requests.
4794        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        /// Sets or clears the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
4803        ///
4804        /// This is a **required** field for requests.
4805        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        /// Sets the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
4814        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        /// Sets or clears the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
4823        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    /// The request builder for [Dataform::get_iam_policy][crate::client::Dataform::get_iam_policy] calls.
4840    ///
4841    /// # Example
4842    /// ```
4843    /// # use google_cloud_dataform_v1::builder::dataform::GetIamPolicy;
4844    /// # async fn sample() -> gax::Result<()> {
4845    ///
4846    /// let builder = prepare_request_builder();
4847    /// let response = builder.send().await?;
4848    /// # Ok(()) }
4849    ///
4850    /// fn prepare_request_builder() -> GetIamPolicy {
4851    ///   # panic!();
4852    ///   // ... details omitted ...
4853    /// }
4854    /// ```
4855    #[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        /// Sets the full request, replacing any prior values.
4864        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        /// Sets all the options, replacing any prior values.
4870        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        /// Sends the request.
4876        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        /// Sets the value of [resource][iam_v1::model::GetIamPolicyRequest::resource].
4884        ///
4885        /// This is a **required** field for requests.
4886        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        /// Sets the value of [options][iam_v1::model::GetIamPolicyRequest::options].
4892        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        /// Sets or clears the value of [options][iam_v1::model::GetIamPolicyRequest::options].
4901        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    /// The request builder for [Dataform::test_iam_permissions][crate::client::Dataform::test_iam_permissions] calls.
4918    ///
4919    /// # Example
4920    /// ```
4921    /// # use google_cloud_dataform_v1::builder::dataform::TestIamPermissions;
4922    /// # async fn sample() -> gax::Result<()> {
4923    ///
4924    /// let builder = prepare_request_builder();
4925    /// let response = builder.send().await?;
4926    /// # Ok(()) }
4927    ///
4928    /// fn prepare_request_builder() -> TestIamPermissions {
4929    ///   # panic!();
4930    ///   // ... details omitted ...
4931    /// }
4932    /// ```
4933    #[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        /// Sets the full request, replacing any prior values.
4942        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        /// Sets all the options, replacing any prior values.
4951        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        /// Sends the request.
4957        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        /// Sets the value of [resource][iam_v1::model::TestIamPermissionsRequest::resource].
4965        ///
4966        /// This is a **required** field for requests.
4967        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        /// Sets the value of [permissions][iam_v1::model::TestIamPermissionsRequest::permissions].
4973        ///
4974        /// This is a **required** field for requests.
4975        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}