google_cloud_dataplex_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 business_glossary_service {
18    use crate::Result;
19
20    /// A builder for [BusinessGlossaryService][crate::client::BusinessGlossaryService].
21    ///
22    /// ```
23    /// # tokio_test::block_on(async {
24    /// # use google_cloud_dataplex_v1::*;
25    /// # use builder::business_glossary_service::ClientBuilder;
26    /// # use client::BusinessGlossaryService;
27    /// let builder : ClientBuilder = BusinessGlossaryService::builder();
28    /// let client = builder
29    ///     .with_endpoint("https://dataplex.googleapis.com")
30    ///     .build().await?;
31    /// # gax::client_builder::Result::<()>::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::BusinessGlossaryService;
38        pub struct Factory;
39        impl gax::client_builder::internal::ClientFactory for Factory {
40            type Client = BusinessGlossaryService;
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::BusinessGlossaryService] 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::BusinessGlossaryService>,
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(
64            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
65        ) -> Self {
66            Self {
67                stub,
68                request: R::default(),
69                options: gax::options::RequestOptions::default(),
70            }
71        }
72    }
73
74    /// The request builder for [BusinessGlossaryService::create_glossary][crate::client::BusinessGlossaryService::create_glossary] calls.
75    ///
76    /// # Example
77    /// ```no_run
78    /// # use google_cloud_dataplex_v1::builder;
79    /// use builder::business_glossary_service::CreateGlossary;
80    /// # tokio_test::block_on(async {
81    /// use lro::Poller;
82    ///
83    /// let builder = prepare_request_builder();
84    /// let response = builder.poller().until_done().await?;
85    /// # gax::Result::<()>::Ok(()) });
86    ///
87    /// fn prepare_request_builder() -> CreateGlossary {
88    ///   # panic!();
89    ///   // ... details omitted ...
90    /// }
91    /// ```
92    #[derive(Clone, Debug)]
93    pub struct CreateGlossary(RequestBuilder<crate::model::CreateGlossaryRequest>);
94
95    impl CreateGlossary {
96        pub(crate) fn new(
97            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
98        ) -> Self {
99            Self(RequestBuilder::new(stub))
100        }
101
102        /// Sets the full request, replacing any prior values.
103        pub fn with_request<V: Into<crate::model::CreateGlossaryRequest>>(mut self, v: V) -> Self {
104            self.0.request = v.into();
105            self
106        }
107
108        /// Sets all the options, replacing any prior values.
109        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
110            self.0.options = v.into();
111            self
112        }
113
114        /// Sends the request.
115        ///
116        /// # Long running operations
117        ///
118        /// This starts, but does not poll, a longrunning operation. More information
119        /// on [create_glossary][crate::client::BusinessGlossaryService::create_glossary].
120        pub async fn send(self) -> Result<longrunning::model::Operation> {
121            (*self.0.stub)
122                .create_glossary(self.0.request, self.0.options)
123                .await
124                .map(gax::response::Response::into_body)
125        }
126
127        /// Creates a [Poller][lro::Poller] to work with `create_glossary`.
128        pub fn poller(
129            self,
130        ) -> impl lro::Poller<crate::model::Glossary, crate::model::OperationMetadata> {
131            type Operation =
132                lro::internal::Operation<crate::model::Glossary, crate::model::OperationMetadata>;
133            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
134            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
135
136            let stub = self.0.stub.clone();
137            let mut options = self.0.options.clone();
138            options.set_retry_policy(gax::retry_policy::NeverRetry);
139            let query = move |name| {
140                let stub = stub.clone();
141                let options = options.clone();
142                async {
143                    let op = GetOperation::new(stub)
144                        .set_name(name)
145                        .with_options(options)
146                        .send()
147                        .await?;
148                    Ok(Operation::new(op))
149                }
150            };
151
152            let start = move || async {
153                let op = self.send().await?;
154                Ok(Operation::new(op))
155            };
156
157            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
158        }
159
160        /// Sets the value of [parent][crate::model::CreateGlossaryRequest::parent].
161        ///
162        /// This is a **required** field for requests.
163        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
164            self.0.request.parent = v.into();
165            self
166        }
167
168        /// Sets the value of [glossary_id][crate::model::CreateGlossaryRequest::glossary_id].
169        ///
170        /// This is a **required** field for requests.
171        pub fn set_glossary_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
172            self.0.request.glossary_id = v.into();
173            self
174        }
175
176        /// Sets the value of [glossary][crate::model::CreateGlossaryRequest::glossary].
177        ///
178        /// This is a **required** field for requests.
179        pub fn set_glossary<T>(mut self, v: T) -> Self
180        where
181            T: std::convert::Into<crate::model::Glossary>,
182        {
183            self.0.request.glossary = std::option::Option::Some(v.into());
184            self
185        }
186
187        /// Sets or clears the value of [glossary][crate::model::CreateGlossaryRequest::glossary].
188        ///
189        /// This is a **required** field for requests.
190        pub fn set_or_clear_glossary<T>(mut self, v: std::option::Option<T>) -> Self
191        where
192            T: std::convert::Into<crate::model::Glossary>,
193        {
194            self.0.request.glossary = v.map(|x| x.into());
195            self
196        }
197
198        /// Sets the value of [validate_only][crate::model::CreateGlossaryRequest::validate_only].
199        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
200            self.0.request.validate_only = v.into();
201            self
202        }
203    }
204
205    #[doc(hidden)]
206    impl gax::options::internal::RequestBuilder for CreateGlossary {
207        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
208            &mut self.0.options
209        }
210    }
211
212    /// The request builder for [BusinessGlossaryService::update_glossary][crate::client::BusinessGlossaryService::update_glossary] calls.
213    ///
214    /// # Example
215    /// ```no_run
216    /// # use google_cloud_dataplex_v1::builder;
217    /// use builder::business_glossary_service::UpdateGlossary;
218    /// # tokio_test::block_on(async {
219    /// use lro::Poller;
220    ///
221    /// let builder = prepare_request_builder();
222    /// let response = builder.poller().until_done().await?;
223    /// # gax::Result::<()>::Ok(()) });
224    ///
225    /// fn prepare_request_builder() -> UpdateGlossary {
226    ///   # panic!();
227    ///   // ... details omitted ...
228    /// }
229    /// ```
230    #[derive(Clone, Debug)]
231    pub struct UpdateGlossary(RequestBuilder<crate::model::UpdateGlossaryRequest>);
232
233    impl UpdateGlossary {
234        pub(crate) fn new(
235            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
236        ) -> Self {
237            Self(RequestBuilder::new(stub))
238        }
239
240        /// Sets the full request, replacing any prior values.
241        pub fn with_request<V: Into<crate::model::UpdateGlossaryRequest>>(mut self, v: V) -> Self {
242            self.0.request = v.into();
243            self
244        }
245
246        /// Sets all the options, replacing any prior values.
247        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
248            self.0.options = v.into();
249            self
250        }
251
252        /// Sends the request.
253        ///
254        /// # Long running operations
255        ///
256        /// This starts, but does not poll, a longrunning operation. More information
257        /// on [update_glossary][crate::client::BusinessGlossaryService::update_glossary].
258        pub async fn send(self) -> Result<longrunning::model::Operation> {
259            (*self.0.stub)
260                .update_glossary(self.0.request, self.0.options)
261                .await
262                .map(gax::response::Response::into_body)
263        }
264
265        /// Creates a [Poller][lro::Poller] to work with `update_glossary`.
266        pub fn poller(
267            self,
268        ) -> impl lro::Poller<crate::model::Glossary, crate::model::OperationMetadata> {
269            type Operation =
270                lro::internal::Operation<crate::model::Glossary, crate::model::OperationMetadata>;
271            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
272            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
273
274            let stub = self.0.stub.clone();
275            let mut options = self.0.options.clone();
276            options.set_retry_policy(gax::retry_policy::NeverRetry);
277            let query = move |name| {
278                let stub = stub.clone();
279                let options = options.clone();
280                async {
281                    let op = GetOperation::new(stub)
282                        .set_name(name)
283                        .with_options(options)
284                        .send()
285                        .await?;
286                    Ok(Operation::new(op))
287                }
288            };
289
290            let start = move || async {
291                let op = self.send().await?;
292                Ok(Operation::new(op))
293            };
294
295            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
296        }
297
298        /// Sets the value of [glossary][crate::model::UpdateGlossaryRequest::glossary].
299        ///
300        /// This is a **required** field for requests.
301        pub fn set_glossary<T>(mut self, v: T) -> Self
302        where
303            T: std::convert::Into<crate::model::Glossary>,
304        {
305            self.0.request.glossary = std::option::Option::Some(v.into());
306            self
307        }
308
309        /// Sets or clears the value of [glossary][crate::model::UpdateGlossaryRequest::glossary].
310        ///
311        /// This is a **required** field for requests.
312        pub fn set_or_clear_glossary<T>(mut self, v: std::option::Option<T>) -> Self
313        where
314            T: std::convert::Into<crate::model::Glossary>,
315        {
316            self.0.request.glossary = v.map(|x| x.into());
317            self
318        }
319
320        /// Sets the value of [update_mask][crate::model::UpdateGlossaryRequest::update_mask].
321        ///
322        /// This is a **required** field for requests.
323        pub fn set_update_mask<T>(mut self, v: T) -> Self
324        where
325            T: std::convert::Into<wkt::FieldMask>,
326        {
327            self.0.request.update_mask = std::option::Option::Some(v.into());
328            self
329        }
330
331        /// Sets or clears the value of [update_mask][crate::model::UpdateGlossaryRequest::update_mask].
332        ///
333        /// This is a **required** field for requests.
334        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
335        where
336            T: std::convert::Into<wkt::FieldMask>,
337        {
338            self.0.request.update_mask = v.map(|x| x.into());
339            self
340        }
341
342        /// Sets the value of [validate_only][crate::model::UpdateGlossaryRequest::validate_only].
343        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
344            self.0.request.validate_only = v.into();
345            self
346        }
347    }
348
349    #[doc(hidden)]
350    impl gax::options::internal::RequestBuilder for UpdateGlossary {
351        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
352            &mut self.0.options
353        }
354    }
355
356    /// The request builder for [BusinessGlossaryService::delete_glossary][crate::client::BusinessGlossaryService::delete_glossary] calls.
357    ///
358    /// # Example
359    /// ```no_run
360    /// # use google_cloud_dataplex_v1::builder;
361    /// use builder::business_glossary_service::DeleteGlossary;
362    /// # tokio_test::block_on(async {
363    /// use lro::Poller;
364    ///
365    /// let builder = prepare_request_builder();
366    /// let response = builder.poller().until_done().await?;
367    /// # gax::Result::<()>::Ok(()) });
368    ///
369    /// fn prepare_request_builder() -> DeleteGlossary {
370    ///   # panic!();
371    ///   // ... details omitted ...
372    /// }
373    /// ```
374    #[derive(Clone, Debug)]
375    pub struct DeleteGlossary(RequestBuilder<crate::model::DeleteGlossaryRequest>);
376
377    impl DeleteGlossary {
378        pub(crate) fn new(
379            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
380        ) -> Self {
381            Self(RequestBuilder::new(stub))
382        }
383
384        /// Sets the full request, replacing any prior values.
385        pub fn with_request<V: Into<crate::model::DeleteGlossaryRequest>>(mut self, v: V) -> Self {
386            self.0.request = v.into();
387            self
388        }
389
390        /// Sets all the options, replacing any prior values.
391        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
392            self.0.options = v.into();
393            self
394        }
395
396        /// Sends the request.
397        ///
398        /// # Long running operations
399        ///
400        /// This starts, but does not poll, a longrunning operation. More information
401        /// on [delete_glossary][crate::client::BusinessGlossaryService::delete_glossary].
402        pub async fn send(self) -> Result<longrunning::model::Operation> {
403            (*self.0.stub)
404                .delete_glossary(self.0.request, self.0.options)
405                .await
406                .map(gax::response::Response::into_body)
407        }
408
409        /// Creates a [Poller][lro::Poller] to work with `delete_glossary`.
410        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
411            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
412            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
413            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
414
415            let stub = self.0.stub.clone();
416            let mut options = self.0.options.clone();
417            options.set_retry_policy(gax::retry_policy::NeverRetry);
418            let query = move |name| {
419                let stub = stub.clone();
420                let options = options.clone();
421                async {
422                    let op = GetOperation::new(stub)
423                        .set_name(name)
424                        .with_options(options)
425                        .send()
426                        .await?;
427                    Ok(Operation::new(op))
428                }
429            };
430
431            let start = move || async {
432                let op = self.send().await?;
433                Ok(Operation::new(op))
434            };
435
436            lro::internal::new_unit_response_poller(
437                polling_error_policy,
438                polling_backoff_policy,
439                start,
440                query,
441            )
442        }
443
444        /// Sets the value of [name][crate::model::DeleteGlossaryRequest::name].
445        ///
446        /// This is a **required** field for requests.
447        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
448            self.0.request.name = v.into();
449            self
450        }
451
452        /// Sets the value of [etag][crate::model::DeleteGlossaryRequest::etag].
453        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
454            self.0.request.etag = v.into();
455            self
456        }
457    }
458
459    #[doc(hidden)]
460    impl gax::options::internal::RequestBuilder for DeleteGlossary {
461        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
462            &mut self.0.options
463        }
464    }
465
466    /// The request builder for [BusinessGlossaryService::get_glossary][crate::client::BusinessGlossaryService::get_glossary] calls.
467    ///
468    /// # Example
469    /// ```no_run
470    /// # use google_cloud_dataplex_v1::builder;
471    /// use builder::business_glossary_service::GetGlossary;
472    /// # tokio_test::block_on(async {
473    ///
474    /// let builder = prepare_request_builder();
475    /// let response = builder.send().await?;
476    /// # gax::Result::<()>::Ok(()) });
477    ///
478    /// fn prepare_request_builder() -> GetGlossary {
479    ///   # panic!();
480    ///   // ... details omitted ...
481    /// }
482    /// ```
483    #[derive(Clone, Debug)]
484    pub struct GetGlossary(RequestBuilder<crate::model::GetGlossaryRequest>);
485
486    impl GetGlossary {
487        pub(crate) fn new(
488            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
489        ) -> Self {
490            Self(RequestBuilder::new(stub))
491        }
492
493        /// Sets the full request, replacing any prior values.
494        pub fn with_request<V: Into<crate::model::GetGlossaryRequest>>(mut self, v: V) -> Self {
495            self.0.request = v.into();
496            self
497        }
498
499        /// Sets all the options, replacing any prior values.
500        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
501            self.0.options = v.into();
502            self
503        }
504
505        /// Sends the request.
506        pub async fn send(self) -> Result<crate::model::Glossary> {
507            (*self.0.stub)
508                .get_glossary(self.0.request, self.0.options)
509                .await
510                .map(gax::response::Response::into_body)
511        }
512
513        /// Sets the value of [name][crate::model::GetGlossaryRequest::name].
514        ///
515        /// This is a **required** field for requests.
516        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
517            self.0.request.name = v.into();
518            self
519        }
520    }
521
522    #[doc(hidden)]
523    impl gax::options::internal::RequestBuilder for GetGlossary {
524        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
525            &mut self.0.options
526        }
527    }
528
529    /// The request builder for [BusinessGlossaryService::list_glossaries][crate::client::BusinessGlossaryService::list_glossaries] calls.
530    ///
531    /// # Example
532    /// ```no_run
533    /// # use google_cloud_dataplex_v1::builder;
534    /// use builder::business_glossary_service::ListGlossaries;
535    /// # tokio_test::block_on(async {
536    /// use gax::paginator::ItemPaginator;
537    ///
538    /// let builder = prepare_request_builder();
539    /// let mut items = builder.by_item();
540    /// while let Some(result) = items.next().await {
541    ///   let item = result?;
542    /// }
543    /// # gax::Result::<()>::Ok(()) });
544    ///
545    /// fn prepare_request_builder() -> ListGlossaries {
546    ///   # panic!();
547    ///   // ... details omitted ...
548    /// }
549    /// ```
550    #[derive(Clone, Debug)]
551    pub struct ListGlossaries(RequestBuilder<crate::model::ListGlossariesRequest>);
552
553    impl ListGlossaries {
554        pub(crate) fn new(
555            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
556        ) -> Self {
557            Self(RequestBuilder::new(stub))
558        }
559
560        /// Sets the full request, replacing any prior values.
561        pub fn with_request<V: Into<crate::model::ListGlossariesRequest>>(mut self, v: V) -> Self {
562            self.0.request = v.into();
563            self
564        }
565
566        /// Sets all the options, replacing any prior values.
567        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
568            self.0.options = v.into();
569            self
570        }
571
572        /// Sends the request.
573        pub async fn send(self) -> Result<crate::model::ListGlossariesResponse> {
574            (*self.0.stub)
575                .list_glossaries(self.0.request, self.0.options)
576                .await
577                .map(gax::response::Response::into_body)
578        }
579
580        /// Streams each page in the collection.
581        pub fn by_page(
582            self,
583        ) -> impl gax::paginator::Paginator<crate::model::ListGlossariesResponse, gax::error::Error>
584        {
585            use std::clone::Clone;
586            let token = self.0.request.page_token.clone();
587            let execute = move |token: String| {
588                let mut builder = self.clone();
589                builder.0.request = builder.0.request.set_page_token(token);
590                builder.send()
591            };
592            gax::paginator::internal::new_paginator(token, execute)
593        }
594
595        /// Streams each item in the collection.
596        pub fn by_item(
597            self,
598        ) -> impl gax::paginator::ItemPaginator<crate::model::ListGlossariesResponse, gax::error::Error>
599        {
600            use gax::paginator::Paginator;
601            self.by_page().items()
602        }
603
604        /// Sets the value of [parent][crate::model::ListGlossariesRequest::parent].
605        ///
606        /// This is a **required** field for requests.
607        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
608            self.0.request.parent = v.into();
609            self
610        }
611
612        /// Sets the value of [page_size][crate::model::ListGlossariesRequest::page_size].
613        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
614            self.0.request.page_size = v.into();
615            self
616        }
617
618        /// Sets the value of [page_token][crate::model::ListGlossariesRequest::page_token].
619        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
620            self.0.request.page_token = v.into();
621            self
622        }
623
624        /// Sets the value of [filter][crate::model::ListGlossariesRequest::filter].
625        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
626            self.0.request.filter = v.into();
627            self
628        }
629
630        /// Sets the value of [order_by][crate::model::ListGlossariesRequest::order_by].
631        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
632            self.0.request.order_by = v.into();
633            self
634        }
635    }
636
637    #[doc(hidden)]
638    impl gax::options::internal::RequestBuilder for ListGlossaries {
639        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
640            &mut self.0.options
641        }
642    }
643
644    /// The request builder for [BusinessGlossaryService::create_glossary_category][crate::client::BusinessGlossaryService::create_glossary_category] calls.
645    ///
646    /// # Example
647    /// ```no_run
648    /// # use google_cloud_dataplex_v1::builder;
649    /// use builder::business_glossary_service::CreateGlossaryCategory;
650    /// # tokio_test::block_on(async {
651    ///
652    /// let builder = prepare_request_builder();
653    /// let response = builder.send().await?;
654    /// # gax::Result::<()>::Ok(()) });
655    ///
656    /// fn prepare_request_builder() -> CreateGlossaryCategory {
657    ///   # panic!();
658    ///   // ... details omitted ...
659    /// }
660    /// ```
661    #[derive(Clone, Debug)]
662    pub struct CreateGlossaryCategory(RequestBuilder<crate::model::CreateGlossaryCategoryRequest>);
663
664    impl CreateGlossaryCategory {
665        pub(crate) fn new(
666            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
667        ) -> Self {
668            Self(RequestBuilder::new(stub))
669        }
670
671        /// Sets the full request, replacing any prior values.
672        pub fn with_request<V: Into<crate::model::CreateGlossaryCategoryRequest>>(
673            mut self,
674            v: V,
675        ) -> Self {
676            self.0.request = v.into();
677            self
678        }
679
680        /// Sets all the options, replacing any prior values.
681        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
682            self.0.options = v.into();
683            self
684        }
685
686        /// Sends the request.
687        pub async fn send(self) -> Result<crate::model::GlossaryCategory> {
688            (*self.0.stub)
689                .create_glossary_category(self.0.request, self.0.options)
690                .await
691                .map(gax::response::Response::into_body)
692        }
693
694        /// Sets the value of [parent][crate::model::CreateGlossaryCategoryRequest::parent].
695        ///
696        /// This is a **required** field for requests.
697        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
698            self.0.request.parent = v.into();
699            self
700        }
701
702        /// Sets the value of [category_id][crate::model::CreateGlossaryCategoryRequest::category_id].
703        ///
704        /// This is a **required** field for requests.
705        pub fn set_category_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
706            self.0.request.category_id = v.into();
707            self
708        }
709
710        /// Sets the value of [category][crate::model::CreateGlossaryCategoryRequest::category].
711        ///
712        /// This is a **required** field for requests.
713        pub fn set_category<T>(mut self, v: T) -> Self
714        where
715            T: std::convert::Into<crate::model::GlossaryCategory>,
716        {
717            self.0.request.category = std::option::Option::Some(v.into());
718            self
719        }
720
721        /// Sets or clears the value of [category][crate::model::CreateGlossaryCategoryRequest::category].
722        ///
723        /// This is a **required** field for requests.
724        pub fn set_or_clear_category<T>(mut self, v: std::option::Option<T>) -> Self
725        where
726            T: std::convert::Into<crate::model::GlossaryCategory>,
727        {
728            self.0.request.category = v.map(|x| x.into());
729            self
730        }
731    }
732
733    #[doc(hidden)]
734    impl gax::options::internal::RequestBuilder for CreateGlossaryCategory {
735        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
736            &mut self.0.options
737        }
738    }
739
740    /// The request builder for [BusinessGlossaryService::update_glossary_category][crate::client::BusinessGlossaryService::update_glossary_category] calls.
741    ///
742    /// # Example
743    /// ```no_run
744    /// # use google_cloud_dataplex_v1::builder;
745    /// use builder::business_glossary_service::UpdateGlossaryCategory;
746    /// # tokio_test::block_on(async {
747    ///
748    /// let builder = prepare_request_builder();
749    /// let response = builder.send().await?;
750    /// # gax::Result::<()>::Ok(()) });
751    ///
752    /// fn prepare_request_builder() -> UpdateGlossaryCategory {
753    ///   # panic!();
754    ///   // ... details omitted ...
755    /// }
756    /// ```
757    #[derive(Clone, Debug)]
758    pub struct UpdateGlossaryCategory(RequestBuilder<crate::model::UpdateGlossaryCategoryRequest>);
759
760    impl UpdateGlossaryCategory {
761        pub(crate) fn new(
762            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
763        ) -> Self {
764            Self(RequestBuilder::new(stub))
765        }
766
767        /// Sets the full request, replacing any prior values.
768        pub fn with_request<V: Into<crate::model::UpdateGlossaryCategoryRequest>>(
769            mut self,
770            v: V,
771        ) -> Self {
772            self.0.request = v.into();
773            self
774        }
775
776        /// Sets all the options, replacing any prior values.
777        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
778            self.0.options = v.into();
779            self
780        }
781
782        /// Sends the request.
783        pub async fn send(self) -> Result<crate::model::GlossaryCategory> {
784            (*self.0.stub)
785                .update_glossary_category(self.0.request, self.0.options)
786                .await
787                .map(gax::response::Response::into_body)
788        }
789
790        /// Sets the value of [category][crate::model::UpdateGlossaryCategoryRequest::category].
791        ///
792        /// This is a **required** field for requests.
793        pub fn set_category<T>(mut self, v: T) -> Self
794        where
795            T: std::convert::Into<crate::model::GlossaryCategory>,
796        {
797            self.0.request.category = std::option::Option::Some(v.into());
798            self
799        }
800
801        /// Sets or clears the value of [category][crate::model::UpdateGlossaryCategoryRequest::category].
802        ///
803        /// This is a **required** field for requests.
804        pub fn set_or_clear_category<T>(mut self, v: std::option::Option<T>) -> Self
805        where
806            T: std::convert::Into<crate::model::GlossaryCategory>,
807        {
808            self.0.request.category = v.map(|x| x.into());
809            self
810        }
811
812        /// Sets the value of [update_mask][crate::model::UpdateGlossaryCategoryRequest::update_mask].
813        ///
814        /// This is a **required** field for requests.
815        pub fn set_update_mask<T>(mut self, v: T) -> Self
816        where
817            T: std::convert::Into<wkt::FieldMask>,
818        {
819            self.0.request.update_mask = std::option::Option::Some(v.into());
820            self
821        }
822
823        /// Sets or clears the value of [update_mask][crate::model::UpdateGlossaryCategoryRequest::update_mask].
824        ///
825        /// This is a **required** field for requests.
826        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
827        where
828            T: std::convert::Into<wkt::FieldMask>,
829        {
830            self.0.request.update_mask = v.map(|x| x.into());
831            self
832        }
833    }
834
835    #[doc(hidden)]
836    impl gax::options::internal::RequestBuilder for UpdateGlossaryCategory {
837        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
838            &mut self.0.options
839        }
840    }
841
842    /// The request builder for [BusinessGlossaryService::delete_glossary_category][crate::client::BusinessGlossaryService::delete_glossary_category] calls.
843    ///
844    /// # Example
845    /// ```no_run
846    /// # use google_cloud_dataplex_v1::builder;
847    /// use builder::business_glossary_service::DeleteGlossaryCategory;
848    /// # tokio_test::block_on(async {
849    ///
850    /// let builder = prepare_request_builder();
851    /// let response = builder.send().await?;
852    /// # gax::Result::<()>::Ok(()) });
853    ///
854    /// fn prepare_request_builder() -> DeleteGlossaryCategory {
855    ///   # panic!();
856    ///   // ... details omitted ...
857    /// }
858    /// ```
859    #[derive(Clone, Debug)]
860    pub struct DeleteGlossaryCategory(RequestBuilder<crate::model::DeleteGlossaryCategoryRequest>);
861
862    impl DeleteGlossaryCategory {
863        pub(crate) fn new(
864            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
865        ) -> Self {
866            Self(RequestBuilder::new(stub))
867        }
868
869        /// Sets the full request, replacing any prior values.
870        pub fn with_request<V: Into<crate::model::DeleteGlossaryCategoryRequest>>(
871            mut self,
872            v: V,
873        ) -> Self {
874            self.0.request = v.into();
875            self
876        }
877
878        /// Sets all the options, replacing any prior values.
879        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
880            self.0.options = v.into();
881            self
882        }
883
884        /// Sends the request.
885        pub async fn send(self) -> Result<()> {
886            (*self.0.stub)
887                .delete_glossary_category(self.0.request, self.0.options)
888                .await
889                .map(gax::response::Response::into_body)
890        }
891
892        /// Sets the value of [name][crate::model::DeleteGlossaryCategoryRequest::name].
893        ///
894        /// This is a **required** field for requests.
895        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
896            self.0.request.name = v.into();
897            self
898        }
899    }
900
901    #[doc(hidden)]
902    impl gax::options::internal::RequestBuilder for DeleteGlossaryCategory {
903        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
904            &mut self.0.options
905        }
906    }
907
908    /// The request builder for [BusinessGlossaryService::get_glossary_category][crate::client::BusinessGlossaryService::get_glossary_category] calls.
909    ///
910    /// # Example
911    /// ```no_run
912    /// # use google_cloud_dataplex_v1::builder;
913    /// use builder::business_glossary_service::GetGlossaryCategory;
914    /// # tokio_test::block_on(async {
915    ///
916    /// let builder = prepare_request_builder();
917    /// let response = builder.send().await?;
918    /// # gax::Result::<()>::Ok(()) });
919    ///
920    /// fn prepare_request_builder() -> GetGlossaryCategory {
921    ///   # panic!();
922    ///   // ... details omitted ...
923    /// }
924    /// ```
925    #[derive(Clone, Debug)]
926    pub struct GetGlossaryCategory(RequestBuilder<crate::model::GetGlossaryCategoryRequest>);
927
928    impl GetGlossaryCategory {
929        pub(crate) fn new(
930            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
931        ) -> Self {
932            Self(RequestBuilder::new(stub))
933        }
934
935        /// Sets the full request, replacing any prior values.
936        pub fn with_request<V: Into<crate::model::GetGlossaryCategoryRequest>>(
937            mut self,
938            v: V,
939        ) -> Self {
940            self.0.request = v.into();
941            self
942        }
943
944        /// Sets all the options, replacing any prior values.
945        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
946            self.0.options = v.into();
947            self
948        }
949
950        /// Sends the request.
951        pub async fn send(self) -> Result<crate::model::GlossaryCategory> {
952            (*self.0.stub)
953                .get_glossary_category(self.0.request, self.0.options)
954                .await
955                .map(gax::response::Response::into_body)
956        }
957
958        /// Sets the value of [name][crate::model::GetGlossaryCategoryRequest::name].
959        ///
960        /// This is a **required** field for requests.
961        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
962            self.0.request.name = v.into();
963            self
964        }
965    }
966
967    #[doc(hidden)]
968    impl gax::options::internal::RequestBuilder for GetGlossaryCategory {
969        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
970            &mut self.0.options
971        }
972    }
973
974    /// The request builder for [BusinessGlossaryService::list_glossary_categories][crate::client::BusinessGlossaryService::list_glossary_categories] calls.
975    ///
976    /// # Example
977    /// ```no_run
978    /// # use google_cloud_dataplex_v1::builder;
979    /// use builder::business_glossary_service::ListGlossaryCategories;
980    /// # tokio_test::block_on(async {
981    /// use gax::paginator::ItemPaginator;
982    ///
983    /// let builder = prepare_request_builder();
984    /// let mut items = builder.by_item();
985    /// while let Some(result) = items.next().await {
986    ///   let item = result?;
987    /// }
988    /// # gax::Result::<()>::Ok(()) });
989    ///
990    /// fn prepare_request_builder() -> ListGlossaryCategories {
991    ///   # panic!();
992    ///   // ... details omitted ...
993    /// }
994    /// ```
995    #[derive(Clone, Debug)]
996    pub struct ListGlossaryCategories(RequestBuilder<crate::model::ListGlossaryCategoriesRequest>);
997
998    impl ListGlossaryCategories {
999        pub(crate) fn new(
1000            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1001        ) -> 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::ListGlossaryCategoriesRequest>>(
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::ListGlossaryCategoriesResponse> {
1022            (*self.0.stub)
1023                .list_glossary_categories(self.0.request, self.0.options)
1024                .await
1025                .map(gax::response::Response::into_body)
1026        }
1027
1028        /// Streams each page in the collection.
1029        pub fn by_page(
1030            self,
1031        ) -> impl gax::paginator::Paginator<
1032            crate::model::ListGlossaryCategoriesResponse,
1033            gax::error::Error,
1034        > {
1035            use std::clone::Clone;
1036            let token = self.0.request.page_token.clone();
1037            let execute = move |token: String| {
1038                let mut builder = self.clone();
1039                builder.0.request = builder.0.request.set_page_token(token);
1040                builder.send()
1041            };
1042            gax::paginator::internal::new_paginator(token, execute)
1043        }
1044
1045        /// Streams each item in the collection.
1046        pub fn by_item(
1047            self,
1048        ) -> impl gax::paginator::ItemPaginator<
1049            crate::model::ListGlossaryCategoriesResponse,
1050            gax::error::Error,
1051        > {
1052            use gax::paginator::Paginator;
1053            self.by_page().items()
1054        }
1055
1056        /// Sets the value of [parent][crate::model::ListGlossaryCategoriesRequest::parent].
1057        ///
1058        /// This is a **required** field for requests.
1059        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1060            self.0.request.parent = v.into();
1061            self
1062        }
1063
1064        /// Sets the value of [page_size][crate::model::ListGlossaryCategoriesRequest::page_size].
1065        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1066            self.0.request.page_size = v.into();
1067            self
1068        }
1069
1070        /// Sets the value of [page_token][crate::model::ListGlossaryCategoriesRequest::page_token].
1071        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1072            self.0.request.page_token = v.into();
1073            self
1074        }
1075
1076        /// Sets the value of [filter][crate::model::ListGlossaryCategoriesRequest::filter].
1077        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1078            self.0.request.filter = v.into();
1079            self
1080        }
1081
1082        /// Sets the value of [order_by][crate::model::ListGlossaryCategoriesRequest::order_by].
1083        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1084            self.0.request.order_by = v.into();
1085            self
1086        }
1087    }
1088
1089    #[doc(hidden)]
1090    impl gax::options::internal::RequestBuilder for ListGlossaryCategories {
1091        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1092            &mut self.0.options
1093        }
1094    }
1095
1096    /// The request builder for [BusinessGlossaryService::create_glossary_term][crate::client::BusinessGlossaryService::create_glossary_term] calls.
1097    ///
1098    /// # Example
1099    /// ```no_run
1100    /// # use google_cloud_dataplex_v1::builder;
1101    /// use builder::business_glossary_service::CreateGlossaryTerm;
1102    /// # tokio_test::block_on(async {
1103    ///
1104    /// let builder = prepare_request_builder();
1105    /// let response = builder.send().await?;
1106    /// # gax::Result::<()>::Ok(()) });
1107    ///
1108    /// fn prepare_request_builder() -> CreateGlossaryTerm {
1109    ///   # panic!();
1110    ///   // ... details omitted ...
1111    /// }
1112    /// ```
1113    #[derive(Clone, Debug)]
1114    pub struct CreateGlossaryTerm(RequestBuilder<crate::model::CreateGlossaryTermRequest>);
1115
1116    impl CreateGlossaryTerm {
1117        pub(crate) fn new(
1118            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1119        ) -> Self {
1120            Self(RequestBuilder::new(stub))
1121        }
1122
1123        /// Sets the full request, replacing any prior values.
1124        pub fn with_request<V: Into<crate::model::CreateGlossaryTermRequest>>(
1125            mut self,
1126            v: V,
1127        ) -> Self {
1128            self.0.request = v.into();
1129            self
1130        }
1131
1132        /// Sets all the options, replacing any prior values.
1133        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1134            self.0.options = v.into();
1135            self
1136        }
1137
1138        /// Sends the request.
1139        pub async fn send(self) -> Result<crate::model::GlossaryTerm> {
1140            (*self.0.stub)
1141                .create_glossary_term(self.0.request, self.0.options)
1142                .await
1143                .map(gax::response::Response::into_body)
1144        }
1145
1146        /// Sets the value of [parent][crate::model::CreateGlossaryTermRequest::parent].
1147        ///
1148        /// This is a **required** field for requests.
1149        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1150            self.0.request.parent = v.into();
1151            self
1152        }
1153
1154        /// Sets the value of [term_id][crate::model::CreateGlossaryTermRequest::term_id].
1155        ///
1156        /// This is a **required** field for requests.
1157        pub fn set_term_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
1158            self.0.request.term_id = v.into();
1159            self
1160        }
1161
1162        /// Sets the value of [term][crate::model::CreateGlossaryTermRequest::term].
1163        ///
1164        /// This is a **required** field for requests.
1165        pub fn set_term<T>(mut self, v: T) -> Self
1166        where
1167            T: std::convert::Into<crate::model::GlossaryTerm>,
1168        {
1169            self.0.request.term = std::option::Option::Some(v.into());
1170            self
1171        }
1172
1173        /// Sets or clears the value of [term][crate::model::CreateGlossaryTermRequest::term].
1174        ///
1175        /// This is a **required** field for requests.
1176        pub fn set_or_clear_term<T>(mut self, v: std::option::Option<T>) -> Self
1177        where
1178            T: std::convert::Into<crate::model::GlossaryTerm>,
1179        {
1180            self.0.request.term = v.map(|x| x.into());
1181            self
1182        }
1183    }
1184
1185    #[doc(hidden)]
1186    impl gax::options::internal::RequestBuilder for CreateGlossaryTerm {
1187        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1188            &mut self.0.options
1189        }
1190    }
1191
1192    /// The request builder for [BusinessGlossaryService::update_glossary_term][crate::client::BusinessGlossaryService::update_glossary_term] calls.
1193    ///
1194    /// # Example
1195    /// ```no_run
1196    /// # use google_cloud_dataplex_v1::builder;
1197    /// use builder::business_glossary_service::UpdateGlossaryTerm;
1198    /// # tokio_test::block_on(async {
1199    ///
1200    /// let builder = prepare_request_builder();
1201    /// let response = builder.send().await?;
1202    /// # gax::Result::<()>::Ok(()) });
1203    ///
1204    /// fn prepare_request_builder() -> UpdateGlossaryTerm {
1205    ///   # panic!();
1206    ///   // ... details omitted ...
1207    /// }
1208    /// ```
1209    #[derive(Clone, Debug)]
1210    pub struct UpdateGlossaryTerm(RequestBuilder<crate::model::UpdateGlossaryTermRequest>);
1211
1212    impl UpdateGlossaryTerm {
1213        pub(crate) fn new(
1214            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1215        ) -> Self {
1216            Self(RequestBuilder::new(stub))
1217        }
1218
1219        /// Sets the full request, replacing any prior values.
1220        pub fn with_request<V: Into<crate::model::UpdateGlossaryTermRequest>>(
1221            mut self,
1222            v: V,
1223        ) -> Self {
1224            self.0.request = v.into();
1225            self
1226        }
1227
1228        /// Sets all the options, replacing any prior values.
1229        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1230            self.0.options = v.into();
1231            self
1232        }
1233
1234        /// Sends the request.
1235        pub async fn send(self) -> Result<crate::model::GlossaryTerm> {
1236            (*self.0.stub)
1237                .update_glossary_term(self.0.request, self.0.options)
1238                .await
1239                .map(gax::response::Response::into_body)
1240        }
1241
1242        /// Sets the value of [term][crate::model::UpdateGlossaryTermRequest::term].
1243        ///
1244        /// This is a **required** field for requests.
1245        pub fn set_term<T>(mut self, v: T) -> Self
1246        where
1247            T: std::convert::Into<crate::model::GlossaryTerm>,
1248        {
1249            self.0.request.term = std::option::Option::Some(v.into());
1250            self
1251        }
1252
1253        /// Sets or clears the value of [term][crate::model::UpdateGlossaryTermRequest::term].
1254        ///
1255        /// This is a **required** field for requests.
1256        pub fn set_or_clear_term<T>(mut self, v: std::option::Option<T>) -> Self
1257        where
1258            T: std::convert::Into<crate::model::GlossaryTerm>,
1259        {
1260            self.0.request.term = v.map(|x| x.into());
1261            self
1262        }
1263
1264        /// Sets the value of [update_mask][crate::model::UpdateGlossaryTermRequest::update_mask].
1265        ///
1266        /// This is a **required** field for requests.
1267        pub fn set_update_mask<T>(mut self, v: T) -> Self
1268        where
1269            T: std::convert::Into<wkt::FieldMask>,
1270        {
1271            self.0.request.update_mask = std::option::Option::Some(v.into());
1272            self
1273        }
1274
1275        /// Sets or clears the value of [update_mask][crate::model::UpdateGlossaryTermRequest::update_mask].
1276        ///
1277        /// This is a **required** field for requests.
1278        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1279        where
1280            T: std::convert::Into<wkt::FieldMask>,
1281        {
1282            self.0.request.update_mask = v.map(|x| x.into());
1283            self
1284        }
1285    }
1286
1287    #[doc(hidden)]
1288    impl gax::options::internal::RequestBuilder for UpdateGlossaryTerm {
1289        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1290            &mut self.0.options
1291        }
1292    }
1293
1294    /// The request builder for [BusinessGlossaryService::delete_glossary_term][crate::client::BusinessGlossaryService::delete_glossary_term] calls.
1295    ///
1296    /// # Example
1297    /// ```no_run
1298    /// # use google_cloud_dataplex_v1::builder;
1299    /// use builder::business_glossary_service::DeleteGlossaryTerm;
1300    /// # tokio_test::block_on(async {
1301    ///
1302    /// let builder = prepare_request_builder();
1303    /// let response = builder.send().await?;
1304    /// # gax::Result::<()>::Ok(()) });
1305    ///
1306    /// fn prepare_request_builder() -> DeleteGlossaryTerm {
1307    ///   # panic!();
1308    ///   // ... details omitted ...
1309    /// }
1310    /// ```
1311    #[derive(Clone, Debug)]
1312    pub struct DeleteGlossaryTerm(RequestBuilder<crate::model::DeleteGlossaryTermRequest>);
1313
1314    impl DeleteGlossaryTerm {
1315        pub(crate) fn new(
1316            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1317        ) -> Self {
1318            Self(RequestBuilder::new(stub))
1319        }
1320
1321        /// Sets the full request, replacing any prior values.
1322        pub fn with_request<V: Into<crate::model::DeleteGlossaryTermRequest>>(
1323            mut self,
1324            v: V,
1325        ) -> Self {
1326            self.0.request = v.into();
1327            self
1328        }
1329
1330        /// Sets all the options, replacing any prior values.
1331        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1332            self.0.options = v.into();
1333            self
1334        }
1335
1336        /// Sends the request.
1337        pub async fn send(self) -> Result<()> {
1338            (*self.0.stub)
1339                .delete_glossary_term(self.0.request, self.0.options)
1340                .await
1341                .map(gax::response::Response::into_body)
1342        }
1343
1344        /// Sets the value of [name][crate::model::DeleteGlossaryTermRequest::name].
1345        ///
1346        /// This is a **required** field for requests.
1347        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1348            self.0.request.name = v.into();
1349            self
1350        }
1351    }
1352
1353    #[doc(hidden)]
1354    impl gax::options::internal::RequestBuilder for DeleteGlossaryTerm {
1355        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1356            &mut self.0.options
1357        }
1358    }
1359
1360    /// The request builder for [BusinessGlossaryService::get_glossary_term][crate::client::BusinessGlossaryService::get_glossary_term] calls.
1361    ///
1362    /// # Example
1363    /// ```no_run
1364    /// # use google_cloud_dataplex_v1::builder;
1365    /// use builder::business_glossary_service::GetGlossaryTerm;
1366    /// # tokio_test::block_on(async {
1367    ///
1368    /// let builder = prepare_request_builder();
1369    /// let response = builder.send().await?;
1370    /// # gax::Result::<()>::Ok(()) });
1371    ///
1372    /// fn prepare_request_builder() -> GetGlossaryTerm {
1373    ///   # panic!();
1374    ///   // ... details omitted ...
1375    /// }
1376    /// ```
1377    #[derive(Clone, Debug)]
1378    pub struct GetGlossaryTerm(RequestBuilder<crate::model::GetGlossaryTermRequest>);
1379
1380    impl GetGlossaryTerm {
1381        pub(crate) fn new(
1382            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1383        ) -> Self {
1384            Self(RequestBuilder::new(stub))
1385        }
1386
1387        /// Sets the full request, replacing any prior values.
1388        pub fn with_request<V: Into<crate::model::GetGlossaryTermRequest>>(mut self, v: V) -> Self {
1389            self.0.request = v.into();
1390            self
1391        }
1392
1393        /// Sets all the options, replacing any prior values.
1394        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1395            self.0.options = v.into();
1396            self
1397        }
1398
1399        /// Sends the request.
1400        pub async fn send(self) -> Result<crate::model::GlossaryTerm> {
1401            (*self.0.stub)
1402                .get_glossary_term(self.0.request, self.0.options)
1403                .await
1404                .map(gax::response::Response::into_body)
1405        }
1406
1407        /// Sets the value of [name][crate::model::GetGlossaryTermRequest::name].
1408        ///
1409        /// This is a **required** field for requests.
1410        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1411            self.0.request.name = v.into();
1412            self
1413        }
1414    }
1415
1416    #[doc(hidden)]
1417    impl gax::options::internal::RequestBuilder for GetGlossaryTerm {
1418        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1419            &mut self.0.options
1420        }
1421    }
1422
1423    /// The request builder for [BusinessGlossaryService::list_glossary_terms][crate::client::BusinessGlossaryService::list_glossary_terms] calls.
1424    ///
1425    /// # Example
1426    /// ```no_run
1427    /// # use google_cloud_dataplex_v1::builder;
1428    /// use builder::business_glossary_service::ListGlossaryTerms;
1429    /// # tokio_test::block_on(async {
1430    /// use gax::paginator::ItemPaginator;
1431    ///
1432    /// let builder = prepare_request_builder();
1433    /// let mut items = builder.by_item();
1434    /// while let Some(result) = items.next().await {
1435    ///   let item = result?;
1436    /// }
1437    /// # gax::Result::<()>::Ok(()) });
1438    ///
1439    /// fn prepare_request_builder() -> ListGlossaryTerms {
1440    ///   # panic!();
1441    ///   // ... details omitted ...
1442    /// }
1443    /// ```
1444    #[derive(Clone, Debug)]
1445    pub struct ListGlossaryTerms(RequestBuilder<crate::model::ListGlossaryTermsRequest>);
1446
1447    impl ListGlossaryTerms {
1448        pub(crate) fn new(
1449            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1450        ) -> Self {
1451            Self(RequestBuilder::new(stub))
1452        }
1453
1454        /// Sets the full request, replacing any prior values.
1455        pub fn with_request<V: Into<crate::model::ListGlossaryTermsRequest>>(
1456            mut self,
1457            v: V,
1458        ) -> Self {
1459            self.0.request = v.into();
1460            self
1461        }
1462
1463        /// Sets all the options, replacing any prior values.
1464        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1465            self.0.options = v.into();
1466            self
1467        }
1468
1469        /// Sends the request.
1470        pub async fn send(self) -> Result<crate::model::ListGlossaryTermsResponse> {
1471            (*self.0.stub)
1472                .list_glossary_terms(self.0.request, self.0.options)
1473                .await
1474                .map(gax::response::Response::into_body)
1475        }
1476
1477        /// Streams each page in the collection.
1478        pub fn by_page(
1479            self,
1480        ) -> impl gax::paginator::Paginator<crate::model::ListGlossaryTermsResponse, gax::error::Error>
1481        {
1482            use std::clone::Clone;
1483            let token = self.0.request.page_token.clone();
1484            let execute = move |token: String| {
1485                let mut builder = self.clone();
1486                builder.0.request = builder.0.request.set_page_token(token);
1487                builder.send()
1488            };
1489            gax::paginator::internal::new_paginator(token, execute)
1490        }
1491
1492        /// Streams each item in the collection.
1493        pub fn by_item(
1494            self,
1495        ) -> impl gax::paginator::ItemPaginator<crate::model::ListGlossaryTermsResponse, gax::error::Error>
1496        {
1497            use gax::paginator::Paginator;
1498            self.by_page().items()
1499        }
1500
1501        /// Sets the value of [parent][crate::model::ListGlossaryTermsRequest::parent].
1502        ///
1503        /// This is a **required** field for requests.
1504        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
1505            self.0.request.parent = v.into();
1506            self
1507        }
1508
1509        /// Sets the value of [page_size][crate::model::ListGlossaryTermsRequest::page_size].
1510        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1511            self.0.request.page_size = v.into();
1512            self
1513        }
1514
1515        /// Sets the value of [page_token][crate::model::ListGlossaryTermsRequest::page_token].
1516        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1517            self.0.request.page_token = v.into();
1518            self
1519        }
1520
1521        /// Sets the value of [filter][crate::model::ListGlossaryTermsRequest::filter].
1522        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1523            self.0.request.filter = v.into();
1524            self
1525        }
1526
1527        /// Sets the value of [order_by][crate::model::ListGlossaryTermsRequest::order_by].
1528        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
1529            self.0.request.order_by = v.into();
1530            self
1531        }
1532    }
1533
1534    #[doc(hidden)]
1535    impl gax::options::internal::RequestBuilder for ListGlossaryTerms {
1536        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1537            &mut self.0.options
1538        }
1539    }
1540
1541    /// The request builder for [BusinessGlossaryService::list_locations][crate::client::BusinessGlossaryService::list_locations] calls.
1542    ///
1543    /// # Example
1544    /// ```no_run
1545    /// # use google_cloud_dataplex_v1::builder;
1546    /// use builder::business_glossary_service::ListLocations;
1547    /// # tokio_test::block_on(async {
1548    /// use gax::paginator::ItemPaginator;
1549    ///
1550    /// let builder = prepare_request_builder();
1551    /// let mut items = builder.by_item();
1552    /// while let Some(result) = items.next().await {
1553    ///   let item = result?;
1554    /// }
1555    /// # gax::Result::<()>::Ok(()) });
1556    ///
1557    /// fn prepare_request_builder() -> ListLocations {
1558    ///   # panic!();
1559    ///   // ... details omitted ...
1560    /// }
1561    /// ```
1562    #[derive(Clone, Debug)]
1563    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
1564
1565    impl ListLocations {
1566        pub(crate) fn new(
1567            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1568        ) -> Self {
1569            Self(RequestBuilder::new(stub))
1570        }
1571
1572        /// Sets the full request, replacing any prior values.
1573        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
1574            mut self,
1575            v: V,
1576        ) -> Self {
1577            self.0.request = v.into();
1578            self
1579        }
1580
1581        /// Sets all the options, replacing any prior values.
1582        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1583            self.0.options = v.into();
1584            self
1585        }
1586
1587        /// Sends the request.
1588        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
1589            (*self.0.stub)
1590                .list_locations(self.0.request, self.0.options)
1591                .await
1592                .map(gax::response::Response::into_body)
1593        }
1594
1595        /// Streams each page in the collection.
1596        pub fn by_page(
1597            self,
1598        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
1599        {
1600            use std::clone::Clone;
1601            let token = self.0.request.page_token.clone();
1602            let execute = move |token: String| {
1603                let mut builder = self.clone();
1604                builder.0.request = builder.0.request.set_page_token(token);
1605                builder.send()
1606            };
1607            gax::paginator::internal::new_paginator(token, execute)
1608        }
1609
1610        /// Streams each item in the collection.
1611        pub fn by_item(
1612            self,
1613        ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
1614        {
1615            use gax::paginator::Paginator;
1616            self.by_page().items()
1617        }
1618
1619        /// Sets the value of [name][location::model::ListLocationsRequest::name].
1620        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1621            self.0.request.name = v.into();
1622            self
1623        }
1624
1625        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
1626        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
1627            self.0.request.filter = v.into();
1628            self
1629        }
1630
1631        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
1632        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
1633            self.0.request.page_size = v.into();
1634            self
1635        }
1636
1637        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
1638        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
1639            self.0.request.page_token = v.into();
1640            self
1641        }
1642    }
1643
1644    #[doc(hidden)]
1645    impl gax::options::internal::RequestBuilder for ListLocations {
1646        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1647            &mut self.0.options
1648        }
1649    }
1650
1651    /// The request builder for [BusinessGlossaryService::get_location][crate::client::BusinessGlossaryService::get_location] calls.
1652    ///
1653    /// # Example
1654    /// ```no_run
1655    /// # use google_cloud_dataplex_v1::builder;
1656    /// use builder::business_glossary_service::GetLocation;
1657    /// # tokio_test::block_on(async {
1658    ///
1659    /// let builder = prepare_request_builder();
1660    /// let response = builder.send().await?;
1661    /// # gax::Result::<()>::Ok(()) });
1662    ///
1663    /// fn prepare_request_builder() -> GetLocation {
1664    ///   # panic!();
1665    ///   // ... details omitted ...
1666    /// }
1667    /// ```
1668    #[derive(Clone, Debug)]
1669    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
1670
1671    impl GetLocation {
1672        pub(crate) fn new(
1673            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1674        ) -> Self {
1675            Self(RequestBuilder::new(stub))
1676        }
1677
1678        /// Sets the full request, replacing any prior values.
1679        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
1680            self.0.request = v.into();
1681            self
1682        }
1683
1684        /// Sets all the options, replacing any prior values.
1685        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1686            self.0.options = v.into();
1687            self
1688        }
1689
1690        /// Sends the request.
1691        pub async fn send(self) -> Result<location::model::Location> {
1692            (*self.0.stub)
1693                .get_location(self.0.request, self.0.options)
1694                .await
1695                .map(gax::response::Response::into_body)
1696        }
1697
1698        /// Sets the value of [name][location::model::GetLocationRequest::name].
1699        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
1700            self.0.request.name = v.into();
1701            self
1702        }
1703    }
1704
1705    #[doc(hidden)]
1706    impl gax::options::internal::RequestBuilder for GetLocation {
1707        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1708            &mut self.0.options
1709        }
1710    }
1711
1712    /// The request builder for [BusinessGlossaryService::set_iam_policy][crate::client::BusinessGlossaryService::set_iam_policy] calls.
1713    ///
1714    /// # Example
1715    /// ```no_run
1716    /// # use google_cloud_dataplex_v1::builder;
1717    /// use builder::business_glossary_service::SetIamPolicy;
1718    /// # tokio_test::block_on(async {
1719    ///
1720    /// let builder = prepare_request_builder();
1721    /// let response = builder.send().await?;
1722    /// # gax::Result::<()>::Ok(()) });
1723    ///
1724    /// fn prepare_request_builder() -> SetIamPolicy {
1725    ///   # panic!();
1726    ///   // ... details omitted ...
1727    /// }
1728    /// ```
1729    #[derive(Clone, Debug)]
1730    pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
1731
1732    impl SetIamPolicy {
1733        pub(crate) fn new(
1734            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1735        ) -> Self {
1736            Self(RequestBuilder::new(stub))
1737        }
1738
1739        /// Sets the full request, replacing any prior values.
1740        pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
1741            self.0.request = v.into();
1742            self
1743        }
1744
1745        /// Sets all the options, replacing any prior values.
1746        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1747            self.0.options = v.into();
1748            self
1749        }
1750
1751        /// Sends the request.
1752        pub async fn send(self) -> Result<iam_v1::model::Policy> {
1753            (*self.0.stub)
1754                .set_iam_policy(self.0.request, self.0.options)
1755                .await
1756                .map(gax::response::Response::into_body)
1757        }
1758
1759        /// Sets the value of [resource][iam_v1::model::SetIamPolicyRequest::resource].
1760        ///
1761        /// This is a **required** field for requests.
1762        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1763            self.0.request.resource = v.into();
1764            self
1765        }
1766
1767        /// Sets the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
1768        ///
1769        /// This is a **required** field for requests.
1770        pub fn set_policy<T>(mut self, v: T) -> Self
1771        where
1772            T: std::convert::Into<iam_v1::model::Policy>,
1773        {
1774            self.0.request.policy = std::option::Option::Some(v.into());
1775            self
1776        }
1777
1778        /// Sets or clears the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
1779        ///
1780        /// This is a **required** field for requests.
1781        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
1782        where
1783            T: std::convert::Into<iam_v1::model::Policy>,
1784        {
1785            self.0.request.policy = v.map(|x| x.into());
1786            self
1787        }
1788
1789        /// Sets the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
1790        pub fn set_update_mask<T>(mut self, v: T) -> Self
1791        where
1792            T: std::convert::Into<wkt::FieldMask>,
1793        {
1794            self.0.request.update_mask = std::option::Option::Some(v.into());
1795            self
1796        }
1797
1798        /// Sets or clears the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
1799        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
1800        where
1801            T: std::convert::Into<wkt::FieldMask>,
1802        {
1803            self.0.request.update_mask = v.map(|x| x.into());
1804            self
1805        }
1806    }
1807
1808    #[doc(hidden)]
1809    impl gax::options::internal::RequestBuilder for SetIamPolicy {
1810        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1811            &mut self.0.options
1812        }
1813    }
1814
1815    /// The request builder for [BusinessGlossaryService::get_iam_policy][crate::client::BusinessGlossaryService::get_iam_policy] calls.
1816    ///
1817    /// # Example
1818    /// ```no_run
1819    /// # use google_cloud_dataplex_v1::builder;
1820    /// use builder::business_glossary_service::GetIamPolicy;
1821    /// # tokio_test::block_on(async {
1822    ///
1823    /// let builder = prepare_request_builder();
1824    /// let response = builder.send().await?;
1825    /// # gax::Result::<()>::Ok(()) });
1826    ///
1827    /// fn prepare_request_builder() -> GetIamPolicy {
1828    ///   # panic!();
1829    ///   // ... details omitted ...
1830    /// }
1831    /// ```
1832    #[derive(Clone, Debug)]
1833    pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
1834
1835    impl GetIamPolicy {
1836        pub(crate) fn new(
1837            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1838        ) -> Self {
1839            Self(RequestBuilder::new(stub))
1840        }
1841
1842        /// Sets the full request, replacing any prior values.
1843        pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
1844            self.0.request = v.into();
1845            self
1846        }
1847
1848        /// Sets all the options, replacing any prior values.
1849        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1850            self.0.options = v.into();
1851            self
1852        }
1853
1854        /// Sends the request.
1855        pub async fn send(self) -> Result<iam_v1::model::Policy> {
1856            (*self.0.stub)
1857                .get_iam_policy(self.0.request, self.0.options)
1858                .await
1859                .map(gax::response::Response::into_body)
1860        }
1861
1862        /// Sets the value of [resource][iam_v1::model::GetIamPolicyRequest::resource].
1863        ///
1864        /// This is a **required** field for requests.
1865        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1866            self.0.request.resource = v.into();
1867            self
1868        }
1869
1870        /// Sets the value of [options][iam_v1::model::GetIamPolicyRequest::options].
1871        pub fn set_options<T>(mut self, v: T) -> Self
1872        where
1873            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
1874        {
1875            self.0.request.options = std::option::Option::Some(v.into());
1876            self
1877        }
1878
1879        /// Sets or clears the value of [options][iam_v1::model::GetIamPolicyRequest::options].
1880        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
1881        where
1882            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
1883        {
1884            self.0.request.options = v.map(|x| x.into());
1885            self
1886        }
1887    }
1888
1889    #[doc(hidden)]
1890    impl gax::options::internal::RequestBuilder for GetIamPolicy {
1891        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1892            &mut self.0.options
1893        }
1894    }
1895
1896    /// The request builder for [BusinessGlossaryService::test_iam_permissions][crate::client::BusinessGlossaryService::test_iam_permissions] calls.
1897    ///
1898    /// # Example
1899    /// ```no_run
1900    /// # use google_cloud_dataplex_v1::builder;
1901    /// use builder::business_glossary_service::TestIamPermissions;
1902    /// # tokio_test::block_on(async {
1903    ///
1904    /// let builder = prepare_request_builder();
1905    /// let response = builder.send().await?;
1906    /// # gax::Result::<()>::Ok(()) });
1907    ///
1908    /// fn prepare_request_builder() -> TestIamPermissions {
1909    ///   # panic!();
1910    ///   // ... details omitted ...
1911    /// }
1912    /// ```
1913    #[derive(Clone, Debug)]
1914    pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
1915
1916    impl TestIamPermissions {
1917        pub(crate) fn new(
1918            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
1919        ) -> Self {
1920            Self(RequestBuilder::new(stub))
1921        }
1922
1923        /// Sets the full request, replacing any prior values.
1924        pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
1925            mut self,
1926            v: V,
1927        ) -> Self {
1928            self.0.request = v.into();
1929            self
1930        }
1931
1932        /// Sets all the options, replacing any prior values.
1933        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
1934            self.0.options = v.into();
1935            self
1936        }
1937
1938        /// Sends the request.
1939        pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
1940            (*self.0.stub)
1941                .test_iam_permissions(self.0.request, self.0.options)
1942                .await
1943                .map(gax::response::Response::into_body)
1944        }
1945
1946        /// Sets the value of [resource][iam_v1::model::TestIamPermissionsRequest::resource].
1947        ///
1948        /// This is a **required** field for requests.
1949        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
1950            self.0.request.resource = v.into();
1951            self
1952        }
1953
1954        /// Sets the value of [permissions][iam_v1::model::TestIamPermissionsRequest::permissions].
1955        ///
1956        /// This is a **required** field for requests.
1957        pub fn set_permissions<T, V>(mut self, v: T) -> Self
1958        where
1959            T: std::iter::IntoIterator<Item = V>,
1960            V: std::convert::Into<std::string::String>,
1961        {
1962            use std::iter::Iterator;
1963            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
1964            self
1965        }
1966    }
1967
1968    #[doc(hidden)]
1969    impl gax::options::internal::RequestBuilder for TestIamPermissions {
1970        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
1971            &mut self.0.options
1972        }
1973    }
1974
1975    /// The request builder for [BusinessGlossaryService::list_operations][crate::client::BusinessGlossaryService::list_operations] calls.
1976    ///
1977    /// # Example
1978    /// ```no_run
1979    /// # use google_cloud_dataplex_v1::builder;
1980    /// use builder::business_glossary_service::ListOperations;
1981    /// # tokio_test::block_on(async {
1982    /// use gax::paginator::ItemPaginator;
1983    ///
1984    /// let builder = prepare_request_builder();
1985    /// let mut items = builder.by_item();
1986    /// while let Some(result) = items.next().await {
1987    ///   let item = result?;
1988    /// }
1989    /// # gax::Result::<()>::Ok(()) });
1990    ///
1991    /// fn prepare_request_builder() -> ListOperations {
1992    ///   # panic!();
1993    ///   // ... details omitted ...
1994    /// }
1995    /// ```
1996    #[derive(Clone, Debug)]
1997    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
1998
1999    impl ListOperations {
2000        pub(crate) fn new(
2001            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
2002        ) -> Self {
2003            Self(RequestBuilder::new(stub))
2004        }
2005
2006        /// Sets the full request, replacing any prior values.
2007        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
2008            mut self,
2009            v: V,
2010        ) -> Self {
2011            self.0.request = v.into();
2012            self
2013        }
2014
2015        /// Sets all the options, replacing any prior values.
2016        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2017            self.0.options = v.into();
2018            self
2019        }
2020
2021        /// Sends the request.
2022        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
2023            (*self.0.stub)
2024                .list_operations(self.0.request, self.0.options)
2025                .await
2026                .map(gax::response::Response::into_body)
2027        }
2028
2029        /// Streams each page in the collection.
2030        pub fn by_page(
2031            self,
2032        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
2033        {
2034            use std::clone::Clone;
2035            let token = self.0.request.page_token.clone();
2036            let execute = move |token: String| {
2037                let mut builder = self.clone();
2038                builder.0.request = builder.0.request.set_page_token(token);
2039                builder.send()
2040            };
2041            gax::paginator::internal::new_paginator(token, execute)
2042        }
2043
2044        /// Streams each item in the collection.
2045        pub fn by_item(
2046            self,
2047        ) -> impl gax::paginator::ItemPaginator<
2048            longrunning::model::ListOperationsResponse,
2049            gax::error::Error,
2050        > {
2051            use gax::paginator::Paginator;
2052            self.by_page().items()
2053        }
2054
2055        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
2056        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2057            self.0.request.name = v.into();
2058            self
2059        }
2060
2061        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
2062        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2063            self.0.request.filter = v.into();
2064            self
2065        }
2066
2067        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
2068        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2069            self.0.request.page_size = v.into();
2070            self
2071        }
2072
2073        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
2074        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2075            self.0.request.page_token = v.into();
2076            self
2077        }
2078
2079        /// Sets the value of [return_partial_success][longrunning::model::ListOperationsRequest::return_partial_success].
2080        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
2081            self.0.request.return_partial_success = v.into();
2082            self
2083        }
2084    }
2085
2086    #[doc(hidden)]
2087    impl gax::options::internal::RequestBuilder for ListOperations {
2088        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2089            &mut self.0.options
2090        }
2091    }
2092
2093    /// The request builder for [BusinessGlossaryService::get_operation][crate::client::BusinessGlossaryService::get_operation] calls.
2094    ///
2095    /// # Example
2096    /// ```no_run
2097    /// # use google_cloud_dataplex_v1::builder;
2098    /// use builder::business_glossary_service::GetOperation;
2099    /// # tokio_test::block_on(async {
2100    ///
2101    /// let builder = prepare_request_builder();
2102    /// let response = builder.send().await?;
2103    /// # gax::Result::<()>::Ok(()) });
2104    ///
2105    /// fn prepare_request_builder() -> GetOperation {
2106    ///   # panic!();
2107    ///   // ... details omitted ...
2108    /// }
2109    /// ```
2110    #[derive(Clone, Debug)]
2111    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
2112
2113    impl GetOperation {
2114        pub(crate) fn new(
2115            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
2116        ) -> Self {
2117            Self(RequestBuilder::new(stub))
2118        }
2119
2120        /// Sets the full request, replacing any prior values.
2121        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
2122            mut self,
2123            v: V,
2124        ) -> Self {
2125            self.0.request = v.into();
2126            self
2127        }
2128
2129        /// Sets all the options, replacing any prior values.
2130        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2131            self.0.options = v.into();
2132            self
2133        }
2134
2135        /// Sends the request.
2136        pub async fn send(self) -> Result<longrunning::model::Operation> {
2137            (*self.0.stub)
2138                .get_operation(self.0.request, self.0.options)
2139                .await
2140                .map(gax::response::Response::into_body)
2141        }
2142
2143        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
2144        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2145            self.0.request.name = v.into();
2146            self
2147        }
2148    }
2149
2150    #[doc(hidden)]
2151    impl gax::options::internal::RequestBuilder for GetOperation {
2152        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2153            &mut self.0.options
2154        }
2155    }
2156
2157    /// The request builder for [BusinessGlossaryService::delete_operation][crate::client::BusinessGlossaryService::delete_operation] calls.
2158    ///
2159    /// # Example
2160    /// ```no_run
2161    /// # use google_cloud_dataplex_v1::builder;
2162    /// use builder::business_glossary_service::DeleteOperation;
2163    /// # tokio_test::block_on(async {
2164    ///
2165    /// let builder = prepare_request_builder();
2166    /// let response = builder.send().await?;
2167    /// # gax::Result::<()>::Ok(()) });
2168    ///
2169    /// fn prepare_request_builder() -> DeleteOperation {
2170    ///   # panic!();
2171    ///   // ... details omitted ...
2172    /// }
2173    /// ```
2174    #[derive(Clone, Debug)]
2175    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
2176
2177    impl DeleteOperation {
2178        pub(crate) fn new(
2179            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
2180        ) -> Self {
2181            Self(RequestBuilder::new(stub))
2182        }
2183
2184        /// Sets the full request, replacing any prior values.
2185        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
2186            mut self,
2187            v: V,
2188        ) -> Self {
2189            self.0.request = v.into();
2190            self
2191        }
2192
2193        /// Sets all the options, replacing any prior values.
2194        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2195            self.0.options = v.into();
2196            self
2197        }
2198
2199        /// Sends the request.
2200        pub async fn send(self) -> Result<()> {
2201            (*self.0.stub)
2202                .delete_operation(self.0.request, self.0.options)
2203                .await
2204                .map(gax::response::Response::into_body)
2205        }
2206
2207        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
2208        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2209            self.0.request.name = v.into();
2210            self
2211        }
2212    }
2213
2214    #[doc(hidden)]
2215    impl gax::options::internal::RequestBuilder for DeleteOperation {
2216        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2217            &mut self.0.options
2218        }
2219    }
2220
2221    /// The request builder for [BusinessGlossaryService::cancel_operation][crate::client::BusinessGlossaryService::cancel_operation] calls.
2222    ///
2223    /// # Example
2224    /// ```no_run
2225    /// # use google_cloud_dataplex_v1::builder;
2226    /// use builder::business_glossary_service::CancelOperation;
2227    /// # tokio_test::block_on(async {
2228    ///
2229    /// let builder = prepare_request_builder();
2230    /// let response = builder.send().await?;
2231    /// # gax::Result::<()>::Ok(()) });
2232    ///
2233    /// fn prepare_request_builder() -> CancelOperation {
2234    ///   # panic!();
2235    ///   // ... details omitted ...
2236    /// }
2237    /// ```
2238    #[derive(Clone, Debug)]
2239    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
2240
2241    impl CancelOperation {
2242        pub(crate) fn new(
2243            stub: std::sync::Arc<dyn super::super::stub::dynamic::BusinessGlossaryService>,
2244        ) -> Self {
2245            Self(RequestBuilder::new(stub))
2246        }
2247
2248        /// Sets the full request, replacing any prior values.
2249        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
2250            mut self,
2251            v: V,
2252        ) -> Self {
2253            self.0.request = v.into();
2254            self
2255        }
2256
2257        /// Sets all the options, replacing any prior values.
2258        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2259            self.0.options = v.into();
2260            self
2261        }
2262
2263        /// Sends the request.
2264        pub async fn send(self) -> Result<()> {
2265            (*self.0.stub)
2266                .cancel_operation(self.0.request, self.0.options)
2267                .await
2268                .map(gax::response::Response::into_body)
2269        }
2270
2271        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
2272        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2273            self.0.request.name = v.into();
2274            self
2275        }
2276    }
2277
2278    #[doc(hidden)]
2279    impl gax::options::internal::RequestBuilder for CancelOperation {
2280        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2281            &mut self.0.options
2282        }
2283    }
2284}
2285
2286pub mod catalog_service {
2287    use crate::Result;
2288
2289    /// A builder for [CatalogService][crate::client::CatalogService].
2290    ///
2291    /// ```
2292    /// # tokio_test::block_on(async {
2293    /// # use google_cloud_dataplex_v1::*;
2294    /// # use builder::catalog_service::ClientBuilder;
2295    /// # use client::CatalogService;
2296    /// let builder : ClientBuilder = CatalogService::builder();
2297    /// let client = builder
2298    ///     .with_endpoint("https://dataplex.googleapis.com")
2299    ///     .build().await?;
2300    /// # gax::client_builder::Result::<()>::Ok(()) });
2301    /// ```
2302    pub type ClientBuilder =
2303        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
2304
2305    pub(crate) mod client {
2306        use super::super::super::client::CatalogService;
2307        pub struct Factory;
2308        impl gax::client_builder::internal::ClientFactory for Factory {
2309            type Client = CatalogService;
2310            type Credentials = gaxi::options::Credentials;
2311            async fn build(
2312                self,
2313                config: gaxi::options::ClientConfig,
2314            ) -> gax::client_builder::Result<Self::Client> {
2315                Self::Client::new(config).await
2316            }
2317        }
2318    }
2319
2320    /// Common implementation for [crate::client::CatalogService] request builders.
2321    #[derive(Clone, Debug)]
2322    pub(crate) struct RequestBuilder<R: std::default::Default> {
2323        stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2324        request: R,
2325        options: gax::options::RequestOptions,
2326    }
2327
2328    impl<R> RequestBuilder<R>
2329    where
2330        R: std::default::Default,
2331    {
2332        pub(crate) fn new(
2333            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2334        ) -> Self {
2335            Self {
2336                stub,
2337                request: R::default(),
2338                options: gax::options::RequestOptions::default(),
2339            }
2340        }
2341    }
2342
2343    /// The request builder for [CatalogService::create_entry_type][crate::client::CatalogService::create_entry_type] calls.
2344    ///
2345    /// # Example
2346    /// ```no_run
2347    /// # use google_cloud_dataplex_v1::builder;
2348    /// use builder::catalog_service::CreateEntryType;
2349    /// # tokio_test::block_on(async {
2350    /// use lro::Poller;
2351    ///
2352    /// let builder = prepare_request_builder();
2353    /// let response = builder.poller().until_done().await?;
2354    /// # gax::Result::<()>::Ok(()) });
2355    ///
2356    /// fn prepare_request_builder() -> CreateEntryType {
2357    ///   # panic!();
2358    ///   // ... details omitted ...
2359    /// }
2360    /// ```
2361    #[derive(Clone, Debug)]
2362    pub struct CreateEntryType(RequestBuilder<crate::model::CreateEntryTypeRequest>);
2363
2364    impl CreateEntryType {
2365        pub(crate) fn new(
2366            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2367        ) -> Self {
2368            Self(RequestBuilder::new(stub))
2369        }
2370
2371        /// Sets the full request, replacing any prior values.
2372        pub fn with_request<V: Into<crate::model::CreateEntryTypeRequest>>(mut self, v: V) -> Self {
2373            self.0.request = v.into();
2374            self
2375        }
2376
2377        /// Sets all the options, replacing any prior values.
2378        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2379            self.0.options = v.into();
2380            self
2381        }
2382
2383        /// Sends the request.
2384        ///
2385        /// # Long running operations
2386        ///
2387        /// This starts, but does not poll, a longrunning operation. More information
2388        /// on [create_entry_type][crate::client::CatalogService::create_entry_type].
2389        pub async fn send(self) -> Result<longrunning::model::Operation> {
2390            (*self.0.stub)
2391                .create_entry_type(self.0.request, self.0.options)
2392                .await
2393                .map(gax::response::Response::into_body)
2394        }
2395
2396        /// Creates a [Poller][lro::Poller] to work with `create_entry_type`.
2397        pub fn poller(
2398            self,
2399        ) -> impl lro::Poller<crate::model::EntryType, crate::model::OperationMetadata> {
2400            type Operation =
2401                lro::internal::Operation<crate::model::EntryType, crate::model::OperationMetadata>;
2402            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2403            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2404
2405            let stub = self.0.stub.clone();
2406            let mut options = self.0.options.clone();
2407            options.set_retry_policy(gax::retry_policy::NeverRetry);
2408            let query = move |name| {
2409                let stub = stub.clone();
2410                let options = options.clone();
2411                async {
2412                    let op = GetOperation::new(stub)
2413                        .set_name(name)
2414                        .with_options(options)
2415                        .send()
2416                        .await?;
2417                    Ok(Operation::new(op))
2418                }
2419            };
2420
2421            let start = move || async {
2422                let op = self.send().await?;
2423                Ok(Operation::new(op))
2424            };
2425
2426            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2427        }
2428
2429        /// Sets the value of [parent][crate::model::CreateEntryTypeRequest::parent].
2430        ///
2431        /// This is a **required** field for requests.
2432        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2433            self.0.request.parent = v.into();
2434            self
2435        }
2436
2437        /// Sets the value of [entry_type_id][crate::model::CreateEntryTypeRequest::entry_type_id].
2438        ///
2439        /// This is a **required** field for requests.
2440        pub fn set_entry_type_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
2441            self.0.request.entry_type_id = v.into();
2442            self
2443        }
2444
2445        /// Sets the value of [entry_type][crate::model::CreateEntryTypeRequest::entry_type].
2446        ///
2447        /// This is a **required** field for requests.
2448        pub fn set_entry_type<T>(mut self, v: T) -> Self
2449        where
2450            T: std::convert::Into<crate::model::EntryType>,
2451        {
2452            self.0.request.entry_type = std::option::Option::Some(v.into());
2453            self
2454        }
2455
2456        /// Sets or clears the value of [entry_type][crate::model::CreateEntryTypeRequest::entry_type].
2457        ///
2458        /// This is a **required** field for requests.
2459        pub fn set_or_clear_entry_type<T>(mut self, v: std::option::Option<T>) -> Self
2460        where
2461            T: std::convert::Into<crate::model::EntryType>,
2462        {
2463            self.0.request.entry_type = v.map(|x| x.into());
2464            self
2465        }
2466
2467        /// Sets the value of [validate_only][crate::model::CreateEntryTypeRequest::validate_only].
2468        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2469            self.0.request.validate_only = v.into();
2470            self
2471        }
2472    }
2473
2474    #[doc(hidden)]
2475    impl gax::options::internal::RequestBuilder for CreateEntryType {
2476        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2477            &mut self.0.options
2478        }
2479    }
2480
2481    /// The request builder for [CatalogService::update_entry_type][crate::client::CatalogService::update_entry_type] calls.
2482    ///
2483    /// # Example
2484    /// ```no_run
2485    /// # use google_cloud_dataplex_v1::builder;
2486    /// use builder::catalog_service::UpdateEntryType;
2487    /// # tokio_test::block_on(async {
2488    /// use lro::Poller;
2489    ///
2490    /// let builder = prepare_request_builder();
2491    /// let response = builder.poller().until_done().await?;
2492    /// # gax::Result::<()>::Ok(()) });
2493    ///
2494    /// fn prepare_request_builder() -> UpdateEntryType {
2495    ///   # panic!();
2496    ///   // ... details omitted ...
2497    /// }
2498    /// ```
2499    #[derive(Clone, Debug)]
2500    pub struct UpdateEntryType(RequestBuilder<crate::model::UpdateEntryTypeRequest>);
2501
2502    impl UpdateEntryType {
2503        pub(crate) fn new(
2504            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2505        ) -> Self {
2506            Self(RequestBuilder::new(stub))
2507        }
2508
2509        /// Sets the full request, replacing any prior values.
2510        pub fn with_request<V: Into<crate::model::UpdateEntryTypeRequest>>(mut self, v: V) -> Self {
2511            self.0.request = v.into();
2512            self
2513        }
2514
2515        /// Sets all the options, replacing any prior values.
2516        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2517            self.0.options = v.into();
2518            self
2519        }
2520
2521        /// Sends the request.
2522        ///
2523        /// # Long running operations
2524        ///
2525        /// This starts, but does not poll, a longrunning operation. More information
2526        /// on [update_entry_type][crate::client::CatalogService::update_entry_type].
2527        pub async fn send(self) -> Result<longrunning::model::Operation> {
2528            (*self.0.stub)
2529                .update_entry_type(self.0.request, self.0.options)
2530                .await
2531                .map(gax::response::Response::into_body)
2532        }
2533
2534        /// Creates a [Poller][lro::Poller] to work with `update_entry_type`.
2535        pub fn poller(
2536            self,
2537        ) -> impl lro::Poller<crate::model::EntryType, crate::model::OperationMetadata> {
2538            type Operation =
2539                lro::internal::Operation<crate::model::EntryType, crate::model::OperationMetadata>;
2540            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2541            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2542
2543            let stub = self.0.stub.clone();
2544            let mut options = self.0.options.clone();
2545            options.set_retry_policy(gax::retry_policy::NeverRetry);
2546            let query = move |name| {
2547                let stub = stub.clone();
2548                let options = options.clone();
2549                async {
2550                    let op = GetOperation::new(stub)
2551                        .set_name(name)
2552                        .with_options(options)
2553                        .send()
2554                        .await?;
2555                    Ok(Operation::new(op))
2556                }
2557            };
2558
2559            let start = move || async {
2560                let op = self.send().await?;
2561                Ok(Operation::new(op))
2562            };
2563
2564            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
2565        }
2566
2567        /// Sets the value of [entry_type][crate::model::UpdateEntryTypeRequest::entry_type].
2568        ///
2569        /// This is a **required** field for requests.
2570        pub fn set_entry_type<T>(mut self, v: T) -> Self
2571        where
2572            T: std::convert::Into<crate::model::EntryType>,
2573        {
2574            self.0.request.entry_type = std::option::Option::Some(v.into());
2575            self
2576        }
2577
2578        /// Sets or clears the value of [entry_type][crate::model::UpdateEntryTypeRequest::entry_type].
2579        ///
2580        /// This is a **required** field for requests.
2581        pub fn set_or_clear_entry_type<T>(mut self, v: std::option::Option<T>) -> Self
2582        where
2583            T: std::convert::Into<crate::model::EntryType>,
2584        {
2585            self.0.request.entry_type = v.map(|x| x.into());
2586            self
2587        }
2588
2589        /// Sets the value of [update_mask][crate::model::UpdateEntryTypeRequest::update_mask].
2590        ///
2591        /// This is a **required** field for requests.
2592        pub fn set_update_mask<T>(mut self, v: T) -> Self
2593        where
2594            T: std::convert::Into<wkt::FieldMask>,
2595        {
2596            self.0.request.update_mask = std::option::Option::Some(v.into());
2597            self
2598        }
2599
2600        /// Sets or clears the value of [update_mask][crate::model::UpdateEntryTypeRequest::update_mask].
2601        ///
2602        /// This is a **required** field for requests.
2603        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
2604        where
2605            T: std::convert::Into<wkt::FieldMask>,
2606        {
2607            self.0.request.update_mask = v.map(|x| x.into());
2608            self
2609        }
2610
2611        /// Sets the value of [validate_only][crate::model::UpdateEntryTypeRequest::validate_only].
2612        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
2613            self.0.request.validate_only = v.into();
2614            self
2615        }
2616    }
2617
2618    #[doc(hidden)]
2619    impl gax::options::internal::RequestBuilder for UpdateEntryType {
2620        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2621            &mut self.0.options
2622        }
2623    }
2624
2625    /// The request builder for [CatalogService::delete_entry_type][crate::client::CatalogService::delete_entry_type] calls.
2626    ///
2627    /// # Example
2628    /// ```no_run
2629    /// # use google_cloud_dataplex_v1::builder;
2630    /// use builder::catalog_service::DeleteEntryType;
2631    /// # tokio_test::block_on(async {
2632    /// use lro::Poller;
2633    ///
2634    /// let builder = prepare_request_builder();
2635    /// let response = builder.poller().until_done().await?;
2636    /// # gax::Result::<()>::Ok(()) });
2637    ///
2638    /// fn prepare_request_builder() -> DeleteEntryType {
2639    ///   # panic!();
2640    ///   // ... details omitted ...
2641    /// }
2642    /// ```
2643    #[derive(Clone, Debug)]
2644    pub struct DeleteEntryType(RequestBuilder<crate::model::DeleteEntryTypeRequest>);
2645
2646    impl DeleteEntryType {
2647        pub(crate) fn new(
2648            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2649        ) -> Self {
2650            Self(RequestBuilder::new(stub))
2651        }
2652
2653        /// Sets the full request, replacing any prior values.
2654        pub fn with_request<V: Into<crate::model::DeleteEntryTypeRequest>>(mut self, v: V) -> Self {
2655            self.0.request = v.into();
2656            self
2657        }
2658
2659        /// Sets all the options, replacing any prior values.
2660        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2661            self.0.options = v.into();
2662            self
2663        }
2664
2665        /// Sends the request.
2666        ///
2667        /// # Long running operations
2668        ///
2669        /// This starts, but does not poll, a longrunning operation. More information
2670        /// on [delete_entry_type][crate::client::CatalogService::delete_entry_type].
2671        pub async fn send(self) -> Result<longrunning::model::Operation> {
2672            (*self.0.stub)
2673                .delete_entry_type(self.0.request, self.0.options)
2674                .await
2675                .map(gax::response::Response::into_body)
2676        }
2677
2678        /// Creates a [Poller][lro::Poller] to work with `delete_entry_type`.
2679        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
2680            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
2681            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2682            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2683
2684            let stub = self.0.stub.clone();
2685            let mut options = self.0.options.clone();
2686            options.set_retry_policy(gax::retry_policy::NeverRetry);
2687            let query = move |name| {
2688                let stub = stub.clone();
2689                let options = options.clone();
2690                async {
2691                    let op = GetOperation::new(stub)
2692                        .set_name(name)
2693                        .with_options(options)
2694                        .send()
2695                        .await?;
2696                    Ok(Operation::new(op))
2697                }
2698            };
2699
2700            let start = move || async {
2701                let op = self.send().await?;
2702                Ok(Operation::new(op))
2703            };
2704
2705            lro::internal::new_unit_response_poller(
2706                polling_error_policy,
2707                polling_backoff_policy,
2708                start,
2709                query,
2710            )
2711        }
2712
2713        /// Sets the value of [name][crate::model::DeleteEntryTypeRequest::name].
2714        ///
2715        /// This is a **required** field for requests.
2716        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2717            self.0.request.name = v.into();
2718            self
2719        }
2720
2721        /// Sets the value of [etag][crate::model::DeleteEntryTypeRequest::etag].
2722        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
2723            self.0.request.etag = v.into();
2724            self
2725        }
2726    }
2727
2728    #[doc(hidden)]
2729    impl gax::options::internal::RequestBuilder for DeleteEntryType {
2730        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2731            &mut self.0.options
2732        }
2733    }
2734
2735    /// The request builder for [CatalogService::list_entry_types][crate::client::CatalogService::list_entry_types] calls.
2736    ///
2737    /// # Example
2738    /// ```no_run
2739    /// # use google_cloud_dataplex_v1::builder;
2740    /// use builder::catalog_service::ListEntryTypes;
2741    /// # tokio_test::block_on(async {
2742    /// use gax::paginator::ItemPaginator;
2743    ///
2744    /// let builder = prepare_request_builder();
2745    /// let mut items = builder.by_item();
2746    /// while let Some(result) = items.next().await {
2747    ///   let item = result?;
2748    /// }
2749    /// # gax::Result::<()>::Ok(()) });
2750    ///
2751    /// fn prepare_request_builder() -> ListEntryTypes {
2752    ///   # panic!();
2753    ///   // ... details omitted ...
2754    /// }
2755    /// ```
2756    #[derive(Clone, Debug)]
2757    pub struct ListEntryTypes(RequestBuilder<crate::model::ListEntryTypesRequest>);
2758
2759    impl ListEntryTypes {
2760        pub(crate) fn new(
2761            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2762        ) -> Self {
2763            Self(RequestBuilder::new(stub))
2764        }
2765
2766        /// Sets the full request, replacing any prior values.
2767        pub fn with_request<V: Into<crate::model::ListEntryTypesRequest>>(mut self, v: V) -> Self {
2768            self.0.request = v.into();
2769            self
2770        }
2771
2772        /// Sets all the options, replacing any prior values.
2773        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2774            self.0.options = v.into();
2775            self
2776        }
2777
2778        /// Sends the request.
2779        pub async fn send(self) -> Result<crate::model::ListEntryTypesResponse> {
2780            (*self.0.stub)
2781                .list_entry_types(self.0.request, self.0.options)
2782                .await
2783                .map(gax::response::Response::into_body)
2784        }
2785
2786        /// Streams each page in the collection.
2787        pub fn by_page(
2788            self,
2789        ) -> impl gax::paginator::Paginator<crate::model::ListEntryTypesResponse, gax::error::Error>
2790        {
2791            use std::clone::Clone;
2792            let token = self.0.request.page_token.clone();
2793            let execute = move |token: String| {
2794                let mut builder = self.clone();
2795                builder.0.request = builder.0.request.set_page_token(token);
2796                builder.send()
2797            };
2798            gax::paginator::internal::new_paginator(token, execute)
2799        }
2800
2801        /// Streams each item in the collection.
2802        pub fn by_item(
2803            self,
2804        ) -> impl gax::paginator::ItemPaginator<crate::model::ListEntryTypesResponse, gax::error::Error>
2805        {
2806            use gax::paginator::Paginator;
2807            self.by_page().items()
2808        }
2809
2810        /// Sets the value of [parent][crate::model::ListEntryTypesRequest::parent].
2811        ///
2812        /// This is a **required** field for requests.
2813        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
2814            self.0.request.parent = v.into();
2815            self
2816        }
2817
2818        /// Sets the value of [page_size][crate::model::ListEntryTypesRequest::page_size].
2819        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
2820            self.0.request.page_size = v.into();
2821            self
2822        }
2823
2824        /// Sets the value of [page_token][crate::model::ListEntryTypesRequest::page_token].
2825        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
2826            self.0.request.page_token = v.into();
2827            self
2828        }
2829
2830        /// Sets the value of [filter][crate::model::ListEntryTypesRequest::filter].
2831        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
2832            self.0.request.filter = v.into();
2833            self
2834        }
2835
2836        /// Sets the value of [order_by][crate::model::ListEntryTypesRequest::order_by].
2837        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
2838            self.0.request.order_by = v.into();
2839            self
2840        }
2841    }
2842
2843    #[doc(hidden)]
2844    impl gax::options::internal::RequestBuilder for ListEntryTypes {
2845        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2846            &mut self.0.options
2847        }
2848    }
2849
2850    /// The request builder for [CatalogService::get_entry_type][crate::client::CatalogService::get_entry_type] calls.
2851    ///
2852    /// # Example
2853    /// ```no_run
2854    /// # use google_cloud_dataplex_v1::builder;
2855    /// use builder::catalog_service::GetEntryType;
2856    /// # tokio_test::block_on(async {
2857    ///
2858    /// let builder = prepare_request_builder();
2859    /// let response = builder.send().await?;
2860    /// # gax::Result::<()>::Ok(()) });
2861    ///
2862    /// fn prepare_request_builder() -> GetEntryType {
2863    ///   # panic!();
2864    ///   // ... details omitted ...
2865    /// }
2866    /// ```
2867    #[derive(Clone, Debug)]
2868    pub struct GetEntryType(RequestBuilder<crate::model::GetEntryTypeRequest>);
2869
2870    impl GetEntryType {
2871        pub(crate) fn new(
2872            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2873        ) -> Self {
2874            Self(RequestBuilder::new(stub))
2875        }
2876
2877        /// Sets the full request, replacing any prior values.
2878        pub fn with_request<V: Into<crate::model::GetEntryTypeRequest>>(mut self, v: V) -> Self {
2879            self.0.request = v.into();
2880            self
2881        }
2882
2883        /// Sets all the options, replacing any prior values.
2884        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2885            self.0.options = v.into();
2886            self
2887        }
2888
2889        /// Sends the request.
2890        pub async fn send(self) -> Result<crate::model::EntryType> {
2891            (*self.0.stub)
2892                .get_entry_type(self.0.request, self.0.options)
2893                .await
2894                .map(gax::response::Response::into_body)
2895        }
2896
2897        /// Sets the value of [name][crate::model::GetEntryTypeRequest::name].
2898        ///
2899        /// This is a **required** field for requests.
2900        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
2901            self.0.request.name = v.into();
2902            self
2903        }
2904    }
2905
2906    #[doc(hidden)]
2907    impl gax::options::internal::RequestBuilder for GetEntryType {
2908        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
2909            &mut self.0.options
2910        }
2911    }
2912
2913    /// The request builder for [CatalogService::create_aspect_type][crate::client::CatalogService::create_aspect_type] calls.
2914    ///
2915    /// # Example
2916    /// ```no_run
2917    /// # use google_cloud_dataplex_v1::builder;
2918    /// use builder::catalog_service::CreateAspectType;
2919    /// # tokio_test::block_on(async {
2920    /// use lro::Poller;
2921    ///
2922    /// let builder = prepare_request_builder();
2923    /// let response = builder.poller().until_done().await?;
2924    /// # gax::Result::<()>::Ok(()) });
2925    ///
2926    /// fn prepare_request_builder() -> CreateAspectType {
2927    ///   # panic!();
2928    ///   // ... details omitted ...
2929    /// }
2930    /// ```
2931    #[derive(Clone, Debug)]
2932    pub struct CreateAspectType(RequestBuilder<crate::model::CreateAspectTypeRequest>);
2933
2934    impl CreateAspectType {
2935        pub(crate) fn new(
2936            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
2937        ) -> Self {
2938            Self(RequestBuilder::new(stub))
2939        }
2940
2941        /// Sets the full request, replacing any prior values.
2942        pub fn with_request<V: Into<crate::model::CreateAspectTypeRequest>>(
2943            mut self,
2944            v: V,
2945        ) -> Self {
2946            self.0.request = v.into();
2947            self
2948        }
2949
2950        /// Sets all the options, replacing any prior values.
2951        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
2952            self.0.options = v.into();
2953            self
2954        }
2955
2956        /// Sends the request.
2957        ///
2958        /// # Long running operations
2959        ///
2960        /// This starts, but does not poll, a longrunning operation. More information
2961        /// on [create_aspect_type][crate::client::CatalogService::create_aspect_type].
2962        pub async fn send(self) -> Result<longrunning::model::Operation> {
2963            (*self.0.stub)
2964                .create_aspect_type(self.0.request, self.0.options)
2965                .await
2966                .map(gax::response::Response::into_body)
2967        }
2968
2969        /// Creates a [Poller][lro::Poller] to work with `create_aspect_type`.
2970        pub fn poller(
2971            self,
2972        ) -> impl lro::Poller<crate::model::AspectType, crate::model::OperationMetadata> {
2973            type Operation =
2974                lro::internal::Operation<crate::model::AspectType, crate::model::OperationMetadata>;
2975            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
2976            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
2977
2978            let stub = self.0.stub.clone();
2979            let mut options = self.0.options.clone();
2980            options.set_retry_policy(gax::retry_policy::NeverRetry);
2981            let query = move |name| {
2982                let stub = stub.clone();
2983                let options = options.clone();
2984                async {
2985                    let op = GetOperation::new(stub)
2986                        .set_name(name)
2987                        .with_options(options)
2988                        .send()
2989                        .await?;
2990                    Ok(Operation::new(op))
2991                }
2992            };
2993
2994            let start = move || async {
2995                let op = self.send().await?;
2996                Ok(Operation::new(op))
2997            };
2998
2999            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3000        }
3001
3002        /// Sets the value of [parent][crate::model::CreateAspectTypeRequest::parent].
3003        ///
3004        /// This is a **required** field for requests.
3005        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3006            self.0.request.parent = v.into();
3007            self
3008        }
3009
3010        /// Sets the value of [aspect_type_id][crate::model::CreateAspectTypeRequest::aspect_type_id].
3011        ///
3012        /// This is a **required** field for requests.
3013        pub fn set_aspect_type_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3014            self.0.request.aspect_type_id = v.into();
3015            self
3016        }
3017
3018        /// Sets the value of [aspect_type][crate::model::CreateAspectTypeRequest::aspect_type].
3019        ///
3020        /// This is a **required** field for requests.
3021        pub fn set_aspect_type<T>(mut self, v: T) -> Self
3022        where
3023            T: std::convert::Into<crate::model::AspectType>,
3024        {
3025            self.0.request.aspect_type = std::option::Option::Some(v.into());
3026            self
3027        }
3028
3029        /// Sets or clears the value of [aspect_type][crate::model::CreateAspectTypeRequest::aspect_type].
3030        ///
3031        /// This is a **required** field for requests.
3032        pub fn set_or_clear_aspect_type<T>(mut self, v: std::option::Option<T>) -> Self
3033        where
3034            T: std::convert::Into<crate::model::AspectType>,
3035        {
3036            self.0.request.aspect_type = v.map(|x| x.into());
3037            self
3038        }
3039
3040        /// Sets the value of [validate_only][crate::model::CreateAspectTypeRequest::validate_only].
3041        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3042            self.0.request.validate_only = v.into();
3043            self
3044        }
3045    }
3046
3047    #[doc(hidden)]
3048    impl gax::options::internal::RequestBuilder for CreateAspectType {
3049        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3050            &mut self.0.options
3051        }
3052    }
3053
3054    /// The request builder for [CatalogService::update_aspect_type][crate::client::CatalogService::update_aspect_type] calls.
3055    ///
3056    /// # Example
3057    /// ```no_run
3058    /// # use google_cloud_dataplex_v1::builder;
3059    /// use builder::catalog_service::UpdateAspectType;
3060    /// # tokio_test::block_on(async {
3061    /// use lro::Poller;
3062    ///
3063    /// let builder = prepare_request_builder();
3064    /// let response = builder.poller().until_done().await?;
3065    /// # gax::Result::<()>::Ok(()) });
3066    ///
3067    /// fn prepare_request_builder() -> UpdateAspectType {
3068    ///   # panic!();
3069    ///   // ... details omitted ...
3070    /// }
3071    /// ```
3072    #[derive(Clone, Debug)]
3073    pub struct UpdateAspectType(RequestBuilder<crate::model::UpdateAspectTypeRequest>);
3074
3075    impl UpdateAspectType {
3076        pub(crate) fn new(
3077            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3078        ) -> Self {
3079            Self(RequestBuilder::new(stub))
3080        }
3081
3082        /// Sets the full request, replacing any prior values.
3083        pub fn with_request<V: Into<crate::model::UpdateAspectTypeRequest>>(
3084            mut self,
3085            v: V,
3086        ) -> Self {
3087            self.0.request = v.into();
3088            self
3089        }
3090
3091        /// Sets all the options, replacing any prior values.
3092        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3093            self.0.options = v.into();
3094            self
3095        }
3096
3097        /// Sends the request.
3098        ///
3099        /// # Long running operations
3100        ///
3101        /// This starts, but does not poll, a longrunning operation. More information
3102        /// on [update_aspect_type][crate::client::CatalogService::update_aspect_type].
3103        pub async fn send(self) -> Result<longrunning::model::Operation> {
3104            (*self.0.stub)
3105                .update_aspect_type(self.0.request, self.0.options)
3106                .await
3107                .map(gax::response::Response::into_body)
3108        }
3109
3110        /// Creates a [Poller][lro::Poller] to work with `update_aspect_type`.
3111        pub fn poller(
3112            self,
3113        ) -> impl lro::Poller<crate::model::AspectType, crate::model::OperationMetadata> {
3114            type Operation =
3115                lro::internal::Operation<crate::model::AspectType, crate::model::OperationMetadata>;
3116            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3117            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3118
3119            let stub = self.0.stub.clone();
3120            let mut options = self.0.options.clone();
3121            options.set_retry_policy(gax::retry_policy::NeverRetry);
3122            let query = move |name| {
3123                let stub = stub.clone();
3124                let options = options.clone();
3125                async {
3126                    let op = GetOperation::new(stub)
3127                        .set_name(name)
3128                        .with_options(options)
3129                        .send()
3130                        .await?;
3131                    Ok(Operation::new(op))
3132                }
3133            };
3134
3135            let start = move || async {
3136                let op = self.send().await?;
3137                Ok(Operation::new(op))
3138            };
3139
3140            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3141        }
3142
3143        /// Sets the value of [aspect_type][crate::model::UpdateAspectTypeRequest::aspect_type].
3144        ///
3145        /// This is a **required** field for requests.
3146        pub fn set_aspect_type<T>(mut self, v: T) -> Self
3147        where
3148            T: std::convert::Into<crate::model::AspectType>,
3149        {
3150            self.0.request.aspect_type = std::option::Option::Some(v.into());
3151            self
3152        }
3153
3154        /// Sets or clears the value of [aspect_type][crate::model::UpdateAspectTypeRequest::aspect_type].
3155        ///
3156        /// This is a **required** field for requests.
3157        pub fn set_or_clear_aspect_type<T>(mut self, v: std::option::Option<T>) -> Self
3158        where
3159            T: std::convert::Into<crate::model::AspectType>,
3160        {
3161            self.0.request.aspect_type = v.map(|x| x.into());
3162            self
3163        }
3164
3165        /// Sets the value of [update_mask][crate::model::UpdateAspectTypeRequest::update_mask].
3166        ///
3167        /// This is a **required** field for requests.
3168        pub fn set_update_mask<T>(mut self, v: T) -> Self
3169        where
3170            T: std::convert::Into<wkt::FieldMask>,
3171        {
3172            self.0.request.update_mask = std::option::Option::Some(v.into());
3173            self
3174        }
3175
3176        /// Sets or clears the value of [update_mask][crate::model::UpdateAspectTypeRequest::update_mask].
3177        ///
3178        /// This is a **required** field for requests.
3179        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3180        where
3181            T: std::convert::Into<wkt::FieldMask>,
3182        {
3183            self.0.request.update_mask = v.map(|x| x.into());
3184            self
3185        }
3186
3187        /// Sets the value of [validate_only][crate::model::UpdateAspectTypeRequest::validate_only].
3188        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3189            self.0.request.validate_only = v.into();
3190            self
3191        }
3192    }
3193
3194    #[doc(hidden)]
3195    impl gax::options::internal::RequestBuilder for UpdateAspectType {
3196        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3197            &mut self.0.options
3198        }
3199    }
3200
3201    /// The request builder for [CatalogService::delete_aspect_type][crate::client::CatalogService::delete_aspect_type] calls.
3202    ///
3203    /// # Example
3204    /// ```no_run
3205    /// # use google_cloud_dataplex_v1::builder;
3206    /// use builder::catalog_service::DeleteAspectType;
3207    /// # tokio_test::block_on(async {
3208    /// use lro::Poller;
3209    ///
3210    /// let builder = prepare_request_builder();
3211    /// let response = builder.poller().until_done().await?;
3212    /// # gax::Result::<()>::Ok(()) });
3213    ///
3214    /// fn prepare_request_builder() -> DeleteAspectType {
3215    ///   # panic!();
3216    ///   // ... details omitted ...
3217    /// }
3218    /// ```
3219    #[derive(Clone, Debug)]
3220    pub struct DeleteAspectType(RequestBuilder<crate::model::DeleteAspectTypeRequest>);
3221
3222    impl DeleteAspectType {
3223        pub(crate) fn new(
3224            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3225        ) -> Self {
3226            Self(RequestBuilder::new(stub))
3227        }
3228
3229        /// Sets the full request, replacing any prior values.
3230        pub fn with_request<V: Into<crate::model::DeleteAspectTypeRequest>>(
3231            mut self,
3232            v: V,
3233        ) -> Self {
3234            self.0.request = v.into();
3235            self
3236        }
3237
3238        /// Sets all the options, replacing any prior values.
3239        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3240            self.0.options = v.into();
3241            self
3242        }
3243
3244        /// Sends the request.
3245        ///
3246        /// # Long running operations
3247        ///
3248        /// This starts, but does not poll, a longrunning operation. More information
3249        /// on [delete_aspect_type][crate::client::CatalogService::delete_aspect_type].
3250        pub async fn send(self) -> Result<longrunning::model::Operation> {
3251            (*self.0.stub)
3252                .delete_aspect_type(self.0.request, self.0.options)
3253                .await
3254                .map(gax::response::Response::into_body)
3255        }
3256
3257        /// Creates a [Poller][lro::Poller] to work with `delete_aspect_type`.
3258        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
3259            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3260            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3261            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3262
3263            let stub = self.0.stub.clone();
3264            let mut options = self.0.options.clone();
3265            options.set_retry_policy(gax::retry_policy::NeverRetry);
3266            let query = move |name| {
3267                let stub = stub.clone();
3268                let options = options.clone();
3269                async {
3270                    let op = GetOperation::new(stub)
3271                        .set_name(name)
3272                        .with_options(options)
3273                        .send()
3274                        .await?;
3275                    Ok(Operation::new(op))
3276                }
3277            };
3278
3279            let start = move || async {
3280                let op = self.send().await?;
3281                Ok(Operation::new(op))
3282            };
3283
3284            lro::internal::new_unit_response_poller(
3285                polling_error_policy,
3286                polling_backoff_policy,
3287                start,
3288                query,
3289            )
3290        }
3291
3292        /// Sets the value of [name][crate::model::DeleteAspectTypeRequest::name].
3293        ///
3294        /// This is a **required** field for requests.
3295        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3296            self.0.request.name = v.into();
3297            self
3298        }
3299
3300        /// Sets the value of [etag][crate::model::DeleteAspectTypeRequest::etag].
3301        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
3302            self.0.request.etag = v.into();
3303            self
3304        }
3305    }
3306
3307    #[doc(hidden)]
3308    impl gax::options::internal::RequestBuilder for DeleteAspectType {
3309        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3310            &mut self.0.options
3311        }
3312    }
3313
3314    /// The request builder for [CatalogService::list_aspect_types][crate::client::CatalogService::list_aspect_types] calls.
3315    ///
3316    /// # Example
3317    /// ```no_run
3318    /// # use google_cloud_dataplex_v1::builder;
3319    /// use builder::catalog_service::ListAspectTypes;
3320    /// # tokio_test::block_on(async {
3321    /// use gax::paginator::ItemPaginator;
3322    ///
3323    /// let builder = prepare_request_builder();
3324    /// let mut items = builder.by_item();
3325    /// while let Some(result) = items.next().await {
3326    ///   let item = result?;
3327    /// }
3328    /// # gax::Result::<()>::Ok(()) });
3329    ///
3330    /// fn prepare_request_builder() -> ListAspectTypes {
3331    ///   # panic!();
3332    ///   // ... details omitted ...
3333    /// }
3334    /// ```
3335    #[derive(Clone, Debug)]
3336    pub struct ListAspectTypes(RequestBuilder<crate::model::ListAspectTypesRequest>);
3337
3338    impl ListAspectTypes {
3339        pub(crate) fn new(
3340            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3341        ) -> Self {
3342            Self(RequestBuilder::new(stub))
3343        }
3344
3345        /// Sets the full request, replacing any prior values.
3346        pub fn with_request<V: Into<crate::model::ListAspectTypesRequest>>(mut self, v: V) -> Self {
3347            self.0.request = v.into();
3348            self
3349        }
3350
3351        /// Sets all the options, replacing any prior values.
3352        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3353            self.0.options = v.into();
3354            self
3355        }
3356
3357        /// Sends the request.
3358        pub async fn send(self) -> Result<crate::model::ListAspectTypesResponse> {
3359            (*self.0.stub)
3360                .list_aspect_types(self.0.request, self.0.options)
3361                .await
3362                .map(gax::response::Response::into_body)
3363        }
3364
3365        /// Streams each page in the collection.
3366        pub fn by_page(
3367            self,
3368        ) -> impl gax::paginator::Paginator<crate::model::ListAspectTypesResponse, gax::error::Error>
3369        {
3370            use std::clone::Clone;
3371            let token = self.0.request.page_token.clone();
3372            let execute = move |token: String| {
3373                let mut builder = self.clone();
3374                builder.0.request = builder.0.request.set_page_token(token);
3375                builder.send()
3376            };
3377            gax::paginator::internal::new_paginator(token, execute)
3378        }
3379
3380        /// Streams each item in the collection.
3381        pub fn by_item(
3382            self,
3383        ) -> impl gax::paginator::ItemPaginator<crate::model::ListAspectTypesResponse, gax::error::Error>
3384        {
3385            use gax::paginator::Paginator;
3386            self.by_page().items()
3387        }
3388
3389        /// Sets the value of [parent][crate::model::ListAspectTypesRequest::parent].
3390        ///
3391        /// This is a **required** field for requests.
3392        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3393            self.0.request.parent = v.into();
3394            self
3395        }
3396
3397        /// Sets the value of [page_size][crate::model::ListAspectTypesRequest::page_size].
3398        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3399            self.0.request.page_size = v.into();
3400            self
3401        }
3402
3403        /// Sets the value of [page_token][crate::model::ListAspectTypesRequest::page_token].
3404        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3405            self.0.request.page_token = v.into();
3406            self
3407        }
3408
3409        /// Sets the value of [filter][crate::model::ListAspectTypesRequest::filter].
3410        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3411            self.0.request.filter = v.into();
3412            self
3413        }
3414
3415        /// Sets the value of [order_by][crate::model::ListAspectTypesRequest::order_by].
3416        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3417            self.0.request.order_by = v.into();
3418            self
3419        }
3420    }
3421
3422    #[doc(hidden)]
3423    impl gax::options::internal::RequestBuilder for ListAspectTypes {
3424        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3425            &mut self.0.options
3426        }
3427    }
3428
3429    /// The request builder for [CatalogService::get_aspect_type][crate::client::CatalogService::get_aspect_type] calls.
3430    ///
3431    /// # Example
3432    /// ```no_run
3433    /// # use google_cloud_dataplex_v1::builder;
3434    /// use builder::catalog_service::GetAspectType;
3435    /// # tokio_test::block_on(async {
3436    ///
3437    /// let builder = prepare_request_builder();
3438    /// let response = builder.send().await?;
3439    /// # gax::Result::<()>::Ok(()) });
3440    ///
3441    /// fn prepare_request_builder() -> GetAspectType {
3442    ///   # panic!();
3443    ///   // ... details omitted ...
3444    /// }
3445    /// ```
3446    #[derive(Clone, Debug)]
3447    pub struct GetAspectType(RequestBuilder<crate::model::GetAspectTypeRequest>);
3448
3449    impl GetAspectType {
3450        pub(crate) fn new(
3451            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3452        ) -> Self {
3453            Self(RequestBuilder::new(stub))
3454        }
3455
3456        /// Sets the full request, replacing any prior values.
3457        pub fn with_request<V: Into<crate::model::GetAspectTypeRequest>>(mut self, v: V) -> Self {
3458            self.0.request = v.into();
3459            self
3460        }
3461
3462        /// Sets all the options, replacing any prior values.
3463        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3464            self.0.options = v.into();
3465            self
3466        }
3467
3468        /// Sends the request.
3469        pub async fn send(self) -> Result<crate::model::AspectType> {
3470            (*self.0.stub)
3471                .get_aspect_type(self.0.request, self.0.options)
3472                .await
3473                .map(gax::response::Response::into_body)
3474        }
3475
3476        /// Sets the value of [name][crate::model::GetAspectTypeRequest::name].
3477        ///
3478        /// This is a **required** field for requests.
3479        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3480            self.0.request.name = v.into();
3481            self
3482        }
3483    }
3484
3485    #[doc(hidden)]
3486    impl gax::options::internal::RequestBuilder for GetAspectType {
3487        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3488            &mut self.0.options
3489        }
3490    }
3491
3492    /// The request builder for [CatalogService::create_entry_group][crate::client::CatalogService::create_entry_group] calls.
3493    ///
3494    /// # Example
3495    /// ```no_run
3496    /// # use google_cloud_dataplex_v1::builder;
3497    /// use builder::catalog_service::CreateEntryGroup;
3498    /// # tokio_test::block_on(async {
3499    /// use lro::Poller;
3500    ///
3501    /// let builder = prepare_request_builder();
3502    /// let response = builder.poller().until_done().await?;
3503    /// # gax::Result::<()>::Ok(()) });
3504    ///
3505    /// fn prepare_request_builder() -> CreateEntryGroup {
3506    ///   # panic!();
3507    ///   // ... details omitted ...
3508    /// }
3509    /// ```
3510    #[derive(Clone, Debug)]
3511    pub struct CreateEntryGroup(RequestBuilder<crate::model::CreateEntryGroupRequest>);
3512
3513    impl CreateEntryGroup {
3514        pub(crate) fn new(
3515            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3516        ) -> Self {
3517            Self(RequestBuilder::new(stub))
3518        }
3519
3520        /// Sets the full request, replacing any prior values.
3521        pub fn with_request<V: Into<crate::model::CreateEntryGroupRequest>>(
3522            mut self,
3523            v: V,
3524        ) -> Self {
3525            self.0.request = v.into();
3526            self
3527        }
3528
3529        /// Sets all the options, replacing any prior values.
3530        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3531            self.0.options = v.into();
3532            self
3533        }
3534
3535        /// Sends the request.
3536        ///
3537        /// # Long running operations
3538        ///
3539        /// This starts, but does not poll, a longrunning operation. More information
3540        /// on [create_entry_group][crate::client::CatalogService::create_entry_group].
3541        pub async fn send(self) -> Result<longrunning::model::Operation> {
3542            (*self.0.stub)
3543                .create_entry_group(self.0.request, self.0.options)
3544                .await
3545                .map(gax::response::Response::into_body)
3546        }
3547
3548        /// Creates a [Poller][lro::Poller] to work with `create_entry_group`.
3549        pub fn poller(
3550            self,
3551        ) -> impl lro::Poller<crate::model::EntryGroup, crate::model::OperationMetadata> {
3552            type Operation =
3553                lro::internal::Operation<crate::model::EntryGroup, crate::model::OperationMetadata>;
3554            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3555            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3556
3557            let stub = self.0.stub.clone();
3558            let mut options = self.0.options.clone();
3559            options.set_retry_policy(gax::retry_policy::NeverRetry);
3560            let query = move |name| {
3561                let stub = stub.clone();
3562                let options = options.clone();
3563                async {
3564                    let op = GetOperation::new(stub)
3565                        .set_name(name)
3566                        .with_options(options)
3567                        .send()
3568                        .await?;
3569                    Ok(Operation::new(op))
3570                }
3571            };
3572
3573            let start = move || async {
3574                let op = self.send().await?;
3575                Ok(Operation::new(op))
3576            };
3577
3578            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3579        }
3580
3581        /// Sets the value of [parent][crate::model::CreateEntryGroupRequest::parent].
3582        ///
3583        /// This is a **required** field for requests.
3584        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3585            self.0.request.parent = v.into();
3586            self
3587        }
3588
3589        /// Sets the value of [entry_group_id][crate::model::CreateEntryGroupRequest::entry_group_id].
3590        ///
3591        /// This is a **required** field for requests.
3592        pub fn set_entry_group_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
3593            self.0.request.entry_group_id = v.into();
3594            self
3595        }
3596
3597        /// Sets the value of [entry_group][crate::model::CreateEntryGroupRequest::entry_group].
3598        ///
3599        /// This is a **required** field for requests.
3600        pub fn set_entry_group<T>(mut self, v: T) -> Self
3601        where
3602            T: std::convert::Into<crate::model::EntryGroup>,
3603        {
3604            self.0.request.entry_group = std::option::Option::Some(v.into());
3605            self
3606        }
3607
3608        /// Sets or clears the value of [entry_group][crate::model::CreateEntryGroupRequest::entry_group].
3609        ///
3610        /// This is a **required** field for requests.
3611        pub fn set_or_clear_entry_group<T>(mut self, v: std::option::Option<T>) -> Self
3612        where
3613            T: std::convert::Into<crate::model::EntryGroup>,
3614        {
3615            self.0.request.entry_group = v.map(|x| x.into());
3616            self
3617        }
3618
3619        /// Sets the value of [validate_only][crate::model::CreateEntryGroupRequest::validate_only].
3620        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3621            self.0.request.validate_only = v.into();
3622            self
3623        }
3624    }
3625
3626    #[doc(hidden)]
3627    impl gax::options::internal::RequestBuilder for CreateEntryGroup {
3628        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3629            &mut self.0.options
3630        }
3631    }
3632
3633    /// The request builder for [CatalogService::update_entry_group][crate::client::CatalogService::update_entry_group] calls.
3634    ///
3635    /// # Example
3636    /// ```no_run
3637    /// # use google_cloud_dataplex_v1::builder;
3638    /// use builder::catalog_service::UpdateEntryGroup;
3639    /// # tokio_test::block_on(async {
3640    /// use lro::Poller;
3641    ///
3642    /// let builder = prepare_request_builder();
3643    /// let response = builder.poller().until_done().await?;
3644    /// # gax::Result::<()>::Ok(()) });
3645    ///
3646    /// fn prepare_request_builder() -> UpdateEntryGroup {
3647    ///   # panic!();
3648    ///   // ... details omitted ...
3649    /// }
3650    /// ```
3651    #[derive(Clone, Debug)]
3652    pub struct UpdateEntryGroup(RequestBuilder<crate::model::UpdateEntryGroupRequest>);
3653
3654    impl UpdateEntryGroup {
3655        pub(crate) fn new(
3656            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3657        ) -> Self {
3658            Self(RequestBuilder::new(stub))
3659        }
3660
3661        /// Sets the full request, replacing any prior values.
3662        pub fn with_request<V: Into<crate::model::UpdateEntryGroupRequest>>(
3663            mut self,
3664            v: V,
3665        ) -> Self {
3666            self.0.request = v.into();
3667            self
3668        }
3669
3670        /// Sets all the options, replacing any prior values.
3671        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3672            self.0.options = v.into();
3673            self
3674        }
3675
3676        /// Sends the request.
3677        ///
3678        /// # Long running operations
3679        ///
3680        /// This starts, but does not poll, a longrunning operation. More information
3681        /// on [update_entry_group][crate::client::CatalogService::update_entry_group].
3682        pub async fn send(self) -> Result<longrunning::model::Operation> {
3683            (*self.0.stub)
3684                .update_entry_group(self.0.request, self.0.options)
3685                .await
3686                .map(gax::response::Response::into_body)
3687        }
3688
3689        /// Creates a [Poller][lro::Poller] to work with `update_entry_group`.
3690        pub fn poller(
3691            self,
3692        ) -> impl lro::Poller<crate::model::EntryGroup, crate::model::OperationMetadata> {
3693            type Operation =
3694                lro::internal::Operation<crate::model::EntryGroup, crate::model::OperationMetadata>;
3695            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3696            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3697
3698            let stub = self.0.stub.clone();
3699            let mut options = self.0.options.clone();
3700            options.set_retry_policy(gax::retry_policy::NeverRetry);
3701            let query = move |name| {
3702                let stub = stub.clone();
3703                let options = options.clone();
3704                async {
3705                    let op = GetOperation::new(stub)
3706                        .set_name(name)
3707                        .with_options(options)
3708                        .send()
3709                        .await?;
3710                    Ok(Operation::new(op))
3711                }
3712            };
3713
3714            let start = move || async {
3715                let op = self.send().await?;
3716                Ok(Operation::new(op))
3717            };
3718
3719            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
3720        }
3721
3722        /// Sets the value of [entry_group][crate::model::UpdateEntryGroupRequest::entry_group].
3723        ///
3724        /// This is a **required** field for requests.
3725        pub fn set_entry_group<T>(mut self, v: T) -> Self
3726        where
3727            T: std::convert::Into<crate::model::EntryGroup>,
3728        {
3729            self.0.request.entry_group = std::option::Option::Some(v.into());
3730            self
3731        }
3732
3733        /// Sets or clears the value of [entry_group][crate::model::UpdateEntryGroupRequest::entry_group].
3734        ///
3735        /// This is a **required** field for requests.
3736        pub fn set_or_clear_entry_group<T>(mut self, v: std::option::Option<T>) -> Self
3737        where
3738            T: std::convert::Into<crate::model::EntryGroup>,
3739        {
3740            self.0.request.entry_group = v.map(|x| x.into());
3741            self
3742        }
3743
3744        /// Sets the value of [update_mask][crate::model::UpdateEntryGroupRequest::update_mask].
3745        ///
3746        /// This is a **required** field for requests.
3747        pub fn set_update_mask<T>(mut self, v: T) -> Self
3748        where
3749            T: std::convert::Into<wkt::FieldMask>,
3750        {
3751            self.0.request.update_mask = std::option::Option::Some(v.into());
3752            self
3753        }
3754
3755        /// Sets or clears the value of [update_mask][crate::model::UpdateEntryGroupRequest::update_mask].
3756        ///
3757        /// This is a **required** field for requests.
3758        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
3759        where
3760            T: std::convert::Into<wkt::FieldMask>,
3761        {
3762            self.0.request.update_mask = v.map(|x| x.into());
3763            self
3764        }
3765
3766        /// Sets the value of [validate_only][crate::model::UpdateEntryGroupRequest::validate_only].
3767        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
3768            self.0.request.validate_only = v.into();
3769            self
3770        }
3771    }
3772
3773    #[doc(hidden)]
3774    impl gax::options::internal::RequestBuilder for UpdateEntryGroup {
3775        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3776            &mut self.0.options
3777        }
3778    }
3779
3780    /// The request builder for [CatalogService::delete_entry_group][crate::client::CatalogService::delete_entry_group] calls.
3781    ///
3782    /// # Example
3783    /// ```no_run
3784    /// # use google_cloud_dataplex_v1::builder;
3785    /// use builder::catalog_service::DeleteEntryGroup;
3786    /// # tokio_test::block_on(async {
3787    /// use lro::Poller;
3788    ///
3789    /// let builder = prepare_request_builder();
3790    /// let response = builder.poller().until_done().await?;
3791    /// # gax::Result::<()>::Ok(()) });
3792    ///
3793    /// fn prepare_request_builder() -> DeleteEntryGroup {
3794    ///   # panic!();
3795    ///   // ... details omitted ...
3796    /// }
3797    /// ```
3798    #[derive(Clone, Debug)]
3799    pub struct DeleteEntryGroup(RequestBuilder<crate::model::DeleteEntryGroupRequest>);
3800
3801    impl DeleteEntryGroup {
3802        pub(crate) fn new(
3803            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3804        ) -> Self {
3805            Self(RequestBuilder::new(stub))
3806        }
3807
3808        /// Sets the full request, replacing any prior values.
3809        pub fn with_request<V: Into<crate::model::DeleteEntryGroupRequest>>(
3810            mut self,
3811            v: V,
3812        ) -> Self {
3813            self.0.request = v.into();
3814            self
3815        }
3816
3817        /// Sets all the options, replacing any prior values.
3818        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3819            self.0.options = v.into();
3820            self
3821        }
3822
3823        /// Sends the request.
3824        ///
3825        /// # Long running operations
3826        ///
3827        /// This starts, but does not poll, a longrunning operation. More information
3828        /// on [delete_entry_group][crate::client::CatalogService::delete_entry_group].
3829        pub async fn send(self) -> Result<longrunning::model::Operation> {
3830            (*self.0.stub)
3831                .delete_entry_group(self.0.request, self.0.options)
3832                .await
3833                .map(gax::response::Response::into_body)
3834        }
3835
3836        /// Creates a [Poller][lro::Poller] to work with `delete_entry_group`.
3837        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
3838            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
3839            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
3840            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
3841
3842            let stub = self.0.stub.clone();
3843            let mut options = self.0.options.clone();
3844            options.set_retry_policy(gax::retry_policy::NeverRetry);
3845            let query = move |name| {
3846                let stub = stub.clone();
3847                let options = options.clone();
3848                async {
3849                    let op = GetOperation::new(stub)
3850                        .set_name(name)
3851                        .with_options(options)
3852                        .send()
3853                        .await?;
3854                    Ok(Operation::new(op))
3855                }
3856            };
3857
3858            let start = move || async {
3859                let op = self.send().await?;
3860                Ok(Operation::new(op))
3861            };
3862
3863            lro::internal::new_unit_response_poller(
3864                polling_error_policy,
3865                polling_backoff_policy,
3866                start,
3867                query,
3868            )
3869        }
3870
3871        /// Sets the value of [name][crate::model::DeleteEntryGroupRequest::name].
3872        ///
3873        /// This is a **required** field for requests.
3874        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
3875            self.0.request.name = v.into();
3876            self
3877        }
3878
3879        /// Sets the value of [etag][crate::model::DeleteEntryGroupRequest::etag].
3880        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
3881            self.0.request.etag = v.into();
3882            self
3883        }
3884    }
3885
3886    #[doc(hidden)]
3887    impl gax::options::internal::RequestBuilder for DeleteEntryGroup {
3888        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
3889            &mut self.0.options
3890        }
3891    }
3892
3893    /// The request builder for [CatalogService::list_entry_groups][crate::client::CatalogService::list_entry_groups] calls.
3894    ///
3895    /// # Example
3896    /// ```no_run
3897    /// # use google_cloud_dataplex_v1::builder;
3898    /// use builder::catalog_service::ListEntryGroups;
3899    /// # tokio_test::block_on(async {
3900    /// use gax::paginator::ItemPaginator;
3901    ///
3902    /// let builder = prepare_request_builder();
3903    /// let mut items = builder.by_item();
3904    /// while let Some(result) = items.next().await {
3905    ///   let item = result?;
3906    /// }
3907    /// # gax::Result::<()>::Ok(()) });
3908    ///
3909    /// fn prepare_request_builder() -> ListEntryGroups {
3910    ///   # panic!();
3911    ///   // ... details omitted ...
3912    /// }
3913    /// ```
3914    #[derive(Clone, Debug)]
3915    pub struct ListEntryGroups(RequestBuilder<crate::model::ListEntryGroupsRequest>);
3916
3917    impl ListEntryGroups {
3918        pub(crate) fn new(
3919            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
3920        ) -> Self {
3921            Self(RequestBuilder::new(stub))
3922        }
3923
3924        /// Sets the full request, replacing any prior values.
3925        pub fn with_request<V: Into<crate::model::ListEntryGroupsRequest>>(mut self, v: V) -> Self {
3926            self.0.request = v.into();
3927            self
3928        }
3929
3930        /// Sets all the options, replacing any prior values.
3931        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
3932            self.0.options = v.into();
3933            self
3934        }
3935
3936        /// Sends the request.
3937        pub async fn send(self) -> Result<crate::model::ListEntryGroupsResponse> {
3938            (*self.0.stub)
3939                .list_entry_groups(self.0.request, self.0.options)
3940                .await
3941                .map(gax::response::Response::into_body)
3942        }
3943
3944        /// Streams each page in the collection.
3945        pub fn by_page(
3946            self,
3947        ) -> impl gax::paginator::Paginator<crate::model::ListEntryGroupsResponse, gax::error::Error>
3948        {
3949            use std::clone::Clone;
3950            let token = self.0.request.page_token.clone();
3951            let execute = move |token: String| {
3952                let mut builder = self.clone();
3953                builder.0.request = builder.0.request.set_page_token(token);
3954                builder.send()
3955            };
3956            gax::paginator::internal::new_paginator(token, execute)
3957        }
3958
3959        /// Streams each item in the collection.
3960        pub fn by_item(
3961            self,
3962        ) -> impl gax::paginator::ItemPaginator<crate::model::ListEntryGroupsResponse, gax::error::Error>
3963        {
3964            use gax::paginator::Paginator;
3965            self.by_page().items()
3966        }
3967
3968        /// Sets the value of [parent][crate::model::ListEntryGroupsRequest::parent].
3969        ///
3970        /// This is a **required** field for requests.
3971        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
3972            self.0.request.parent = v.into();
3973            self
3974        }
3975
3976        /// Sets the value of [page_size][crate::model::ListEntryGroupsRequest::page_size].
3977        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
3978            self.0.request.page_size = v.into();
3979            self
3980        }
3981
3982        /// Sets the value of [page_token][crate::model::ListEntryGroupsRequest::page_token].
3983        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
3984            self.0.request.page_token = v.into();
3985            self
3986        }
3987
3988        /// Sets the value of [filter][crate::model::ListEntryGroupsRequest::filter].
3989        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
3990            self.0.request.filter = v.into();
3991            self
3992        }
3993
3994        /// Sets the value of [order_by][crate::model::ListEntryGroupsRequest::order_by].
3995        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
3996            self.0.request.order_by = v.into();
3997            self
3998        }
3999    }
4000
4001    #[doc(hidden)]
4002    impl gax::options::internal::RequestBuilder for ListEntryGroups {
4003        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4004            &mut self.0.options
4005        }
4006    }
4007
4008    /// The request builder for [CatalogService::get_entry_group][crate::client::CatalogService::get_entry_group] calls.
4009    ///
4010    /// # Example
4011    /// ```no_run
4012    /// # use google_cloud_dataplex_v1::builder;
4013    /// use builder::catalog_service::GetEntryGroup;
4014    /// # tokio_test::block_on(async {
4015    ///
4016    /// let builder = prepare_request_builder();
4017    /// let response = builder.send().await?;
4018    /// # gax::Result::<()>::Ok(()) });
4019    ///
4020    /// fn prepare_request_builder() -> GetEntryGroup {
4021    ///   # panic!();
4022    ///   // ... details omitted ...
4023    /// }
4024    /// ```
4025    #[derive(Clone, Debug)]
4026    pub struct GetEntryGroup(RequestBuilder<crate::model::GetEntryGroupRequest>);
4027
4028    impl GetEntryGroup {
4029        pub(crate) fn new(
4030            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4031        ) -> Self {
4032            Self(RequestBuilder::new(stub))
4033        }
4034
4035        /// Sets the full request, replacing any prior values.
4036        pub fn with_request<V: Into<crate::model::GetEntryGroupRequest>>(mut self, v: V) -> Self {
4037            self.0.request = v.into();
4038            self
4039        }
4040
4041        /// Sets all the options, replacing any prior values.
4042        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4043            self.0.options = v.into();
4044            self
4045        }
4046
4047        /// Sends the request.
4048        pub async fn send(self) -> Result<crate::model::EntryGroup> {
4049            (*self.0.stub)
4050                .get_entry_group(self.0.request, self.0.options)
4051                .await
4052                .map(gax::response::Response::into_body)
4053        }
4054
4055        /// Sets the value of [name][crate::model::GetEntryGroupRequest::name].
4056        ///
4057        /// This is a **required** field for requests.
4058        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4059            self.0.request.name = v.into();
4060            self
4061        }
4062    }
4063
4064    #[doc(hidden)]
4065    impl gax::options::internal::RequestBuilder for GetEntryGroup {
4066        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4067            &mut self.0.options
4068        }
4069    }
4070
4071    /// The request builder for [CatalogService::create_entry][crate::client::CatalogService::create_entry] calls.
4072    ///
4073    /// # Example
4074    /// ```no_run
4075    /// # use google_cloud_dataplex_v1::builder;
4076    /// use builder::catalog_service::CreateEntry;
4077    /// # tokio_test::block_on(async {
4078    ///
4079    /// let builder = prepare_request_builder();
4080    /// let response = builder.send().await?;
4081    /// # gax::Result::<()>::Ok(()) });
4082    ///
4083    /// fn prepare_request_builder() -> CreateEntry {
4084    ///   # panic!();
4085    ///   // ... details omitted ...
4086    /// }
4087    /// ```
4088    #[derive(Clone, Debug)]
4089    pub struct CreateEntry(RequestBuilder<crate::model::CreateEntryRequest>);
4090
4091    impl CreateEntry {
4092        pub(crate) fn new(
4093            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4094        ) -> Self {
4095            Self(RequestBuilder::new(stub))
4096        }
4097
4098        /// Sets the full request, replacing any prior values.
4099        pub fn with_request<V: Into<crate::model::CreateEntryRequest>>(mut self, v: V) -> Self {
4100            self.0.request = v.into();
4101            self
4102        }
4103
4104        /// Sets all the options, replacing any prior values.
4105        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4106            self.0.options = v.into();
4107            self
4108        }
4109
4110        /// Sends the request.
4111        pub async fn send(self) -> Result<crate::model::Entry> {
4112            (*self.0.stub)
4113                .create_entry(self.0.request, self.0.options)
4114                .await
4115                .map(gax::response::Response::into_body)
4116        }
4117
4118        /// Sets the value of [parent][crate::model::CreateEntryRequest::parent].
4119        ///
4120        /// This is a **required** field for requests.
4121        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4122            self.0.request.parent = v.into();
4123            self
4124        }
4125
4126        /// Sets the value of [entry_id][crate::model::CreateEntryRequest::entry_id].
4127        ///
4128        /// This is a **required** field for requests.
4129        pub fn set_entry_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4130            self.0.request.entry_id = v.into();
4131            self
4132        }
4133
4134        /// Sets the value of [entry][crate::model::CreateEntryRequest::entry].
4135        ///
4136        /// This is a **required** field for requests.
4137        pub fn set_entry<T>(mut self, v: T) -> Self
4138        where
4139            T: std::convert::Into<crate::model::Entry>,
4140        {
4141            self.0.request.entry = std::option::Option::Some(v.into());
4142            self
4143        }
4144
4145        /// Sets or clears the value of [entry][crate::model::CreateEntryRequest::entry].
4146        ///
4147        /// This is a **required** field for requests.
4148        pub fn set_or_clear_entry<T>(mut self, v: std::option::Option<T>) -> Self
4149        where
4150            T: std::convert::Into<crate::model::Entry>,
4151        {
4152            self.0.request.entry = v.map(|x| x.into());
4153            self
4154        }
4155    }
4156
4157    #[doc(hidden)]
4158    impl gax::options::internal::RequestBuilder for CreateEntry {
4159        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4160            &mut self.0.options
4161        }
4162    }
4163
4164    /// The request builder for [CatalogService::update_entry][crate::client::CatalogService::update_entry] calls.
4165    ///
4166    /// # Example
4167    /// ```no_run
4168    /// # use google_cloud_dataplex_v1::builder;
4169    /// use builder::catalog_service::UpdateEntry;
4170    /// # tokio_test::block_on(async {
4171    ///
4172    /// let builder = prepare_request_builder();
4173    /// let response = builder.send().await?;
4174    /// # gax::Result::<()>::Ok(()) });
4175    ///
4176    /// fn prepare_request_builder() -> UpdateEntry {
4177    ///   # panic!();
4178    ///   // ... details omitted ...
4179    /// }
4180    /// ```
4181    #[derive(Clone, Debug)]
4182    pub struct UpdateEntry(RequestBuilder<crate::model::UpdateEntryRequest>);
4183
4184    impl UpdateEntry {
4185        pub(crate) fn new(
4186            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4187        ) -> Self {
4188            Self(RequestBuilder::new(stub))
4189        }
4190
4191        /// Sets the full request, replacing any prior values.
4192        pub fn with_request<V: Into<crate::model::UpdateEntryRequest>>(mut self, v: V) -> Self {
4193            self.0.request = v.into();
4194            self
4195        }
4196
4197        /// Sets all the options, replacing any prior values.
4198        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4199            self.0.options = v.into();
4200            self
4201        }
4202
4203        /// Sends the request.
4204        pub async fn send(self) -> Result<crate::model::Entry> {
4205            (*self.0.stub)
4206                .update_entry(self.0.request, self.0.options)
4207                .await
4208                .map(gax::response::Response::into_body)
4209        }
4210
4211        /// Sets the value of [entry][crate::model::UpdateEntryRequest::entry].
4212        ///
4213        /// This is a **required** field for requests.
4214        pub fn set_entry<T>(mut self, v: T) -> Self
4215        where
4216            T: std::convert::Into<crate::model::Entry>,
4217        {
4218            self.0.request.entry = std::option::Option::Some(v.into());
4219            self
4220        }
4221
4222        /// Sets or clears the value of [entry][crate::model::UpdateEntryRequest::entry].
4223        ///
4224        /// This is a **required** field for requests.
4225        pub fn set_or_clear_entry<T>(mut self, v: std::option::Option<T>) -> Self
4226        where
4227            T: std::convert::Into<crate::model::Entry>,
4228        {
4229            self.0.request.entry = v.map(|x| x.into());
4230            self
4231        }
4232
4233        /// Sets the value of [update_mask][crate::model::UpdateEntryRequest::update_mask].
4234        pub fn set_update_mask<T>(mut self, v: T) -> Self
4235        where
4236            T: std::convert::Into<wkt::FieldMask>,
4237        {
4238            self.0.request.update_mask = std::option::Option::Some(v.into());
4239            self
4240        }
4241
4242        /// Sets or clears the value of [update_mask][crate::model::UpdateEntryRequest::update_mask].
4243        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
4244        where
4245            T: std::convert::Into<wkt::FieldMask>,
4246        {
4247            self.0.request.update_mask = v.map(|x| x.into());
4248            self
4249        }
4250
4251        /// Sets the value of [allow_missing][crate::model::UpdateEntryRequest::allow_missing].
4252        pub fn set_allow_missing<T: Into<bool>>(mut self, v: T) -> Self {
4253            self.0.request.allow_missing = v.into();
4254            self
4255        }
4256
4257        /// Sets the value of [delete_missing_aspects][crate::model::UpdateEntryRequest::delete_missing_aspects].
4258        pub fn set_delete_missing_aspects<T: Into<bool>>(mut self, v: T) -> Self {
4259            self.0.request.delete_missing_aspects = v.into();
4260            self
4261        }
4262
4263        /// Sets the value of [aspect_keys][crate::model::UpdateEntryRequest::aspect_keys].
4264        pub fn set_aspect_keys<T, V>(mut self, v: T) -> Self
4265        where
4266            T: std::iter::IntoIterator<Item = V>,
4267            V: std::convert::Into<std::string::String>,
4268        {
4269            use std::iter::Iterator;
4270            self.0.request.aspect_keys = v.into_iter().map(|i| i.into()).collect();
4271            self
4272        }
4273    }
4274
4275    #[doc(hidden)]
4276    impl gax::options::internal::RequestBuilder for UpdateEntry {
4277        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4278            &mut self.0.options
4279        }
4280    }
4281
4282    /// The request builder for [CatalogService::delete_entry][crate::client::CatalogService::delete_entry] calls.
4283    ///
4284    /// # Example
4285    /// ```no_run
4286    /// # use google_cloud_dataplex_v1::builder;
4287    /// use builder::catalog_service::DeleteEntry;
4288    /// # tokio_test::block_on(async {
4289    ///
4290    /// let builder = prepare_request_builder();
4291    /// let response = builder.send().await?;
4292    /// # gax::Result::<()>::Ok(()) });
4293    ///
4294    /// fn prepare_request_builder() -> DeleteEntry {
4295    ///   # panic!();
4296    ///   // ... details omitted ...
4297    /// }
4298    /// ```
4299    #[derive(Clone, Debug)]
4300    pub struct DeleteEntry(RequestBuilder<crate::model::DeleteEntryRequest>);
4301
4302    impl DeleteEntry {
4303        pub(crate) fn new(
4304            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4305        ) -> Self {
4306            Self(RequestBuilder::new(stub))
4307        }
4308
4309        /// Sets the full request, replacing any prior values.
4310        pub fn with_request<V: Into<crate::model::DeleteEntryRequest>>(mut self, v: V) -> Self {
4311            self.0.request = v.into();
4312            self
4313        }
4314
4315        /// Sets all the options, replacing any prior values.
4316        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4317            self.0.options = v.into();
4318            self
4319        }
4320
4321        /// Sends the request.
4322        pub async fn send(self) -> Result<crate::model::Entry> {
4323            (*self.0.stub)
4324                .delete_entry(self.0.request, self.0.options)
4325                .await
4326                .map(gax::response::Response::into_body)
4327        }
4328
4329        /// Sets the value of [name][crate::model::DeleteEntryRequest::name].
4330        ///
4331        /// This is a **required** field for requests.
4332        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4333            self.0.request.name = v.into();
4334            self
4335        }
4336    }
4337
4338    #[doc(hidden)]
4339    impl gax::options::internal::RequestBuilder for DeleteEntry {
4340        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4341            &mut self.0.options
4342        }
4343    }
4344
4345    /// The request builder for [CatalogService::list_entries][crate::client::CatalogService::list_entries] calls.
4346    ///
4347    /// # Example
4348    /// ```no_run
4349    /// # use google_cloud_dataplex_v1::builder;
4350    /// use builder::catalog_service::ListEntries;
4351    /// # tokio_test::block_on(async {
4352    /// use gax::paginator::ItemPaginator;
4353    ///
4354    /// let builder = prepare_request_builder();
4355    /// let mut items = builder.by_item();
4356    /// while let Some(result) = items.next().await {
4357    ///   let item = result?;
4358    /// }
4359    /// # gax::Result::<()>::Ok(()) });
4360    ///
4361    /// fn prepare_request_builder() -> ListEntries {
4362    ///   # panic!();
4363    ///   // ... details omitted ...
4364    /// }
4365    /// ```
4366    #[derive(Clone, Debug)]
4367    pub struct ListEntries(RequestBuilder<crate::model::ListEntriesRequest>);
4368
4369    impl ListEntries {
4370        pub(crate) fn new(
4371            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4372        ) -> Self {
4373            Self(RequestBuilder::new(stub))
4374        }
4375
4376        /// Sets the full request, replacing any prior values.
4377        pub fn with_request<V: Into<crate::model::ListEntriesRequest>>(mut self, v: V) -> Self {
4378            self.0.request = v.into();
4379            self
4380        }
4381
4382        /// Sets all the options, replacing any prior values.
4383        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4384            self.0.options = v.into();
4385            self
4386        }
4387
4388        /// Sends the request.
4389        pub async fn send(self) -> Result<crate::model::ListEntriesResponse> {
4390            (*self.0.stub)
4391                .list_entries(self.0.request, self.0.options)
4392                .await
4393                .map(gax::response::Response::into_body)
4394        }
4395
4396        /// Streams each page in the collection.
4397        pub fn by_page(
4398            self,
4399        ) -> impl gax::paginator::Paginator<crate::model::ListEntriesResponse, gax::error::Error>
4400        {
4401            use std::clone::Clone;
4402            let token = self.0.request.page_token.clone();
4403            let execute = move |token: String| {
4404                let mut builder = self.clone();
4405                builder.0.request = builder.0.request.set_page_token(token);
4406                builder.send()
4407            };
4408            gax::paginator::internal::new_paginator(token, execute)
4409        }
4410
4411        /// Streams each item in the collection.
4412        pub fn by_item(
4413            self,
4414        ) -> impl gax::paginator::ItemPaginator<crate::model::ListEntriesResponse, gax::error::Error>
4415        {
4416            use gax::paginator::Paginator;
4417            self.by_page().items()
4418        }
4419
4420        /// Sets the value of [parent][crate::model::ListEntriesRequest::parent].
4421        ///
4422        /// This is a **required** field for requests.
4423        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4424            self.0.request.parent = v.into();
4425            self
4426        }
4427
4428        /// Sets the value of [page_size][crate::model::ListEntriesRequest::page_size].
4429        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4430            self.0.request.page_size = v.into();
4431            self
4432        }
4433
4434        /// Sets the value of [page_token][crate::model::ListEntriesRequest::page_token].
4435        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4436            self.0.request.page_token = v.into();
4437            self
4438        }
4439
4440        /// Sets the value of [filter][crate::model::ListEntriesRequest::filter].
4441        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
4442            self.0.request.filter = v.into();
4443            self
4444        }
4445    }
4446
4447    #[doc(hidden)]
4448    impl gax::options::internal::RequestBuilder for ListEntries {
4449        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4450            &mut self.0.options
4451        }
4452    }
4453
4454    /// The request builder for [CatalogService::get_entry][crate::client::CatalogService::get_entry] calls.
4455    ///
4456    /// # Example
4457    /// ```no_run
4458    /// # use google_cloud_dataplex_v1::builder;
4459    /// use builder::catalog_service::GetEntry;
4460    /// # tokio_test::block_on(async {
4461    ///
4462    /// let builder = prepare_request_builder();
4463    /// let response = builder.send().await?;
4464    /// # gax::Result::<()>::Ok(()) });
4465    ///
4466    /// fn prepare_request_builder() -> GetEntry {
4467    ///   # panic!();
4468    ///   // ... details omitted ...
4469    /// }
4470    /// ```
4471    #[derive(Clone, Debug)]
4472    pub struct GetEntry(RequestBuilder<crate::model::GetEntryRequest>);
4473
4474    impl GetEntry {
4475        pub(crate) fn new(
4476            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4477        ) -> Self {
4478            Self(RequestBuilder::new(stub))
4479        }
4480
4481        /// Sets the full request, replacing any prior values.
4482        pub fn with_request<V: Into<crate::model::GetEntryRequest>>(mut self, v: V) -> Self {
4483            self.0.request = v.into();
4484            self
4485        }
4486
4487        /// Sets all the options, replacing any prior values.
4488        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4489            self.0.options = v.into();
4490            self
4491        }
4492
4493        /// Sends the request.
4494        pub async fn send(self) -> Result<crate::model::Entry> {
4495            (*self.0.stub)
4496                .get_entry(self.0.request, self.0.options)
4497                .await
4498                .map(gax::response::Response::into_body)
4499        }
4500
4501        /// Sets the value of [name][crate::model::GetEntryRequest::name].
4502        ///
4503        /// This is a **required** field for requests.
4504        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4505            self.0.request.name = v.into();
4506            self
4507        }
4508
4509        /// Sets the value of [view][crate::model::GetEntryRequest::view].
4510        pub fn set_view<T: Into<crate::model::EntryView>>(mut self, v: T) -> Self {
4511            self.0.request.view = v.into();
4512            self
4513        }
4514
4515        /// Sets the value of [aspect_types][crate::model::GetEntryRequest::aspect_types].
4516        pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
4517        where
4518            T: std::iter::IntoIterator<Item = V>,
4519            V: std::convert::Into<std::string::String>,
4520        {
4521            use std::iter::Iterator;
4522            self.0.request.aspect_types = v.into_iter().map(|i| i.into()).collect();
4523            self
4524        }
4525
4526        /// Sets the value of [paths][crate::model::GetEntryRequest::paths].
4527        pub fn set_paths<T, V>(mut self, v: T) -> Self
4528        where
4529            T: std::iter::IntoIterator<Item = V>,
4530            V: std::convert::Into<std::string::String>,
4531        {
4532            use std::iter::Iterator;
4533            self.0.request.paths = v.into_iter().map(|i| i.into()).collect();
4534            self
4535        }
4536    }
4537
4538    #[doc(hidden)]
4539    impl gax::options::internal::RequestBuilder for GetEntry {
4540        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4541            &mut self.0.options
4542        }
4543    }
4544
4545    /// The request builder for [CatalogService::lookup_entry][crate::client::CatalogService::lookup_entry] calls.
4546    ///
4547    /// # Example
4548    /// ```no_run
4549    /// # use google_cloud_dataplex_v1::builder;
4550    /// use builder::catalog_service::LookupEntry;
4551    /// # tokio_test::block_on(async {
4552    ///
4553    /// let builder = prepare_request_builder();
4554    /// let response = builder.send().await?;
4555    /// # gax::Result::<()>::Ok(()) });
4556    ///
4557    /// fn prepare_request_builder() -> LookupEntry {
4558    ///   # panic!();
4559    ///   // ... details omitted ...
4560    /// }
4561    /// ```
4562    #[derive(Clone, Debug)]
4563    pub struct LookupEntry(RequestBuilder<crate::model::LookupEntryRequest>);
4564
4565    impl LookupEntry {
4566        pub(crate) fn new(
4567            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4568        ) -> Self {
4569            Self(RequestBuilder::new(stub))
4570        }
4571
4572        /// Sets the full request, replacing any prior values.
4573        pub fn with_request<V: Into<crate::model::LookupEntryRequest>>(mut self, v: V) -> Self {
4574            self.0.request = v.into();
4575            self
4576        }
4577
4578        /// Sets all the options, replacing any prior values.
4579        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4580            self.0.options = v.into();
4581            self
4582        }
4583
4584        /// Sends the request.
4585        pub async fn send(self) -> Result<crate::model::Entry> {
4586            (*self.0.stub)
4587                .lookup_entry(self.0.request, self.0.options)
4588                .await
4589                .map(gax::response::Response::into_body)
4590        }
4591
4592        /// Sets the value of [name][crate::model::LookupEntryRequest::name].
4593        ///
4594        /// This is a **required** field for requests.
4595        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4596            self.0.request.name = v.into();
4597            self
4598        }
4599
4600        /// Sets the value of [view][crate::model::LookupEntryRequest::view].
4601        pub fn set_view<T: Into<crate::model::EntryView>>(mut self, v: T) -> Self {
4602            self.0.request.view = v.into();
4603            self
4604        }
4605
4606        /// Sets the value of [aspect_types][crate::model::LookupEntryRequest::aspect_types].
4607        pub fn set_aspect_types<T, V>(mut self, v: T) -> Self
4608        where
4609            T: std::iter::IntoIterator<Item = V>,
4610            V: std::convert::Into<std::string::String>,
4611        {
4612            use std::iter::Iterator;
4613            self.0.request.aspect_types = v.into_iter().map(|i| i.into()).collect();
4614            self
4615        }
4616
4617        /// Sets the value of [paths][crate::model::LookupEntryRequest::paths].
4618        pub fn set_paths<T, V>(mut self, v: T) -> Self
4619        where
4620            T: std::iter::IntoIterator<Item = V>,
4621            V: std::convert::Into<std::string::String>,
4622        {
4623            use std::iter::Iterator;
4624            self.0.request.paths = v.into_iter().map(|i| i.into()).collect();
4625            self
4626        }
4627
4628        /// Sets the value of [entry][crate::model::LookupEntryRequest::entry].
4629        ///
4630        /// This is a **required** field for requests.
4631        pub fn set_entry<T: Into<std::string::String>>(mut self, v: T) -> Self {
4632            self.0.request.entry = v.into();
4633            self
4634        }
4635    }
4636
4637    #[doc(hidden)]
4638    impl gax::options::internal::RequestBuilder for LookupEntry {
4639        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4640            &mut self.0.options
4641        }
4642    }
4643
4644    /// The request builder for [CatalogService::search_entries][crate::client::CatalogService::search_entries] calls.
4645    ///
4646    /// # Example
4647    /// ```no_run
4648    /// # use google_cloud_dataplex_v1::builder;
4649    /// use builder::catalog_service::SearchEntries;
4650    /// # tokio_test::block_on(async {
4651    /// use gax::paginator::ItemPaginator;
4652    ///
4653    /// let builder = prepare_request_builder();
4654    /// let mut items = builder.by_item();
4655    /// while let Some(result) = items.next().await {
4656    ///   let item = result?;
4657    /// }
4658    /// # gax::Result::<()>::Ok(()) });
4659    ///
4660    /// fn prepare_request_builder() -> SearchEntries {
4661    ///   # panic!();
4662    ///   // ... details omitted ...
4663    /// }
4664    /// ```
4665    #[derive(Clone, Debug)]
4666    pub struct SearchEntries(RequestBuilder<crate::model::SearchEntriesRequest>);
4667
4668    impl SearchEntries {
4669        pub(crate) fn new(
4670            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4671        ) -> Self {
4672            Self(RequestBuilder::new(stub))
4673        }
4674
4675        /// Sets the full request, replacing any prior values.
4676        pub fn with_request<V: Into<crate::model::SearchEntriesRequest>>(mut self, v: V) -> Self {
4677            self.0.request = v.into();
4678            self
4679        }
4680
4681        /// Sets all the options, replacing any prior values.
4682        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4683            self.0.options = v.into();
4684            self
4685        }
4686
4687        /// Sends the request.
4688        pub async fn send(self) -> Result<crate::model::SearchEntriesResponse> {
4689            (*self.0.stub)
4690                .search_entries(self.0.request, self.0.options)
4691                .await
4692                .map(gax::response::Response::into_body)
4693        }
4694
4695        /// Streams each page in the collection.
4696        pub fn by_page(
4697            self,
4698        ) -> impl gax::paginator::Paginator<crate::model::SearchEntriesResponse, gax::error::Error>
4699        {
4700            use std::clone::Clone;
4701            let token = self.0.request.page_token.clone();
4702            let execute = move |token: String| {
4703                let mut builder = self.clone();
4704                builder.0.request = builder.0.request.set_page_token(token);
4705                builder.send()
4706            };
4707            gax::paginator::internal::new_paginator(token, execute)
4708        }
4709
4710        /// Streams each item in the collection.
4711        pub fn by_item(
4712            self,
4713        ) -> impl gax::paginator::ItemPaginator<crate::model::SearchEntriesResponse, gax::error::Error>
4714        {
4715            use gax::paginator::Paginator;
4716            self.by_page().items()
4717        }
4718
4719        /// Sets the value of [name][crate::model::SearchEntriesRequest::name].
4720        ///
4721        /// This is a **required** field for requests.
4722        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4723            self.0.request.name = v.into();
4724            self
4725        }
4726
4727        /// Sets the value of [query][crate::model::SearchEntriesRequest::query].
4728        ///
4729        /// This is a **required** field for requests.
4730        pub fn set_query<T: Into<std::string::String>>(mut self, v: T) -> Self {
4731            self.0.request.query = v.into();
4732            self
4733        }
4734
4735        /// Sets the value of [page_size][crate::model::SearchEntriesRequest::page_size].
4736        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
4737            self.0.request.page_size = v.into();
4738            self
4739        }
4740
4741        /// Sets the value of [page_token][crate::model::SearchEntriesRequest::page_token].
4742        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
4743            self.0.request.page_token = v.into();
4744            self
4745        }
4746
4747        /// Sets the value of [order_by][crate::model::SearchEntriesRequest::order_by].
4748        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
4749            self.0.request.order_by = v.into();
4750            self
4751        }
4752
4753        /// Sets the value of [scope][crate::model::SearchEntriesRequest::scope].
4754        pub fn set_scope<T: Into<std::string::String>>(mut self, v: T) -> Self {
4755            self.0.request.scope = v.into();
4756            self
4757        }
4758
4759        /// Sets the value of [semantic_search][crate::model::SearchEntriesRequest::semantic_search].
4760        pub fn set_semantic_search<T: Into<bool>>(mut self, v: T) -> Self {
4761            self.0.request.semantic_search = v.into();
4762            self
4763        }
4764    }
4765
4766    #[doc(hidden)]
4767    impl gax::options::internal::RequestBuilder for SearchEntries {
4768        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4769            &mut self.0.options
4770        }
4771    }
4772
4773    /// The request builder for [CatalogService::create_metadata_job][crate::client::CatalogService::create_metadata_job] calls.
4774    ///
4775    /// # Example
4776    /// ```no_run
4777    /// # use google_cloud_dataplex_v1::builder;
4778    /// use builder::catalog_service::CreateMetadataJob;
4779    /// # tokio_test::block_on(async {
4780    /// use lro::Poller;
4781    ///
4782    /// let builder = prepare_request_builder();
4783    /// let response = builder.poller().until_done().await?;
4784    /// # gax::Result::<()>::Ok(()) });
4785    ///
4786    /// fn prepare_request_builder() -> CreateMetadataJob {
4787    ///   # panic!();
4788    ///   // ... details omitted ...
4789    /// }
4790    /// ```
4791    #[derive(Clone, Debug)]
4792    pub struct CreateMetadataJob(RequestBuilder<crate::model::CreateMetadataJobRequest>);
4793
4794    impl CreateMetadataJob {
4795        pub(crate) fn new(
4796            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4797        ) -> Self {
4798            Self(RequestBuilder::new(stub))
4799        }
4800
4801        /// Sets the full request, replacing any prior values.
4802        pub fn with_request<V: Into<crate::model::CreateMetadataJobRequest>>(
4803            mut self,
4804            v: V,
4805        ) -> Self {
4806            self.0.request = v.into();
4807            self
4808        }
4809
4810        /// Sets all the options, replacing any prior values.
4811        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4812            self.0.options = v.into();
4813            self
4814        }
4815
4816        /// Sends the request.
4817        ///
4818        /// # Long running operations
4819        ///
4820        /// This starts, but does not poll, a longrunning operation. More information
4821        /// on [create_metadata_job][crate::client::CatalogService::create_metadata_job].
4822        pub async fn send(self) -> Result<longrunning::model::Operation> {
4823            (*self.0.stub)
4824                .create_metadata_job(self.0.request, self.0.options)
4825                .await
4826                .map(gax::response::Response::into_body)
4827        }
4828
4829        /// Creates a [Poller][lro::Poller] to work with `create_metadata_job`.
4830        pub fn poller(
4831            self,
4832        ) -> impl lro::Poller<crate::model::MetadataJob, crate::model::OperationMetadata> {
4833            type Operation = lro::internal::Operation<
4834                crate::model::MetadataJob,
4835                crate::model::OperationMetadata,
4836            >;
4837            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
4838            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
4839
4840            let stub = self.0.stub.clone();
4841            let mut options = self.0.options.clone();
4842            options.set_retry_policy(gax::retry_policy::NeverRetry);
4843            let query = move |name| {
4844                let stub = stub.clone();
4845                let options = options.clone();
4846                async {
4847                    let op = GetOperation::new(stub)
4848                        .set_name(name)
4849                        .with_options(options)
4850                        .send()
4851                        .await?;
4852                    Ok(Operation::new(op))
4853                }
4854            };
4855
4856            let start = move || async {
4857                let op = self.send().await?;
4858                Ok(Operation::new(op))
4859            };
4860
4861            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
4862        }
4863
4864        /// Sets the value of [parent][crate::model::CreateMetadataJobRequest::parent].
4865        ///
4866        /// This is a **required** field for requests.
4867        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
4868            self.0.request.parent = v.into();
4869            self
4870        }
4871
4872        /// Sets the value of [metadata_job][crate::model::CreateMetadataJobRequest::metadata_job].
4873        ///
4874        /// This is a **required** field for requests.
4875        pub fn set_metadata_job<T>(mut self, v: T) -> Self
4876        where
4877            T: std::convert::Into<crate::model::MetadataJob>,
4878        {
4879            self.0.request.metadata_job = std::option::Option::Some(v.into());
4880            self
4881        }
4882
4883        /// Sets or clears the value of [metadata_job][crate::model::CreateMetadataJobRequest::metadata_job].
4884        ///
4885        /// This is a **required** field for requests.
4886        pub fn set_or_clear_metadata_job<T>(mut self, v: std::option::Option<T>) -> Self
4887        where
4888            T: std::convert::Into<crate::model::MetadataJob>,
4889        {
4890            self.0.request.metadata_job = v.map(|x| x.into());
4891            self
4892        }
4893
4894        /// Sets the value of [metadata_job_id][crate::model::CreateMetadataJobRequest::metadata_job_id].
4895        pub fn set_metadata_job_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
4896            self.0.request.metadata_job_id = v.into();
4897            self
4898        }
4899
4900        /// Sets the value of [validate_only][crate::model::CreateMetadataJobRequest::validate_only].
4901        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
4902            self.0.request.validate_only = v.into();
4903            self
4904        }
4905    }
4906
4907    #[doc(hidden)]
4908    impl gax::options::internal::RequestBuilder for CreateMetadataJob {
4909        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4910            &mut self.0.options
4911        }
4912    }
4913
4914    /// The request builder for [CatalogService::get_metadata_job][crate::client::CatalogService::get_metadata_job] calls.
4915    ///
4916    /// # Example
4917    /// ```no_run
4918    /// # use google_cloud_dataplex_v1::builder;
4919    /// use builder::catalog_service::GetMetadataJob;
4920    /// # tokio_test::block_on(async {
4921    ///
4922    /// let builder = prepare_request_builder();
4923    /// let response = builder.send().await?;
4924    /// # gax::Result::<()>::Ok(()) });
4925    ///
4926    /// fn prepare_request_builder() -> GetMetadataJob {
4927    ///   # panic!();
4928    ///   // ... details omitted ...
4929    /// }
4930    /// ```
4931    #[derive(Clone, Debug)]
4932    pub struct GetMetadataJob(RequestBuilder<crate::model::GetMetadataJobRequest>);
4933
4934    impl GetMetadataJob {
4935        pub(crate) fn new(
4936            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
4937        ) -> Self {
4938            Self(RequestBuilder::new(stub))
4939        }
4940
4941        /// Sets the full request, replacing any prior values.
4942        pub fn with_request<V: Into<crate::model::GetMetadataJobRequest>>(mut self, v: V) -> Self {
4943            self.0.request = v.into();
4944            self
4945        }
4946
4947        /// Sets all the options, replacing any prior values.
4948        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
4949            self.0.options = v.into();
4950            self
4951        }
4952
4953        /// Sends the request.
4954        pub async fn send(self) -> Result<crate::model::MetadataJob> {
4955            (*self.0.stub)
4956                .get_metadata_job(self.0.request, self.0.options)
4957                .await
4958                .map(gax::response::Response::into_body)
4959        }
4960
4961        /// Sets the value of [name][crate::model::GetMetadataJobRequest::name].
4962        ///
4963        /// This is a **required** field for requests.
4964        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
4965            self.0.request.name = v.into();
4966            self
4967        }
4968    }
4969
4970    #[doc(hidden)]
4971    impl gax::options::internal::RequestBuilder for GetMetadataJob {
4972        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
4973            &mut self.0.options
4974        }
4975    }
4976
4977    /// The request builder for [CatalogService::list_metadata_jobs][crate::client::CatalogService::list_metadata_jobs] calls.
4978    ///
4979    /// # Example
4980    /// ```no_run
4981    /// # use google_cloud_dataplex_v1::builder;
4982    /// use builder::catalog_service::ListMetadataJobs;
4983    /// # tokio_test::block_on(async {
4984    /// use gax::paginator::ItemPaginator;
4985    ///
4986    /// let builder = prepare_request_builder();
4987    /// let mut items = builder.by_item();
4988    /// while let Some(result) = items.next().await {
4989    ///   let item = result?;
4990    /// }
4991    /// # gax::Result::<()>::Ok(()) });
4992    ///
4993    /// fn prepare_request_builder() -> ListMetadataJobs {
4994    ///   # panic!();
4995    ///   // ... details omitted ...
4996    /// }
4997    /// ```
4998    #[derive(Clone, Debug)]
4999    pub struct ListMetadataJobs(RequestBuilder<crate::model::ListMetadataJobsRequest>);
5000
5001    impl ListMetadataJobs {
5002        pub(crate) fn new(
5003            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5004        ) -> Self {
5005            Self(RequestBuilder::new(stub))
5006        }
5007
5008        /// Sets the full request, replacing any prior values.
5009        pub fn with_request<V: Into<crate::model::ListMetadataJobsRequest>>(
5010            mut self,
5011            v: V,
5012        ) -> Self {
5013            self.0.request = v.into();
5014            self
5015        }
5016
5017        /// Sets all the options, replacing any prior values.
5018        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5019            self.0.options = v.into();
5020            self
5021        }
5022
5023        /// Sends the request.
5024        pub async fn send(self) -> Result<crate::model::ListMetadataJobsResponse> {
5025            (*self.0.stub)
5026                .list_metadata_jobs(self.0.request, self.0.options)
5027                .await
5028                .map(gax::response::Response::into_body)
5029        }
5030
5031        /// Streams each page in the collection.
5032        pub fn by_page(
5033            self,
5034        ) -> impl gax::paginator::Paginator<crate::model::ListMetadataJobsResponse, gax::error::Error>
5035        {
5036            use std::clone::Clone;
5037            let token = self.0.request.page_token.clone();
5038            let execute = move |token: String| {
5039                let mut builder = self.clone();
5040                builder.0.request = builder.0.request.set_page_token(token);
5041                builder.send()
5042            };
5043            gax::paginator::internal::new_paginator(token, execute)
5044        }
5045
5046        /// Streams each item in the collection.
5047        pub fn by_item(
5048            self,
5049        ) -> impl gax::paginator::ItemPaginator<crate::model::ListMetadataJobsResponse, gax::error::Error>
5050        {
5051            use gax::paginator::Paginator;
5052            self.by_page().items()
5053        }
5054
5055        /// Sets the value of [parent][crate::model::ListMetadataJobsRequest::parent].
5056        ///
5057        /// This is a **required** field for requests.
5058        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5059            self.0.request.parent = v.into();
5060            self
5061        }
5062
5063        /// Sets the value of [page_size][crate::model::ListMetadataJobsRequest::page_size].
5064        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5065            self.0.request.page_size = v.into();
5066            self
5067        }
5068
5069        /// Sets the value of [page_token][crate::model::ListMetadataJobsRequest::page_token].
5070        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5071            self.0.request.page_token = v.into();
5072            self
5073        }
5074
5075        /// Sets the value of [filter][crate::model::ListMetadataJobsRequest::filter].
5076        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5077            self.0.request.filter = v.into();
5078            self
5079        }
5080
5081        /// Sets the value of [order_by][crate::model::ListMetadataJobsRequest::order_by].
5082        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
5083            self.0.request.order_by = v.into();
5084            self
5085        }
5086    }
5087
5088    #[doc(hidden)]
5089    impl gax::options::internal::RequestBuilder for ListMetadataJobs {
5090        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5091            &mut self.0.options
5092        }
5093    }
5094
5095    /// The request builder for [CatalogService::cancel_metadata_job][crate::client::CatalogService::cancel_metadata_job] calls.
5096    ///
5097    /// # Example
5098    /// ```no_run
5099    /// # use google_cloud_dataplex_v1::builder;
5100    /// use builder::catalog_service::CancelMetadataJob;
5101    /// # tokio_test::block_on(async {
5102    ///
5103    /// let builder = prepare_request_builder();
5104    /// let response = builder.send().await?;
5105    /// # gax::Result::<()>::Ok(()) });
5106    ///
5107    /// fn prepare_request_builder() -> CancelMetadataJob {
5108    ///   # panic!();
5109    ///   // ... details omitted ...
5110    /// }
5111    /// ```
5112    #[derive(Clone, Debug)]
5113    pub struct CancelMetadataJob(RequestBuilder<crate::model::CancelMetadataJobRequest>);
5114
5115    impl CancelMetadataJob {
5116        pub(crate) fn new(
5117            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5118        ) -> Self {
5119            Self(RequestBuilder::new(stub))
5120        }
5121
5122        /// Sets the full request, replacing any prior values.
5123        pub fn with_request<V: Into<crate::model::CancelMetadataJobRequest>>(
5124            mut self,
5125            v: V,
5126        ) -> Self {
5127            self.0.request = v.into();
5128            self
5129        }
5130
5131        /// Sets all the options, replacing any prior values.
5132        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5133            self.0.options = v.into();
5134            self
5135        }
5136
5137        /// Sends the request.
5138        pub async fn send(self) -> Result<()> {
5139            (*self.0.stub)
5140                .cancel_metadata_job(self.0.request, self.0.options)
5141                .await
5142                .map(gax::response::Response::into_body)
5143        }
5144
5145        /// Sets the value of [name][crate::model::CancelMetadataJobRequest::name].
5146        ///
5147        /// This is a **required** field for requests.
5148        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5149            self.0.request.name = v.into();
5150            self
5151        }
5152    }
5153
5154    #[doc(hidden)]
5155    impl gax::options::internal::RequestBuilder for CancelMetadataJob {
5156        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5157            &mut self.0.options
5158        }
5159    }
5160
5161    /// The request builder for [CatalogService::create_entry_link][crate::client::CatalogService::create_entry_link] calls.
5162    ///
5163    /// # Example
5164    /// ```no_run
5165    /// # use google_cloud_dataplex_v1::builder;
5166    /// use builder::catalog_service::CreateEntryLink;
5167    /// # tokio_test::block_on(async {
5168    ///
5169    /// let builder = prepare_request_builder();
5170    /// let response = builder.send().await?;
5171    /// # gax::Result::<()>::Ok(()) });
5172    ///
5173    /// fn prepare_request_builder() -> CreateEntryLink {
5174    ///   # panic!();
5175    ///   // ... details omitted ...
5176    /// }
5177    /// ```
5178    #[derive(Clone, Debug)]
5179    pub struct CreateEntryLink(RequestBuilder<crate::model::CreateEntryLinkRequest>);
5180
5181    impl CreateEntryLink {
5182        pub(crate) fn new(
5183            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5184        ) -> Self {
5185            Self(RequestBuilder::new(stub))
5186        }
5187
5188        /// Sets the full request, replacing any prior values.
5189        pub fn with_request<V: Into<crate::model::CreateEntryLinkRequest>>(mut self, v: V) -> Self {
5190            self.0.request = v.into();
5191            self
5192        }
5193
5194        /// Sets all the options, replacing any prior values.
5195        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5196            self.0.options = v.into();
5197            self
5198        }
5199
5200        /// Sends the request.
5201        pub async fn send(self) -> Result<crate::model::EntryLink> {
5202            (*self.0.stub)
5203                .create_entry_link(self.0.request, self.0.options)
5204                .await
5205                .map(gax::response::Response::into_body)
5206        }
5207
5208        /// Sets the value of [parent][crate::model::CreateEntryLinkRequest::parent].
5209        ///
5210        /// This is a **required** field for requests.
5211        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
5212            self.0.request.parent = v.into();
5213            self
5214        }
5215
5216        /// Sets the value of [entry_link_id][crate::model::CreateEntryLinkRequest::entry_link_id].
5217        ///
5218        /// This is a **required** field for requests.
5219        pub fn set_entry_link_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
5220            self.0.request.entry_link_id = v.into();
5221            self
5222        }
5223
5224        /// Sets the value of [entry_link][crate::model::CreateEntryLinkRequest::entry_link].
5225        ///
5226        /// This is a **required** field for requests.
5227        pub fn set_entry_link<T>(mut self, v: T) -> Self
5228        where
5229            T: std::convert::Into<crate::model::EntryLink>,
5230        {
5231            self.0.request.entry_link = std::option::Option::Some(v.into());
5232            self
5233        }
5234
5235        /// Sets or clears the value of [entry_link][crate::model::CreateEntryLinkRequest::entry_link].
5236        ///
5237        /// This is a **required** field for requests.
5238        pub fn set_or_clear_entry_link<T>(mut self, v: std::option::Option<T>) -> Self
5239        where
5240            T: std::convert::Into<crate::model::EntryLink>,
5241        {
5242            self.0.request.entry_link = v.map(|x| x.into());
5243            self
5244        }
5245    }
5246
5247    #[doc(hidden)]
5248    impl gax::options::internal::RequestBuilder for CreateEntryLink {
5249        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5250            &mut self.0.options
5251        }
5252    }
5253
5254    /// The request builder for [CatalogService::delete_entry_link][crate::client::CatalogService::delete_entry_link] calls.
5255    ///
5256    /// # Example
5257    /// ```no_run
5258    /// # use google_cloud_dataplex_v1::builder;
5259    /// use builder::catalog_service::DeleteEntryLink;
5260    /// # tokio_test::block_on(async {
5261    ///
5262    /// let builder = prepare_request_builder();
5263    /// let response = builder.send().await?;
5264    /// # gax::Result::<()>::Ok(()) });
5265    ///
5266    /// fn prepare_request_builder() -> DeleteEntryLink {
5267    ///   # panic!();
5268    ///   // ... details omitted ...
5269    /// }
5270    /// ```
5271    #[derive(Clone, Debug)]
5272    pub struct DeleteEntryLink(RequestBuilder<crate::model::DeleteEntryLinkRequest>);
5273
5274    impl DeleteEntryLink {
5275        pub(crate) fn new(
5276            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5277        ) -> Self {
5278            Self(RequestBuilder::new(stub))
5279        }
5280
5281        /// Sets the full request, replacing any prior values.
5282        pub fn with_request<V: Into<crate::model::DeleteEntryLinkRequest>>(mut self, v: V) -> Self {
5283            self.0.request = v.into();
5284            self
5285        }
5286
5287        /// Sets all the options, replacing any prior values.
5288        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5289            self.0.options = v.into();
5290            self
5291        }
5292
5293        /// Sends the request.
5294        pub async fn send(self) -> Result<crate::model::EntryLink> {
5295            (*self.0.stub)
5296                .delete_entry_link(self.0.request, self.0.options)
5297                .await
5298                .map(gax::response::Response::into_body)
5299        }
5300
5301        /// Sets the value of [name][crate::model::DeleteEntryLinkRequest::name].
5302        ///
5303        /// This is a **required** field for requests.
5304        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5305            self.0.request.name = v.into();
5306            self
5307        }
5308    }
5309
5310    #[doc(hidden)]
5311    impl gax::options::internal::RequestBuilder for DeleteEntryLink {
5312        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5313            &mut self.0.options
5314        }
5315    }
5316
5317    /// The request builder for [CatalogService::get_entry_link][crate::client::CatalogService::get_entry_link] calls.
5318    ///
5319    /// # Example
5320    /// ```no_run
5321    /// # use google_cloud_dataplex_v1::builder;
5322    /// use builder::catalog_service::GetEntryLink;
5323    /// # tokio_test::block_on(async {
5324    ///
5325    /// let builder = prepare_request_builder();
5326    /// let response = builder.send().await?;
5327    /// # gax::Result::<()>::Ok(()) });
5328    ///
5329    /// fn prepare_request_builder() -> GetEntryLink {
5330    ///   # panic!();
5331    ///   // ... details omitted ...
5332    /// }
5333    /// ```
5334    #[derive(Clone, Debug)]
5335    pub struct GetEntryLink(RequestBuilder<crate::model::GetEntryLinkRequest>);
5336
5337    impl GetEntryLink {
5338        pub(crate) fn new(
5339            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5340        ) -> Self {
5341            Self(RequestBuilder::new(stub))
5342        }
5343
5344        /// Sets the full request, replacing any prior values.
5345        pub fn with_request<V: Into<crate::model::GetEntryLinkRequest>>(mut self, v: V) -> Self {
5346            self.0.request = v.into();
5347            self
5348        }
5349
5350        /// Sets all the options, replacing any prior values.
5351        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5352            self.0.options = v.into();
5353            self
5354        }
5355
5356        /// Sends the request.
5357        pub async fn send(self) -> Result<crate::model::EntryLink> {
5358            (*self.0.stub)
5359                .get_entry_link(self.0.request, self.0.options)
5360                .await
5361                .map(gax::response::Response::into_body)
5362        }
5363
5364        /// Sets the value of [name][crate::model::GetEntryLinkRequest::name].
5365        ///
5366        /// This is a **required** field for requests.
5367        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5368            self.0.request.name = v.into();
5369            self
5370        }
5371    }
5372
5373    #[doc(hidden)]
5374    impl gax::options::internal::RequestBuilder for GetEntryLink {
5375        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5376            &mut self.0.options
5377        }
5378    }
5379
5380    /// The request builder for [CatalogService::list_locations][crate::client::CatalogService::list_locations] calls.
5381    ///
5382    /// # Example
5383    /// ```no_run
5384    /// # use google_cloud_dataplex_v1::builder;
5385    /// use builder::catalog_service::ListLocations;
5386    /// # tokio_test::block_on(async {
5387    /// use gax::paginator::ItemPaginator;
5388    ///
5389    /// let builder = prepare_request_builder();
5390    /// let mut items = builder.by_item();
5391    /// while let Some(result) = items.next().await {
5392    ///   let item = result?;
5393    /// }
5394    /// # gax::Result::<()>::Ok(()) });
5395    ///
5396    /// fn prepare_request_builder() -> ListLocations {
5397    ///   # panic!();
5398    ///   // ... details omitted ...
5399    /// }
5400    /// ```
5401    #[derive(Clone, Debug)]
5402    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
5403
5404    impl ListLocations {
5405        pub(crate) fn new(
5406            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5407        ) -> Self {
5408            Self(RequestBuilder::new(stub))
5409        }
5410
5411        /// Sets the full request, replacing any prior values.
5412        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
5413            mut self,
5414            v: V,
5415        ) -> Self {
5416            self.0.request = v.into();
5417            self
5418        }
5419
5420        /// Sets all the options, replacing any prior values.
5421        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5422            self.0.options = v.into();
5423            self
5424        }
5425
5426        /// Sends the request.
5427        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
5428            (*self.0.stub)
5429                .list_locations(self.0.request, self.0.options)
5430                .await
5431                .map(gax::response::Response::into_body)
5432        }
5433
5434        /// Streams each page in the collection.
5435        pub fn by_page(
5436            self,
5437        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
5438        {
5439            use std::clone::Clone;
5440            let token = self.0.request.page_token.clone();
5441            let execute = move |token: String| {
5442                let mut builder = self.clone();
5443                builder.0.request = builder.0.request.set_page_token(token);
5444                builder.send()
5445            };
5446            gax::paginator::internal::new_paginator(token, execute)
5447        }
5448
5449        /// Streams each item in the collection.
5450        pub fn by_item(
5451            self,
5452        ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
5453        {
5454            use gax::paginator::Paginator;
5455            self.by_page().items()
5456        }
5457
5458        /// Sets the value of [name][location::model::ListLocationsRequest::name].
5459        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5460            self.0.request.name = v.into();
5461            self
5462        }
5463
5464        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
5465        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5466            self.0.request.filter = v.into();
5467            self
5468        }
5469
5470        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
5471        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5472            self.0.request.page_size = v.into();
5473            self
5474        }
5475
5476        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
5477        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5478            self.0.request.page_token = v.into();
5479            self
5480        }
5481    }
5482
5483    #[doc(hidden)]
5484    impl gax::options::internal::RequestBuilder for ListLocations {
5485        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5486            &mut self.0.options
5487        }
5488    }
5489
5490    /// The request builder for [CatalogService::get_location][crate::client::CatalogService::get_location] calls.
5491    ///
5492    /// # Example
5493    /// ```no_run
5494    /// # use google_cloud_dataplex_v1::builder;
5495    /// use builder::catalog_service::GetLocation;
5496    /// # tokio_test::block_on(async {
5497    ///
5498    /// let builder = prepare_request_builder();
5499    /// let response = builder.send().await?;
5500    /// # gax::Result::<()>::Ok(()) });
5501    ///
5502    /// fn prepare_request_builder() -> GetLocation {
5503    ///   # panic!();
5504    ///   // ... details omitted ...
5505    /// }
5506    /// ```
5507    #[derive(Clone, Debug)]
5508    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
5509
5510    impl GetLocation {
5511        pub(crate) fn new(
5512            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5513        ) -> Self {
5514            Self(RequestBuilder::new(stub))
5515        }
5516
5517        /// Sets the full request, replacing any prior values.
5518        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
5519            self.0.request = v.into();
5520            self
5521        }
5522
5523        /// Sets all the options, replacing any prior values.
5524        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5525            self.0.options = v.into();
5526            self
5527        }
5528
5529        /// Sends the request.
5530        pub async fn send(self) -> Result<location::model::Location> {
5531            (*self.0.stub)
5532                .get_location(self.0.request, self.0.options)
5533                .await
5534                .map(gax::response::Response::into_body)
5535        }
5536
5537        /// Sets the value of [name][location::model::GetLocationRequest::name].
5538        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5539            self.0.request.name = v.into();
5540            self
5541        }
5542    }
5543
5544    #[doc(hidden)]
5545    impl gax::options::internal::RequestBuilder for GetLocation {
5546        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5547            &mut self.0.options
5548        }
5549    }
5550
5551    /// The request builder for [CatalogService::set_iam_policy][crate::client::CatalogService::set_iam_policy] calls.
5552    ///
5553    /// # Example
5554    /// ```no_run
5555    /// # use google_cloud_dataplex_v1::builder;
5556    /// use builder::catalog_service::SetIamPolicy;
5557    /// # tokio_test::block_on(async {
5558    ///
5559    /// let builder = prepare_request_builder();
5560    /// let response = builder.send().await?;
5561    /// # gax::Result::<()>::Ok(()) });
5562    ///
5563    /// fn prepare_request_builder() -> SetIamPolicy {
5564    ///   # panic!();
5565    ///   // ... details omitted ...
5566    /// }
5567    /// ```
5568    #[derive(Clone, Debug)]
5569    pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
5570
5571    impl SetIamPolicy {
5572        pub(crate) fn new(
5573            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5574        ) -> Self {
5575            Self(RequestBuilder::new(stub))
5576        }
5577
5578        /// Sets the full request, replacing any prior values.
5579        pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
5580            self.0.request = v.into();
5581            self
5582        }
5583
5584        /// Sets all the options, replacing any prior values.
5585        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5586            self.0.options = v.into();
5587            self
5588        }
5589
5590        /// Sends the request.
5591        pub async fn send(self) -> Result<iam_v1::model::Policy> {
5592            (*self.0.stub)
5593                .set_iam_policy(self.0.request, self.0.options)
5594                .await
5595                .map(gax::response::Response::into_body)
5596        }
5597
5598        /// Sets the value of [resource][iam_v1::model::SetIamPolicyRequest::resource].
5599        ///
5600        /// This is a **required** field for requests.
5601        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
5602            self.0.request.resource = v.into();
5603            self
5604        }
5605
5606        /// Sets the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
5607        ///
5608        /// This is a **required** field for requests.
5609        pub fn set_policy<T>(mut self, v: T) -> Self
5610        where
5611            T: std::convert::Into<iam_v1::model::Policy>,
5612        {
5613            self.0.request.policy = std::option::Option::Some(v.into());
5614            self
5615        }
5616
5617        /// Sets or clears the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
5618        ///
5619        /// This is a **required** field for requests.
5620        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
5621        where
5622            T: std::convert::Into<iam_v1::model::Policy>,
5623        {
5624            self.0.request.policy = v.map(|x| x.into());
5625            self
5626        }
5627
5628        /// Sets the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
5629        pub fn set_update_mask<T>(mut self, v: T) -> Self
5630        where
5631            T: std::convert::Into<wkt::FieldMask>,
5632        {
5633            self.0.request.update_mask = std::option::Option::Some(v.into());
5634            self
5635        }
5636
5637        /// Sets or clears the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
5638        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
5639        where
5640            T: std::convert::Into<wkt::FieldMask>,
5641        {
5642            self.0.request.update_mask = v.map(|x| x.into());
5643            self
5644        }
5645    }
5646
5647    #[doc(hidden)]
5648    impl gax::options::internal::RequestBuilder for SetIamPolicy {
5649        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5650            &mut self.0.options
5651        }
5652    }
5653
5654    /// The request builder for [CatalogService::get_iam_policy][crate::client::CatalogService::get_iam_policy] calls.
5655    ///
5656    /// # Example
5657    /// ```no_run
5658    /// # use google_cloud_dataplex_v1::builder;
5659    /// use builder::catalog_service::GetIamPolicy;
5660    /// # tokio_test::block_on(async {
5661    ///
5662    /// let builder = prepare_request_builder();
5663    /// let response = builder.send().await?;
5664    /// # gax::Result::<()>::Ok(()) });
5665    ///
5666    /// fn prepare_request_builder() -> GetIamPolicy {
5667    ///   # panic!();
5668    ///   // ... details omitted ...
5669    /// }
5670    /// ```
5671    #[derive(Clone, Debug)]
5672    pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
5673
5674    impl GetIamPolicy {
5675        pub(crate) fn new(
5676            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5677        ) -> Self {
5678            Self(RequestBuilder::new(stub))
5679        }
5680
5681        /// Sets the full request, replacing any prior values.
5682        pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
5683            self.0.request = v.into();
5684            self
5685        }
5686
5687        /// Sets all the options, replacing any prior values.
5688        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5689            self.0.options = v.into();
5690            self
5691        }
5692
5693        /// Sends the request.
5694        pub async fn send(self) -> Result<iam_v1::model::Policy> {
5695            (*self.0.stub)
5696                .get_iam_policy(self.0.request, self.0.options)
5697                .await
5698                .map(gax::response::Response::into_body)
5699        }
5700
5701        /// Sets the value of [resource][iam_v1::model::GetIamPolicyRequest::resource].
5702        ///
5703        /// This is a **required** field for requests.
5704        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
5705            self.0.request.resource = v.into();
5706            self
5707        }
5708
5709        /// Sets the value of [options][iam_v1::model::GetIamPolicyRequest::options].
5710        pub fn set_options<T>(mut self, v: T) -> Self
5711        where
5712            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
5713        {
5714            self.0.request.options = std::option::Option::Some(v.into());
5715            self
5716        }
5717
5718        /// Sets or clears the value of [options][iam_v1::model::GetIamPolicyRequest::options].
5719        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
5720        where
5721            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
5722        {
5723            self.0.request.options = v.map(|x| x.into());
5724            self
5725        }
5726    }
5727
5728    #[doc(hidden)]
5729    impl gax::options::internal::RequestBuilder for GetIamPolicy {
5730        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5731            &mut self.0.options
5732        }
5733    }
5734
5735    /// The request builder for [CatalogService::test_iam_permissions][crate::client::CatalogService::test_iam_permissions] calls.
5736    ///
5737    /// # Example
5738    /// ```no_run
5739    /// # use google_cloud_dataplex_v1::builder;
5740    /// use builder::catalog_service::TestIamPermissions;
5741    /// # tokio_test::block_on(async {
5742    ///
5743    /// let builder = prepare_request_builder();
5744    /// let response = builder.send().await?;
5745    /// # gax::Result::<()>::Ok(()) });
5746    ///
5747    /// fn prepare_request_builder() -> TestIamPermissions {
5748    ///   # panic!();
5749    ///   // ... details omitted ...
5750    /// }
5751    /// ```
5752    #[derive(Clone, Debug)]
5753    pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
5754
5755    impl TestIamPermissions {
5756        pub(crate) fn new(
5757            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5758        ) -> Self {
5759            Self(RequestBuilder::new(stub))
5760        }
5761
5762        /// Sets the full request, replacing any prior values.
5763        pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
5764            mut self,
5765            v: V,
5766        ) -> Self {
5767            self.0.request = v.into();
5768            self
5769        }
5770
5771        /// Sets all the options, replacing any prior values.
5772        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5773            self.0.options = v.into();
5774            self
5775        }
5776
5777        /// Sends the request.
5778        pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
5779            (*self.0.stub)
5780                .test_iam_permissions(self.0.request, self.0.options)
5781                .await
5782                .map(gax::response::Response::into_body)
5783        }
5784
5785        /// Sets the value of [resource][iam_v1::model::TestIamPermissionsRequest::resource].
5786        ///
5787        /// This is a **required** field for requests.
5788        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
5789            self.0.request.resource = v.into();
5790            self
5791        }
5792
5793        /// Sets the value of [permissions][iam_v1::model::TestIamPermissionsRequest::permissions].
5794        ///
5795        /// This is a **required** field for requests.
5796        pub fn set_permissions<T, V>(mut self, v: T) -> Self
5797        where
5798            T: std::iter::IntoIterator<Item = V>,
5799            V: std::convert::Into<std::string::String>,
5800        {
5801            use std::iter::Iterator;
5802            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
5803            self
5804        }
5805    }
5806
5807    #[doc(hidden)]
5808    impl gax::options::internal::RequestBuilder for TestIamPermissions {
5809        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5810            &mut self.0.options
5811        }
5812    }
5813
5814    /// The request builder for [CatalogService::list_operations][crate::client::CatalogService::list_operations] calls.
5815    ///
5816    /// # Example
5817    /// ```no_run
5818    /// # use google_cloud_dataplex_v1::builder;
5819    /// use builder::catalog_service::ListOperations;
5820    /// # tokio_test::block_on(async {
5821    /// use gax::paginator::ItemPaginator;
5822    ///
5823    /// let builder = prepare_request_builder();
5824    /// let mut items = builder.by_item();
5825    /// while let Some(result) = items.next().await {
5826    ///   let item = result?;
5827    /// }
5828    /// # gax::Result::<()>::Ok(()) });
5829    ///
5830    /// fn prepare_request_builder() -> ListOperations {
5831    ///   # panic!();
5832    ///   // ... details omitted ...
5833    /// }
5834    /// ```
5835    #[derive(Clone, Debug)]
5836    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
5837
5838    impl ListOperations {
5839        pub(crate) fn new(
5840            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5841        ) -> Self {
5842            Self(RequestBuilder::new(stub))
5843        }
5844
5845        /// Sets the full request, replacing any prior values.
5846        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
5847            mut self,
5848            v: V,
5849        ) -> Self {
5850            self.0.request = v.into();
5851            self
5852        }
5853
5854        /// Sets all the options, replacing any prior values.
5855        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5856            self.0.options = v.into();
5857            self
5858        }
5859
5860        /// Sends the request.
5861        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
5862            (*self.0.stub)
5863                .list_operations(self.0.request, self.0.options)
5864                .await
5865                .map(gax::response::Response::into_body)
5866        }
5867
5868        /// Streams each page in the collection.
5869        pub fn by_page(
5870            self,
5871        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
5872        {
5873            use std::clone::Clone;
5874            let token = self.0.request.page_token.clone();
5875            let execute = move |token: String| {
5876                let mut builder = self.clone();
5877                builder.0.request = builder.0.request.set_page_token(token);
5878                builder.send()
5879            };
5880            gax::paginator::internal::new_paginator(token, execute)
5881        }
5882
5883        /// Streams each item in the collection.
5884        pub fn by_item(
5885            self,
5886        ) -> impl gax::paginator::ItemPaginator<
5887            longrunning::model::ListOperationsResponse,
5888            gax::error::Error,
5889        > {
5890            use gax::paginator::Paginator;
5891            self.by_page().items()
5892        }
5893
5894        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
5895        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5896            self.0.request.name = v.into();
5897            self
5898        }
5899
5900        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
5901        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
5902            self.0.request.filter = v.into();
5903            self
5904        }
5905
5906        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
5907        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
5908            self.0.request.page_size = v.into();
5909            self
5910        }
5911
5912        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
5913        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
5914            self.0.request.page_token = v.into();
5915            self
5916        }
5917
5918        /// Sets the value of [return_partial_success][longrunning::model::ListOperationsRequest::return_partial_success].
5919        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
5920            self.0.request.return_partial_success = v.into();
5921            self
5922        }
5923    }
5924
5925    #[doc(hidden)]
5926    impl gax::options::internal::RequestBuilder for ListOperations {
5927        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5928            &mut self.0.options
5929        }
5930    }
5931
5932    /// The request builder for [CatalogService::get_operation][crate::client::CatalogService::get_operation] calls.
5933    ///
5934    /// # Example
5935    /// ```no_run
5936    /// # use google_cloud_dataplex_v1::builder;
5937    /// use builder::catalog_service::GetOperation;
5938    /// # tokio_test::block_on(async {
5939    ///
5940    /// let builder = prepare_request_builder();
5941    /// let response = builder.send().await?;
5942    /// # gax::Result::<()>::Ok(()) });
5943    ///
5944    /// fn prepare_request_builder() -> GetOperation {
5945    ///   # panic!();
5946    ///   // ... details omitted ...
5947    /// }
5948    /// ```
5949    #[derive(Clone, Debug)]
5950    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
5951
5952    impl GetOperation {
5953        pub(crate) fn new(
5954            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
5955        ) -> Self {
5956            Self(RequestBuilder::new(stub))
5957        }
5958
5959        /// Sets the full request, replacing any prior values.
5960        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
5961            mut self,
5962            v: V,
5963        ) -> Self {
5964            self.0.request = v.into();
5965            self
5966        }
5967
5968        /// Sets all the options, replacing any prior values.
5969        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
5970            self.0.options = v.into();
5971            self
5972        }
5973
5974        /// Sends the request.
5975        pub async fn send(self) -> Result<longrunning::model::Operation> {
5976            (*self.0.stub)
5977                .get_operation(self.0.request, self.0.options)
5978                .await
5979                .map(gax::response::Response::into_body)
5980        }
5981
5982        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
5983        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
5984            self.0.request.name = v.into();
5985            self
5986        }
5987    }
5988
5989    #[doc(hidden)]
5990    impl gax::options::internal::RequestBuilder for GetOperation {
5991        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
5992            &mut self.0.options
5993        }
5994    }
5995
5996    /// The request builder for [CatalogService::delete_operation][crate::client::CatalogService::delete_operation] calls.
5997    ///
5998    /// # Example
5999    /// ```no_run
6000    /// # use google_cloud_dataplex_v1::builder;
6001    /// use builder::catalog_service::DeleteOperation;
6002    /// # tokio_test::block_on(async {
6003    ///
6004    /// let builder = prepare_request_builder();
6005    /// let response = builder.send().await?;
6006    /// # gax::Result::<()>::Ok(()) });
6007    ///
6008    /// fn prepare_request_builder() -> DeleteOperation {
6009    ///   # panic!();
6010    ///   // ... details omitted ...
6011    /// }
6012    /// ```
6013    #[derive(Clone, Debug)]
6014    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
6015
6016    impl DeleteOperation {
6017        pub(crate) fn new(
6018            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6019        ) -> Self {
6020            Self(RequestBuilder::new(stub))
6021        }
6022
6023        /// Sets the full request, replacing any prior values.
6024        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
6025            mut self,
6026            v: V,
6027        ) -> Self {
6028            self.0.request = v.into();
6029            self
6030        }
6031
6032        /// Sets all the options, replacing any prior values.
6033        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6034            self.0.options = v.into();
6035            self
6036        }
6037
6038        /// Sends the request.
6039        pub async fn send(self) -> Result<()> {
6040            (*self.0.stub)
6041                .delete_operation(self.0.request, self.0.options)
6042                .await
6043                .map(gax::response::Response::into_body)
6044        }
6045
6046        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
6047        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6048            self.0.request.name = v.into();
6049            self
6050        }
6051    }
6052
6053    #[doc(hidden)]
6054    impl gax::options::internal::RequestBuilder for DeleteOperation {
6055        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6056            &mut self.0.options
6057        }
6058    }
6059
6060    /// The request builder for [CatalogService::cancel_operation][crate::client::CatalogService::cancel_operation] calls.
6061    ///
6062    /// # Example
6063    /// ```no_run
6064    /// # use google_cloud_dataplex_v1::builder;
6065    /// use builder::catalog_service::CancelOperation;
6066    /// # tokio_test::block_on(async {
6067    ///
6068    /// let builder = prepare_request_builder();
6069    /// let response = builder.send().await?;
6070    /// # gax::Result::<()>::Ok(()) });
6071    ///
6072    /// fn prepare_request_builder() -> CancelOperation {
6073    ///   # panic!();
6074    ///   // ... details omitted ...
6075    /// }
6076    /// ```
6077    #[derive(Clone, Debug)]
6078    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
6079
6080    impl CancelOperation {
6081        pub(crate) fn new(
6082            stub: std::sync::Arc<dyn super::super::stub::dynamic::CatalogService>,
6083        ) -> Self {
6084            Self(RequestBuilder::new(stub))
6085        }
6086
6087        /// Sets the full request, replacing any prior values.
6088        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
6089            mut self,
6090            v: V,
6091        ) -> Self {
6092            self.0.request = v.into();
6093            self
6094        }
6095
6096        /// Sets all the options, replacing any prior values.
6097        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6098            self.0.options = v.into();
6099            self
6100        }
6101
6102        /// Sends the request.
6103        pub async fn send(self) -> Result<()> {
6104            (*self.0.stub)
6105                .cancel_operation(self.0.request, self.0.options)
6106                .await
6107                .map(gax::response::Response::into_body)
6108        }
6109
6110        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
6111        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6112            self.0.request.name = v.into();
6113            self
6114        }
6115    }
6116
6117    #[doc(hidden)]
6118    impl gax::options::internal::RequestBuilder for CancelOperation {
6119        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6120            &mut self.0.options
6121        }
6122    }
6123}
6124
6125pub mod cmek_service {
6126    use crate::Result;
6127
6128    /// A builder for [CmekService][crate::client::CmekService].
6129    ///
6130    /// ```
6131    /// # tokio_test::block_on(async {
6132    /// # use google_cloud_dataplex_v1::*;
6133    /// # use builder::cmek_service::ClientBuilder;
6134    /// # use client::CmekService;
6135    /// let builder : ClientBuilder = CmekService::builder();
6136    /// let client = builder
6137    ///     .with_endpoint("https://dataplex.googleapis.com")
6138    ///     .build().await?;
6139    /// # gax::client_builder::Result::<()>::Ok(()) });
6140    /// ```
6141    pub type ClientBuilder =
6142        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
6143
6144    pub(crate) mod client {
6145        use super::super::super::client::CmekService;
6146        pub struct Factory;
6147        impl gax::client_builder::internal::ClientFactory for Factory {
6148            type Client = CmekService;
6149            type Credentials = gaxi::options::Credentials;
6150            async fn build(
6151                self,
6152                config: gaxi::options::ClientConfig,
6153            ) -> gax::client_builder::Result<Self::Client> {
6154                Self::Client::new(config).await
6155            }
6156        }
6157    }
6158
6159    /// Common implementation for [crate::client::CmekService] request builders.
6160    #[derive(Clone, Debug)]
6161    pub(crate) struct RequestBuilder<R: std::default::Default> {
6162        stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
6163        request: R,
6164        options: gax::options::RequestOptions,
6165    }
6166
6167    impl<R> RequestBuilder<R>
6168    where
6169        R: std::default::Default,
6170    {
6171        pub(crate) fn new(
6172            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
6173        ) -> Self {
6174            Self {
6175                stub,
6176                request: R::default(),
6177                options: gax::options::RequestOptions::default(),
6178            }
6179        }
6180    }
6181
6182    /// The request builder for [CmekService::create_encryption_config][crate::client::CmekService::create_encryption_config] calls.
6183    ///
6184    /// # Example
6185    /// ```no_run
6186    /// # use google_cloud_dataplex_v1::builder;
6187    /// use builder::cmek_service::CreateEncryptionConfig;
6188    /// # tokio_test::block_on(async {
6189    /// use lro::Poller;
6190    ///
6191    /// let builder = prepare_request_builder();
6192    /// let response = builder.poller().until_done().await?;
6193    /// # gax::Result::<()>::Ok(()) });
6194    ///
6195    /// fn prepare_request_builder() -> CreateEncryptionConfig {
6196    ///   # panic!();
6197    ///   // ... details omitted ...
6198    /// }
6199    /// ```
6200    #[derive(Clone, Debug)]
6201    pub struct CreateEncryptionConfig(RequestBuilder<crate::model::CreateEncryptionConfigRequest>);
6202
6203    impl CreateEncryptionConfig {
6204        pub(crate) fn new(
6205            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
6206        ) -> Self {
6207            Self(RequestBuilder::new(stub))
6208        }
6209
6210        /// Sets the full request, replacing any prior values.
6211        pub fn with_request<V: Into<crate::model::CreateEncryptionConfigRequest>>(
6212            mut self,
6213            v: V,
6214        ) -> Self {
6215            self.0.request = v.into();
6216            self
6217        }
6218
6219        /// Sets all the options, replacing any prior values.
6220        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6221            self.0.options = v.into();
6222            self
6223        }
6224
6225        /// Sends the request.
6226        ///
6227        /// # Long running operations
6228        ///
6229        /// This starts, but does not poll, a longrunning operation. More information
6230        /// on [create_encryption_config][crate::client::CmekService::create_encryption_config].
6231        pub async fn send(self) -> Result<longrunning::model::Operation> {
6232            (*self.0.stub)
6233                .create_encryption_config(self.0.request, self.0.options)
6234                .await
6235                .map(gax::response::Response::into_body)
6236        }
6237
6238        /// Creates a [Poller][lro::Poller] to work with `create_encryption_config`.
6239        pub fn poller(
6240            self,
6241        ) -> impl lro::Poller<crate::model::EncryptionConfig, crate::model::OperationMetadata>
6242        {
6243            type Operation = lro::internal::Operation<
6244                crate::model::EncryptionConfig,
6245                crate::model::OperationMetadata,
6246            >;
6247            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6248            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6249
6250            let stub = self.0.stub.clone();
6251            let mut options = self.0.options.clone();
6252            options.set_retry_policy(gax::retry_policy::NeverRetry);
6253            let query = move |name| {
6254                let stub = stub.clone();
6255                let options = options.clone();
6256                async {
6257                    let op = GetOperation::new(stub)
6258                        .set_name(name)
6259                        .with_options(options)
6260                        .send()
6261                        .await?;
6262                    Ok(Operation::new(op))
6263                }
6264            };
6265
6266            let start = move || async {
6267                let op = self.send().await?;
6268                Ok(Operation::new(op))
6269            };
6270
6271            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
6272        }
6273
6274        /// Sets the value of [parent][crate::model::CreateEncryptionConfigRequest::parent].
6275        ///
6276        /// This is a **required** field for requests.
6277        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6278            self.0.request.parent = v.into();
6279            self
6280        }
6281
6282        /// Sets the value of [encryption_config_id][crate::model::CreateEncryptionConfigRequest::encryption_config_id].
6283        ///
6284        /// This is a **required** field for requests.
6285        pub fn set_encryption_config_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
6286            self.0.request.encryption_config_id = v.into();
6287            self
6288        }
6289
6290        /// Sets the value of [encryption_config][crate::model::CreateEncryptionConfigRequest::encryption_config].
6291        ///
6292        /// This is a **required** field for requests.
6293        pub fn set_encryption_config<T>(mut self, v: T) -> Self
6294        where
6295            T: std::convert::Into<crate::model::EncryptionConfig>,
6296        {
6297            self.0.request.encryption_config = std::option::Option::Some(v.into());
6298            self
6299        }
6300
6301        /// Sets or clears the value of [encryption_config][crate::model::CreateEncryptionConfigRequest::encryption_config].
6302        ///
6303        /// This is a **required** field for requests.
6304        pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
6305        where
6306            T: std::convert::Into<crate::model::EncryptionConfig>,
6307        {
6308            self.0.request.encryption_config = v.map(|x| x.into());
6309            self
6310        }
6311    }
6312
6313    #[doc(hidden)]
6314    impl gax::options::internal::RequestBuilder for CreateEncryptionConfig {
6315        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6316            &mut self.0.options
6317        }
6318    }
6319
6320    /// The request builder for [CmekService::update_encryption_config][crate::client::CmekService::update_encryption_config] calls.
6321    ///
6322    /// # Example
6323    /// ```no_run
6324    /// # use google_cloud_dataplex_v1::builder;
6325    /// use builder::cmek_service::UpdateEncryptionConfig;
6326    /// # tokio_test::block_on(async {
6327    /// use lro::Poller;
6328    ///
6329    /// let builder = prepare_request_builder();
6330    /// let response = builder.poller().until_done().await?;
6331    /// # gax::Result::<()>::Ok(()) });
6332    ///
6333    /// fn prepare_request_builder() -> UpdateEncryptionConfig {
6334    ///   # panic!();
6335    ///   // ... details omitted ...
6336    /// }
6337    /// ```
6338    #[derive(Clone, Debug)]
6339    pub struct UpdateEncryptionConfig(RequestBuilder<crate::model::UpdateEncryptionConfigRequest>);
6340
6341    impl UpdateEncryptionConfig {
6342        pub(crate) fn new(
6343            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
6344        ) -> Self {
6345            Self(RequestBuilder::new(stub))
6346        }
6347
6348        /// Sets the full request, replacing any prior values.
6349        pub fn with_request<V: Into<crate::model::UpdateEncryptionConfigRequest>>(
6350            mut self,
6351            v: V,
6352        ) -> Self {
6353            self.0.request = v.into();
6354            self
6355        }
6356
6357        /// Sets all the options, replacing any prior values.
6358        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6359            self.0.options = v.into();
6360            self
6361        }
6362
6363        /// Sends the request.
6364        ///
6365        /// # Long running operations
6366        ///
6367        /// This starts, but does not poll, a longrunning operation. More information
6368        /// on [update_encryption_config][crate::client::CmekService::update_encryption_config].
6369        pub async fn send(self) -> Result<longrunning::model::Operation> {
6370            (*self.0.stub)
6371                .update_encryption_config(self.0.request, self.0.options)
6372                .await
6373                .map(gax::response::Response::into_body)
6374        }
6375
6376        /// Creates a [Poller][lro::Poller] to work with `update_encryption_config`.
6377        pub fn poller(
6378            self,
6379        ) -> impl lro::Poller<crate::model::EncryptionConfig, crate::model::OperationMetadata>
6380        {
6381            type Operation = lro::internal::Operation<
6382                crate::model::EncryptionConfig,
6383                crate::model::OperationMetadata,
6384            >;
6385            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6386            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6387
6388            let stub = self.0.stub.clone();
6389            let mut options = self.0.options.clone();
6390            options.set_retry_policy(gax::retry_policy::NeverRetry);
6391            let query = move |name| {
6392                let stub = stub.clone();
6393                let options = options.clone();
6394                async {
6395                    let op = GetOperation::new(stub)
6396                        .set_name(name)
6397                        .with_options(options)
6398                        .send()
6399                        .await?;
6400                    Ok(Operation::new(op))
6401                }
6402            };
6403
6404            let start = move || async {
6405                let op = self.send().await?;
6406                Ok(Operation::new(op))
6407            };
6408
6409            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
6410        }
6411
6412        /// Sets the value of [encryption_config][crate::model::UpdateEncryptionConfigRequest::encryption_config].
6413        ///
6414        /// This is a **required** field for requests.
6415        pub fn set_encryption_config<T>(mut self, v: T) -> Self
6416        where
6417            T: std::convert::Into<crate::model::EncryptionConfig>,
6418        {
6419            self.0.request.encryption_config = std::option::Option::Some(v.into());
6420            self
6421        }
6422
6423        /// Sets or clears the value of [encryption_config][crate::model::UpdateEncryptionConfigRequest::encryption_config].
6424        ///
6425        /// This is a **required** field for requests.
6426        pub fn set_or_clear_encryption_config<T>(mut self, v: std::option::Option<T>) -> Self
6427        where
6428            T: std::convert::Into<crate::model::EncryptionConfig>,
6429        {
6430            self.0.request.encryption_config = v.map(|x| x.into());
6431            self
6432        }
6433
6434        /// Sets the value of [update_mask][crate::model::UpdateEncryptionConfigRequest::update_mask].
6435        pub fn set_update_mask<T>(mut self, v: T) -> Self
6436        where
6437            T: std::convert::Into<wkt::FieldMask>,
6438        {
6439            self.0.request.update_mask = std::option::Option::Some(v.into());
6440            self
6441        }
6442
6443        /// Sets or clears the value of [update_mask][crate::model::UpdateEncryptionConfigRequest::update_mask].
6444        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
6445        where
6446            T: std::convert::Into<wkt::FieldMask>,
6447        {
6448            self.0.request.update_mask = v.map(|x| x.into());
6449            self
6450        }
6451    }
6452
6453    #[doc(hidden)]
6454    impl gax::options::internal::RequestBuilder for UpdateEncryptionConfig {
6455        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6456            &mut self.0.options
6457        }
6458    }
6459
6460    /// The request builder for [CmekService::delete_encryption_config][crate::client::CmekService::delete_encryption_config] calls.
6461    ///
6462    /// # Example
6463    /// ```no_run
6464    /// # use google_cloud_dataplex_v1::builder;
6465    /// use builder::cmek_service::DeleteEncryptionConfig;
6466    /// # tokio_test::block_on(async {
6467    /// use lro::Poller;
6468    ///
6469    /// let builder = prepare_request_builder();
6470    /// let response = builder.poller().until_done().await?;
6471    /// # gax::Result::<()>::Ok(()) });
6472    ///
6473    /// fn prepare_request_builder() -> DeleteEncryptionConfig {
6474    ///   # panic!();
6475    ///   // ... details omitted ...
6476    /// }
6477    /// ```
6478    #[derive(Clone, Debug)]
6479    pub struct DeleteEncryptionConfig(RequestBuilder<crate::model::DeleteEncryptionConfigRequest>);
6480
6481    impl DeleteEncryptionConfig {
6482        pub(crate) fn new(
6483            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
6484        ) -> Self {
6485            Self(RequestBuilder::new(stub))
6486        }
6487
6488        /// Sets the full request, replacing any prior values.
6489        pub fn with_request<V: Into<crate::model::DeleteEncryptionConfigRequest>>(
6490            mut self,
6491            v: V,
6492        ) -> Self {
6493            self.0.request = v.into();
6494            self
6495        }
6496
6497        /// Sets all the options, replacing any prior values.
6498        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6499            self.0.options = v.into();
6500            self
6501        }
6502
6503        /// Sends the request.
6504        ///
6505        /// # Long running operations
6506        ///
6507        /// This starts, but does not poll, a longrunning operation. More information
6508        /// on [delete_encryption_config][crate::client::CmekService::delete_encryption_config].
6509        pub async fn send(self) -> Result<longrunning::model::Operation> {
6510            (*self.0.stub)
6511                .delete_encryption_config(self.0.request, self.0.options)
6512                .await
6513                .map(gax::response::Response::into_body)
6514        }
6515
6516        /// Creates a [Poller][lro::Poller] to work with `delete_encryption_config`.
6517        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
6518            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
6519            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
6520            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
6521
6522            let stub = self.0.stub.clone();
6523            let mut options = self.0.options.clone();
6524            options.set_retry_policy(gax::retry_policy::NeverRetry);
6525            let query = move |name| {
6526                let stub = stub.clone();
6527                let options = options.clone();
6528                async {
6529                    let op = GetOperation::new(stub)
6530                        .set_name(name)
6531                        .with_options(options)
6532                        .send()
6533                        .await?;
6534                    Ok(Operation::new(op))
6535                }
6536            };
6537
6538            let start = move || async {
6539                let op = self.send().await?;
6540                Ok(Operation::new(op))
6541            };
6542
6543            lro::internal::new_unit_response_poller(
6544                polling_error_policy,
6545                polling_backoff_policy,
6546                start,
6547                query,
6548            )
6549        }
6550
6551        /// Sets the value of [name][crate::model::DeleteEncryptionConfigRequest::name].
6552        ///
6553        /// This is a **required** field for requests.
6554        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6555            self.0.request.name = v.into();
6556            self
6557        }
6558
6559        /// Sets the value of [etag][crate::model::DeleteEncryptionConfigRequest::etag].
6560        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
6561            self.0.request.etag = v.into();
6562            self
6563        }
6564    }
6565
6566    #[doc(hidden)]
6567    impl gax::options::internal::RequestBuilder for DeleteEncryptionConfig {
6568        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6569            &mut self.0.options
6570        }
6571    }
6572
6573    /// The request builder for [CmekService::list_encryption_configs][crate::client::CmekService::list_encryption_configs] calls.
6574    ///
6575    /// # Example
6576    /// ```no_run
6577    /// # use google_cloud_dataplex_v1::builder;
6578    /// use builder::cmek_service::ListEncryptionConfigs;
6579    /// # tokio_test::block_on(async {
6580    /// use gax::paginator::ItemPaginator;
6581    ///
6582    /// let builder = prepare_request_builder();
6583    /// let mut items = builder.by_item();
6584    /// while let Some(result) = items.next().await {
6585    ///   let item = result?;
6586    /// }
6587    /// # gax::Result::<()>::Ok(()) });
6588    ///
6589    /// fn prepare_request_builder() -> ListEncryptionConfigs {
6590    ///   # panic!();
6591    ///   // ... details omitted ...
6592    /// }
6593    /// ```
6594    #[derive(Clone, Debug)]
6595    pub struct ListEncryptionConfigs(RequestBuilder<crate::model::ListEncryptionConfigsRequest>);
6596
6597    impl ListEncryptionConfigs {
6598        pub(crate) fn new(
6599            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
6600        ) -> Self {
6601            Self(RequestBuilder::new(stub))
6602        }
6603
6604        /// Sets the full request, replacing any prior values.
6605        pub fn with_request<V: Into<crate::model::ListEncryptionConfigsRequest>>(
6606            mut self,
6607            v: V,
6608        ) -> Self {
6609            self.0.request = v.into();
6610            self
6611        }
6612
6613        /// Sets all the options, replacing any prior values.
6614        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6615            self.0.options = v.into();
6616            self
6617        }
6618
6619        /// Sends the request.
6620        pub async fn send(self) -> Result<crate::model::ListEncryptionConfigsResponse> {
6621            (*self.0.stub)
6622                .list_encryption_configs(self.0.request, self.0.options)
6623                .await
6624                .map(gax::response::Response::into_body)
6625        }
6626
6627        /// Streams each page in the collection.
6628        pub fn by_page(
6629            self,
6630        ) -> impl gax::paginator::Paginator<crate::model::ListEncryptionConfigsResponse, gax::error::Error>
6631        {
6632            use std::clone::Clone;
6633            let token = self.0.request.page_token.clone();
6634            let execute = move |token: String| {
6635                let mut builder = self.clone();
6636                builder.0.request = builder.0.request.set_page_token(token);
6637                builder.send()
6638            };
6639            gax::paginator::internal::new_paginator(token, execute)
6640        }
6641
6642        /// Streams each item in the collection.
6643        pub fn by_item(
6644            self,
6645        ) -> impl gax::paginator::ItemPaginator<
6646            crate::model::ListEncryptionConfigsResponse,
6647            gax::error::Error,
6648        > {
6649            use gax::paginator::Paginator;
6650            self.by_page().items()
6651        }
6652
6653        /// Sets the value of [parent][crate::model::ListEncryptionConfigsRequest::parent].
6654        ///
6655        /// This is a **required** field for requests.
6656        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
6657            self.0.request.parent = v.into();
6658            self
6659        }
6660
6661        /// Sets the value of [page_size][crate::model::ListEncryptionConfigsRequest::page_size].
6662        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6663            self.0.request.page_size = v.into();
6664            self
6665        }
6666
6667        /// Sets the value of [page_token][crate::model::ListEncryptionConfigsRequest::page_token].
6668        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6669            self.0.request.page_token = v.into();
6670            self
6671        }
6672
6673        /// Sets the value of [filter][crate::model::ListEncryptionConfigsRequest::filter].
6674        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6675            self.0.request.filter = v.into();
6676            self
6677        }
6678
6679        /// Sets the value of [order_by][crate::model::ListEncryptionConfigsRequest::order_by].
6680        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
6681            self.0.request.order_by = v.into();
6682            self
6683        }
6684    }
6685
6686    #[doc(hidden)]
6687    impl gax::options::internal::RequestBuilder for ListEncryptionConfigs {
6688        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6689            &mut self.0.options
6690        }
6691    }
6692
6693    /// The request builder for [CmekService::get_encryption_config][crate::client::CmekService::get_encryption_config] calls.
6694    ///
6695    /// # Example
6696    /// ```no_run
6697    /// # use google_cloud_dataplex_v1::builder;
6698    /// use builder::cmek_service::GetEncryptionConfig;
6699    /// # tokio_test::block_on(async {
6700    ///
6701    /// let builder = prepare_request_builder();
6702    /// let response = builder.send().await?;
6703    /// # gax::Result::<()>::Ok(()) });
6704    ///
6705    /// fn prepare_request_builder() -> GetEncryptionConfig {
6706    ///   # panic!();
6707    ///   // ... details omitted ...
6708    /// }
6709    /// ```
6710    #[derive(Clone, Debug)]
6711    pub struct GetEncryptionConfig(RequestBuilder<crate::model::GetEncryptionConfigRequest>);
6712
6713    impl GetEncryptionConfig {
6714        pub(crate) fn new(
6715            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
6716        ) -> Self {
6717            Self(RequestBuilder::new(stub))
6718        }
6719
6720        /// Sets the full request, replacing any prior values.
6721        pub fn with_request<V: Into<crate::model::GetEncryptionConfigRequest>>(
6722            mut self,
6723            v: V,
6724        ) -> Self {
6725            self.0.request = v.into();
6726            self
6727        }
6728
6729        /// Sets all the options, replacing any prior values.
6730        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6731            self.0.options = v.into();
6732            self
6733        }
6734
6735        /// Sends the request.
6736        pub async fn send(self) -> Result<crate::model::EncryptionConfig> {
6737            (*self.0.stub)
6738                .get_encryption_config(self.0.request, self.0.options)
6739                .await
6740                .map(gax::response::Response::into_body)
6741        }
6742
6743        /// Sets the value of [name][crate::model::GetEncryptionConfigRequest::name].
6744        ///
6745        /// This is a **required** field for requests.
6746        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6747            self.0.request.name = v.into();
6748            self
6749        }
6750    }
6751
6752    #[doc(hidden)]
6753    impl gax::options::internal::RequestBuilder for GetEncryptionConfig {
6754        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6755            &mut self.0.options
6756        }
6757    }
6758
6759    /// The request builder for [CmekService::list_locations][crate::client::CmekService::list_locations] calls.
6760    ///
6761    /// # Example
6762    /// ```no_run
6763    /// # use google_cloud_dataplex_v1::builder;
6764    /// use builder::cmek_service::ListLocations;
6765    /// # tokio_test::block_on(async {
6766    /// use gax::paginator::ItemPaginator;
6767    ///
6768    /// let builder = prepare_request_builder();
6769    /// let mut items = builder.by_item();
6770    /// while let Some(result) = items.next().await {
6771    ///   let item = result?;
6772    /// }
6773    /// # gax::Result::<()>::Ok(()) });
6774    ///
6775    /// fn prepare_request_builder() -> ListLocations {
6776    ///   # panic!();
6777    ///   // ... details omitted ...
6778    /// }
6779    /// ```
6780    #[derive(Clone, Debug)]
6781    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
6782
6783    impl ListLocations {
6784        pub(crate) fn new(
6785            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
6786        ) -> Self {
6787            Self(RequestBuilder::new(stub))
6788        }
6789
6790        /// Sets the full request, replacing any prior values.
6791        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
6792            mut self,
6793            v: V,
6794        ) -> Self {
6795            self.0.request = v.into();
6796            self
6797        }
6798
6799        /// Sets all the options, replacing any prior values.
6800        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6801            self.0.options = v.into();
6802            self
6803        }
6804
6805        /// Sends the request.
6806        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
6807            (*self.0.stub)
6808                .list_locations(self.0.request, self.0.options)
6809                .await
6810                .map(gax::response::Response::into_body)
6811        }
6812
6813        /// Streams each page in the collection.
6814        pub fn by_page(
6815            self,
6816        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
6817        {
6818            use std::clone::Clone;
6819            let token = self.0.request.page_token.clone();
6820            let execute = move |token: String| {
6821                let mut builder = self.clone();
6822                builder.0.request = builder.0.request.set_page_token(token);
6823                builder.send()
6824            };
6825            gax::paginator::internal::new_paginator(token, execute)
6826        }
6827
6828        /// Streams each item in the collection.
6829        pub fn by_item(
6830            self,
6831        ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
6832        {
6833            use gax::paginator::Paginator;
6834            self.by_page().items()
6835        }
6836
6837        /// Sets the value of [name][location::model::ListLocationsRequest::name].
6838        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6839            self.0.request.name = v.into();
6840            self
6841        }
6842
6843        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
6844        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
6845            self.0.request.filter = v.into();
6846            self
6847        }
6848
6849        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
6850        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
6851            self.0.request.page_size = v.into();
6852            self
6853        }
6854
6855        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
6856        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
6857            self.0.request.page_token = v.into();
6858            self
6859        }
6860    }
6861
6862    #[doc(hidden)]
6863    impl gax::options::internal::RequestBuilder for ListLocations {
6864        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6865            &mut self.0.options
6866        }
6867    }
6868
6869    /// The request builder for [CmekService::get_location][crate::client::CmekService::get_location] calls.
6870    ///
6871    /// # Example
6872    /// ```no_run
6873    /// # use google_cloud_dataplex_v1::builder;
6874    /// use builder::cmek_service::GetLocation;
6875    /// # tokio_test::block_on(async {
6876    ///
6877    /// let builder = prepare_request_builder();
6878    /// let response = builder.send().await?;
6879    /// # gax::Result::<()>::Ok(()) });
6880    ///
6881    /// fn prepare_request_builder() -> GetLocation {
6882    ///   # panic!();
6883    ///   // ... details omitted ...
6884    /// }
6885    /// ```
6886    #[derive(Clone, Debug)]
6887    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
6888
6889    impl GetLocation {
6890        pub(crate) fn new(
6891            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
6892        ) -> Self {
6893            Self(RequestBuilder::new(stub))
6894        }
6895
6896        /// Sets the full request, replacing any prior values.
6897        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
6898            self.0.request = v.into();
6899            self
6900        }
6901
6902        /// Sets all the options, replacing any prior values.
6903        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6904            self.0.options = v.into();
6905            self
6906        }
6907
6908        /// Sends the request.
6909        pub async fn send(self) -> Result<location::model::Location> {
6910            (*self.0.stub)
6911                .get_location(self.0.request, self.0.options)
6912                .await
6913                .map(gax::response::Response::into_body)
6914        }
6915
6916        /// Sets the value of [name][location::model::GetLocationRequest::name].
6917        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
6918            self.0.request.name = v.into();
6919            self
6920        }
6921    }
6922
6923    #[doc(hidden)]
6924    impl gax::options::internal::RequestBuilder for GetLocation {
6925        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
6926            &mut self.0.options
6927        }
6928    }
6929
6930    /// The request builder for [CmekService::set_iam_policy][crate::client::CmekService::set_iam_policy] calls.
6931    ///
6932    /// # Example
6933    /// ```no_run
6934    /// # use google_cloud_dataplex_v1::builder;
6935    /// use builder::cmek_service::SetIamPolicy;
6936    /// # tokio_test::block_on(async {
6937    ///
6938    /// let builder = prepare_request_builder();
6939    /// let response = builder.send().await?;
6940    /// # gax::Result::<()>::Ok(()) });
6941    ///
6942    /// fn prepare_request_builder() -> SetIamPolicy {
6943    ///   # panic!();
6944    ///   // ... details omitted ...
6945    /// }
6946    /// ```
6947    #[derive(Clone, Debug)]
6948    pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
6949
6950    impl SetIamPolicy {
6951        pub(crate) fn new(
6952            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
6953        ) -> Self {
6954            Self(RequestBuilder::new(stub))
6955        }
6956
6957        /// Sets the full request, replacing any prior values.
6958        pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
6959            self.0.request = v.into();
6960            self
6961        }
6962
6963        /// Sets all the options, replacing any prior values.
6964        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
6965            self.0.options = v.into();
6966            self
6967        }
6968
6969        /// Sends the request.
6970        pub async fn send(self) -> Result<iam_v1::model::Policy> {
6971            (*self.0.stub)
6972                .set_iam_policy(self.0.request, self.0.options)
6973                .await
6974                .map(gax::response::Response::into_body)
6975        }
6976
6977        /// Sets the value of [resource][iam_v1::model::SetIamPolicyRequest::resource].
6978        ///
6979        /// This is a **required** field for requests.
6980        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
6981            self.0.request.resource = v.into();
6982            self
6983        }
6984
6985        /// Sets the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
6986        ///
6987        /// This is a **required** field for requests.
6988        pub fn set_policy<T>(mut self, v: T) -> Self
6989        where
6990            T: std::convert::Into<iam_v1::model::Policy>,
6991        {
6992            self.0.request.policy = std::option::Option::Some(v.into());
6993            self
6994        }
6995
6996        /// Sets or clears the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
6997        ///
6998        /// This is a **required** field for requests.
6999        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
7000        where
7001            T: std::convert::Into<iam_v1::model::Policy>,
7002        {
7003            self.0.request.policy = v.map(|x| x.into());
7004            self
7005        }
7006
7007        /// Sets the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
7008        pub fn set_update_mask<T>(mut self, v: T) -> Self
7009        where
7010            T: std::convert::Into<wkt::FieldMask>,
7011        {
7012            self.0.request.update_mask = std::option::Option::Some(v.into());
7013            self
7014        }
7015
7016        /// Sets or clears the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
7017        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7018        where
7019            T: std::convert::Into<wkt::FieldMask>,
7020        {
7021            self.0.request.update_mask = v.map(|x| x.into());
7022            self
7023        }
7024    }
7025
7026    #[doc(hidden)]
7027    impl gax::options::internal::RequestBuilder for SetIamPolicy {
7028        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7029            &mut self.0.options
7030        }
7031    }
7032
7033    /// The request builder for [CmekService::get_iam_policy][crate::client::CmekService::get_iam_policy] calls.
7034    ///
7035    /// # Example
7036    /// ```no_run
7037    /// # use google_cloud_dataplex_v1::builder;
7038    /// use builder::cmek_service::GetIamPolicy;
7039    /// # tokio_test::block_on(async {
7040    ///
7041    /// let builder = prepare_request_builder();
7042    /// let response = builder.send().await?;
7043    /// # gax::Result::<()>::Ok(()) });
7044    ///
7045    /// fn prepare_request_builder() -> GetIamPolicy {
7046    ///   # panic!();
7047    ///   // ... details omitted ...
7048    /// }
7049    /// ```
7050    #[derive(Clone, Debug)]
7051    pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
7052
7053    impl GetIamPolicy {
7054        pub(crate) fn new(
7055            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7056        ) -> Self {
7057            Self(RequestBuilder::new(stub))
7058        }
7059
7060        /// Sets the full request, replacing any prior values.
7061        pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
7062            self.0.request = v.into();
7063            self
7064        }
7065
7066        /// Sets all the options, replacing any prior values.
7067        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7068            self.0.options = v.into();
7069            self
7070        }
7071
7072        /// Sends the request.
7073        pub async fn send(self) -> Result<iam_v1::model::Policy> {
7074            (*self.0.stub)
7075                .get_iam_policy(self.0.request, self.0.options)
7076                .await
7077                .map(gax::response::Response::into_body)
7078        }
7079
7080        /// Sets the value of [resource][iam_v1::model::GetIamPolicyRequest::resource].
7081        ///
7082        /// This is a **required** field for requests.
7083        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
7084            self.0.request.resource = v.into();
7085            self
7086        }
7087
7088        /// Sets the value of [options][iam_v1::model::GetIamPolicyRequest::options].
7089        pub fn set_options<T>(mut self, v: T) -> Self
7090        where
7091            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
7092        {
7093            self.0.request.options = std::option::Option::Some(v.into());
7094            self
7095        }
7096
7097        /// Sets or clears the value of [options][iam_v1::model::GetIamPolicyRequest::options].
7098        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
7099        where
7100            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
7101        {
7102            self.0.request.options = v.map(|x| x.into());
7103            self
7104        }
7105    }
7106
7107    #[doc(hidden)]
7108    impl gax::options::internal::RequestBuilder for GetIamPolicy {
7109        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7110            &mut self.0.options
7111        }
7112    }
7113
7114    /// The request builder for [CmekService::test_iam_permissions][crate::client::CmekService::test_iam_permissions] calls.
7115    ///
7116    /// # Example
7117    /// ```no_run
7118    /// # use google_cloud_dataplex_v1::builder;
7119    /// use builder::cmek_service::TestIamPermissions;
7120    /// # tokio_test::block_on(async {
7121    ///
7122    /// let builder = prepare_request_builder();
7123    /// let response = builder.send().await?;
7124    /// # gax::Result::<()>::Ok(()) });
7125    ///
7126    /// fn prepare_request_builder() -> TestIamPermissions {
7127    ///   # panic!();
7128    ///   // ... details omitted ...
7129    /// }
7130    /// ```
7131    #[derive(Clone, Debug)]
7132    pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
7133
7134    impl TestIamPermissions {
7135        pub(crate) fn new(
7136            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7137        ) -> Self {
7138            Self(RequestBuilder::new(stub))
7139        }
7140
7141        /// Sets the full request, replacing any prior values.
7142        pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
7143            mut self,
7144            v: V,
7145        ) -> Self {
7146            self.0.request = v.into();
7147            self
7148        }
7149
7150        /// Sets all the options, replacing any prior values.
7151        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7152            self.0.options = v.into();
7153            self
7154        }
7155
7156        /// Sends the request.
7157        pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
7158            (*self.0.stub)
7159                .test_iam_permissions(self.0.request, self.0.options)
7160                .await
7161                .map(gax::response::Response::into_body)
7162        }
7163
7164        /// Sets the value of [resource][iam_v1::model::TestIamPermissionsRequest::resource].
7165        ///
7166        /// This is a **required** field for requests.
7167        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
7168            self.0.request.resource = v.into();
7169            self
7170        }
7171
7172        /// Sets the value of [permissions][iam_v1::model::TestIamPermissionsRequest::permissions].
7173        ///
7174        /// This is a **required** field for requests.
7175        pub fn set_permissions<T, V>(mut self, v: T) -> Self
7176        where
7177            T: std::iter::IntoIterator<Item = V>,
7178            V: std::convert::Into<std::string::String>,
7179        {
7180            use std::iter::Iterator;
7181            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
7182            self
7183        }
7184    }
7185
7186    #[doc(hidden)]
7187    impl gax::options::internal::RequestBuilder for TestIamPermissions {
7188        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7189            &mut self.0.options
7190        }
7191    }
7192
7193    /// The request builder for [CmekService::list_operations][crate::client::CmekService::list_operations] calls.
7194    ///
7195    /// # Example
7196    /// ```no_run
7197    /// # use google_cloud_dataplex_v1::builder;
7198    /// use builder::cmek_service::ListOperations;
7199    /// # tokio_test::block_on(async {
7200    /// use gax::paginator::ItemPaginator;
7201    ///
7202    /// let builder = prepare_request_builder();
7203    /// let mut items = builder.by_item();
7204    /// while let Some(result) = items.next().await {
7205    ///   let item = result?;
7206    /// }
7207    /// # gax::Result::<()>::Ok(()) });
7208    ///
7209    /// fn prepare_request_builder() -> ListOperations {
7210    ///   # panic!();
7211    ///   // ... details omitted ...
7212    /// }
7213    /// ```
7214    #[derive(Clone, Debug)]
7215    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
7216
7217    impl ListOperations {
7218        pub(crate) fn new(
7219            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7220        ) -> Self {
7221            Self(RequestBuilder::new(stub))
7222        }
7223
7224        /// Sets the full request, replacing any prior values.
7225        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
7226            mut self,
7227            v: V,
7228        ) -> Self {
7229            self.0.request = v.into();
7230            self
7231        }
7232
7233        /// Sets all the options, replacing any prior values.
7234        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7235            self.0.options = v.into();
7236            self
7237        }
7238
7239        /// Sends the request.
7240        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
7241            (*self.0.stub)
7242                .list_operations(self.0.request, self.0.options)
7243                .await
7244                .map(gax::response::Response::into_body)
7245        }
7246
7247        /// Streams each page in the collection.
7248        pub fn by_page(
7249            self,
7250        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
7251        {
7252            use std::clone::Clone;
7253            let token = self.0.request.page_token.clone();
7254            let execute = move |token: String| {
7255                let mut builder = self.clone();
7256                builder.0.request = builder.0.request.set_page_token(token);
7257                builder.send()
7258            };
7259            gax::paginator::internal::new_paginator(token, execute)
7260        }
7261
7262        /// Streams each item in the collection.
7263        pub fn by_item(
7264            self,
7265        ) -> impl gax::paginator::ItemPaginator<
7266            longrunning::model::ListOperationsResponse,
7267            gax::error::Error,
7268        > {
7269            use gax::paginator::Paginator;
7270            self.by_page().items()
7271        }
7272
7273        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
7274        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7275            self.0.request.name = v.into();
7276            self
7277        }
7278
7279        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
7280        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
7281            self.0.request.filter = v.into();
7282            self
7283        }
7284
7285        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
7286        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
7287            self.0.request.page_size = v.into();
7288            self
7289        }
7290
7291        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
7292        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
7293            self.0.request.page_token = v.into();
7294            self
7295        }
7296
7297        /// Sets the value of [return_partial_success][longrunning::model::ListOperationsRequest::return_partial_success].
7298        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
7299            self.0.request.return_partial_success = v.into();
7300            self
7301        }
7302    }
7303
7304    #[doc(hidden)]
7305    impl gax::options::internal::RequestBuilder for ListOperations {
7306        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7307            &mut self.0.options
7308        }
7309    }
7310
7311    /// The request builder for [CmekService::get_operation][crate::client::CmekService::get_operation] calls.
7312    ///
7313    /// # Example
7314    /// ```no_run
7315    /// # use google_cloud_dataplex_v1::builder;
7316    /// use builder::cmek_service::GetOperation;
7317    /// # tokio_test::block_on(async {
7318    ///
7319    /// let builder = prepare_request_builder();
7320    /// let response = builder.send().await?;
7321    /// # gax::Result::<()>::Ok(()) });
7322    ///
7323    /// fn prepare_request_builder() -> GetOperation {
7324    ///   # panic!();
7325    ///   // ... details omitted ...
7326    /// }
7327    /// ```
7328    #[derive(Clone, Debug)]
7329    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
7330
7331    impl GetOperation {
7332        pub(crate) fn new(
7333            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7334        ) -> Self {
7335            Self(RequestBuilder::new(stub))
7336        }
7337
7338        /// Sets the full request, replacing any prior values.
7339        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
7340            mut self,
7341            v: V,
7342        ) -> Self {
7343            self.0.request = v.into();
7344            self
7345        }
7346
7347        /// Sets all the options, replacing any prior values.
7348        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7349            self.0.options = v.into();
7350            self
7351        }
7352
7353        /// Sends the request.
7354        pub async fn send(self) -> Result<longrunning::model::Operation> {
7355            (*self.0.stub)
7356                .get_operation(self.0.request, self.0.options)
7357                .await
7358                .map(gax::response::Response::into_body)
7359        }
7360
7361        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
7362        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7363            self.0.request.name = v.into();
7364            self
7365        }
7366    }
7367
7368    #[doc(hidden)]
7369    impl gax::options::internal::RequestBuilder for GetOperation {
7370        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7371            &mut self.0.options
7372        }
7373    }
7374
7375    /// The request builder for [CmekService::delete_operation][crate::client::CmekService::delete_operation] calls.
7376    ///
7377    /// # Example
7378    /// ```no_run
7379    /// # use google_cloud_dataplex_v1::builder;
7380    /// use builder::cmek_service::DeleteOperation;
7381    /// # tokio_test::block_on(async {
7382    ///
7383    /// let builder = prepare_request_builder();
7384    /// let response = builder.send().await?;
7385    /// # gax::Result::<()>::Ok(()) });
7386    ///
7387    /// fn prepare_request_builder() -> DeleteOperation {
7388    ///   # panic!();
7389    ///   // ... details omitted ...
7390    /// }
7391    /// ```
7392    #[derive(Clone, Debug)]
7393    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
7394
7395    impl DeleteOperation {
7396        pub(crate) fn new(
7397            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7398        ) -> Self {
7399            Self(RequestBuilder::new(stub))
7400        }
7401
7402        /// Sets the full request, replacing any prior values.
7403        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
7404            mut self,
7405            v: V,
7406        ) -> Self {
7407            self.0.request = v.into();
7408            self
7409        }
7410
7411        /// Sets all the options, replacing any prior values.
7412        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7413            self.0.options = v.into();
7414            self
7415        }
7416
7417        /// Sends the request.
7418        pub async fn send(self) -> Result<()> {
7419            (*self.0.stub)
7420                .delete_operation(self.0.request, self.0.options)
7421                .await
7422                .map(gax::response::Response::into_body)
7423        }
7424
7425        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
7426        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7427            self.0.request.name = v.into();
7428            self
7429        }
7430    }
7431
7432    #[doc(hidden)]
7433    impl gax::options::internal::RequestBuilder for DeleteOperation {
7434        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7435            &mut self.0.options
7436        }
7437    }
7438
7439    /// The request builder for [CmekService::cancel_operation][crate::client::CmekService::cancel_operation] calls.
7440    ///
7441    /// # Example
7442    /// ```no_run
7443    /// # use google_cloud_dataplex_v1::builder;
7444    /// use builder::cmek_service::CancelOperation;
7445    /// # tokio_test::block_on(async {
7446    ///
7447    /// let builder = prepare_request_builder();
7448    /// let response = builder.send().await?;
7449    /// # gax::Result::<()>::Ok(()) });
7450    ///
7451    /// fn prepare_request_builder() -> CancelOperation {
7452    ///   # panic!();
7453    ///   // ... details omitted ...
7454    /// }
7455    /// ```
7456    #[derive(Clone, Debug)]
7457    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
7458
7459    impl CancelOperation {
7460        pub(crate) fn new(
7461            stub: std::sync::Arc<dyn super::super::stub::dynamic::CmekService>,
7462        ) -> Self {
7463            Self(RequestBuilder::new(stub))
7464        }
7465
7466        /// Sets the full request, replacing any prior values.
7467        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
7468            mut self,
7469            v: V,
7470        ) -> Self {
7471            self.0.request = v.into();
7472            self
7473        }
7474
7475        /// Sets all the options, replacing any prior values.
7476        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7477            self.0.options = v.into();
7478            self
7479        }
7480
7481        /// Sends the request.
7482        pub async fn send(self) -> Result<()> {
7483            (*self.0.stub)
7484                .cancel_operation(self.0.request, self.0.options)
7485                .await
7486                .map(gax::response::Response::into_body)
7487        }
7488
7489        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
7490        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7491            self.0.request.name = v.into();
7492            self
7493        }
7494    }
7495
7496    #[doc(hidden)]
7497    impl gax::options::internal::RequestBuilder for CancelOperation {
7498        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7499            &mut self.0.options
7500        }
7501    }
7502}
7503
7504pub mod content_service {
7505    use crate::Result;
7506
7507    /// A builder for [ContentService][crate::client::ContentService].
7508    ///
7509    /// ```
7510    /// # tokio_test::block_on(async {
7511    /// # use google_cloud_dataplex_v1::*;
7512    /// # use builder::content_service::ClientBuilder;
7513    /// # use client::ContentService;
7514    /// let builder : ClientBuilder = ContentService::builder();
7515    /// let client = builder
7516    ///     .with_endpoint("https://dataplex.googleapis.com")
7517    ///     .build().await?;
7518    /// # gax::client_builder::Result::<()>::Ok(()) });
7519    /// ```
7520    pub type ClientBuilder =
7521        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
7522
7523    pub(crate) mod client {
7524        use super::super::super::client::ContentService;
7525        pub struct Factory;
7526        impl gax::client_builder::internal::ClientFactory for Factory {
7527            type Client = ContentService;
7528            type Credentials = gaxi::options::Credentials;
7529            async fn build(
7530                self,
7531                config: gaxi::options::ClientConfig,
7532            ) -> gax::client_builder::Result<Self::Client> {
7533                Self::Client::new(config).await
7534            }
7535        }
7536    }
7537
7538    /// Common implementation for [crate::client::ContentService] request builders.
7539    #[derive(Clone, Debug)]
7540    pub(crate) struct RequestBuilder<R: std::default::Default> {
7541        stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
7542        request: R,
7543        options: gax::options::RequestOptions,
7544    }
7545
7546    impl<R> RequestBuilder<R>
7547    where
7548        R: std::default::Default,
7549    {
7550        pub(crate) fn new(
7551            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
7552        ) -> Self {
7553            Self {
7554                stub,
7555                request: R::default(),
7556                options: gax::options::RequestOptions::default(),
7557            }
7558        }
7559    }
7560
7561    /// The request builder for [ContentService::create_content][crate::client::ContentService::create_content] calls.
7562    ///
7563    /// # Example
7564    /// ```no_run
7565    /// # use google_cloud_dataplex_v1::builder;
7566    /// use builder::content_service::CreateContent;
7567    /// # tokio_test::block_on(async {
7568    ///
7569    /// let builder = prepare_request_builder();
7570    /// let response = builder.send().await?;
7571    /// # gax::Result::<()>::Ok(()) });
7572    ///
7573    /// fn prepare_request_builder() -> CreateContent {
7574    ///   # panic!();
7575    ///   // ... details omitted ...
7576    /// }
7577    /// ```
7578    #[derive(Clone, Debug)]
7579    pub struct CreateContent(RequestBuilder<crate::model::CreateContentRequest>);
7580
7581    impl CreateContent {
7582        pub(crate) fn new(
7583            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
7584        ) -> Self {
7585            Self(RequestBuilder::new(stub))
7586        }
7587
7588        /// Sets the full request, replacing any prior values.
7589        pub fn with_request<V: Into<crate::model::CreateContentRequest>>(mut self, v: V) -> Self {
7590            self.0.request = v.into();
7591            self
7592        }
7593
7594        /// Sets all the options, replacing any prior values.
7595        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7596            self.0.options = v.into();
7597            self
7598        }
7599
7600        /// Sends the request.
7601        pub async fn send(self) -> Result<crate::model::Content> {
7602            (*self.0.stub)
7603                .create_content(self.0.request, self.0.options)
7604                .await
7605                .map(gax::response::Response::into_body)
7606        }
7607
7608        /// Sets the value of [parent][crate::model::CreateContentRequest::parent].
7609        ///
7610        /// This is a **required** field for requests.
7611        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
7612            self.0.request.parent = v.into();
7613            self
7614        }
7615
7616        /// Sets the value of [content][crate::model::CreateContentRequest::content].
7617        ///
7618        /// This is a **required** field for requests.
7619        pub fn set_content<T>(mut self, v: T) -> Self
7620        where
7621            T: std::convert::Into<crate::model::Content>,
7622        {
7623            self.0.request.content = std::option::Option::Some(v.into());
7624            self
7625        }
7626
7627        /// Sets or clears the value of [content][crate::model::CreateContentRequest::content].
7628        ///
7629        /// This is a **required** field for requests.
7630        pub fn set_or_clear_content<T>(mut self, v: std::option::Option<T>) -> Self
7631        where
7632            T: std::convert::Into<crate::model::Content>,
7633        {
7634            self.0.request.content = v.map(|x| x.into());
7635            self
7636        }
7637
7638        /// Sets the value of [validate_only][crate::model::CreateContentRequest::validate_only].
7639        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
7640            self.0.request.validate_only = v.into();
7641            self
7642        }
7643    }
7644
7645    #[doc(hidden)]
7646    impl gax::options::internal::RequestBuilder for CreateContent {
7647        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7648            &mut self.0.options
7649        }
7650    }
7651
7652    /// The request builder for [ContentService::update_content][crate::client::ContentService::update_content] calls.
7653    ///
7654    /// # Example
7655    /// ```no_run
7656    /// # use google_cloud_dataplex_v1::builder;
7657    /// use builder::content_service::UpdateContent;
7658    /// # tokio_test::block_on(async {
7659    ///
7660    /// let builder = prepare_request_builder();
7661    /// let response = builder.send().await?;
7662    /// # gax::Result::<()>::Ok(()) });
7663    ///
7664    /// fn prepare_request_builder() -> UpdateContent {
7665    ///   # panic!();
7666    ///   // ... details omitted ...
7667    /// }
7668    /// ```
7669    #[derive(Clone, Debug)]
7670    pub struct UpdateContent(RequestBuilder<crate::model::UpdateContentRequest>);
7671
7672    impl UpdateContent {
7673        pub(crate) fn new(
7674            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
7675        ) -> Self {
7676            Self(RequestBuilder::new(stub))
7677        }
7678
7679        /// Sets the full request, replacing any prior values.
7680        pub fn with_request<V: Into<crate::model::UpdateContentRequest>>(mut self, v: V) -> Self {
7681            self.0.request = v.into();
7682            self
7683        }
7684
7685        /// Sets all the options, replacing any prior values.
7686        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7687            self.0.options = v.into();
7688            self
7689        }
7690
7691        /// Sends the request.
7692        pub async fn send(self) -> Result<crate::model::Content> {
7693            (*self.0.stub)
7694                .update_content(self.0.request, self.0.options)
7695                .await
7696                .map(gax::response::Response::into_body)
7697        }
7698
7699        /// Sets the value of [update_mask][crate::model::UpdateContentRequest::update_mask].
7700        ///
7701        /// This is a **required** field for requests.
7702        pub fn set_update_mask<T>(mut self, v: T) -> Self
7703        where
7704            T: std::convert::Into<wkt::FieldMask>,
7705        {
7706            self.0.request.update_mask = std::option::Option::Some(v.into());
7707            self
7708        }
7709
7710        /// Sets or clears the value of [update_mask][crate::model::UpdateContentRequest::update_mask].
7711        ///
7712        /// This is a **required** field for requests.
7713        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
7714        where
7715            T: std::convert::Into<wkt::FieldMask>,
7716        {
7717            self.0.request.update_mask = v.map(|x| x.into());
7718            self
7719        }
7720
7721        /// Sets the value of [content][crate::model::UpdateContentRequest::content].
7722        ///
7723        /// This is a **required** field for requests.
7724        pub fn set_content<T>(mut self, v: T) -> Self
7725        where
7726            T: std::convert::Into<crate::model::Content>,
7727        {
7728            self.0.request.content = std::option::Option::Some(v.into());
7729            self
7730        }
7731
7732        /// Sets or clears the value of [content][crate::model::UpdateContentRequest::content].
7733        ///
7734        /// This is a **required** field for requests.
7735        pub fn set_or_clear_content<T>(mut self, v: std::option::Option<T>) -> Self
7736        where
7737            T: std::convert::Into<crate::model::Content>,
7738        {
7739            self.0.request.content = v.map(|x| x.into());
7740            self
7741        }
7742
7743        /// Sets the value of [validate_only][crate::model::UpdateContentRequest::validate_only].
7744        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
7745            self.0.request.validate_only = v.into();
7746            self
7747        }
7748    }
7749
7750    #[doc(hidden)]
7751    impl gax::options::internal::RequestBuilder for UpdateContent {
7752        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7753            &mut self.0.options
7754        }
7755    }
7756
7757    /// The request builder for [ContentService::delete_content][crate::client::ContentService::delete_content] calls.
7758    ///
7759    /// # Example
7760    /// ```no_run
7761    /// # use google_cloud_dataplex_v1::builder;
7762    /// use builder::content_service::DeleteContent;
7763    /// # tokio_test::block_on(async {
7764    ///
7765    /// let builder = prepare_request_builder();
7766    /// let response = builder.send().await?;
7767    /// # gax::Result::<()>::Ok(()) });
7768    ///
7769    /// fn prepare_request_builder() -> DeleteContent {
7770    ///   # panic!();
7771    ///   // ... details omitted ...
7772    /// }
7773    /// ```
7774    #[derive(Clone, Debug)]
7775    pub struct DeleteContent(RequestBuilder<crate::model::DeleteContentRequest>);
7776
7777    impl DeleteContent {
7778        pub(crate) fn new(
7779            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
7780        ) -> Self {
7781            Self(RequestBuilder::new(stub))
7782        }
7783
7784        /// Sets the full request, replacing any prior values.
7785        pub fn with_request<V: Into<crate::model::DeleteContentRequest>>(mut self, v: V) -> Self {
7786            self.0.request = v.into();
7787            self
7788        }
7789
7790        /// Sets all the options, replacing any prior values.
7791        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7792            self.0.options = v.into();
7793            self
7794        }
7795
7796        /// Sends the request.
7797        pub async fn send(self) -> Result<()> {
7798            (*self.0.stub)
7799                .delete_content(self.0.request, self.0.options)
7800                .await
7801                .map(gax::response::Response::into_body)
7802        }
7803
7804        /// Sets the value of [name][crate::model::DeleteContentRequest::name].
7805        ///
7806        /// This is a **required** field for requests.
7807        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7808            self.0.request.name = v.into();
7809            self
7810        }
7811    }
7812
7813    #[doc(hidden)]
7814    impl gax::options::internal::RequestBuilder for DeleteContent {
7815        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7816            &mut self.0.options
7817        }
7818    }
7819
7820    /// The request builder for [ContentService::get_content][crate::client::ContentService::get_content] calls.
7821    ///
7822    /// # Example
7823    /// ```no_run
7824    /// # use google_cloud_dataplex_v1::builder;
7825    /// use builder::content_service::GetContent;
7826    /// # tokio_test::block_on(async {
7827    ///
7828    /// let builder = prepare_request_builder();
7829    /// let response = builder.send().await?;
7830    /// # gax::Result::<()>::Ok(()) });
7831    ///
7832    /// fn prepare_request_builder() -> GetContent {
7833    ///   # panic!();
7834    ///   // ... details omitted ...
7835    /// }
7836    /// ```
7837    #[derive(Clone, Debug)]
7838    pub struct GetContent(RequestBuilder<crate::model::GetContentRequest>);
7839
7840    impl GetContent {
7841        pub(crate) fn new(
7842            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
7843        ) -> Self {
7844            Self(RequestBuilder::new(stub))
7845        }
7846
7847        /// Sets the full request, replacing any prior values.
7848        pub fn with_request<V: Into<crate::model::GetContentRequest>>(mut self, v: V) -> Self {
7849            self.0.request = v.into();
7850            self
7851        }
7852
7853        /// Sets all the options, replacing any prior values.
7854        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7855            self.0.options = v.into();
7856            self
7857        }
7858
7859        /// Sends the request.
7860        pub async fn send(self) -> Result<crate::model::Content> {
7861            (*self.0.stub)
7862                .get_content(self.0.request, self.0.options)
7863                .await
7864                .map(gax::response::Response::into_body)
7865        }
7866
7867        /// Sets the value of [name][crate::model::GetContentRequest::name].
7868        ///
7869        /// This is a **required** field for requests.
7870        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
7871            self.0.request.name = v.into();
7872            self
7873        }
7874
7875        /// Sets the value of [view][crate::model::GetContentRequest::view].
7876        pub fn set_view<T: Into<crate::model::get_content_request::ContentView>>(
7877            mut self,
7878            v: T,
7879        ) -> Self {
7880            self.0.request.view = v.into();
7881            self
7882        }
7883    }
7884
7885    #[doc(hidden)]
7886    impl gax::options::internal::RequestBuilder for GetContent {
7887        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7888            &mut self.0.options
7889        }
7890    }
7891
7892    /// The request builder for [ContentService::get_iam_policy][crate::client::ContentService::get_iam_policy] calls.
7893    ///
7894    /// # Example
7895    /// ```no_run
7896    /// # use google_cloud_dataplex_v1::builder;
7897    /// use builder::content_service::GetIamPolicy;
7898    /// # tokio_test::block_on(async {
7899    ///
7900    /// let builder = prepare_request_builder();
7901    /// let response = builder.send().await?;
7902    /// # gax::Result::<()>::Ok(()) });
7903    ///
7904    /// fn prepare_request_builder() -> GetIamPolicy {
7905    ///   # panic!();
7906    ///   // ... details omitted ...
7907    /// }
7908    /// ```
7909    #[derive(Clone, Debug)]
7910    pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
7911
7912    impl GetIamPolicy {
7913        pub(crate) fn new(
7914            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
7915        ) -> Self {
7916            Self(RequestBuilder::new(stub))
7917        }
7918
7919        /// Sets the full request, replacing any prior values.
7920        pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
7921            self.0.request = v.into();
7922            self
7923        }
7924
7925        /// Sets all the options, replacing any prior values.
7926        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
7927            self.0.options = v.into();
7928            self
7929        }
7930
7931        /// Sends the request.
7932        pub async fn send(self) -> Result<iam_v1::model::Policy> {
7933            (*self.0.stub)
7934                .get_iam_policy(self.0.request, self.0.options)
7935                .await
7936                .map(gax::response::Response::into_body)
7937        }
7938
7939        /// Sets the value of [resource][iam_v1::model::GetIamPolicyRequest::resource].
7940        ///
7941        /// This is a **required** field for requests.
7942        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
7943            self.0.request.resource = v.into();
7944            self
7945        }
7946
7947        /// Sets the value of [options][iam_v1::model::GetIamPolicyRequest::options].
7948        pub fn set_options<T>(mut self, v: T) -> Self
7949        where
7950            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
7951        {
7952            self.0.request.options = std::option::Option::Some(v.into());
7953            self
7954        }
7955
7956        /// Sets or clears the value of [options][iam_v1::model::GetIamPolicyRequest::options].
7957        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
7958        where
7959            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
7960        {
7961            self.0.request.options = v.map(|x| x.into());
7962            self
7963        }
7964    }
7965
7966    #[doc(hidden)]
7967    impl gax::options::internal::RequestBuilder for GetIamPolicy {
7968        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
7969            &mut self.0.options
7970        }
7971    }
7972
7973    /// The request builder for [ContentService::set_iam_policy][crate::client::ContentService::set_iam_policy] calls.
7974    ///
7975    /// # Example
7976    /// ```no_run
7977    /// # use google_cloud_dataplex_v1::builder;
7978    /// use builder::content_service::SetIamPolicy;
7979    /// # tokio_test::block_on(async {
7980    ///
7981    /// let builder = prepare_request_builder();
7982    /// let response = builder.send().await?;
7983    /// # gax::Result::<()>::Ok(()) });
7984    ///
7985    /// fn prepare_request_builder() -> SetIamPolicy {
7986    ///   # panic!();
7987    ///   // ... details omitted ...
7988    /// }
7989    /// ```
7990    #[derive(Clone, Debug)]
7991    pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
7992
7993    impl SetIamPolicy {
7994        pub(crate) fn new(
7995            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
7996        ) -> Self {
7997            Self(RequestBuilder::new(stub))
7998        }
7999
8000        /// Sets the full request, replacing any prior values.
8001        pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
8002            self.0.request = v.into();
8003            self
8004        }
8005
8006        /// Sets all the options, replacing any prior values.
8007        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8008            self.0.options = v.into();
8009            self
8010        }
8011
8012        /// Sends the request.
8013        pub async fn send(self) -> Result<iam_v1::model::Policy> {
8014            (*self.0.stub)
8015                .set_iam_policy(self.0.request, self.0.options)
8016                .await
8017                .map(gax::response::Response::into_body)
8018        }
8019
8020        /// Sets the value of [resource][iam_v1::model::SetIamPolicyRequest::resource].
8021        ///
8022        /// This is a **required** field for requests.
8023        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8024            self.0.request.resource = v.into();
8025            self
8026        }
8027
8028        /// Sets the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
8029        ///
8030        /// This is a **required** field for requests.
8031        pub fn set_policy<T>(mut self, v: T) -> Self
8032        where
8033            T: std::convert::Into<iam_v1::model::Policy>,
8034        {
8035            self.0.request.policy = std::option::Option::Some(v.into());
8036            self
8037        }
8038
8039        /// Sets or clears the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
8040        ///
8041        /// This is a **required** field for requests.
8042        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
8043        where
8044            T: std::convert::Into<iam_v1::model::Policy>,
8045        {
8046            self.0.request.policy = v.map(|x| x.into());
8047            self
8048        }
8049
8050        /// Sets the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
8051        pub fn set_update_mask<T>(mut self, v: T) -> Self
8052        where
8053            T: std::convert::Into<wkt::FieldMask>,
8054        {
8055            self.0.request.update_mask = std::option::Option::Some(v.into());
8056            self
8057        }
8058
8059        /// Sets or clears the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
8060        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
8061        where
8062            T: std::convert::Into<wkt::FieldMask>,
8063        {
8064            self.0.request.update_mask = v.map(|x| x.into());
8065            self
8066        }
8067    }
8068
8069    #[doc(hidden)]
8070    impl gax::options::internal::RequestBuilder for SetIamPolicy {
8071        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8072            &mut self.0.options
8073        }
8074    }
8075
8076    /// The request builder for [ContentService::test_iam_permissions][crate::client::ContentService::test_iam_permissions] calls.
8077    ///
8078    /// # Example
8079    /// ```no_run
8080    /// # use google_cloud_dataplex_v1::builder;
8081    /// use builder::content_service::TestIamPermissions;
8082    /// # tokio_test::block_on(async {
8083    ///
8084    /// let builder = prepare_request_builder();
8085    /// let response = builder.send().await?;
8086    /// # gax::Result::<()>::Ok(()) });
8087    ///
8088    /// fn prepare_request_builder() -> TestIamPermissions {
8089    ///   # panic!();
8090    ///   // ... details omitted ...
8091    /// }
8092    /// ```
8093    #[derive(Clone, Debug)]
8094    pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
8095
8096    impl TestIamPermissions {
8097        pub(crate) fn new(
8098            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8099        ) -> Self {
8100            Self(RequestBuilder::new(stub))
8101        }
8102
8103        /// Sets the full request, replacing any prior values.
8104        pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
8105            mut self,
8106            v: V,
8107        ) -> Self {
8108            self.0.request = v.into();
8109            self
8110        }
8111
8112        /// Sets all the options, replacing any prior values.
8113        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8114            self.0.options = v.into();
8115            self
8116        }
8117
8118        /// Sends the request.
8119        pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
8120            (*self.0.stub)
8121                .test_iam_permissions(self.0.request, self.0.options)
8122                .await
8123                .map(gax::response::Response::into_body)
8124        }
8125
8126        /// Sets the value of [resource][iam_v1::model::TestIamPermissionsRequest::resource].
8127        ///
8128        /// This is a **required** field for requests.
8129        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
8130            self.0.request.resource = v.into();
8131            self
8132        }
8133
8134        /// Sets the value of [permissions][iam_v1::model::TestIamPermissionsRequest::permissions].
8135        ///
8136        /// This is a **required** field for requests.
8137        pub fn set_permissions<T, V>(mut self, v: T) -> Self
8138        where
8139            T: std::iter::IntoIterator<Item = V>,
8140            V: std::convert::Into<std::string::String>,
8141        {
8142            use std::iter::Iterator;
8143            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
8144            self
8145        }
8146    }
8147
8148    #[doc(hidden)]
8149    impl gax::options::internal::RequestBuilder for TestIamPermissions {
8150        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8151            &mut self.0.options
8152        }
8153    }
8154
8155    /// The request builder for [ContentService::list_content][crate::client::ContentService::list_content] calls.
8156    ///
8157    /// # Example
8158    /// ```no_run
8159    /// # use google_cloud_dataplex_v1::builder;
8160    /// use builder::content_service::ListContent;
8161    /// # tokio_test::block_on(async {
8162    /// use gax::paginator::ItemPaginator;
8163    ///
8164    /// let builder = prepare_request_builder();
8165    /// let mut items = builder.by_item();
8166    /// while let Some(result) = items.next().await {
8167    ///   let item = result?;
8168    /// }
8169    /// # gax::Result::<()>::Ok(()) });
8170    ///
8171    /// fn prepare_request_builder() -> ListContent {
8172    ///   # panic!();
8173    ///   // ... details omitted ...
8174    /// }
8175    /// ```
8176    #[derive(Clone, Debug)]
8177    pub struct ListContent(RequestBuilder<crate::model::ListContentRequest>);
8178
8179    impl ListContent {
8180        pub(crate) fn new(
8181            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8182        ) -> Self {
8183            Self(RequestBuilder::new(stub))
8184        }
8185
8186        /// Sets the full request, replacing any prior values.
8187        pub fn with_request<V: Into<crate::model::ListContentRequest>>(mut self, v: V) -> Self {
8188            self.0.request = v.into();
8189            self
8190        }
8191
8192        /// Sets all the options, replacing any prior values.
8193        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8194            self.0.options = v.into();
8195            self
8196        }
8197
8198        /// Sends the request.
8199        pub async fn send(self) -> Result<crate::model::ListContentResponse> {
8200            (*self.0.stub)
8201                .list_content(self.0.request, self.0.options)
8202                .await
8203                .map(gax::response::Response::into_body)
8204        }
8205
8206        /// Streams each page in the collection.
8207        pub fn by_page(
8208            self,
8209        ) -> impl gax::paginator::Paginator<crate::model::ListContentResponse, gax::error::Error>
8210        {
8211            use std::clone::Clone;
8212            let token = self.0.request.page_token.clone();
8213            let execute = move |token: String| {
8214                let mut builder = self.clone();
8215                builder.0.request = builder.0.request.set_page_token(token);
8216                builder.send()
8217            };
8218            gax::paginator::internal::new_paginator(token, execute)
8219        }
8220
8221        /// Streams each item in the collection.
8222        pub fn by_item(
8223            self,
8224        ) -> impl gax::paginator::ItemPaginator<crate::model::ListContentResponse, gax::error::Error>
8225        {
8226            use gax::paginator::Paginator;
8227            self.by_page().items()
8228        }
8229
8230        /// Sets the value of [parent][crate::model::ListContentRequest::parent].
8231        ///
8232        /// This is a **required** field for requests.
8233        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
8234            self.0.request.parent = v.into();
8235            self
8236        }
8237
8238        /// Sets the value of [page_size][crate::model::ListContentRequest::page_size].
8239        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8240            self.0.request.page_size = v.into();
8241            self
8242        }
8243
8244        /// Sets the value of [page_token][crate::model::ListContentRequest::page_token].
8245        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8246            self.0.request.page_token = v.into();
8247            self
8248        }
8249
8250        /// Sets the value of [filter][crate::model::ListContentRequest::filter].
8251        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8252            self.0.request.filter = v.into();
8253            self
8254        }
8255    }
8256
8257    #[doc(hidden)]
8258    impl gax::options::internal::RequestBuilder for ListContent {
8259        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8260            &mut self.0.options
8261        }
8262    }
8263
8264    /// The request builder for [ContentService::list_locations][crate::client::ContentService::list_locations] calls.
8265    ///
8266    /// # Example
8267    /// ```no_run
8268    /// # use google_cloud_dataplex_v1::builder;
8269    /// use builder::content_service::ListLocations;
8270    /// # tokio_test::block_on(async {
8271    /// use gax::paginator::ItemPaginator;
8272    ///
8273    /// let builder = prepare_request_builder();
8274    /// let mut items = builder.by_item();
8275    /// while let Some(result) = items.next().await {
8276    ///   let item = result?;
8277    /// }
8278    /// # gax::Result::<()>::Ok(()) });
8279    ///
8280    /// fn prepare_request_builder() -> ListLocations {
8281    ///   # panic!();
8282    ///   // ... details omitted ...
8283    /// }
8284    /// ```
8285    #[derive(Clone, Debug)]
8286    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
8287
8288    impl ListLocations {
8289        pub(crate) fn new(
8290            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8291        ) -> Self {
8292            Self(RequestBuilder::new(stub))
8293        }
8294
8295        /// Sets the full request, replacing any prior values.
8296        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
8297            mut self,
8298            v: V,
8299        ) -> Self {
8300            self.0.request = v.into();
8301            self
8302        }
8303
8304        /// Sets all the options, replacing any prior values.
8305        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8306            self.0.options = v.into();
8307            self
8308        }
8309
8310        /// Sends the request.
8311        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
8312            (*self.0.stub)
8313                .list_locations(self.0.request, self.0.options)
8314                .await
8315                .map(gax::response::Response::into_body)
8316        }
8317
8318        /// Streams each page in the collection.
8319        pub fn by_page(
8320            self,
8321        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
8322        {
8323            use std::clone::Clone;
8324            let token = self.0.request.page_token.clone();
8325            let execute = move |token: String| {
8326                let mut builder = self.clone();
8327                builder.0.request = builder.0.request.set_page_token(token);
8328                builder.send()
8329            };
8330            gax::paginator::internal::new_paginator(token, execute)
8331        }
8332
8333        /// Streams each item in the collection.
8334        pub fn by_item(
8335            self,
8336        ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
8337        {
8338            use gax::paginator::Paginator;
8339            self.by_page().items()
8340        }
8341
8342        /// Sets the value of [name][location::model::ListLocationsRequest::name].
8343        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8344            self.0.request.name = v.into();
8345            self
8346        }
8347
8348        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
8349        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8350            self.0.request.filter = v.into();
8351            self
8352        }
8353
8354        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
8355        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8356            self.0.request.page_size = v.into();
8357            self
8358        }
8359
8360        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
8361        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8362            self.0.request.page_token = v.into();
8363            self
8364        }
8365    }
8366
8367    #[doc(hidden)]
8368    impl gax::options::internal::RequestBuilder for ListLocations {
8369        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8370            &mut self.0.options
8371        }
8372    }
8373
8374    /// The request builder for [ContentService::get_location][crate::client::ContentService::get_location] calls.
8375    ///
8376    /// # Example
8377    /// ```no_run
8378    /// # use google_cloud_dataplex_v1::builder;
8379    /// use builder::content_service::GetLocation;
8380    /// # tokio_test::block_on(async {
8381    ///
8382    /// let builder = prepare_request_builder();
8383    /// let response = builder.send().await?;
8384    /// # gax::Result::<()>::Ok(()) });
8385    ///
8386    /// fn prepare_request_builder() -> GetLocation {
8387    ///   # panic!();
8388    ///   // ... details omitted ...
8389    /// }
8390    /// ```
8391    #[derive(Clone, Debug)]
8392    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
8393
8394    impl GetLocation {
8395        pub(crate) fn new(
8396            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8397        ) -> Self {
8398            Self(RequestBuilder::new(stub))
8399        }
8400
8401        /// Sets the full request, replacing any prior values.
8402        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
8403            self.0.request = v.into();
8404            self
8405        }
8406
8407        /// Sets all the options, replacing any prior values.
8408        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8409            self.0.options = v.into();
8410            self
8411        }
8412
8413        /// Sends the request.
8414        pub async fn send(self) -> Result<location::model::Location> {
8415            (*self.0.stub)
8416                .get_location(self.0.request, self.0.options)
8417                .await
8418                .map(gax::response::Response::into_body)
8419        }
8420
8421        /// Sets the value of [name][location::model::GetLocationRequest::name].
8422        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8423            self.0.request.name = v.into();
8424            self
8425        }
8426    }
8427
8428    #[doc(hidden)]
8429    impl gax::options::internal::RequestBuilder for GetLocation {
8430        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8431            &mut self.0.options
8432        }
8433    }
8434
8435    /// The request builder for [ContentService::list_operations][crate::client::ContentService::list_operations] calls.
8436    ///
8437    /// # Example
8438    /// ```no_run
8439    /// # use google_cloud_dataplex_v1::builder;
8440    /// use builder::content_service::ListOperations;
8441    /// # tokio_test::block_on(async {
8442    /// use gax::paginator::ItemPaginator;
8443    ///
8444    /// let builder = prepare_request_builder();
8445    /// let mut items = builder.by_item();
8446    /// while let Some(result) = items.next().await {
8447    ///   let item = result?;
8448    /// }
8449    /// # gax::Result::<()>::Ok(()) });
8450    ///
8451    /// fn prepare_request_builder() -> ListOperations {
8452    ///   # panic!();
8453    ///   // ... details omitted ...
8454    /// }
8455    /// ```
8456    #[derive(Clone, Debug)]
8457    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
8458
8459    impl ListOperations {
8460        pub(crate) fn new(
8461            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8462        ) -> Self {
8463            Self(RequestBuilder::new(stub))
8464        }
8465
8466        /// Sets the full request, replacing any prior values.
8467        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
8468            mut self,
8469            v: V,
8470        ) -> Self {
8471            self.0.request = v.into();
8472            self
8473        }
8474
8475        /// Sets all the options, replacing any prior values.
8476        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8477            self.0.options = v.into();
8478            self
8479        }
8480
8481        /// Sends the request.
8482        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
8483            (*self.0.stub)
8484                .list_operations(self.0.request, self.0.options)
8485                .await
8486                .map(gax::response::Response::into_body)
8487        }
8488
8489        /// Streams each page in the collection.
8490        pub fn by_page(
8491            self,
8492        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
8493        {
8494            use std::clone::Clone;
8495            let token = self.0.request.page_token.clone();
8496            let execute = move |token: String| {
8497                let mut builder = self.clone();
8498                builder.0.request = builder.0.request.set_page_token(token);
8499                builder.send()
8500            };
8501            gax::paginator::internal::new_paginator(token, execute)
8502        }
8503
8504        /// Streams each item in the collection.
8505        pub fn by_item(
8506            self,
8507        ) -> impl gax::paginator::ItemPaginator<
8508            longrunning::model::ListOperationsResponse,
8509            gax::error::Error,
8510        > {
8511            use gax::paginator::Paginator;
8512            self.by_page().items()
8513        }
8514
8515        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
8516        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8517            self.0.request.name = v.into();
8518            self
8519        }
8520
8521        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
8522        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
8523            self.0.request.filter = v.into();
8524            self
8525        }
8526
8527        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
8528        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
8529            self.0.request.page_size = v.into();
8530            self
8531        }
8532
8533        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
8534        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
8535            self.0.request.page_token = v.into();
8536            self
8537        }
8538
8539        /// Sets the value of [return_partial_success][longrunning::model::ListOperationsRequest::return_partial_success].
8540        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
8541            self.0.request.return_partial_success = v.into();
8542            self
8543        }
8544    }
8545
8546    #[doc(hidden)]
8547    impl gax::options::internal::RequestBuilder for ListOperations {
8548        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8549            &mut self.0.options
8550        }
8551    }
8552
8553    /// The request builder for [ContentService::get_operation][crate::client::ContentService::get_operation] calls.
8554    ///
8555    /// # Example
8556    /// ```no_run
8557    /// # use google_cloud_dataplex_v1::builder;
8558    /// use builder::content_service::GetOperation;
8559    /// # tokio_test::block_on(async {
8560    ///
8561    /// let builder = prepare_request_builder();
8562    /// let response = builder.send().await?;
8563    /// # gax::Result::<()>::Ok(()) });
8564    ///
8565    /// fn prepare_request_builder() -> GetOperation {
8566    ///   # panic!();
8567    ///   // ... details omitted ...
8568    /// }
8569    /// ```
8570    #[derive(Clone, Debug)]
8571    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
8572
8573    impl GetOperation {
8574        pub(crate) fn new(
8575            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8576        ) -> Self {
8577            Self(RequestBuilder::new(stub))
8578        }
8579
8580        /// Sets the full request, replacing any prior values.
8581        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
8582            mut self,
8583            v: V,
8584        ) -> Self {
8585            self.0.request = v.into();
8586            self
8587        }
8588
8589        /// Sets all the options, replacing any prior values.
8590        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8591            self.0.options = v.into();
8592            self
8593        }
8594
8595        /// Sends the request.
8596        pub async fn send(self) -> Result<longrunning::model::Operation> {
8597            (*self.0.stub)
8598                .get_operation(self.0.request, self.0.options)
8599                .await
8600                .map(gax::response::Response::into_body)
8601        }
8602
8603        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
8604        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8605            self.0.request.name = v.into();
8606            self
8607        }
8608    }
8609
8610    #[doc(hidden)]
8611    impl gax::options::internal::RequestBuilder for GetOperation {
8612        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8613            &mut self.0.options
8614        }
8615    }
8616
8617    /// The request builder for [ContentService::delete_operation][crate::client::ContentService::delete_operation] calls.
8618    ///
8619    /// # Example
8620    /// ```no_run
8621    /// # use google_cloud_dataplex_v1::builder;
8622    /// use builder::content_service::DeleteOperation;
8623    /// # tokio_test::block_on(async {
8624    ///
8625    /// let builder = prepare_request_builder();
8626    /// let response = builder.send().await?;
8627    /// # gax::Result::<()>::Ok(()) });
8628    ///
8629    /// fn prepare_request_builder() -> DeleteOperation {
8630    ///   # panic!();
8631    ///   // ... details omitted ...
8632    /// }
8633    /// ```
8634    #[derive(Clone, Debug)]
8635    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
8636
8637    impl DeleteOperation {
8638        pub(crate) fn new(
8639            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8640        ) -> Self {
8641            Self(RequestBuilder::new(stub))
8642        }
8643
8644        /// Sets the full request, replacing any prior values.
8645        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
8646            mut self,
8647            v: V,
8648        ) -> Self {
8649            self.0.request = v.into();
8650            self
8651        }
8652
8653        /// Sets all the options, replacing any prior values.
8654        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8655            self.0.options = v.into();
8656            self
8657        }
8658
8659        /// Sends the request.
8660        pub async fn send(self) -> Result<()> {
8661            (*self.0.stub)
8662                .delete_operation(self.0.request, self.0.options)
8663                .await
8664                .map(gax::response::Response::into_body)
8665        }
8666
8667        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
8668        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8669            self.0.request.name = v.into();
8670            self
8671        }
8672    }
8673
8674    #[doc(hidden)]
8675    impl gax::options::internal::RequestBuilder for DeleteOperation {
8676        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8677            &mut self.0.options
8678        }
8679    }
8680
8681    /// The request builder for [ContentService::cancel_operation][crate::client::ContentService::cancel_operation] calls.
8682    ///
8683    /// # Example
8684    /// ```no_run
8685    /// # use google_cloud_dataplex_v1::builder;
8686    /// use builder::content_service::CancelOperation;
8687    /// # tokio_test::block_on(async {
8688    ///
8689    /// let builder = prepare_request_builder();
8690    /// let response = builder.send().await?;
8691    /// # gax::Result::<()>::Ok(()) });
8692    ///
8693    /// fn prepare_request_builder() -> CancelOperation {
8694    ///   # panic!();
8695    ///   // ... details omitted ...
8696    /// }
8697    /// ```
8698    #[derive(Clone, Debug)]
8699    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
8700
8701    impl CancelOperation {
8702        pub(crate) fn new(
8703            stub: std::sync::Arc<dyn super::super::stub::dynamic::ContentService>,
8704        ) -> Self {
8705            Self(RequestBuilder::new(stub))
8706        }
8707
8708        /// Sets the full request, replacing any prior values.
8709        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
8710            mut self,
8711            v: V,
8712        ) -> Self {
8713            self.0.request = v.into();
8714            self
8715        }
8716
8717        /// Sets all the options, replacing any prior values.
8718        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8719            self.0.options = v.into();
8720            self
8721        }
8722
8723        /// Sends the request.
8724        pub async fn send(self) -> Result<()> {
8725            (*self.0.stub)
8726                .cancel_operation(self.0.request, self.0.options)
8727                .await
8728                .map(gax::response::Response::into_body)
8729        }
8730
8731        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
8732        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
8733            self.0.request.name = v.into();
8734            self
8735        }
8736    }
8737
8738    #[doc(hidden)]
8739    impl gax::options::internal::RequestBuilder for CancelOperation {
8740        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8741            &mut self.0.options
8742        }
8743    }
8744}
8745
8746pub mod data_taxonomy_service {
8747    use crate::Result;
8748
8749    /// A builder for [DataTaxonomyService][crate::client::DataTaxonomyService].
8750    ///
8751    /// ```
8752    /// # tokio_test::block_on(async {
8753    /// # use google_cloud_dataplex_v1::*;
8754    /// # use builder::data_taxonomy_service::ClientBuilder;
8755    /// # use client::DataTaxonomyService;
8756    /// let builder : ClientBuilder = DataTaxonomyService::builder();
8757    /// let client = builder
8758    ///     .with_endpoint("https://dataplex.googleapis.com")
8759    ///     .build().await?;
8760    /// # gax::client_builder::Result::<()>::Ok(()) });
8761    /// ```
8762    pub type ClientBuilder =
8763        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
8764
8765    pub(crate) mod client {
8766        use super::super::super::client::DataTaxonomyService;
8767        pub struct Factory;
8768        impl gax::client_builder::internal::ClientFactory for Factory {
8769            type Client = DataTaxonomyService;
8770            type Credentials = gaxi::options::Credentials;
8771            async fn build(
8772                self,
8773                config: gaxi::options::ClientConfig,
8774            ) -> gax::client_builder::Result<Self::Client> {
8775                Self::Client::new(config).await
8776            }
8777        }
8778    }
8779
8780    /// Common implementation for [crate::client::DataTaxonomyService] request builders.
8781    #[derive(Clone, Debug)]
8782    pub(crate) struct RequestBuilder<R: std::default::Default> {
8783        stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
8784        request: R,
8785        options: gax::options::RequestOptions,
8786    }
8787
8788    impl<R> RequestBuilder<R>
8789    where
8790        R: std::default::Default,
8791    {
8792        pub(crate) fn new(
8793            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
8794        ) -> Self {
8795            Self {
8796                stub,
8797                request: R::default(),
8798                options: gax::options::RequestOptions::default(),
8799            }
8800        }
8801    }
8802
8803    /// The request builder for [DataTaxonomyService::create_data_taxonomy][crate::client::DataTaxonomyService::create_data_taxonomy] calls.
8804    ///
8805    /// # Example
8806    /// ```no_run
8807    /// # use google_cloud_dataplex_v1::builder;
8808    /// use builder::data_taxonomy_service::CreateDataTaxonomy;
8809    /// # tokio_test::block_on(async {
8810    /// use lro::Poller;
8811    ///
8812    /// let builder = prepare_request_builder();
8813    /// let response = builder.poller().until_done().await?;
8814    /// # gax::Result::<()>::Ok(()) });
8815    ///
8816    /// fn prepare_request_builder() -> CreateDataTaxonomy {
8817    ///   # panic!();
8818    ///   // ... details omitted ...
8819    /// }
8820    /// ```
8821    #[derive(Clone, Debug)]
8822    pub struct CreateDataTaxonomy(RequestBuilder<crate::model::CreateDataTaxonomyRequest>);
8823
8824    impl CreateDataTaxonomy {
8825        pub(crate) fn new(
8826            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
8827        ) -> Self {
8828            Self(RequestBuilder::new(stub))
8829        }
8830
8831        /// Sets the full request, replacing any prior values.
8832        pub fn with_request<V: Into<crate::model::CreateDataTaxonomyRequest>>(
8833            mut self,
8834            v: V,
8835        ) -> Self {
8836            self.0.request = v.into();
8837            self
8838        }
8839
8840        /// Sets all the options, replacing any prior values.
8841        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8842            self.0.options = v.into();
8843            self
8844        }
8845
8846        /// Sends the request.
8847        ///
8848        /// # Long running operations
8849        ///
8850        /// This starts, but does not poll, a longrunning operation. More information
8851        /// on [create_data_taxonomy][crate::client::DataTaxonomyService::create_data_taxonomy].
8852        pub async fn send(self) -> Result<longrunning::model::Operation> {
8853            (*self.0.stub)
8854                .create_data_taxonomy(self.0.request, self.0.options)
8855                .await
8856                .map(gax::response::Response::into_body)
8857        }
8858
8859        /// Creates a [Poller][lro::Poller] to work with `create_data_taxonomy`.
8860        pub fn poller(
8861            self,
8862        ) -> impl lro::Poller<crate::model::DataTaxonomy, crate::model::OperationMetadata> {
8863            type Operation = lro::internal::Operation<
8864                crate::model::DataTaxonomy,
8865                crate::model::OperationMetadata,
8866            >;
8867            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
8868            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
8869
8870            let stub = self.0.stub.clone();
8871            let mut options = self.0.options.clone();
8872            options.set_retry_policy(gax::retry_policy::NeverRetry);
8873            let query = move |name| {
8874                let stub = stub.clone();
8875                let options = options.clone();
8876                async {
8877                    let op = GetOperation::new(stub)
8878                        .set_name(name)
8879                        .with_options(options)
8880                        .send()
8881                        .await?;
8882                    Ok(Operation::new(op))
8883                }
8884            };
8885
8886            let start = move || async {
8887                let op = self.send().await?;
8888                Ok(Operation::new(op))
8889            };
8890
8891            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
8892        }
8893
8894        /// Sets the value of [parent][crate::model::CreateDataTaxonomyRequest::parent].
8895        ///
8896        /// This is a **required** field for requests.
8897        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
8898            self.0.request.parent = v.into();
8899            self
8900        }
8901
8902        /// Sets the value of [data_taxonomy_id][crate::model::CreateDataTaxonomyRequest::data_taxonomy_id].
8903        ///
8904        /// This is a **required** field for requests.
8905        pub fn set_data_taxonomy_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
8906            self.0.request.data_taxonomy_id = v.into();
8907            self
8908        }
8909
8910        /// Sets the value of [data_taxonomy][crate::model::CreateDataTaxonomyRequest::data_taxonomy].
8911        ///
8912        /// This is a **required** field for requests.
8913        pub fn set_data_taxonomy<T>(mut self, v: T) -> Self
8914        where
8915            T: std::convert::Into<crate::model::DataTaxonomy>,
8916        {
8917            self.0.request.data_taxonomy = std::option::Option::Some(v.into());
8918            self
8919        }
8920
8921        /// Sets or clears the value of [data_taxonomy][crate::model::CreateDataTaxonomyRequest::data_taxonomy].
8922        ///
8923        /// This is a **required** field for requests.
8924        pub fn set_or_clear_data_taxonomy<T>(mut self, v: std::option::Option<T>) -> Self
8925        where
8926            T: std::convert::Into<crate::model::DataTaxonomy>,
8927        {
8928            self.0.request.data_taxonomy = v.map(|x| x.into());
8929            self
8930        }
8931
8932        /// Sets the value of [validate_only][crate::model::CreateDataTaxonomyRequest::validate_only].
8933        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
8934            self.0.request.validate_only = v.into();
8935            self
8936        }
8937    }
8938
8939    #[doc(hidden)]
8940    impl gax::options::internal::RequestBuilder for CreateDataTaxonomy {
8941        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
8942            &mut self.0.options
8943        }
8944    }
8945
8946    /// The request builder for [DataTaxonomyService::update_data_taxonomy][crate::client::DataTaxonomyService::update_data_taxonomy] calls.
8947    ///
8948    /// # Example
8949    /// ```no_run
8950    /// # use google_cloud_dataplex_v1::builder;
8951    /// use builder::data_taxonomy_service::UpdateDataTaxonomy;
8952    /// # tokio_test::block_on(async {
8953    /// use lro::Poller;
8954    ///
8955    /// let builder = prepare_request_builder();
8956    /// let response = builder.poller().until_done().await?;
8957    /// # gax::Result::<()>::Ok(()) });
8958    ///
8959    /// fn prepare_request_builder() -> UpdateDataTaxonomy {
8960    ///   # panic!();
8961    ///   // ... details omitted ...
8962    /// }
8963    /// ```
8964    #[derive(Clone, Debug)]
8965    pub struct UpdateDataTaxonomy(RequestBuilder<crate::model::UpdateDataTaxonomyRequest>);
8966
8967    impl UpdateDataTaxonomy {
8968        pub(crate) fn new(
8969            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
8970        ) -> Self {
8971            Self(RequestBuilder::new(stub))
8972        }
8973
8974        /// Sets the full request, replacing any prior values.
8975        pub fn with_request<V: Into<crate::model::UpdateDataTaxonomyRequest>>(
8976            mut self,
8977            v: V,
8978        ) -> Self {
8979            self.0.request = v.into();
8980            self
8981        }
8982
8983        /// Sets all the options, replacing any prior values.
8984        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
8985            self.0.options = v.into();
8986            self
8987        }
8988
8989        /// Sends the request.
8990        ///
8991        /// # Long running operations
8992        ///
8993        /// This starts, but does not poll, a longrunning operation. More information
8994        /// on [update_data_taxonomy][crate::client::DataTaxonomyService::update_data_taxonomy].
8995        pub async fn send(self) -> Result<longrunning::model::Operation> {
8996            (*self.0.stub)
8997                .update_data_taxonomy(self.0.request, self.0.options)
8998                .await
8999                .map(gax::response::Response::into_body)
9000        }
9001
9002        /// Creates a [Poller][lro::Poller] to work with `update_data_taxonomy`.
9003        pub fn poller(
9004            self,
9005        ) -> impl lro::Poller<crate::model::DataTaxonomy, crate::model::OperationMetadata> {
9006            type Operation = lro::internal::Operation<
9007                crate::model::DataTaxonomy,
9008                crate::model::OperationMetadata,
9009            >;
9010            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
9011            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
9012
9013            let stub = self.0.stub.clone();
9014            let mut options = self.0.options.clone();
9015            options.set_retry_policy(gax::retry_policy::NeverRetry);
9016            let query = move |name| {
9017                let stub = stub.clone();
9018                let options = options.clone();
9019                async {
9020                    let op = GetOperation::new(stub)
9021                        .set_name(name)
9022                        .with_options(options)
9023                        .send()
9024                        .await?;
9025                    Ok(Operation::new(op))
9026                }
9027            };
9028
9029            let start = move || async {
9030                let op = self.send().await?;
9031                Ok(Operation::new(op))
9032            };
9033
9034            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
9035        }
9036
9037        /// Sets the value of [update_mask][crate::model::UpdateDataTaxonomyRequest::update_mask].
9038        ///
9039        /// This is a **required** field for requests.
9040        pub fn set_update_mask<T>(mut self, v: T) -> Self
9041        where
9042            T: std::convert::Into<wkt::FieldMask>,
9043        {
9044            self.0.request.update_mask = std::option::Option::Some(v.into());
9045            self
9046        }
9047
9048        /// Sets or clears the value of [update_mask][crate::model::UpdateDataTaxonomyRequest::update_mask].
9049        ///
9050        /// This is a **required** field for requests.
9051        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
9052        where
9053            T: std::convert::Into<wkt::FieldMask>,
9054        {
9055            self.0.request.update_mask = v.map(|x| x.into());
9056            self
9057        }
9058
9059        /// Sets the value of [data_taxonomy][crate::model::UpdateDataTaxonomyRequest::data_taxonomy].
9060        ///
9061        /// This is a **required** field for requests.
9062        pub fn set_data_taxonomy<T>(mut self, v: T) -> Self
9063        where
9064            T: std::convert::Into<crate::model::DataTaxonomy>,
9065        {
9066            self.0.request.data_taxonomy = std::option::Option::Some(v.into());
9067            self
9068        }
9069
9070        /// Sets or clears the value of [data_taxonomy][crate::model::UpdateDataTaxonomyRequest::data_taxonomy].
9071        ///
9072        /// This is a **required** field for requests.
9073        pub fn set_or_clear_data_taxonomy<T>(mut self, v: std::option::Option<T>) -> Self
9074        where
9075            T: std::convert::Into<crate::model::DataTaxonomy>,
9076        {
9077            self.0.request.data_taxonomy = v.map(|x| x.into());
9078            self
9079        }
9080
9081        /// Sets the value of [validate_only][crate::model::UpdateDataTaxonomyRequest::validate_only].
9082        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
9083            self.0.request.validate_only = v.into();
9084            self
9085        }
9086    }
9087
9088    #[doc(hidden)]
9089    impl gax::options::internal::RequestBuilder for UpdateDataTaxonomy {
9090        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
9091            &mut self.0.options
9092        }
9093    }
9094
9095    /// The request builder for [DataTaxonomyService::delete_data_taxonomy][crate::client::DataTaxonomyService::delete_data_taxonomy] calls.
9096    ///
9097    /// # Example
9098    /// ```no_run
9099    /// # use google_cloud_dataplex_v1::builder;
9100    /// use builder::data_taxonomy_service::DeleteDataTaxonomy;
9101    /// # tokio_test::block_on(async {
9102    /// use lro::Poller;
9103    ///
9104    /// let builder = prepare_request_builder();
9105    /// let response = builder.poller().until_done().await?;
9106    /// # gax::Result::<()>::Ok(()) });
9107    ///
9108    /// fn prepare_request_builder() -> DeleteDataTaxonomy {
9109    ///   # panic!();
9110    ///   // ... details omitted ...
9111    /// }
9112    /// ```
9113    #[derive(Clone, Debug)]
9114    pub struct DeleteDataTaxonomy(RequestBuilder<crate::model::DeleteDataTaxonomyRequest>);
9115
9116    impl DeleteDataTaxonomy {
9117        pub(crate) fn new(
9118            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
9119        ) -> Self {
9120            Self(RequestBuilder::new(stub))
9121        }
9122
9123        /// Sets the full request, replacing any prior values.
9124        pub fn with_request<V: Into<crate::model::DeleteDataTaxonomyRequest>>(
9125            mut self,
9126            v: V,
9127        ) -> Self {
9128            self.0.request = v.into();
9129            self
9130        }
9131
9132        /// Sets all the options, replacing any prior values.
9133        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
9134            self.0.options = v.into();
9135            self
9136        }
9137
9138        /// Sends the request.
9139        ///
9140        /// # Long running operations
9141        ///
9142        /// This starts, but does not poll, a longrunning operation. More information
9143        /// on [delete_data_taxonomy][crate::client::DataTaxonomyService::delete_data_taxonomy].
9144        pub async fn send(self) -> Result<longrunning::model::Operation> {
9145            (*self.0.stub)
9146                .delete_data_taxonomy(self.0.request, self.0.options)
9147                .await
9148                .map(gax::response::Response::into_body)
9149        }
9150
9151        /// Creates a [Poller][lro::Poller] to work with `delete_data_taxonomy`.
9152        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
9153            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
9154            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
9155            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
9156
9157            let stub = self.0.stub.clone();
9158            let mut options = self.0.options.clone();
9159            options.set_retry_policy(gax::retry_policy::NeverRetry);
9160            let query = move |name| {
9161                let stub = stub.clone();
9162                let options = options.clone();
9163                async {
9164                    let op = GetOperation::new(stub)
9165                        .set_name(name)
9166                        .with_options(options)
9167                        .send()
9168                        .await?;
9169                    Ok(Operation::new(op))
9170                }
9171            };
9172
9173            let start = move || async {
9174                let op = self.send().await?;
9175                Ok(Operation::new(op))
9176            };
9177
9178            lro::internal::new_unit_response_poller(
9179                polling_error_policy,
9180                polling_backoff_policy,
9181                start,
9182                query,
9183            )
9184        }
9185
9186        /// Sets the value of [name][crate::model::DeleteDataTaxonomyRequest::name].
9187        ///
9188        /// This is a **required** field for requests.
9189        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9190            self.0.request.name = v.into();
9191            self
9192        }
9193
9194        /// Sets the value of [etag][crate::model::DeleteDataTaxonomyRequest::etag].
9195        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
9196            self.0.request.etag = v.into();
9197            self
9198        }
9199    }
9200
9201    #[doc(hidden)]
9202    impl gax::options::internal::RequestBuilder for DeleteDataTaxonomy {
9203        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
9204            &mut self.0.options
9205        }
9206    }
9207
9208    /// The request builder for [DataTaxonomyService::list_data_taxonomies][crate::client::DataTaxonomyService::list_data_taxonomies] calls.
9209    ///
9210    /// # Example
9211    /// ```no_run
9212    /// # use google_cloud_dataplex_v1::builder;
9213    /// use builder::data_taxonomy_service::ListDataTaxonomies;
9214    /// # tokio_test::block_on(async {
9215    /// use gax::paginator::ItemPaginator;
9216    ///
9217    /// let builder = prepare_request_builder();
9218    /// let mut items = builder.by_item();
9219    /// while let Some(result) = items.next().await {
9220    ///   let item = result?;
9221    /// }
9222    /// # gax::Result::<()>::Ok(()) });
9223    ///
9224    /// fn prepare_request_builder() -> ListDataTaxonomies {
9225    ///   # panic!();
9226    ///   // ... details omitted ...
9227    /// }
9228    /// ```
9229    #[derive(Clone, Debug)]
9230    pub struct ListDataTaxonomies(RequestBuilder<crate::model::ListDataTaxonomiesRequest>);
9231
9232    impl ListDataTaxonomies {
9233        pub(crate) fn new(
9234            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
9235        ) -> Self {
9236            Self(RequestBuilder::new(stub))
9237        }
9238
9239        /// Sets the full request, replacing any prior values.
9240        pub fn with_request<V: Into<crate::model::ListDataTaxonomiesRequest>>(
9241            mut self,
9242            v: V,
9243        ) -> Self {
9244            self.0.request = v.into();
9245            self
9246        }
9247
9248        /// Sets all the options, replacing any prior values.
9249        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
9250            self.0.options = v.into();
9251            self
9252        }
9253
9254        /// Sends the request.
9255        pub async fn send(self) -> Result<crate::model::ListDataTaxonomiesResponse> {
9256            (*self.0.stub)
9257                .list_data_taxonomies(self.0.request, self.0.options)
9258                .await
9259                .map(gax::response::Response::into_body)
9260        }
9261
9262        /// Streams each page in the collection.
9263        pub fn by_page(
9264            self,
9265        ) -> impl gax::paginator::Paginator<crate::model::ListDataTaxonomiesResponse, gax::error::Error>
9266        {
9267            use std::clone::Clone;
9268            let token = self.0.request.page_token.clone();
9269            let execute = move |token: String| {
9270                let mut builder = self.clone();
9271                builder.0.request = builder.0.request.set_page_token(token);
9272                builder.send()
9273            };
9274            gax::paginator::internal::new_paginator(token, execute)
9275        }
9276
9277        /// Streams each item in the collection.
9278        pub fn by_item(
9279            self,
9280        ) -> impl gax::paginator::ItemPaginator<
9281            crate::model::ListDataTaxonomiesResponse,
9282            gax::error::Error,
9283        > {
9284            use gax::paginator::Paginator;
9285            self.by_page().items()
9286        }
9287
9288        /// Sets the value of [parent][crate::model::ListDataTaxonomiesRequest::parent].
9289        ///
9290        /// This is a **required** field for requests.
9291        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
9292            self.0.request.parent = v.into();
9293            self
9294        }
9295
9296        /// Sets the value of [page_size][crate::model::ListDataTaxonomiesRequest::page_size].
9297        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
9298            self.0.request.page_size = v.into();
9299            self
9300        }
9301
9302        /// Sets the value of [page_token][crate::model::ListDataTaxonomiesRequest::page_token].
9303        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
9304            self.0.request.page_token = v.into();
9305            self
9306        }
9307
9308        /// Sets the value of [filter][crate::model::ListDataTaxonomiesRequest::filter].
9309        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
9310            self.0.request.filter = v.into();
9311            self
9312        }
9313
9314        /// Sets the value of [order_by][crate::model::ListDataTaxonomiesRequest::order_by].
9315        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
9316            self.0.request.order_by = v.into();
9317            self
9318        }
9319    }
9320
9321    #[doc(hidden)]
9322    impl gax::options::internal::RequestBuilder for ListDataTaxonomies {
9323        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
9324            &mut self.0.options
9325        }
9326    }
9327
9328    /// The request builder for [DataTaxonomyService::get_data_taxonomy][crate::client::DataTaxonomyService::get_data_taxonomy] calls.
9329    ///
9330    /// # Example
9331    /// ```no_run
9332    /// # use google_cloud_dataplex_v1::builder;
9333    /// use builder::data_taxonomy_service::GetDataTaxonomy;
9334    /// # tokio_test::block_on(async {
9335    ///
9336    /// let builder = prepare_request_builder();
9337    /// let response = builder.send().await?;
9338    /// # gax::Result::<()>::Ok(()) });
9339    ///
9340    /// fn prepare_request_builder() -> GetDataTaxonomy {
9341    ///   # panic!();
9342    ///   // ... details omitted ...
9343    /// }
9344    /// ```
9345    #[derive(Clone, Debug)]
9346    pub struct GetDataTaxonomy(RequestBuilder<crate::model::GetDataTaxonomyRequest>);
9347
9348    impl GetDataTaxonomy {
9349        pub(crate) fn new(
9350            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
9351        ) -> Self {
9352            Self(RequestBuilder::new(stub))
9353        }
9354
9355        /// Sets the full request, replacing any prior values.
9356        pub fn with_request<V: Into<crate::model::GetDataTaxonomyRequest>>(mut self, v: V) -> Self {
9357            self.0.request = v.into();
9358            self
9359        }
9360
9361        /// Sets all the options, replacing any prior values.
9362        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
9363            self.0.options = v.into();
9364            self
9365        }
9366
9367        /// Sends the request.
9368        pub async fn send(self) -> Result<crate::model::DataTaxonomy> {
9369            (*self.0.stub)
9370                .get_data_taxonomy(self.0.request, self.0.options)
9371                .await
9372                .map(gax::response::Response::into_body)
9373        }
9374
9375        /// Sets the value of [name][crate::model::GetDataTaxonomyRequest::name].
9376        ///
9377        /// This is a **required** field for requests.
9378        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9379            self.0.request.name = v.into();
9380            self
9381        }
9382    }
9383
9384    #[doc(hidden)]
9385    impl gax::options::internal::RequestBuilder for GetDataTaxonomy {
9386        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
9387            &mut self.0.options
9388        }
9389    }
9390
9391    /// The request builder for [DataTaxonomyService::create_data_attribute_binding][crate::client::DataTaxonomyService::create_data_attribute_binding] calls.
9392    ///
9393    /// # Example
9394    /// ```no_run
9395    /// # use google_cloud_dataplex_v1::builder;
9396    /// use builder::data_taxonomy_service::CreateDataAttributeBinding;
9397    /// # tokio_test::block_on(async {
9398    /// use lro::Poller;
9399    ///
9400    /// let builder = prepare_request_builder();
9401    /// let response = builder.poller().until_done().await?;
9402    /// # gax::Result::<()>::Ok(()) });
9403    ///
9404    /// fn prepare_request_builder() -> CreateDataAttributeBinding {
9405    ///   # panic!();
9406    ///   // ... details omitted ...
9407    /// }
9408    /// ```
9409    #[derive(Clone, Debug)]
9410    pub struct CreateDataAttributeBinding(
9411        RequestBuilder<crate::model::CreateDataAttributeBindingRequest>,
9412    );
9413
9414    impl CreateDataAttributeBinding {
9415        pub(crate) fn new(
9416            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
9417        ) -> Self {
9418            Self(RequestBuilder::new(stub))
9419        }
9420
9421        /// Sets the full request, replacing any prior values.
9422        pub fn with_request<V: Into<crate::model::CreateDataAttributeBindingRequest>>(
9423            mut self,
9424            v: V,
9425        ) -> Self {
9426            self.0.request = v.into();
9427            self
9428        }
9429
9430        /// Sets all the options, replacing any prior values.
9431        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
9432            self.0.options = v.into();
9433            self
9434        }
9435
9436        /// Sends the request.
9437        ///
9438        /// # Long running operations
9439        ///
9440        /// This starts, but does not poll, a longrunning operation. More information
9441        /// on [create_data_attribute_binding][crate::client::DataTaxonomyService::create_data_attribute_binding].
9442        pub async fn send(self) -> Result<longrunning::model::Operation> {
9443            (*self.0.stub)
9444                .create_data_attribute_binding(self.0.request, self.0.options)
9445                .await
9446                .map(gax::response::Response::into_body)
9447        }
9448
9449        /// Creates a [Poller][lro::Poller] to work with `create_data_attribute_binding`.
9450        pub fn poller(
9451            self,
9452        ) -> impl lro::Poller<crate::model::DataAttributeBinding, crate::model::OperationMetadata>
9453        {
9454            type Operation = lro::internal::Operation<
9455                crate::model::DataAttributeBinding,
9456                crate::model::OperationMetadata,
9457            >;
9458            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
9459            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
9460
9461            let stub = self.0.stub.clone();
9462            let mut options = self.0.options.clone();
9463            options.set_retry_policy(gax::retry_policy::NeverRetry);
9464            let query = move |name| {
9465                let stub = stub.clone();
9466                let options = options.clone();
9467                async {
9468                    let op = GetOperation::new(stub)
9469                        .set_name(name)
9470                        .with_options(options)
9471                        .send()
9472                        .await?;
9473                    Ok(Operation::new(op))
9474                }
9475            };
9476
9477            let start = move || async {
9478                let op = self.send().await?;
9479                Ok(Operation::new(op))
9480            };
9481
9482            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
9483        }
9484
9485        /// Sets the value of [parent][crate::model::CreateDataAttributeBindingRequest::parent].
9486        ///
9487        /// This is a **required** field for requests.
9488        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
9489            self.0.request.parent = v.into();
9490            self
9491        }
9492
9493        /// Sets the value of [data_attribute_binding_id][crate::model::CreateDataAttributeBindingRequest::data_attribute_binding_id].
9494        ///
9495        /// This is a **required** field for requests.
9496        pub fn set_data_attribute_binding_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
9497            self.0.request.data_attribute_binding_id = v.into();
9498            self
9499        }
9500
9501        /// Sets the value of [data_attribute_binding][crate::model::CreateDataAttributeBindingRequest::data_attribute_binding].
9502        ///
9503        /// This is a **required** field for requests.
9504        pub fn set_data_attribute_binding<T>(mut self, v: T) -> Self
9505        where
9506            T: std::convert::Into<crate::model::DataAttributeBinding>,
9507        {
9508            self.0.request.data_attribute_binding = std::option::Option::Some(v.into());
9509            self
9510        }
9511
9512        /// Sets or clears the value of [data_attribute_binding][crate::model::CreateDataAttributeBindingRequest::data_attribute_binding].
9513        ///
9514        /// This is a **required** field for requests.
9515        pub fn set_or_clear_data_attribute_binding<T>(mut self, v: std::option::Option<T>) -> Self
9516        where
9517            T: std::convert::Into<crate::model::DataAttributeBinding>,
9518        {
9519            self.0.request.data_attribute_binding = v.map(|x| x.into());
9520            self
9521        }
9522
9523        /// Sets the value of [validate_only][crate::model::CreateDataAttributeBindingRequest::validate_only].
9524        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
9525            self.0.request.validate_only = v.into();
9526            self
9527        }
9528    }
9529
9530    #[doc(hidden)]
9531    impl gax::options::internal::RequestBuilder for CreateDataAttributeBinding {
9532        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
9533            &mut self.0.options
9534        }
9535    }
9536
9537    /// The request builder for [DataTaxonomyService::update_data_attribute_binding][crate::client::DataTaxonomyService::update_data_attribute_binding] calls.
9538    ///
9539    /// # Example
9540    /// ```no_run
9541    /// # use google_cloud_dataplex_v1::builder;
9542    /// use builder::data_taxonomy_service::UpdateDataAttributeBinding;
9543    /// # tokio_test::block_on(async {
9544    /// use lro::Poller;
9545    ///
9546    /// let builder = prepare_request_builder();
9547    /// let response = builder.poller().until_done().await?;
9548    /// # gax::Result::<()>::Ok(()) });
9549    ///
9550    /// fn prepare_request_builder() -> UpdateDataAttributeBinding {
9551    ///   # panic!();
9552    ///   // ... details omitted ...
9553    /// }
9554    /// ```
9555    #[derive(Clone, Debug)]
9556    pub struct UpdateDataAttributeBinding(
9557        RequestBuilder<crate::model::UpdateDataAttributeBindingRequest>,
9558    );
9559
9560    impl UpdateDataAttributeBinding {
9561        pub(crate) fn new(
9562            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
9563        ) -> Self {
9564            Self(RequestBuilder::new(stub))
9565        }
9566
9567        /// Sets the full request, replacing any prior values.
9568        pub fn with_request<V: Into<crate::model::UpdateDataAttributeBindingRequest>>(
9569            mut self,
9570            v: V,
9571        ) -> Self {
9572            self.0.request = v.into();
9573            self
9574        }
9575
9576        /// Sets all the options, replacing any prior values.
9577        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
9578            self.0.options = v.into();
9579            self
9580        }
9581
9582        /// Sends the request.
9583        ///
9584        /// # Long running operations
9585        ///
9586        /// This starts, but does not poll, a longrunning operation. More information
9587        /// on [update_data_attribute_binding][crate::client::DataTaxonomyService::update_data_attribute_binding].
9588        pub async fn send(self) -> Result<longrunning::model::Operation> {
9589            (*self.0.stub)
9590                .update_data_attribute_binding(self.0.request, self.0.options)
9591                .await
9592                .map(gax::response::Response::into_body)
9593        }
9594
9595        /// Creates a [Poller][lro::Poller] to work with `update_data_attribute_binding`.
9596        pub fn poller(
9597            self,
9598        ) -> impl lro::Poller<crate::model::DataAttributeBinding, crate::model::OperationMetadata>
9599        {
9600            type Operation = lro::internal::Operation<
9601                crate::model::DataAttributeBinding,
9602                crate::model::OperationMetadata,
9603            >;
9604            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
9605            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
9606
9607            let stub = self.0.stub.clone();
9608            let mut options = self.0.options.clone();
9609            options.set_retry_policy(gax::retry_policy::NeverRetry);
9610            let query = move |name| {
9611                let stub = stub.clone();
9612                let options = options.clone();
9613                async {
9614                    let op = GetOperation::new(stub)
9615                        .set_name(name)
9616                        .with_options(options)
9617                        .send()
9618                        .await?;
9619                    Ok(Operation::new(op))
9620                }
9621            };
9622
9623            let start = move || async {
9624                let op = self.send().await?;
9625                Ok(Operation::new(op))
9626            };
9627
9628            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
9629        }
9630
9631        /// Sets the value of [update_mask][crate::model::UpdateDataAttributeBindingRequest::update_mask].
9632        ///
9633        /// This is a **required** field for requests.
9634        pub fn set_update_mask<T>(mut self, v: T) -> Self
9635        where
9636            T: std::convert::Into<wkt::FieldMask>,
9637        {
9638            self.0.request.update_mask = std::option::Option::Some(v.into());
9639            self
9640        }
9641
9642        /// Sets or clears the value of [update_mask][crate::model::UpdateDataAttributeBindingRequest::update_mask].
9643        ///
9644        /// This is a **required** field for requests.
9645        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
9646        where
9647            T: std::convert::Into<wkt::FieldMask>,
9648        {
9649            self.0.request.update_mask = v.map(|x| x.into());
9650            self
9651        }
9652
9653        /// Sets the value of [data_attribute_binding][crate::model::UpdateDataAttributeBindingRequest::data_attribute_binding].
9654        ///
9655        /// This is a **required** field for requests.
9656        pub fn set_data_attribute_binding<T>(mut self, v: T) -> Self
9657        where
9658            T: std::convert::Into<crate::model::DataAttributeBinding>,
9659        {
9660            self.0.request.data_attribute_binding = std::option::Option::Some(v.into());
9661            self
9662        }
9663
9664        /// Sets or clears the value of [data_attribute_binding][crate::model::UpdateDataAttributeBindingRequest::data_attribute_binding].
9665        ///
9666        /// This is a **required** field for requests.
9667        pub fn set_or_clear_data_attribute_binding<T>(mut self, v: std::option::Option<T>) -> Self
9668        where
9669            T: std::convert::Into<crate::model::DataAttributeBinding>,
9670        {
9671            self.0.request.data_attribute_binding = v.map(|x| x.into());
9672            self
9673        }
9674
9675        /// Sets the value of [validate_only][crate::model::UpdateDataAttributeBindingRequest::validate_only].
9676        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
9677            self.0.request.validate_only = v.into();
9678            self
9679        }
9680    }
9681
9682    #[doc(hidden)]
9683    impl gax::options::internal::RequestBuilder for UpdateDataAttributeBinding {
9684        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
9685            &mut self.0.options
9686        }
9687    }
9688
9689    /// The request builder for [DataTaxonomyService::delete_data_attribute_binding][crate::client::DataTaxonomyService::delete_data_attribute_binding] calls.
9690    ///
9691    /// # Example
9692    /// ```no_run
9693    /// # use google_cloud_dataplex_v1::builder;
9694    /// use builder::data_taxonomy_service::DeleteDataAttributeBinding;
9695    /// # tokio_test::block_on(async {
9696    /// use lro::Poller;
9697    ///
9698    /// let builder = prepare_request_builder();
9699    /// let response = builder.poller().until_done().await?;
9700    /// # gax::Result::<()>::Ok(()) });
9701    ///
9702    /// fn prepare_request_builder() -> DeleteDataAttributeBinding {
9703    ///   # panic!();
9704    ///   // ... details omitted ...
9705    /// }
9706    /// ```
9707    #[derive(Clone, Debug)]
9708    pub struct DeleteDataAttributeBinding(
9709        RequestBuilder<crate::model::DeleteDataAttributeBindingRequest>,
9710    );
9711
9712    impl DeleteDataAttributeBinding {
9713        pub(crate) fn new(
9714            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
9715        ) -> Self {
9716            Self(RequestBuilder::new(stub))
9717        }
9718
9719        /// Sets the full request, replacing any prior values.
9720        pub fn with_request<V: Into<crate::model::DeleteDataAttributeBindingRequest>>(
9721            mut self,
9722            v: V,
9723        ) -> Self {
9724            self.0.request = v.into();
9725            self
9726        }
9727
9728        /// Sets all the options, replacing any prior values.
9729        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
9730            self.0.options = v.into();
9731            self
9732        }
9733
9734        /// Sends the request.
9735        ///
9736        /// # Long running operations
9737        ///
9738        /// This starts, but does not poll, a longrunning operation. More information
9739        /// on [delete_data_attribute_binding][crate::client::DataTaxonomyService::delete_data_attribute_binding].
9740        pub async fn send(self) -> Result<longrunning::model::Operation> {
9741            (*self.0.stub)
9742                .delete_data_attribute_binding(self.0.request, self.0.options)
9743                .await
9744                .map(gax::response::Response::into_body)
9745        }
9746
9747        /// Creates a [Poller][lro::Poller] to work with `delete_data_attribute_binding`.
9748        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
9749            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
9750            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
9751            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
9752
9753            let stub = self.0.stub.clone();
9754            let mut options = self.0.options.clone();
9755            options.set_retry_policy(gax::retry_policy::NeverRetry);
9756            let query = move |name| {
9757                let stub = stub.clone();
9758                let options = options.clone();
9759                async {
9760                    let op = GetOperation::new(stub)
9761                        .set_name(name)
9762                        .with_options(options)
9763                        .send()
9764                        .await?;
9765                    Ok(Operation::new(op))
9766                }
9767            };
9768
9769            let start = move || async {
9770                let op = self.send().await?;
9771                Ok(Operation::new(op))
9772            };
9773
9774            lro::internal::new_unit_response_poller(
9775                polling_error_policy,
9776                polling_backoff_policy,
9777                start,
9778                query,
9779            )
9780        }
9781
9782        /// Sets the value of [name][crate::model::DeleteDataAttributeBindingRequest::name].
9783        ///
9784        /// This is a **required** field for requests.
9785        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9786            self.0.request.name = v.into();
9787            self
9788        }
9789
9790        /// Sets the value of [etag][crate::model::DeleteDataAttributeBindingRequest::etag].
9791        ///
9792        /// This is a **required** field for requests.
9793        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
9794            self.0.request.etag = v.into();
9795            self
9796        }
9797    }
9798
9799    #[doc(hidden)]
9800    impl gax::options::internal::RequestBuilder for DeleteDataAttributeBinding {
9801        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
9802            &mut self.0.options
9803        }
9804    }
9805
9806    /// The request builder for [DataTaxonomyService::list_data_attribute_bindings][crate::client::DataTaxonomyService::list_data_attribute_bindings] calls.
9807    ///
9808    /// # Example
9809    /// ```no_run
9810    /// # use google_cloud_dataplex_v1::builder;
9811    /// use builder::data_taxonomy_service::ListDataAttributeBindings;
9812    /// # tokio_test::block_on(async {
9813    /// use gax::paginator::ItemPaginator;
9814    ///
9815    /// let builder = prepare_request_builder();
9816    /// let mut items = builder.by_item();
9817    /// while let Some(result) = items.next().await {
9818    ///   let item = result?;
9819    /// }
9820    /// # gax::Result::<()>::Ok(()) });
9821    ///
9822    /// fn prepare_request_builder() -> ListDataAttributeBindings {
9823    ///   # panic!();
9824    ///   // ... details omitted ...
9825    /// }
9826    /// ```
9827    #[derive(Clone, Debug)]
9828    pub struct ListDataAttributeBindings(
9829        RequestBuilder<crate::model::ListDataAttributeBindingsRequest>,
9830    );
9831
9832    impl ListDataAttributeBindings {
9833        pub(crate) fn new(
9834            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
9835        ) -> Self {
9836            Self(RequestBuilder::new(stub))
9837        }
9838
9839        /// Sets the full request, replacing any prior values.
9840        pub fn with_request<V: Into<crate::model::ListDataAttributeBindingsRequest>>(
9841            mut self,
9842            v: V,
9843        ) -> Self {
9844            self.0.request = v.into();
9845            self
9846        }
9847
9848        /// Sets all the options, replacing any prior values.
9849        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
9850            self.0.options = v.into();
9851            self
9852        }
9853
9854        /// Sends the request.
9855        pub async fn send(self) -> Result<crate::model::ListDataAttributeBindingsResponse> {
9856            (*self.0.stub)
9857                .list_data_attribute_bindings(self.0.request, self.0.options)
9858                .await
9859                .map(gax::response::Response::into_body)
9860        }
9861
9862        /// Streams each page in the collection.
9863        pub fn by_page(
9864            self,
9865        ) -> impl gax::paginator::Paginator<
9866            crate::model::ListDataAttributeBindingsResponse,
9867            gax::error::Error,
9868        > {
9869            use std::clone::Clone;
9870            let token = self.0.request.page_token.clone();
9871            let execute = move |token: String| {
9872                let mut builder = self.clone();
9873                builder.0.request = builder.0.request.set_page_token(token);
9874                builder.send()
9875            };
9876            gax::paginator::internal::new_paginator(token, execute)
9877        }
9878
9879        /// Streams each item in the collection.
9880        pub fn by_item(
9881            self,
9882        ) -> impl gax::paginator::ItemPaginator<
9883            crate::model::ListDataAttributeBindingsResponse,
9884            gax::error::Error,
9885        > {
9886            use gax::paginator::Paginator;
9887            self.by_page().items()
9888        }
9889
9890        /// Sets the value of [parent][crate::model::ListDataAttributeBindingsRequest::parent].
9891        ///
9892        /// This is a **required** field for requests.
9893        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
9894            self.0.request.parent = v.into();
9895            self
9896        }
9897
9898        /// Sets the value of [page_size][crate::model::ListDataAttributeBindingsRequest::page_size].
9899        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
9900            self.0.request.page_size = v.into();
9901            self
9902        }
9903
9904        /// Sets the value of [page_token][crate::model::ListDataAttributeBindingsRequest::page_token].
9905        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
9906            self.0.request.page_token = v.into();
9907            self
9908        }
9909
9910        /// Sets the value of [filter][crate::model::ListDataAttributeBindingsRequest::filter].
9911        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
9912            self.0.request.filter = v.into();
9913            self
9914        }
9915
9916        /// Sets the value of [order_by][crate::model::ListDataAttributeBindingsRequest::order_by].
9917        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
9918            self.0.request.order_by = v.into();
9919            self
9920        }
9921    }
9922
9923    #[doc(hidden)]
9924    impl gax::options::internal::RequestBuilder for ListDataAttributeBindings {
9925        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
9926            &mut self.0.options
9927        }
9928    }
9929
9930    /// The request builder for [DataTaxonomyService::get_data_attribute_binding][crate::client::DataTaxonomyService::get_data_attribute_binding] calls.
9931    ///
9932    /// # Example
9933    /// ```no_run
9934    /// # use google_cloud_dataplex_v1::builder;
9935    /// use builder::data_taxonomy_service::GetDataAttributeBinding;
9936    /// # tokio_test::block_on(async {
9937    ///
9938    /// let builder = prepare_request_builder();
9939    /// let response = builder.send().await?;
9940    /// # gax::Result::<()>::Ok(()) });
9941    ///
9942    /// fn prepare_request_builder() -> GetDataAttributeBinding {
9943    ///   # panic!();
9944    ///   // ... details omitted ...
9945    /// }
9946    /// ```
9947    #[derive(Clone, Debug)]
9948    pub struct GetDataAttributeBinding(
9949        RequestBuilder<crate::model::GetDataAttributeBindingRequest>,
9950    );
9951
9952    impl GetDataAttributeBinding {
9953        pub(crate) fn new(
9954            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
9955        ) -> Self {
9956            Self(RequestBuilder::new(stub))
9957        }
9958
9959        /// Sets the full request, replacing any prior values.
9960        pub fn with_request<V: Into<crate::model::GetDataAttributeBindingRequest>>(
9961            mut self,
9962            v: V,
9963        ) -> Self {
9964            self.0.request = v.into();
9965            self
9966        }
9967
9968        /// Sets all the options, replacing any prior values.
9969        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
9970            self.0.options = v.into();
9971            self
9972        }
9973
9974        /// Sends the request.
9975        pub async fn send(self) -> Result<crate::model::DataAttributeBinding> {
9976            (*self.0.stub)
9977                .get_data_attribute_binding(self.0.request, self.0.options)
9978                .await
9979                .map(gax::response::Response::into_body)
9980        }
9981
9982        /// Sets the value of [name][crate::model::GetDataAttributeBindingRequest::name].
9983        ///
9984        /// This is a **required** field for requests.
9985        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
9986            self.0.request.name = v.into();
9987            self
9988        }
9989    }
9990
9991    #[doc(hidden)]
9992    impl gax::options::internal::RequestBuilder for GetDataAttributeBinding {
9993        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
9994            &mut self.0.options
9995        }
9996    }
9997
9998    /// The request builder for [DataTaxonomyService::create_data_attribute][crate::client::DataTaxonomyService::create_data_attribute] calls.
9999    ///
10000    /// # Example
10001    /// ```no_run
10002    /// # use google_cloud_dataplex_v1::builder;
10003    /// use builder::data_taxonomy_service::CreateDataAttribute;
10004    /// # tokio_test::block_on(async {
10005    /// use lro::Poller;
10006    ///
10007    /// let builder = prepare_request_builder();
10008    /// let response = builder.poller().until_done().await?;
10009    /// # gax::Result::<()>::Ok(()) });
10010    ///
10011    /// fn prepare_request_builder() -> CreateDataAttribute {
10012    ///   # panic!();
10013    ///   // ... details omitted ...
10014    /// }
10015    /// ```
10016    #[derive(Clone, Debug)]
10017    pub struct CreateDataAttribute(RequestBuilder<crate::model::CreateDataAttributeRequest>);
10018
10019    impl CreateDataAttribute {
10020        pub(crate) fn new(
10021            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
10022        ) -> Self {
10023            Self(RequestBuilder::new(stub))
10024        }
10025
10026        /// Sets the full request, replacing any prior values.
10027        pub fn with_request<V: Into<crate::model::CreateDataAttributeRequest>>(
10028            mut self,
10029            v: V,
10030        ) -> Self {
10031            self.0.request = v.into();
10032            self
10033        }
10034
10035        /// Sets all the options, replacing any prior values.
10036        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
10037            self.0.options = v.into();
10038            self
10039        }
10040
10041        /// Sends the request.
10042        ///
10043        /// # Long running operations
10044        ///
10045        /// This starts, but does not poll, a longrunning operation. More information
10046        /// on [create_data_attribute][crate::client::DataTaxonomyService::create_data_attribute].
10047        pub async fn send(self) -> Result<longrunning::model::Operation> {
10048            (*self.0.stub)
10049                .create_data_attribute(self.0.request, self.0.options)
10050                .await
10051                .map(gax::response::Response::into_body)
10052        }
10053
10054        /// Creates a [Poller][lro::Poller] to work with `create_data_attribute`.
10055        pub fn poller(
10056            self,
10057        ) -> impl lro::Poller<crate::model::DataAttribute, crate::model::OperationMetadata>
10058        {
10059            type Operation = lro::internal::Operation<
10060                crate::model::DataAttribute,
10061                crate::model::OperationMetadata,
10062            >;
10063            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
10064            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
10065
10066            let stub = self.0.stub.clone();
10067            let mut options = self.0.options.clone();
10068            options.set_retry_policy(gax::retry_policy::NeverRetry);
10069            let query = move |name| {
10070                let stub = stub.clone();
10071                let options = options.clone();
10072                async {
10073                    let op = GetOperation::new(stub)
10074                        .set_name(name)
10075                        .with_options(options)
10076                        .send()
10077                        .await?;
10078                    Ok(Operation::new(op))
10079                }
10080            };
10081
10082            let start = move || async {
10083                let op = self.send().await?;
10084                Ok(Operation::new(op))
10085            };
10086
10087            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
10088        }
10089
10090        /// Sets the value of [parent][crate::model::CreateDataAttributeRequest::parent].
10091        ///
10092        /// This is a **required** field for requests.
10093        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
10094            self.0.request.parent = v.into();
10095            self
10096        }
10097
10098        /// Sets the value of [data_attribute_id][crate::model::CreateDataAttributeRequest::data_attribute_id].
10099        ///
10100        /// This is a **required** field for requests.
10101        pub fn set_data_attribute_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
10102            self.0.request.data_attribute_id = v.into();
10103            self
10104        }
10105
10106        /// Sets the value of [data_attribute][crate::model::CreateDataAttributeRequest::data_attribute].
10107        ///
10108        /// This is a **required** field for requests.
10109        pub fn set_data_attribute<T>(mut self, v: T) -> Self
10110        where
10111            T: std::convert::Into<crate::model::DataAttribute>,
10112        {
10113            self.0.request.data_attribute = std::option::Option::Some(v.into());
10114            self
10115        }
10116
10117        /// Sets or clears the value of [data_attribute][crate::model::CreateDataAttributeRequest::data_attribute].
10118        ///
10119        /// This is a **required** field for requests.
10120        pub fn set_or_clear_data_attribute<T>(mut self, v: std::option::Option<T>) -> Self
10121        where
10122            T: std::convert::Into<crate::model::DataAttribute>,
10123        {
10124            self.0.request.data_attribute = v.map(|x| x.into());
10125            self
10126        }
10127
10128        /// Sets the value of [validate_only][crate::model::CreateDataAttributeRequest::validate_only].
10129        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
10130            self.0.request.validate_only = v.into();
10131            self
10132        }
10133    }
10134
10135    #[doc(hidden)]
10136    impl gax::options::internal::RequestBuilder for CreateDataAttribute {
10137        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
10138            &mut self.0.options
10139        }
10140    }
10141
10142    /// The request builder for [DataTaxonomyService::update_data_attribute][crate::client::DataTaxonomyService::update_data_attribute] calls.
10143    ///
10144    /// # Example
10145    /// ```no_run
10146    /// # use google_cloud_dataplex_v1::builder;
10147    /// use builder::data_taxonomy_service::UpdateDataAttribute;
10148    /// # tokio_test::block_on(async {
10149    /// use lro::Poller;
10150    ///
10151    /// let builder = prepare_request_builder();
10152    /// let response = builder.poller().until_done().await?;
10153    /// # gax::Result::<()>::Ok(()) });
10154    ///
10155    /// fn prepare_request_builder() -> UpdateDataAttribute {
10156    ///   # panic!();
10157    ///   // ... details omitted ...
10158    /// }
10159    /// ```
10160    #[derive(Clone, Debug)]
10161    pub struct UpdateDataAttribute(RequestBuilder<crate::model::UpdateDataAttributeRequest>);
10162
10163    impl UpdateDataAttribute {
10164        pub(crate) fn new(
10165            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
10166        ) -> Self {
10167            Self(RequestBuilder::new(stub))
10168        }
10169
10170        /// Sets the full request, replacing any prior values.
10171        pub fn with_request<V: Into<crate::model::UpdateDataAttributeRequest>>(
10172            mut self,
10173            v: V,
10174        ) -> Self {
10175            self.0.request = v.into();
10176            self
10177        }
10178
10179        /// Sets all the options, replacing any prior values.
10180        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
10181            self.0.options = v.into();
10182            self
10183        }
10184
10185        /// Sends the request.
10186        ///
10187        /// # Long running operations
10188        ///
10189        /// This starts, but does not poll, a longrunning operation. More information
10190        /// on [update_data_attribute][crate::client::DataTaxonomyService::update_data_attribute].
10191        pub async fn send(self) -> Result<longrunning::model::Operation> {
10192            (*self.0.stub)
10193                .update_data_attribute(self.0.request, self.0.options)
10194                .await
10195                .map(gax::response::Response::into_body)
10196        }
10197
10198        /// Creates a [Poller][lro::Poller] to work with `update_data_attribute`.
10199        pub fn poller(
10200            self,
10201        ) -> impl lro::Poller<crate::model::DataAttribute, crate::model::OperationMetadata>
10202        {
10203            type Operation = lro::internal::Operation<
10204                crate::model::DataAttribute,
10205                crate::model::OperationMetadata,
10206            >;
10207            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
10208            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
10209
10210            let stub = self.0.stub.clone();
10211            let mut options = self.0.options.clone();
10212            options.set_retry_policy(gax::retry_policy::NeverRetry);
10213            let query = move |name| {
10214                let stub = stub.clone();
10215                let options = options.clone();
10216                async {
10217                    let op = GetOperation::new(stub)
10218                        .set_name(name)
10219                        .with_options(options)
10220                        .send()
10221                        .await?;
10222                    Ok(Operation::new(op))
10223                }
10224            };
10225
10226            let start = move || async {
10227                let op = self.send().await?;
10228                Ok(Operation::new(op))
10229            };
10230
10231            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
10232        }
10233
10234        /// Sets the value of [update_mask][crate::model::UpdateDataAttributeRequest::update_mask].
10235        ///
10236        /// This is a **required** field for requests.
10237        pub fn set_update_mask<T>(mut self, v: T) -> Self
10238        where
10239            T: std::convert::Into<wkt::FieldMask>,
10240        {
10241            self.0.request.update_mask = std::option::Option::Some(v.into());
10242            self
10243        }
10244
10245        /// Sets or clears the value of [update_mask][crate::model::UpdateDataAttributeRequest::update_mask].
10246        ///
10247        /// This is a **required** field for requests.
10248        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
10249        where
10250            T: std::convert::Into<wkt::FieldMask>,
10251        {
10252            self.0.request.update_mask = v.map(|x| x.into());
10253            self
10254        }
10255
10256        /// Sets the value of [data_attribute][crate::model::UpdateDataAttributeRequest::data_attribute].
10257        ///
10258        /// This is a **required** field for requests.
10259        pub fn set_data_attribute<T>(mut self, v: T) -> Self
10260        where
10261            T: std::convert::Into<crate::model::DataAttribute>,
10262        {
10263            self.0.request.data_attribute = std::option::Option::Some(v.into());
10264            self
10265        }
10266
10267        /// Sets or clears the value of [data_attribute][crate::model::UpdateDataAttributeRequest::data_attribute].
10268        ///
10269        /// This is a **required** field for requests.
10270        pub fn set_or_clear_data_attribute<T>(mut self, v: std::option::Option<T>) -> Self
10271        where
10272            T: std::convert::Into<crate::model::DataAttribute>,
10273        {
10274            self.0.request.data_attribute = v.map(|x| x.into());
10275            self
10276        }
10277
10278        /// Sets the value of [validate_only][crate::model::UpdateDataAttributeRequest::validate_only].
10279        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
10280            self.0.request.validate_only = v.into();
10281            self
10282        }
10283    }
10284
10285    #[doc(hidden)]
10286    impl gax::options::internal::RequestBuilder for UpdateDataAttribute {
10287        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
10288            &mut self.0.options
10289        }
10290    }
10291
10292    /// The request builder for [DataTaxonomyService::delete_data_attribute][crate::client::DataTaxonomyService::delete_data_attribute] calls.
10293    ///
10294    /// # Example
10295    /// ```no_run
10296    /// # use google_cloud_dataplex_v1::builder;
10297    /// use builder::data_taxonomy_service::DeleteDataAttribute;
10298    /// # tokio_test::block_on(async {
10299    /// use lro::Poller;
10300    ///
10301    /// let builder = prepare_request_builder();
10302    /// let response = builder.poller().until_done().await?;
10303    /// # gax::Result::<()>::Ok(()) });
10304    ///
10305    /// fn prepare_request_builder() -> DeleteDataAttribute {
10306    ///   # panic!();
10307    ///   // ... details omitted ...
10308    /// }
10309    /// ```
10310    #[derive(Clone, Debug)]
10311    pub struct DeleteDataAttribute(RequestBuilder<crate::model::DeleteDataAttributeRequest>);
10312
10313    impl DeleteDataAttribute {
10314        pub(crate) fn new(
10315            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
10316        ) -> Self {
10317            Self(RequestBuilder::new(stub))
10318        }
10319
10320        /// Sets the full request, replacing any prior values.
10321        pub fn with_request<V: Into<crate::model::DeleteDataAttributeRequest>>(
10322            mut self,
10323            v: V,
10324        ) -> Self {
10325            self.0.request = v.into();
10326            self
10327        }
10328
10329        /// Sets all the options, replacing any prior values.
10330        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
10331            self.0.options = v.into();
10332            self
10333        }
10334
10335        /// Sends the request.
10336        ///
10337        /// # Long running operations
10338        ///
10339        /// This starts, but does not poll, a longrunning operation. More information
10340        /// on [delete_data_attribute][crate::client::DataTaxonomyService::delete_data_attribute].
10341        pub async fn send(self) -> Result<longrunning::model::Operation> {
10342            (*self.0.stub)
10343                .delete_data_attribute(self.0.request, self.0.options)
10344                .await
10345                .map(gax::response::Response::into_body)
10346        }
10347
10348        /// Creates a [Poller][lro::Poller] to work with `delete_data_attribute`.
10349        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
10350            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
10351            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
10352            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
10353
10354            let stub = self.0.stub.clone();
10355            let mut options = self.0.options.clone();
10356            options.set_retry_policy(gax::retry_policy::NeverRetry);
10357            let query = move |name| {
10358                let stub = stub.clone();
10359                let options = options.clone();
10360                async {
10361                    let op = GetOperation::new(stub)
10362                        .set_name(name)
10363                        .with_options(options)
10364                        .send()
10365                        .await?;
10366                    Ok(Operation::new(op))
10367                }
10368            };
10369
10370            let start = move || async {
10371                let op = self.send().await?;
10372                Ok(Operation::new(op))
10373            };
10374
10375            lro::internal::new_unit_response_poller(
10376                polling_error_policy,
10377                polling_backoff_policy,
10378                start,
10379                query,
10380            )
10381        }
10382
10383        /// Sets the value of [name][crate::model::DeleteDataAttributeRequest::name].
10384        ///
10385        /// This is a **required** field for requests.
10386        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10387            self.0.request.name = v.into();
10388            self
10389        }
10390
10391        /// Sets the value of [etag][crate::model::DeleteDataAttributeRequest::etag].
10392        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
10393            self.0.request.etag = v.into();
10394            self
10395        }
10396    }
10397
10398    #[doc(hidden)]
10399    impl gax::options::internal::RequestBuilder for DeleteDataAttribute {
10400        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
10401            &mut self.0.options
10402        }
10403    }
10404
10405    /// The request builder for [DataTaxonomyService::list_data_attributes][crate::client::DataTaxonomyService::list_data_attributes] calls.
10406    ///
10407    /// # Example
10408    /// ```no_run
10409    /// # use google_cloud_dataplex_v1::builder;
10410    /// use builder::data_taxonomy_service::ListDataAttributes;
10411    /// # tokio_test::block_on(async {
10412    /// use gax::paginator::ItemPaginator;
10413    ///
10414    /// let builder = prepare_request_builder();
10415    /// let mut items = builder.by_item();
10416    /// while let Some(result) = items.next().await {
10417    ///   let item = result?;
10418    /// }
10419    /// # gax::Result::<()>::Ok(()) });
10420    ///
10421    /// fn prepare_request_builder() -> ListDataAttributes {
10422    ///   # panic!();
10423    ///   // ... details omitted ...
10424    /// }
10425    /// ```
10426    #[derive(Clone, Debug)]
10427    pub struct ListDataAttributes(RequestBuilder<crate::model::ListDataAttributesRequest>);
10428
10429    impl ListDataAttributes {
10430        pub(crate) fn new(
10431            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
10432        ) -> Self {
10433            Self(RequestBuilder::new(stub))
10434        }
10435
10436        /// Sets the full request, replacing any prior values.
10437        pub fn with_request<V: Into<crate::model::ListDataAttributesRequest>>(
10438            mut self,
10439            v: V,
10440        ) -> Self {
10441            self.0.request = v.into();
10442            self
10443        }
10444
10445        /// Sets all the options, replacing any prior values.
10446        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
10447            self.0.options = v.into();
10448            self
10449        }
10450
10451        /// Sends the request.
10452        pub async fn send(self) -> Result<crate::model::ListDataAttributesResponse> {
10453            (*self.0.stub)
10454                .list_data_attributes(self.0.request, self.0.options)
10455                .await
10456                .map(gax::response::Response::into_body)
10457        }
10458
10459        /// Streams each page in the collection.
10460        pub fn by_page(
10461            self,
10462        ) -> impl gax::paginator::Paginator<crate::model::ListDataAttributesResponse, gax::error::Error>
10463        {
10464            use std::clone::Clone;
10465            let token = self.0.request.page_token.clone();
10466            let execute = move |token: String| {
10467                let mut builder = self.clone();
10468                builder.0.request = builder.0.request.set_page_token(token);
10469                builder.send()
10470            };
10471            gax::paginator::internal::new_paginator(token, execute)
10472        }
10473
10474        /// Streams each item in the collection.
10475        pub fn by_item(
10476            self,
10477        ) -> impl gax::paginator::ItemPaginator<
10478            crate::model::ListDataAttributesResponse,
10479            gax::error::Error,
10480        > {
10481            use gax::paginator::Paginator;
10482            self.by_page().items()
10483        }
10484
10485        /// Sets the value of [parent][crate::model::ListDataAttributesRequest::parent].
10486        ///
10487        /// This is a **required** field for requests.
10488        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
10489            self.0.request.parent = v.into();
10490            self
10491        }
10492
10493        /// Sets the value of [page_size][crate::model::ListDataAttributesRequest::page_size].
10494        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
10495            self.0.request.page_size = v.into();
10496            self
10497        }
10498
10499        /// Sets the value of [page_token][crate::model::ListDataAttributesRequest::page_token].
10500        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
10501            self.0.request.page_token = v.into();
10502            self
10503        }
10504
10505        /// Sets the value of [filter][crate::model::ListDataAttributesRequest::filter].
10506        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
10507            self.0.request.filter = v.into();
10508            self
10509        }
10510
10511        /// Sets the value of [order_by][crate::model::ListDataAttributesRequest::order_by].
10512        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
10513            self.0.request.order_by = v.into();
10514            self
10515        }
10516    }
10517
10518    #[doc(hidden)]
10519    impl gax::options::internal::RequestBuilder for ListDataAttributes {
10520        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
10521            &mut self.0.options
10522        }
10523    }
10524
10525    /// The request builder for [DataTaxonomyService::get_data_attribute][crate::client::DataTaxonomyService::get_data_attribute] calls.
10526    ///
10527    /// # Example
10528    /// ```no_run
10529    /// # use google_cloud_dataplex_v1::builder;
10530    /// use builder::data_taxonomy_service::GetDataAttribute;
10531    /// # tokio_test::block_on(async {
10532    ///
10533    /// let builder = prepare_request_builder();
10534    /// let response = builder.send().await?;
10535    /// # gax::Result::<()>::Ok(()) });
10536    ///
10537    /// fn prepare_request_builder() -> GetDataAttribute {
10538    ///   # panic!();
10539    ///   // ... details omitted ...
10540    /// }
10541    /// ```
10542    #[derive(Clone, Debug)]
10543    pub struct GetDataAttribute(RequestBuilder<crate::model::GetDataAttributeRequest>);
10544
10545    impl GetDataAttribute {
10546        pub(crate) fn new(
10547            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
10548        ) -> Self {
10549            Self(RequestBuilder::new(stub))
10550        }
10551
10552        /// Sets the full request, replacing any prior values.
10553        pub fn with_request<V: Into<crate::model::GetDataAttributeRequest>>(
10554            mut self,
10555            v: V,
10556        ) -> Self {
10557            self.0.request = v.into();
10558            self
10559        }
10560
10561        /// Sets all the options, replacing any prior values.
10562        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
10563            self.0.options = v.into();
10564            self
10565        }
10566
10567        /// Sends the request.
10568        pub async fn send(self) -> Result<crate::model::DataAttribute> {
10569            (*self.0.stub)
10570                .get_data_attribute(self.0.request, self.0.options)
10571                .await
10572                .map(gax::response::Response::into_body)
10573        }
10574
10575        /// Sets the value of [name][crate::model::GetDataAttributeRequest::name].
10576        ///
10577        /// This is a **required** field for requests.
10578        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10579            self.0.request.name = v.into();
10580            self
10581        }
10582    }
10583
10584    #[doc(hidden)]
10585    impl gax::options::internal::RequestBuilder for GetDataAttribute {
10586        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
10587            &mut self.0.options
10588        }
10589    }
10590
10591    /// The request builder for [DataTaxonomyService::list_locations][crate::client::DataTaxonomyService::list_locations] calls.
10592    ///
10593    /// # Example
10594    /// ```no_run
10595    /// # use google_cloud_dataplex_v1::builder;
10596    /// use builder::data_taxonomy_service::ListLocations;
10597    /// # tokio_test::block_on(async {
10598    /// use gax::paginator::ItemPaginator;
10599    ///
10600    /// let builder = prepare_request_builder();
10601    /// let mut items = builder.by_item();
10602    /// while let Some(result) = items.next().await {
10603    ///   let item = result?;
10604    /// }
10605    /// # gax::Result::<()>::Ok(()) });
10606    ///
10607    /// fn prepare_request_builder() -> ListLocations {
10608    ///   # panic!();
10609    ///   // ... details omitted ...
10610    /// }
10611    /// ```
10612    #[derive(Clone, Debug)]
10613    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
10614
10615    impl ListLocations {
10616        pub(crate) fn new(
10617            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
10618        ) -> Self {
10619            Self(RequestBuilder::new(stub))
10620        }
10621
10622        /// Sets the full request, replacing any prior values.
10623        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
10624            mut self,
10625            v: V,
10626        ) -> Self {
10627            self.0.request = v.into();
10628            self
10629        }
10630
10631        /// Sets all the options, replacing any prior values.
10632        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
10633            self.0.options = v.into();
10634            self
10635        }
10636
10637        /// Sends the request.
10638        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
10639            (*self.0.stub)
10640                .list_locations(self.0.request, self.0.options)
10641                .await
10642                .map(gax::response::Response::into_body)
10643        }
10644
10645        /// Streams each page in the collection.
10646        pub fn by_page(
10647            self,
10648        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
10649        {
10650            use std::clone::Clone;
10651            let token = self.0.request.page_token.clone();
10652            let execute = move |token: String| {
10653                let mut builder = self.clone();
10654                builder.0.request = builder.0.request.set_page_token(token);
10655                builder.send()
10656            };
10657            gax::paginator::internal::new_paginator(token, execute)
10658        }
10659
10660        /// Streams each item in the collection.
10661        pub fn by_item(
10662            self,
10663        ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
10664        {
10665            use gax::paginator::Paginator;
10666            self.by_page().items()
10667        }
10668
10669        /// Sets the value of [name][location::model::ListLocationsRequest::name].
10670        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10671            self.0.request.name = v.into();
10672            self
10673        }
10674
10675        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
10676        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
10677            self.0.request.filter = v.into();
10678            self
10679        }
10680
10681        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
10682        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
10683            self.0.request.page_size = v.into();
10684            self
10685        }
10686
10687        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
10688        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
10689            self.0.request.page_token = v.into();
10690            self
10691        }
10692    }
10693
10694    #[doc(hidden)]
10695    impl gax::options::internal::RequestBuilder for ListLocations {
10696        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
10697            &mut self.0.options
10698        }
10699    }
10700
10701    /// The request builder for [DataTaxonomyService::get_location][crate::client::DataTaxonomyService::get_location] calls.
10702    ///
10703    /// # Example
10704    /// ```no_run
10705    /// # use google_cloud_dataplex_v1::builder;
10706    /// use builder::data_taxonomy_service::GetLocation;
10707    /// # tokio_test::block_on(async {
10708    ///
10709    /// let builder = prepare_request_builder();
10710    /// let response = builder.send().await?;
10711    /// # gax::Result::<()>::Ok(()) });
10712    ///
10713    /// fn prepare_request_builder() -> GetLocation {
10714    ///   # panic!();
10715    ///   // ... details omitted ...
10716    /// }
10717    /// ```
10718    #[derive(Clone, Debug)]
10719    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
10720
10721    impl GetLocation {
10722        pub(crate) fn new(
10723            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
10724        ) -> Self {
10725            Self(RequestBuilder::new(stub))
10726        }
10727
10728        /// Sets the full request, replacing any prior values.
10729        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
10730            self.0.request = v.into();
10731            self
10732        }
10733
10734        /// Sets all the options, replacing any prior values.
10735        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
10736            self.0.options = v.into();
10737            self
10738        }
10739
10740        /// Sends the request.
10741        pub async fn send(self) -> Result<location::model::Location> {
10742            (*self.0.stub)
10743                .get_location(self.0.request, self.0.options)
10744                .await
10745                .map(gax::response::Response::into_body)
10746        }
10747
10748        /// Sets the value of [name][location::model::GetLocationRequest::name].
10749        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
10750            self.0.request.name = v.into();
10751            self
10752        }
10753    }
10754
10755    #[doc(hidden)]
10756    impl gax::options::internal::RequestBuilder for GetLocation {
10757        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
10758            &mut self.0.options
10759        }
10760    }
10761
10762    /// The request builder for [DataTaxonomyService::set_iam_policy][crate::client::DataTaxonomyService::set_iam_policy] calls.
10763    ///
10764    /// # Example
10765    /// ```no_run
10766    /// # use google_cloud_dataplex_v1::builder;
10767    /// use builder::data_taxonomy_service::SetIamPolicy;
10768    /// # tokio_test::block_on(async {
10769    ///
10770    /// let builder = prepare_request_builder();
10771    /// let response = builder.send().await?;
10772    /// # gax::Result::<()>::Ok(()) });
10773    ///
10774    /// fn prepare_request_builder() -> SetIamPolicy {
10775    ///   # panic!();
10776    ///   // ... details omitted ...
10777    /// }
10778    /// ```
10779    #[derive(Clone, Debug)]
10780    pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
10781
10782    impl SetIamPolicy {
10783        pub(crate) fn new(
10784            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
10785        ) -> Self {
10786            Self(RequestBuilder::new(stub))
10787        }
10788
10789        /// Sets the full request, replacing any prior values.
10790        pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
10791            self.0.request = v.into();
10792            self
10793        }
10794
10795        /// Sets all the options, replacing any prior values.
10796        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
10797            self.0.options = v.into();
10798            self
10799        }
10800
10801        /// Sends the request.
10802        pub async fn send(self) -> Result<iam_v1::model::Policy> {
10803            (*self.0.stub)
10804                .set_iam_policy(self.0.request, self.0.options)
10805                .await
10806                .map(gax::response::Response::into_body)
10807        }
10808
10809        /// Sets the value of [resource][iam_v1::model::SetIamPolicyRequest::resource].
10810        ///
10811        /// This is a **required** field for requests.
10812        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
10813            self.0.request.resource = v.into();
10814            self
10815        }
10816
10817        /// Sets the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
10818        ///
10819        /// This is a **required** field for requests.
10820        pub fn set_policy<T>(mut self, v: T) -> Self
10821        where
10822            T: std::convert::Into<iam_v1::model::Policy>,
10823        {
10824            self.0.request.policy = std::option::Option::Some(v.into());
10825            self
10826        }
10827
10828        /// Sets or clears the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
10829        ///
10830        /// This is a **required** field for requests.
10831        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
10832        where
10833            T: std::convert::Into<iam_v1::model::Policy>,
10834        {
10835            self.0.request.policy = v.map(|x| x.into());
10836            self
10837        }
10838
10839        /// Sets the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
10840        pub fn set_update_mask<T>(mut self, v: T) -> Self
10841        where
10842            T: std::convert::Into<wkt::FieldMask>,
10843        {
10844            self.0.request.update_mask = std::option::Option::Some(v.into());
10845            self
10846        }
10847
10848        /// Sets or clears the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
10849        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
10850        where
10851            T: std::convert::Into<wkt::FieldMask>,
10852        {
10853            self.0.request.update_mask = v.map(|x| x.into());
10854            self
10855        }
10856    }
10857
10858    #[doc(hidden)]
10859    impl gax::options::internal::RequestBuilder for SetIamPolicy {
10860        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
10861            &mut self.0.options
10862        }
10863    }
10864
10865    /// The request builder for [DataTaxonomyService::get_iam_policy][crate::client::DataTaxonomyService::get_iam_policy] calls.
10866    ///
10867    /// # Example
10868    /// ```no_run
10869    /// # use google_cloud_dataplex_v1::builder;
10870    /// use builder::data_taxonomy_service::GetIamPolicy;
10871    /// # tokio_test::block_on(async {
10872    ///
10873    /// let builder = prepare_request_builder();
10874    /// let response = builder.send().await?;
10875    /// # gax::Result::<()>::Ok(()) });
10876    ///
10877    /// fn prepare_request_builder() -> GetIamPolicy {
10878    ///   # panic!();
10879    ///   // ... details omitted ...
10880    /// }
10881    /// ```
10882    #[derive(Clone, Debug)]
10883    pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
10884
10885    impl GetIamPolicy {
10886        pub(crate) fn new(
10887            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
10888        ) -> Self {
10889            Self(RequestBuilder::new(stub))
10890        }
10891
10892        /// Sets the full request, replacing any prior values.
10893        pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
10894            self.0.request = v.into();
10895            self
10896        }
10897
10898        /// Sets all the options, replacing any prior values.
10899        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
10900            self.0.options = v.into();
10901            self
10902        }
10903
10904        /// Sends the request.
10905        pub async fn send(self) -> Result<iam_v1::model::Policy> {
10906            (*self.0.stub)
10907                .get_iam_policy(self.0.request, self.0.options)
10908                .await
10909                .map(gax::response::Response::into_body)
10910        }
10911
10912        /// Sets the value of [resource][iam_v1::model::GetIamPolicyRequest::resource].
10913        ///
10914        /// This is a **required** field for requests.
10915        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
10916            self.0.request.resource = v.into();
10917            self
10918        }
10919
10920        /// Sets the value of [options][iam_v1::model::GetIamPolicyRequest::options].
10921        pub fn set_options<T>(mut self, v: T) -> Self
10922        where
10923            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
10924        {
10925            self.0.request.options = std::option::Option::Some(v.into());
10926            self
10927        }
10928
10929        /// Sets or clears the value of [options][iam_v1::model::GetIamPolicyRequest::options].
10930        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
10931        where
10932            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
10933        {
10934            self.0.request.options = v.map(|x| x.into());
10935            self
10936        }
10937    }
10938
10939    #[doc(hidden)]
10940    impl gax::options::internal::RequestBuilder for GetIamPolicy {
10941        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
10942            &mut self.0.options
10943        }
10944    }
10945
10946    /// The request builder for [DataTaxonomyService::test_iam_permissions][crate::client::DataTaxonomyService::test_iam_permissions] calls.
10947    ///
10948    /// # Example
10949    /// ```no_run
10950    /// # use google_cloud_dataplex_v1::builder;
10951    /// use builder::data_taxonomy_service::TestIamPermissions;
10952    /// # tokio_test::block_on(async {
10953    ///
10954    /// let builder = prepare_request_builder();
10955    /// let response = builder.send().await?;
10956    /// # gax::Result::<()>::Ok(()) });
10957    ///
10958    /// fn prepare_request_builder() -> TestIamPermissions {
10959    ///   # panic!();
10960    ///   // ... details omitted ...
10961    /// }
10962    /// ```
10963    #[derive(Clone, Debug)]
10964    pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
10965
10966    impl TestIamPermissions {
10967        pub(crate) fn new(
10968            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
10969        ) -> Self {
10970            Self(RequestBuilder::new(stub))
10971        }
10972
10973        /// Sets the full request, replacing any prior values.
10974        pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
10975            mut self,
10976            v: V,
10977        ) -> Self {
10978            self.0.request = v.into();
10979            self
10980        }
10981
10982        /// Sets all the options, replacing any prior values.
10983        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
10984            self.0.options = v.into();
10985            self
10986        }
10987
10988        /// Sends the request.
10989        pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
10990            (*self.0.stub)
10991                .test_iam_permissions(self.0.request, self.0.options)
10992                .await
10993                .map(gax::response::Response::into_body)
10994        }
10995
10996        /// Sets the value of [resource][iam_v1::model::TestIamPermissionsRequest::resource].
10997        ///
10998        /// This is a **required** field for requests.
10999        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
11000            self.0.request.resource = v.into();
11001            self
11002        }
11003
11004        /// Sets the value of [permissions][iam_v1::model::TestIamPermissionsRequest::permissions].
11005        ///
11006        /// This is a **required** field for requests.
11007        pub fn set_permissions<T, V>(mut self, v: T) -> Self
11008        where
11009            T: std::iter::IntoIterator<Item = V>,
11010            V: std::convert::Into<std::string::String>,
11011        {
11012            use std::iter::Iterator;
11013            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
11014            self
11015        }
11016    }
11017
11018    #[doc(hidden)]
11019    impl gax::options::internal::RequestBuilder for TestIamPermissions {
11020        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
11021            &mut self.0.options
11022        }
11023    }
11024
11025    /// The request builder for [DataTaxonomyService::list_operations][crate::client::DataTaxonomyService::list_operations] calls.
11026    ///
11027    /// # Example
11028    /// ```no_run
11029    /// # use google_cloud_dataplex_v1::builder;
11030    /// use builder::data_taxonomy_service::ListOperations;
11031    /// # tokio_test::block_on(async {
11032    /// use gax::paginator::ItemPaginator;
11033    ///
11034    /// let builder = prepare_request_builder();
11035    /// let mut items = builder.by_item();
11036    /// while let Some(result) = items.next().await {
11037    ///   let item = result?;
11038    /// }
11039    /// # gax::Result::<()>::Ok(()) });
11040    ///
11041    /// fn prepare_request_builder() -> ListOperations {
11042    ///   # panic!();
11043    ///   // ... details omitted ...
11044    /// }
11045    /// ```
11046    #[derive(Clone, Debug)]
11047    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
11048
11049    impl ListOperations {
11050        pub(crate) fn new(
11051            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11052        ) -> Self {
11053            Self(RequestBuilder::new(stub))
11054        }
11055
11056        /// Sets the full request, replacing any prior values.
11057        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
11058            mut self,
11059            v: V,
11060        ) -> Self {
11061            self.0.request = v.into();
11062            self
11063        }
11064
11065        /// Sets all the options, replacing any prior values.
11066        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
11067            self.0.options = v.into();
11068            self
11069        }
11070
11071        /// Sends the request.
11072        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
11073            (*self.0.stub)
11074                .list_operations(self.0.request, self.0.options)
11075                .await
11076                .map(gax::response::Response::into_body)
11077        }
11078
11079        /// Streams each page in the collection.
11080        pub fn by_page(
11081            self,
11082        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
11083        {
11084            use std::clone::Clone;
11085            let token = self.0.request.page_token.clone();
11086            let execute = move |token: String| {
11087                let mut builder = self.clone();
11088                builder.0.request = builder.0.request.set_page_token(token);
11089                builder.send()
11090            };
11091            gax::paginator::internal::new_paginator(token, execute)
11092        }
11093
11094        /// Streams each item in the collection.
11095        pub fn by_item(
11096            self,
11097        ) -> impl gax::paginator::ItemPaginator<
11098            longrunning::model::ListOperationsResponse,
11099            gax::error::Error,
11100        > {
11101            use gax::paginator::Paginator;
11102            self.by_page().items()
11103        }
11104
11105        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
11106        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11107            self.0.request.name = v.into();
11108            self
11109        }
11110
11111        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
11112        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
11113            self.0.request.filter = v.into();
11114            self
11115        }
11116
11117        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
11118        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
11119            self.0.request.page_size = v.into();
11120            self
11121        }
11122
11123        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
11124        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
11125            self.0.request.page_token = v.into();
11126            self
11127        }
11128
11129        /// Sets the value of [return_partial_success][longrunning::model::ListOperationsRequest::return_partial_success].
11130        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
11131            self.0.request.return_partial_success = v.into();
11132            self
11133        }
11134    }
11135
11136    #[doc(hidden)]
11137    impl gax::options::internal::RequestBuilder for ListOperations {
11138        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
11139            &mut self.0.options
11140        }
11141    }
11142
11143    /// The request builder for [DataTaxonomyService::get_operation][crate::client::DataTaxonomyService::get_operation] calls.
11144    ///
11145    /// # Example
11146    /// ```no_run
11147    /// # use google_cloud_dataplex_v1::builder;
11148    /// use builder::data_taxonomy_service::GetOperation;
11149    /// # tokio_test::block_on(async {
11150    ///
11151    /// let builder = prepare_request_builder();
11152    /// let response = builder.send().await?;
11153    /// # gax::Result::<()>::Ok(()) });
11154    ///
11155    /// fn prepare_request_builder() -> GetOperation {
11156    ///   # panic!();
11157    ///   // ... details omitted ...
11158    /// }
11159    /// ```
11160    #[derive(Clone, Debug)]
11161    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
11162
11163    impl GetOperation {
11164        pub(crate) fn new(
11165            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11166        ) -> Self {
11167            Self(RequestBuilder::new(stub))
11168        }
11169
11170        /// Sets the full request, replacing any prior values.
11171        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
11172            mut self,
11173            v: V,
11174        ) -> Self {
11175            self.0.request = v.into();
11176            self
11177        }
11178
11179        /// Sets all the options, replacing any prior values.
11180        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
11181            self.0.options = v.into();
11182            self
11183        }
11184
11185        /// Sends the request.
11186        pub async fn send(self) -> Result<longrunning::model::Operation> {
11187            (*self.0.stub)
11188                .get_operation(self.0.request, self.0.options)
11189                .await
11190                .map(gax::response::Response::into_body)
11191        }
11192
11193        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
11194        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11195            self.0.request.name = v.into();
11196            self
11197        }
11198    }
11199
11200    #[doc(hidden)]
11201    impl gax::options::internal::RequestBuilder for GetOperation {
11202        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
11203            &mut self.0.options
11204        }
11205    }
11206
11207    /// The request builder for [DataTaxonomyService::delete_operation][crate::client::DataTaxonomyService::delete_operation] calls.
11208    ///
11209    /// # Example
11210    /// ```no_run
11211    /// # use google_cloud_dataplex_v1::builder;
11212    /// use builder::data_taxonomy_service::DeleteOperation;
11213    /// # tokio_test::block_on(async {
11214    ///
11215    /// let builder = prepare_request_builder();
11216    /// let response = builder.send().await?;
11217    /// # gax::Result::<()>::Ok(()) });
11218    ///
11219    /// fn prepare_request_builder() -> DeleteOperation {
11220    ///   # panic!();
11221    ///   // ... details omitted ...
11222    /// }
11223    /// ```
11224    #[derive(Clone, Debug)]
11225    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
11226
11227    impl DeleteOperation {
11228        pub(crate) fn new(
11229            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11230        ) -> Self {
11231            Self(RequestBuilder::new(stub))
11232        }
11233
11234        /// Sets the full request, replacing any prior values.
11235        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
11236            mut self,
11237            v: V,
11238        ) -> Self {
11239            self.0.request = v.into();
11240            self
11241        }
11242
11243        /// Sets all the options, replacing any prior values.
11244        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
11245            self.0.options = v.into();
11246            self
11247        }
11248
11249        /// Sends the request.
11250        pub async fn send(self) -> Result<()> {
11251            (*self.0.stub)
11252                .delete_operation(self.0.request, self.0.options)
11253                .await
11254                .map(gax::response::Response::into_body)
11255        }
11256
11257        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
11258        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11259            self.0.request.name = v.into();
11260            self
11261        }
11262    }
11263
11264    #[doc(hidden)]
11265    impl gax::options::internal::RequestBuilder for DeleteOperation {
11266        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
11267            &mut self.0.options
11268        }
11269    }
11270
11271    /// The request builder for [DataTaxonomyService::cancel_operation][crate::client::DataTaxonomyService::cancel_operation] calls.
11272    ///
11273    /// # Example
11274    /// ```no_run
11275    /// # use google_cloud_dataplex_v1::builder;
11276    /// use builder::data_taxonomy_service::CancelOperation;
11277    /// # tokio_test::block_on(async {
11278    ///
11279    /// let builder = prepare_request_builder();
11280    /// let response = builder.send().await?;
11281    /// # gax::Result::<()>::Ok(()) });
11282    ///
11283    /// fn prepare_request_builder() -> CancelOperation {
11284    ///   # panic!();
11285    ///   // ... details omitted ...
11286    /// }
11287    /// ```
11288    #[derive(Clone, Debug)]
11289    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
11290
11291    impl CancelOperation {
11292        pub(crate) fn new(
11293            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataTaxonomyService>,
11294        ) -> Self {
11295            Self(RequestBuilder::new(stub))
11296        }
11297
11298        /// Sets the full request, replacing any prior values.
11299        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
11300            mut self,
11301            v: V,
11302        ) -> Self {
11303            self.0.request = v.into();
11304            self
11305        }
11306
11307        /// Sets all the options, replacing any prior values.
11308        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
11309            self.0.options = v.into();
11310            self
11311        }
11312
11313        /// Sends the request.
11314        pub async fn send(self) -> Result<()> {
11315            (*self.0.stub)
11316                .cancel_operation(self.0.request, self.0.options)
11317                .await
11318                .map(gax::response::Response::into_body)
11319        }
11320
11321        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
11322        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11323            self.0.request.name = v.into();
11324            self
11325        }
11326    }
11327
11328    #[doc(hidden)]
11329    impl gax::options::internal::RequestBuilder for CancelOperation {
11330        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
11331            &mut self.0.options
11332        }
11333    }
11334}
11335
11336pub mod data_scan_service {
11337    use crate::Result;
11338
11339    /// A builder for [DataScanService][crate::client::DataScanService].
11340    ///
11341    /// ```
11342    /// # tokio_test::block_on(async {
11343    /// # use google_cloud_dataplex_v1::*;
11344    /// # use builder::data_scan_service::ClientBuilder;
11345    /// # use client::DataScanService;
11346    /// let builder : ClientBuilder = DataScanService::builder();
11347    /// let client = builder
11348    ///     .with_endpoint("https://dataplex.googleapis.com")
11349    ///     .build().await?;
11350    /// # gax::client_builder::Result::<()>::Ok(()) });
11351    /// ```
11352    pub type ClientBuilder =
11353        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
11354
11355    pub(crate) mod client {
11356        use super::super::super::client::DataScanService;
11357        pub struct Factory;
11358        impl gax::client_builder::internal::ClientFactory for Factory {
11359            type Client = DataScanService;
11360            type Credentials = gaxi::options::Credentials;
11361            async fn build(
11362                self,
11363                config: gaxi::options::ClientConfig,
11364            ) -> gax::client_builder::Result<Self::Client> {
11365                Self::Client::new(config).await
11366            }
11367        }
11368    }
11369
11370    /// Common implementation for [crate::client::DataScanService] request builders.
11371    #[derive(Clone, Debug)]
11372    pub(crate) struct RequestBuilder<R: std::default::Default> {
11373        stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
11374        request: R,
11375        options: gax::options::RequestOptions,
11376    }
11377
11378    impl<R> RequestBuilder<R>
11379    where
11380        R: std::default::Default,
11381    {
11382        pub(crate) fn new(
11383            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
11384        ) -> Self {
11385            Self {
11386                stub,
11387                request: R::default(),
11388                options: gax::options::RequestOptions::default(),
11389            }
11390        }
11391    }
11392
11393    /// The request builder for [DataScanService::create_data_scan][crate::client::DataScanService::create_data_scan] calls.
11394    ///
11395    /// # Example
11396    /// ```no_run
11397    /// # use google_cloud_dataplex_v1::builder;
11398    /// use builder::data_scan_service::CreateDataScan;
11399    /// # tokio_test::block_on(async {
11400    /// use lro::Poller;
11401    ///
11402    /// let builder = prepare_request_builder();
11403    /// let response = builder.poller().until_done().await?;
11404    /// # gax::Result::<()>::Ok(()) });
11405    ///
11406    /// fn prepare_request_builder() -> CreateDataScan {
11407    ///   # panic!();
11408    ///   // ... details omitted ...
11409    /// }
11410    /// ```
11411    #[derive(Clone, Debug)]
11412    pub struct CreateDataScan(RequestBuilder<crate::model::CreateDataScanRequest>);
11413
11414    impl CreateDataScan {
11415        pub(crate) fn new(
11416            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
11417        ) -> Self {
11418            Self(RequestBuilder::new(stub))
11419        }
11420
11421        /// Sets the full request, replacing any prior values.
11422        pub fn with_request<V: Into<crate::model::CreateDataScanRequest>>(mut self, v: V) -> Self {
11423            self.0.request = v.into();
11424            self
11425        }
11426
11427        /// Sets all the options, replacing any prior values.
11428        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
11429            self.0.options = v.into();
11430            self
11431        }
11432
11433        /// Sends the request.
11434        ///
11435        /// # Long running operations
11436        ///
11437        /// This starts, but does not poll, a longrunning operation. More information
11438        /// on [create_data_scan][crate::client::DataScanService::create_data_scan].
11439        pub async fn send(self) -> Result<longrunning::model::Operation> {
11440            (*self.0.stub)
11441                .create_data_scan(self.0.request, self.0.options)
11442                .await
11443                .map(gax::response::Response::into_body)
11444        }
11445
11446        /// Creates a [Poller][lro::Poller] to work with `create_data_scan`.
11447        pub fn poller(
11448            self,
11449        ) -> impl lro::Poller<crate::model::DataScan, crate::model::OperationMetadata> {
11450            type Operation =
11451                lro::internal::Operation<crate::model::DataScan, crate::model::OperationMetadata>;
11452            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
11453            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
11454
11455            let stub = self.0.stub.clone();
11456            let mut options = self.0.options.clone();
11457            options.set_retry_policy(gax::retry_policy::NeverRetry);
11458            let query = move |name| {
11459                let stub = stub.clone();
11460                let options = options.clone();
11461                async {
11462                    let op = GetOperation::new(stub)
11463                        .set_name(name)
11464                        .with_options(options)
11465                        .send()
11466                        .await?;
11467                    Ok(Operation::new(op))
11468                }
11469            };
11470
11471            let start = move || async {
11472                let op = self.send().await?;
11473                Ok(Operation::new(op))
11474            };
11475
11476            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
11477        }
11478
11479        /// Sets the value of [parent][crate::model::CreateDataScanRequest::parent].
11480        ///
11481        /// This is a **required** field for requests.
11482        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
11483            self.0.request.parent = v.into();
11484            self
11485        }
11486
11487        /// Sets the value of [data_scan][crate::model::CreateDataScanRequest::data_scan].
11488        ///
11489        /// This is a **required** field for requests.
11490        pub fn set_data_scan<T>(mut self, v: T) -> Self
11491        where
11492            T: std::convert::Into<crate::model::DataScan>,
11493        {
11494            self.0.request.data_scan = std::option::Option::Some(v.into());
11495            self
11496        }
11497
11498        /// Sets or clears the value of [data_scan][crate::model::CreateDataScanRequest::data_scan].
11499        ///
11500        /// This is a **required** field for requests.
11501        pub fn set_or_clear_data_scan<T>(mut self, v: std::option::Option<T>) -> Self
11502        where
11503            T: std::convert::Into<crate::model::DataScan>,
11504        {
11505            self.0.request.data_scan = v.map(|x| x.into());
11506            self
11507        }
11508
11509        /// Sets the value of [data_scan_id][crate::model::CreateDataScanRequest::data_scan_id].
11510        ///
11511        /// This is a **required** field for requests.
11512        pub fn set_data_scan_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
11513            self.0.request.data_scan_id = v.into();
11514            self
11515        }
11516
11517        /// Sets the value of [validate_only][crate::model::CreateDataScanRequest::validate_only].
11518        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
11519            self.0.request.validate_only = v.into();
11520            self
11521        }
11522    }
11523
11524    #[doc(hidden)]
11525    impl gax::options::internal::RequestBuilder for CreateDataScan {
11526        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
11527            &mut self.0.options
11528        }
11529    }
11530
11531    /// The request builder for [DataScanService::update_data_scan][crate::client::DataScanService::update_data_scan] calls.
11532    ///
11533    /// # Example
11534    /// ```no_run
11535    /// # use google_cloud_dataplex_v1::builder;
11536    /// use builder::data_scan_service::UpdateDataScan;
11537    /// # tokio_test::block_on(async {
11538    /// use lro::Poller;
11539    ///
11540    /// let builder = prepare_request_builder();
11541    /// let response = builder.poller().until_done().await?;
11542    /// # gax::Result::<()>::Ok(()) });
11543    ///
11544    /// fn prepare_request_builder() -> UpdateDataScan {
11545    ///   # panic!();
11546    ///   // ... details omitted ...
11547    /// }
11548    /// ```
11549    #[derive(Clone, Debug)]
11550    pub struct UpdateDataScan(RequestBuilder<crate::model::UpdateDataScanRequest>);
11551
11552    impl UpdateDataScan {
11553        pub(crate) fn new(
11554            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
11555        ) -> Self {
11556            Self(RequestBuilder::new(stub))
11557        }
11558
11559        /// Sets the full request, replacing any prior values.
11560        pub fn with_request<V: Into<crate::model::UpdateDataScanRequest>>(mut self, v: V) -> Self {
11561            self.0.request = v.into();
11562            self
11563        }
11564
11565        /// Sets all the options, replacing any prior values.
11566        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
11567            self.0.options = v.into();
11568            self
11569        }
11570
11571        /// Sends the request.
11572        ///
11573        /// # Long running operations
11574        ///
11575        /// This starts, but does not poll, a longrunning operation. More information
11576        /// on [update_data_scan][crate::client::DataScanService::update_data_scan].
11577        pub async fn send(self) -> Result<longrunning::model::Operation> {
11578            (*self.0.stub)
11579                .update_data_scan(self.0.request, self.0.options)
11580                .await
11581                .map(gax::response::Response::into_body)
11582        }
11583
11584        /// Creates a [Poller][lro::Poller] to work with `update_data_scan`.
11585        pub fn poller(
11586            self,
11587        ) -> impl lro::Poller<crate::model::DataScan, crate::model::OperationMetadata> {
11588            type Operation =
11589                lro::internal::Operation<crate::model::DataScan, crate::model::OperationMetadata>;
11590            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
11591            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
11592
11593            let stub = self.0.stub.clone();
11594            let mut options = self.0.options.clone();
11595            options.set_retry_policy(gax::retry_policy::NeverRetry);
11596            let query = move |name| {
11597                let stub = stub.clone();
11598                let options = options.clone();
11599                async {
11600                    let op = GetOperation::new(stub)
11601                        .set_name(name)
11602                        .with_options(options)
11603                        .send()
11604                        .await?;
11605                    Ok(Operation::new(op))
11606                }
11607            };
11608
11609            let start = move || async {
11610                let op = self.send().await?;
11611                Ok(Operation::new(op))
11612            };
11613
11614            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
11615        }
11616
11617        /// Sets the value of [data_scan][crate::model::UpdateDataScanRequest::data_scan].
11618        ///
11619        /// This is a **required** field for requests.
11620        pub fn set_data_scan<T>(mut self, v: T) -> Self
11621        where
11622            T: std::convert::Into<crate::model::DataScan>,
11623        {
11624            self.0.request.data_scan = std::option::Option::Some(v.into());
11625            self
11626        }
11627
11628        /// Sets or clears the value of [data_scan][crate::model::UpdateDataScanRequest::data_scan].
11629        ///
11630        /// This is a **required** field for requests.
11631        pub fn set_or_clear_data_scan<T>(mut self, v: std::option::Option<T>) -> Self
11632        where
11633            T: std::convert::Into<crate::model::DataScan>,
11634        {
11635            self.0.request.data_scan = v.map(|x| x.into());
11636            self
11637        }
11638
11639        /// Sets the value of [update_mask][crate::model::UpdateDataScanRequest::update_mask].
11640        pub fn set_update_mask<T>(mut self, v: T) -> Self
11641        where
11642            T: std::convert::Into<wkt::FieldMask>,
11643        {
11644            self.0.request.update_mask = std::option::Option::Some(v.into());
11645            self
11646        }
11647
11648        /// Sets or clears the value of [update_mask][crate::model::UpdateDataScanRequest::update_mask].
11649        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
11650        where
11651            T: std::convert::Into<wkt::FieldMask>,
11652        {
11653            self.0.request.update_mask = v.map(|x| x.into());
11654            self
11655        }
11656
11657        /// Sets the value of [validate_only][crate::model::UpdateDataScanRequest::validate_only].
11658        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
11659            self.0.request.validate_only = v.into();
11660            self
11661        }
11662    }
11663
11664    #[doc(hidden)]
11665    impl gax::options::internal::RequestBuilder for UpdateDataScan {
11666        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
11667            &mut self.0.options
11668        }
11669    }
11670
11671    /// The request builder for [DataScanService::delete_data_scan][crate::client::DataScanService::delete_data_scan] calls.
11672    ///
11673    /// # Example
11674    /// ```no_run
11675    /// # use google_cloud_dataplex_v1::builder;
11676    /// use builder::data_scan_service::DeleteDataScan;
11677    /// # tokio_test::block_on(async {
11678    /// use lro::Poller;
11679    ///
11680    /// let builder = prepare_request_builder();
11681    /// let response = builder.poller().until_done().await?;
11682    /// # gax::Result::<()>::Ok(()) });
11683    ///
11684    /// fn prepare_request_builder() -> DeleteDataScan {
11685    ///   # panic!();
11686    ///   // ... details omitted ...
11687    /// }
11688    /// ```
11689    #[derive(Clone, Debug)]
11690    pub struct DeleteDataScan(RequestBuilder<crate::model::DeleteDataScanRequest>);
11691
11692    impl DeleteDataScan {
11693        pub(crate) fn new(
11694            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
11695        ) -> Self {
11696            Self(RequestBuilder::new(stub))
11697        }
11698
11699        /// Sets the full request, replacing any prior values.
11700        pub fn with_request<V: Into<crate::model::DeleteDataScanRequest>>(mut self, v: V) -> Self {
11701            self.0.request = v.into();
11702            self
11703        }
11704
11705        /// Sets all the options, replacing any prior values.
11706        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
11707            self.0.options = v.into();
11708            self
11709        }
11710
11711        /// Sends the request.
11712        ///
11713        /// # Long running operations
11714        ///
11715        /// This starts, but does not poll, a longrunning operation. More information
11716        /// on [delete_data_scan][crate::client::DataScanService::delete_data_scan].
11717        pub async fn send(self) -> Result<longrunning::model::Operation> {
11718            (*self.0.stub)
11719                .delete_data_scan(self.0.request, self.0.options)
11720                .await
11721                .map(gax::response::Response::into_body)
11722        }
11723
11724        /// Creates a [Poller][lro::Poller] to work with `delete_data_scan`.
11725        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
11726            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
11727            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
11728            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
11729
11730            let stub = self.0.stub.clone();
11731            let mut options = self.0.options.clone();
11732            options.set_retry_policy(gax::retry_policy::NeverRetry);
11733            let query = move |name| {
11734                let stub = stub.clone();
11735                let options = options.clone();
11736                async {
11737                    let op = GetOperation::new(stub)
11738                        .set_name(name)
11739                        .with_options(options)
11740                        .send()
11741                        .await?;
11742                    Ok(Operation::new(op))
11743                }
11744            };
11745
11746            let start = move || async {
11747                let op = self.send().await?;
11748                Ok(Operation::new(op))
11749            };
11750
11751            lro::internal::new_unit_response_poller(
11752                polling_error_policy,
11753                polling_backoff_policy,
11754                start,
11755                query,
11756            )
11757        }
11758
11759        /// Sets the value of [name][crate::model::DeleteDataScanRequest::name].
11760        ///
11761        /// This is a **required** field for requests.
11762        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11763            self.0.request.name = v.into();
11764            self
11765        }
11766
11767        /// Sets the value of [force][crate::model::DeleteDataScanRequest::force].
11768        pub fn set_force<T: Into<bool>>(mut self, v: T) -> Self {
11769            self.0.request.force = v.into();
11770            self
11771        }
11772    }
11773
11774    #[doc(hidden)]
11775    impl gax::options::internal::RequestBuilder for DeleteDataScan {
11776        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
11777            &mut self.0.options
11778        }
11779    }
11780
11781    /// The request builder for [DataScanService::get_data_scan][crate::client::DataScanService::get_data_scan] calls.
11782    ///
11783    /// # Example
11784    /// ```no_run
11785    /// # use google_cloud_dataplex_v1::builder;
11786    /// use builder::data_scan_service::GetDataScan;
11787    /// # tokio_test::block_on(async {
11788    ///
11789    /// let builder = prepare_request_builder();
11790    /// let response = builder.send().await?;
11791    /// # gax::Result::<()>::Ok(()) });
11792    ///
11793    /// fn prepare_request_builder() -> GetDataScan {
11794    ///   # panic!();
11795    ///   // ... details omitted ...
11796    /// }
11797    /// ```
11798    #[derive(Clone, Debug)]
11799    pub struct GetDataScan(RequestBuilder<crate::model::GetDataScanRequest>);
11800
11801    impl GetDataScan {
11802        pub(crate) fn new(
11803            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
11804        ) -> Self {
11805            Self(RequestBuilder::new(stub))
11806        }
11807
11808        /// Sets the full request, replacing any prior values.
11809        pub fn with_request<V: Into<crate::model::GetDataScanRequest>>(mut self, v: V) -> Self {
11810            self.0.request = v.into();
11811            self
11812        }
11813
11814        /// Sets all the options, replacing any prior values.
11815        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
11816            self.0.options = v.into();
11817            self
11818        }
11819
11820        /// Sends the request.
11821        pub async fn send(self) -> Result<crate::model::DataScan> {
11822            (*self.0.stub)
11823                .get_data_scan(self.0.request, self.0.options)
11824                .await
11825                .map(gax::response::Response::into_body)
11826        }
11827
11828        /// Sets the value of [name][crate::model::GetDataScanRequest::name].
11829        ///
11830        /// This is a **required** field for requests.
11831        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
11832            self.0.request.name = v.into();
11833            self
11834        }
11835
11836        /// Sets the value of [view][crate::model::GetDataScanRequest::view].
11837        pub fn set_view<T: Into<crate::model::get_data_scan_request::DataScanView>>(
11838            mut self,
11839            v: T,
11840        ) -> Self {
11841            self.0.request.view = v.into();
11842            self
11843        }
11844    }
11845
11846    #[doc(hidden)]
11847    impl gax::options::internal::RequestBuilder for GetDataScan {
11848        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
11849            &mut self.0.options
11850        }
11851    }
11852
11853    /// The request builder for [DataScanService::list_data_scans][crate::client::DataScanService::list_data_scans] calls.
11854    ///
11855    /// # Example
11856    /// ```no_run
11857    /// # use google_cloud_dataplex_v1::builder;
11858    /// use builder::data_scan_service::ListDataScans;
11859    /// # tokio_test::block_on(async {
11860    /// use gax::paginator::ItemPaginator;
11861    ///
11862    /// let builder = prepare_request_builder();
11863    /// let mut items = builder.by_item();
11864    /// while let Some(result) = items.next().await {
11865    ///   let item = result?;
11866    /// }
11867    /// # gax::Result::<()>::Ok(()) });
11868    ///
11869    /// fn prepare_request_builder() -> ListDataScans {
11870    ///   # panic!();
11871    ///   // ... details omitted ...
11872    /// }
11873    /// ```
11874    #[derive(Clone, Debug)]
11875    pub struct ListDataScans(RequestBuilder<crate::model::ListDataScansRequest>);
11876
11877    impl ListDataScans {
11878        pub(crate) fn new(
11879            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
11880        ) -> Self {
11881            Self(RequestBuilder::new(stub))
11882        }
11883
11884        /// Sets the full request, replacing any prior values.
11885        pub fn with_request<V: Into<crate::model::ListDataScansRequest>>(mut self, v: V) -> Self {
11886            self.0.request = v.into();
11887            self
11888        }
11889
11890        /// Sets all the options, replacing any prior values.
11891        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
11892            self.0.options = v.into();
11893            self
11894        }
11895
11896        /// Sends the request.
11897        pub async fn send(self) -> Result<crate::model::ListDataScansResponse> {
11898            (*self.0.stub)
11899                .list_data_scans(self.0.request, self.0.options)
11900                .await
11901                .map(gax::response::Response::into_body)
11902        }
11903
11904        /// Streams each page in the collection.
11905        pub fn by_page(
11906            self,
11907        ) -> impl gax::paginator::Paginator<crate::model::ListDataScansResponse, gax::error::Error>
11908        {
11909            use std::clone::Clone;
11910            let token = self.0.request.page_token.clone();
11911            let execute = move |token: String| {
11912                let mut builder = self.clone();
11913                builder.0.request = builder.0.request.set_page_token(token);
11914                builder.send()
11915            };
11916            gax::paginator::internal::new_paginator(token, execute)
11917        }
11918
11919        /// Streams each item in the collection.
11920        pub fn by_item(
11921            self,
11922        ) -> impl gax::paginator::ItemPaginator<crate::model::ListDataScansResponse, gax::error::Error>
11923        {
11924            use gax::paginator::Paginator;
11925            self.by_page().items()
11926        }
11927
11928        /// Sets the value of [parent][crate::model::ListDataScansRequest::parent].
11929        ///
11930        /// This is a **required** field for requests.
11931        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
11932            self.0.request.parent = v.into();
11933            self
11934        }
11935
11936        /// Sets the value of [page_size][crate::model::ListDataScansRequest::page_size].
11937        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
11938            self.0.request.page_size = v.into();
11939            self
11940        }
11941
11942        /// Sets the value of [page_token][crate::model::ListDataScansRequest::page_token].
11943        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
11944            self.0.request.page_token = v.into();
11945            self
11946        }
11947
11948        /// Sets the value of [filter][crate::model::ListDataScansRequest::filter].
11949        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
11950            self.0.request.filter = v.into();
11951            self
11952        }
11953
11954        /// Sets the value of [order_by][crate::model::ListDataScansRequest::order_by].
11955        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
11956            self.0.request.order_by = v.into();
11957            self
11958        }
11959    }
11960
11961    #[doc(hidden)]
11962    impl gax::options::internal::RequestBuilder for ListDataScans {
11963        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
11964            &mut self.0.options
11965        }
11966    }
11967
11968    /// The request builder for [DataScanService::run_data_scan][crate::client::DataScanService::run_data_scan] calls.
11969    ///
11970    /// # Example
11971    /// ```no_run
11972    /// # use google_cloud_dataplex_v1::builder;
11973    /// use builder::data_scan_service::RunDataScan;
11974    /// # tokio_test::block_on(async {
11975    ///
11976    /// let builder = prepare_request_builder();
11977    /// let response = builder.send().await?;
11978    /// # gax::Result::<()>::Ok(()) });
11979    ///
11980    /// fn prepare_request_builder() -> RunDataScan {
11981    ///   # panic!();
11982    ///   // ... details omitted ...
11983    /// }
11984    /// ```
11985    #[derive(Clone, Debug)]
11986    pub struct RunDataScan(RequestBuilder<crate::model::RunDataScanRequest>);
11987
11988    impl RunDataScan {
11989        pub(crate) fn new(
11990            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
11991        ) -> Self {
11992            Self(RequestBuilder::new(stub))
11993        }
11994
11995        /// Sets the full request, replacing any prior values.
11996        pub fn with_request<V: Into<crate::model::RunDataScanRequest>>(mut self, v: V) -> Self {
11997            self.0.request = v.into();
11998            self
11999        }
12000
12001        /// Sets all the options, replacing any prior values.
12002        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
12003            self.0.options = v.into();
12004            self
12005        }
12006
12007        /// Sends the request.
12008        pub async fn send(self) -> Result<crate::model::RunDataScanResponse> {
12009            (*self.0.stub)
12010                .run_data_scan(self.0.request, self.0.options)
12011                .await
12012                .map(gax::response::Response::into_body)
12013        }
12014
12015        /// Sets the value of [name][crate::model::RunDataScanRequest::name].
12016        ///
12017        /// This is a **required** field for requests.
12018        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12019            self.0.request.name = v.into();
12020            self
12021        }
12022    }
12023
12024    #[doc(hidden)]
12025    impl gax::options::internal::RequestBuilder for RunDataScan {
12026        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
12027            &mut self.0.options
12028        }
12029    }
12030
12031    /// The request builder for [DataScanService::get_data_scan_job][crate::client::DataScanService::get_data_scan_job] calls.
12032    ///
12033    /// # Example
12034    /// ```no_run
12035    /// # use google_cloud_dataplex_v1::builder;
12036    /// use builder::data_scan_service::GetDataScanJob;
12037    /// # tokio_test::block_on(async {
12038    ///
12039    /// let builder = prepare_request_builder();
12040    /// let response = builder.send().await?;
12041    /// # gax::Result::<()>::Ok(()) });
12042    ///
12043    /// fn prepare_request_builder() -> GetDataScanJob {
12044    ///   # panic!();
12045    ///   // ... details omitted ...
12046    /// }
12047    /// ```
12048    #[derive(Clone, Debug)]
12049    pub struct GetDataScanJob(RequestBuilder<crate::model::GetDataScanJobRequest>);
12050
12051    impl GetDataScanJob {
12052        pub(crate) fn new(
12053            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12054        ) -> Self {
12055            Self(RequestBuilder::new(stub))
12056        }
12057
12058        /// Sets the full request, replacing any prior values.
12059        pub fn with_request<V: Into<crate::model::GetDataScanJobRequest>>(mut self, v: V) -> Self {
12060            self.0.request = v.into();
12061            self
12062        }
12063
12064        /// Sets all the options, replacing any prior values.
12065        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
12066            self.0.options = v.into();
12067            self
12068        }
12069
12070        /// Sends the request.
12071        pub async fn send(self) -> Result<crate::model::DataScanJob> {
12072            (*self.0.stub)
12073                .get_data_scan_job(self.0.request, self.0.options)
12074                .await
12075                .map(gax::response::Response::into_body)
12076        }
12077
12078        /// Sets the value of [name][crate::model::GetDataScanJobRequest::name].
12079        ///
12080        /// This is a **required** field for requests.
12081        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12082            self.0.request.name = v.into();
12083            self
12084        }
12085
12086        /// Sets the value of [view][crate::model::GetDataScanJobRequest::view].
12087        pub fn set_view<T: Into<crate::model::get_data_scan_job_request::DataScanJobView>>(
12088            mut self,
12089            v: T,
12090        ) -> Self {
12091            self.0.request.view = v.into();
12092            self
12093        }
12094    }
12095
12096    #[doc(hidden)]
12097    impl gax::options::internal::RequestBuilder for GetDataScanJob {
12098        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
12099            &mut self.0.options
12100        }
12101    }
12102
12103    /// The request builder for [DataScanService::list_data_scan_jobs][crate::client::DataScanService::list_data_scan_jobs] calls.
12104    ///
12105    /// # Example
12106    /// ```no_run
12107    /// # use google_cloud_dataplex_v1::builder;
12108    /// use builder::data_scan_service::ListDataScanJobs;
12109    /// # tokio_test::block_on(async {
12110    /// use gax::paginator::ItemPaginator;
12111    ///
12112    /// let builder = prepare_request_builder();
12113    /// let mut items = builder.by_item();
12114    /// while let Some(result) = items.next().await {
12115    ///   let item = result?;
12116    /// }
12117    /// # gax::Result::<()>::Ok(()) });
12118    ///
12119    /// fn prepare_request_builder() -> ListDataScanJobs {
12120    ///   # panic!();
12121    ///   // ... details omitted ...
12122    /// }
12123    /// ```
12124    #[derive(Clone, Debug)]
12125    pub struct ListDataScanJobs(RequestBuilder<crate::model::ListDataScanJobsRequest>);
12126
12127    impl ListDataScanJobs {
12128        pub(crate) fn new(
12129            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12130        ) -> Self {
12131            Self(RequestBuilder::new(stub))
12132        }
12133
12134        /// Sets the full request, replacing any prior values.
12135        pub fn with_request<V: Into<crate::model::ListDataScanJobsRequest>>(
12136            mut self,
12137            v: V,
12138        ) -> Self {
12139            self.0.request = v.into();
12140            self
12141        }
12142
12143        /// Sets all the options, replacing any prior values.
12144        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
12145            self.0.options = v.into();
12146            self
12147        }
12148
12149        /// Sends the request.
12150        pub async fn send(self) -> Result<crate::model::ListDataScanJobsResponse> {
12151            (*self.0.stub)
12152                .list_data_scan_jobs(self.0.request, self.0.options)
12153                .await
12154                .map(gax::response::Response::into_body)
12155        }
12156
12157        /// Streams each page in the collection.
12158        pub fn by_page(
12159            self,
12160        ) -> impl gax::paginator::Paginator<crate::model::ListDataScanJobsResponse, gax::error::Error>
12161        {
12162            use std::clone::Clone;
12163            let token = self.0.request.page_token.clone();
12164            let execute = move |token: String| {
12165                let mut builder = self.clone();
12166                builder.0.request = builder.0.request.set_page_token(token);
12167                builder.send()
12168            };
12169            gax::paginator::internal::new_paginator(token, execute)
12170        }
12171
12172        /// Streams each item in the collection.
12173        pub fn by_item(
12174            self,
12175        ) -> impl gax::paginator::ItemPaginator<crate::model::ListDataScanJobsResponse, gax::error::Error>
12176        {
12177            use gax::paginator::Paginator;
12178            self.by_page().items()
12179        }
12180
12181        /// Sets the value of [parent][crate::model::ListDataScanJobsRequest::parent].
12182        ///
12183        /// This is a **required** field for requests.
12184        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
12185            self.0.request.parent = v.into();
12186            self
12187        }
12188
12189        /// Sets the value of [page_size][crate::model::ListDataScanJobsRequest::page_size].
12190        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
12191            self.0.request.page_size = v.into();
12192            self
12193        }
12194
12195        /// Sets the value of [page_token][crate::model::ListDataScanJobsRequest::page_token].
12196        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
12197            self.0.request.page_token = v.into();
12198            self
12199        }
12200
12201        /// Sets the value of [filter][crate::model::ListDataScanJobsRequest::filter].
12202        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
12203            self.0.request.filter = v.into();
12204            self
12205        }
12206    }
12207
12208    #[doc(hidden)]
12209    impl gax::options::internal::RequestBuilder for ListDataScanJobs {
12210        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
12211            &mut self.0.options
12212        }
12213    }
12214
12215    /// The request builder for [DataScanService::generate_data_quality_rules][crate::client::DataScanService::generate_data_quality_rules] calls.
12216    ///
12217    /// # Example
12218    /// ```no_run
12219    /// # use google_cloud_dataplex_v1::builder;
12220    /// use builder::data_scan_service::GenerateDataQualityRules;
12221    /// # tokio_test::block_on(async {
12222    ///
12223    /// let builder = prepare_request_builder();
12224    /// let response = builder.send().await?;
12225    /// # gax::Result::<()>::Ok(()) });
12226    ///
12227    /// fn prepare_request_builder() -> GenerateDataQualityRules {
12228    ///   # panic!();
12229    ///   // ... details omitted ...
12230    /// }
12231    /// ```
12232    #[derive(Clone, Debug)]
12233    pub struct GenerateDataQualityRules(
12234        RequestBuilder<crate::model::GenerateDataQualityRulesRequest>,
12235    );
12236
12237    impl GenerateDataQualityRules {
12238        pub(crate) fn new(
12239            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12240        ) -> Self {
12241            Self(RequestBuilder::new(stub))
12242        }
12243
12244        /// Sets the full request, replacing any prior values.
12245        pub fn with_request<V: Into<crate::model::GenerateDataQualityRulesRequest>>(
12246            mut self,
12247            v: V,
12248        ) -> Self {
12249            self.0.request = v.into();
12250            self
12251        }
12252
12253        /// Sets all the options, replacing any prior values.
12254        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
12255            self.0.options = v.into();
12256            self
12257        }
12258
12259        /// Sends the request.
12260        pub async fn send(self) -> Result<crate::model::GenerateDataQualityRulesResponse> {
12261            (*self.0.stub)
12262                .generate_data_quality_rules(self.0.request, self.0.options)
12263                .await
12264                .map(gax::response::Response::into_body)
12265        }
12266
12267        /// Sets the value of [name][crate::model::GenerateDataQualityRulesRequest::name].
12268        ///
12269        /// This is a **required** field for requests.
12270        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12271            self.0.request.name = v.into();
12272            self
12273        }
12274    }
12275
12276    #[doc(hidden)]
12277    impl gax::options::internal::RequestBuilder for GenerateDataQualityRules {
12278        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
12279            &mut self.0.options
12280        }
12281    }
12282
12283    /// The request builder for [DataScanService::list_locations][crate::client::DataScanService::list_locations] calls.
12284    ///
12285    /// # Example
12286    /// ```no_run
12287    /// # use google_cloud_dataplex_v1::builder;
12288    /// use builder::data_scan_service::ListLocations;
12289    /// # tokio_test::block_on(async {
12290    /// use gax::paginator::ItemPaginator;
12291    ///
12292    /// let builder = prepare_request_builder();
12293    /// let mut items = builder.by_item();
12294    /// while let Some(result) = items.next().await {
12295    ///   let item = result?;
12296    /// }
12297    /// # gax::Result::<()>::Ok(()) });
12298    ///
12299    /// fn prepare_request_builder() -> ListLocations {
12300    ///   # panic!();
12301    ///   // ... details omitted ...
12302    /// }
12303    /// ```
12304    #[derive(Clone, Debug)]
12305    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
12306
12307    impl ListLocations {
12308        pub(crate) fn new(
12309            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12310        ) -> Self {
12311            Self(RequestBuilder::new(stub))
12312        }
12313
12314        /// Sets the full request, replacing any prior values.
12315        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
12316            mut self,
12317            v: V,
12318        ) -> Self {
12319            self.0.request = v.into();
12320            self
12321        }
12322
12323        /// Sets all the options, replacing any prior values.
12324        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
12325            self.0.options = v.into();
12326            self
12327        }
12328
12329        /// Sends the request.
12330        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
12331            (*self.0.stub)
12332                .list_locations(self.0.request, self.0.options)
12333                .await
12334                .map(gax::response::Response::into_body)
12335        }
12336
12337        /// Streams each page in the collection.
12338        pub fn by_page(
12339            self,
12340        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
12341        {
12342            use std::clone::Clone;
12343            let token = self.0.request.page_token.clone();
12344            let execute = move |token: String| {
12345                let mut builder = self.clone();
12346                builder.0.request = builder.0.request.set_page_token(token);
12347                builder.send()
12348            };
12349            gax::paginator::internal::new_paginator(token, execute)
12350        }
12351
12352        /// Streams each item in the collection.
12353        pub fn by_item(
12354            self,
12355        ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
12356        {
12357            use gax::paginator::Paginator;
12358            self.by_page().items()
12359        }
12360
12361        /// Sets the value of [name][location::model::ListLocationsRequest::name].
12362        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12363            self.0.request.name = v.into();
12364            self
12365        }
12366
12367        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
12368        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
12369            self.0.request.filter = v.into();
12370            self
12371        }
12372
12373        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
12374        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
12375            self.0.request.page_size = v.into();
12376            self
12377        }
12378
12379        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
12380        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
12381            self.0.request.page_token = v.into();
12382            self
12383        }
12384    }
12385
12386    #[doc(hidden)]
12387    impl gax::options::internal::RequestBuilder for ListLocations {
12388        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
12389            &mut self.0.options
12390        }
12391    }
12392
12393    /// The request builder for [DataScanService::get_location][crate::client::DataScanService::get_location] calls.
12394    ///
12395    /// # Example
12396    /// ```no_run
12397    /// # use google_cloud_dataplex_v1::builder;
12398    /// use builder::data_scan_service::GetLocation;
12399    /// # tokio_test::block_on(async {
12400    ///
12401    /// let builder = prepare_request_builder();
12402    /// let response = builder.send().await?;
12403    /// # gax::Result::<()>::Ok(()) });
12404    ///
12405    /// fn prepare_request_builder() -> GetLocation {
12406    ///   # panic!();
12407    ///   // ... details omitted ...
12408    /// }
12409    /// ```
12410    #[derive(Clone, Debug)]
12411    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
12412
12413    impl GetLocation {
12414        pub(crate) fn new(
12415            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12416        ) -> Self {
12417            Self(RequestBuilder::new(stub))
12418        }
12419
12420        /// Sets the full request, replacing any prior values.
12421        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
12422            self.0.request = v.into();
12423            self
12424        }
12425
12426        /// Sets all the options, replacing any prior values.
12427        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
12428            self.0.options = v.into();
12429            self
12430        }
12431
12432        /// Sends the request.
12433        pub async fn send(self) -> Result<location::model::Location> {
12434            (*self.0.stub)
12435                .get_location(self.0.request, self.0.options)
12436                .await
12437                .map(gax::response::Response::into_body)
12438        }
12439
12440        /// Sets the value of [name][location::model::GetLocationRequest::name].
12441        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12442            self.0.request.name = v.into();
12443            self
12444        }
12445    }
12446
12447    #[doc(hidden)]
12448    impl gax::options::internal::RequestBuilder for GetLocation {
12449        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
12450            &mut self.0.options
12451        }
12452    }
12453
12454    /// The request builder for [DataScanService::set_iam_policy][crate::client::DataScanService::set_iam_policy] calls.
12455    ///
12456    /// # Example
12457    /// ```no_run
12458    /// # use google_cloud_dataplex_v1::builder;
12459    /// use builder::data_scan_service::SetIamPolicy;
12460    /// # tokio_test::block_on(async {
12461    ///
12462    /// let builder = prepare_request_builder();
12463    /// let response = builder.send().await?;
12464    /// # gax::Result::<()>::Ok(()) });
12465    ///
12466    /// fn prepare_request_builder() -> SetIamPolicy {
12467    ///   # panic!();
12468    ///   // ... details omitted ...
12469    /// }
12470    /// ```
12471    #[derive(Clone, Debug)]
12472    pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
12473
12474    impl SetIamPolicy {
12475        pub(crate) fn new(
12476            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12477        ) -> Self {
12478            Self(RequestBuilder::new(stub))
12479        }
12480
12481        /// Sets the full request, replacing any prior values.
12482        pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
12483            self.0.request = v.into();
12484            self
12485        }
12486
12487        /// Sets all the options, replacing any prior values.
12488        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
12489            self.0.options = v.into();
12490            self
12491        }
12492
12493        /// Sends the request.
12494        pub async fn send(self) -> Result<iam_v1::model::Policy> {
12495            (*self.0.stub)
12496                .set_iam_policy(self.0.request, self.0.options)
12497                .await
12498                .map(gax::response::Response::into_body)
12499        }
12500
12501        /// Sets the value of [resource][iam_v1::model::SetIamPolicyRequest::resource].
12502        ///
12503        /// This is a **required** field for requests.
12504        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
12505            self.0.request.resource = v.into();
12506            self
12507        }
12508
12509        /// Sets the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
12510        ///
12511        /// This is a **required** field for requests.
12512        pub fn set_policy<T>(mut self, v: T) -> Self
12513        where
12514            T: std::convert::Into<iam_v1::model::Policy>,
12515        {
12516            self.0.request.policy = std::option::Option::Some(v.into());
12517            self
12518        }
12519
12520        /// Sets or clears the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
12521        ///
12522        /// This is a **required** field for requests.
12523        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
12524        where
12525            T: std::convert::Into<iam_v1::model::Policy>,
12526        {
12527            self.0.request.policy = v.map(|x| x.into());
12528            self
12529        }
12530
12531        /// Sets the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
12532        pub fn set_update_mask<T>(mut self, v: T) -> Self
12533        where
12534            T: std::convert::Into<wkt::FieldMask>,
12535        {
12536            self.0.request.update_mask = std::option::Option::Some(v.into());
12537            self
12538        }
12539
12540        /// Sets or clears the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
12541        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
12542        where
12543            T: std::convert::Into<wkt::FieldMask>,
12544        {
12545            self.0.request.update_mask = v.map(|x| x.into());
12546            self
12547        }
12548    }
12549
12550    #[doc(hidden)]
12551    impl gax::options::internal::RequestBuilder for SetIamPolicy {
12552        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
12553            &mut self.0.options
12554        }
12555    }
12556
12557    /// The request builder for [DataScanService::get_iam_policy][crate::client::DataScanService::get_iam_policy] calls.
12558    ///
12559    /// # Example
12560    /// ```no_run
12561    /// # use google_cloud_dataplex_v1::builder;
12562    /// use builder::data_scan_service::GetIamPolicy;
12563    /// # tokio_test::block_on(async {
12564    ///
12565    /// let builder = prepare_request_builder();
12566    /// let response = builder.send().await?;
12567    /// # gax::Result::<()>::Ok(()) });
12568    ///
12569    /// fn prepare_request_builder() -> GetIamPolicy {
12570    ///   # panic!();
12571    ///   // ... details omitted ...
12572    /// }
12573    /// ```
12574    #[derive(Clone, Debug)]
12575    pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
12576
12577    impl GetIamPolicy {
12578        pub(crate) fn new(
12579            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12580        ) -> Self {
12581            Self(RequestBuilder::new(stub))
12582        }
12583
12584        /// Sets the full request, replacing any prior values.
12585        pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
12586            self.0.request = v.into();
12587            self
12588        }
12589
12590        /// Sets all the options, replacing any prior values.
12591        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
12592            self.0.options = v.into();
12593            self
12594        }
12595
12596        /// Sends the request.
12597        pub async fn send(self) -> Result<iam_v1::model::Policy> {
12598            (*self.0.stub)
12599                .get_iam_policy(self.0.request, self.0.options)
12600                .await
12601                .map(gax::response::Response::into_body)
12602        }
12603
12604        /// Sets the value of [resource][iam_v1::model::GetIamPolicyRequest::resource].
12605        ///
12606        /// This is a **required** field for requests.
12607        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
12608            self.0.request.resource = v.into();
12609            self
12610        }
12611
12612        /// Sets the value of [options][iam_v1::model::GetIamPolicyRequest::options].
12613        pub fn set_options<T>(mut self, v: T) -> Self
12614        where
12615            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
12616        {
12617            self.0.request.options = std::option::Option::Some(v.into());
12618            self
12619        }
12620
12621        /// Sets or clears the value of [options][iam_v1::model::GetIamPolicyRequest::options].
12622        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
12623        where
12624            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
12625        {
12626            self.0.request.options = v.map(|x| x.into());
12627            self
12628        }
12629    }
12630
12631    #[doc(hidden)]
12632    impl gax::options::internal::RequestBuilder for GetIamPolicy {
12633        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
12634            &mut self.0.options
12635        }
12636    }
12637
12638    /// The request builder for [DataScanService::test_iam_permissions][crate::client::DataScanService::test_iam_permissions] calls.
12639    ///
12640    /// # Example
12641    /// ```no_run
12642    /// # use google_cloud_dataplex_v1::builder;
12643    /// use builder::data_scan_service::TestIamPermissions;
12644    /// # tokio_test::block_on(async {
12645    ///
12646    /// let builder = prepare_request_builder();
12647    /// let response = builder.send().await?;
12648    /// # gax::Result::<()>::Ok(()) });
12649    ///
12650    /// fn prepare_request_builder() -> TestIamPermissions {
12651    ///   # panic!();
12652    ///   // ... details omitted ...
12653    /// }
12654    /// ```
12655    #[derive(Clone, Debug)]
12656    pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
12657
12658    impl TestIamPermissions {
12659        pub(crate) fn new(
12660            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12661        ) -> Self {
12662            Self(RequestBuilder::new(stub))
12663        }
12664
12665        /// Sets the full request, replacing any prior values.
12666        pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
12667            mut self,
12668            v: V,
12669        ) -> Self {
12670            self.0.request = v.into();
12671            self
12672        }
12673
12674        /// Sets all the options, replacing any prior values.
12675        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
12676            self.0.options = v.into();
12677            self
12678        }
12679
12680        /// Sends the request.
12681        pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
12682            (*self.0.stub)
12683                .test_iam_permissions(self.0.request, self.0.options)
12684                .await
12685                .map(gax::response::Response::into_body)
12686        }
12687
12688        /// Sets the value of [resource][iam_v1::model::TestIamPermissionsRequest::resource].
12689        ///
12690        /// This is a **required** field for requests.
12691        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
12692            self.0.request.resource = v.into();
12693            self
12694        }
12695
12696        /// Sets the value of [permissions][iam_v1::model::TestIamPermissionsRequest::permissions].
12697        ///
12698        /// This is a **required** field for requests.
12699        pub fn set_permissions<T, V>(mut self, v: T) -> Self
12700        where
12701            T: std::iter::IntoIterator<Item = V>,
12702            V: std::convert::Into<std::string::String>,
12703        {
12704            use std::iter::Iterator;
12705            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
12706            self
12707        }
12708    }
12709
12710    #[doc(hidden)]
12711    impl gax::options::internal::RequestBuilder for TestIamPermissions {
12712        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
12713            &mut self.0.options
12714        }
12715    }
12716
12717    /// The request builder for [DataScanService::list_operations][crate::client::DataScanService::list_operations] calls.
12718    ///
12719    /// # Example
12720    /// ```no_run
12721    /// # use google_cloud_dataplex_v1::builder;
12722    /// use builder::data_scan_service::ListOperations;
12723    /// # tokio_test::block_on(async {
12724    /// use gax::paginator::ItemPaginator;
12725    ///
12726    /// let builder = prepare_request_builder();
12727    /// let mut items = builder.by_item();
12728    /// while let Some(result) = items.next().await {
12729    ///   let item = result?;
12730    /// }
12731    /// # gax::Result::<()>::Ok(()) });
12732    ///
12733    /// fn prepare_request_builder() -> ListOperations {
12734    ///   # panic!();
12735    ///   // ... details omitted ...
12736    /// }
12737    /// ```
12738    #[derive(Clone, Debug)]
12739    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
12740
12741    impl ListOperations {
12742        pub(crate) fn new(
12743            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12744        ) -> Self {
12745            Self(RequestBuilder::new(stub))
12746        }
12747
12748        /// Sets the full request, replacing any prior values.
12749        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
12750            mut self,
12751            v: V,
12752        ) -> Self {
12753            self.0.request = v.into();
12754            self
12755        }
12756
12757        /// Sets all the options, replacing any prior values.
12758        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
12759            self.0.options = v.into();
12760            self
12761        }
12762
12763        /// Sends the request.
12764        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
12765            (*self.0.stub)
12766                .list_operations(self.0.request, self.0.options)
12767                .await
12768                .map(gax::response::Response::into_body)
12769        }
12770
12771        /// Streams each page in the collection.
12772        pub fn by_page(
12773            self,
12774        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
12775        {
12776            use std::clone::Clone;
12777            let token = self.0.request.page_token.clone();
12778            let execute = move |token: String| {
12779                let mut builder = self.clone();
12780                builder.0.request = builder.0.request.set_page_token(token);
12781                builder.send()
12782            };
12783            gax::paginator::internal::new_paginator(token, execute)
12784        }
12785
12786        /// Streams each item in the collection.
12787        pub fn by_item(
12788            self,
12789        ) -> impl gax::paginator::ItemPaginator<
12790            longrunning::model::ListOperationsResponse,
12791            gax::error::Error,
12792        > {
12793            use gax::paginator::Paginator;
12794            self.by_page().items()
12795        }
12796
12797        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
12798        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12799            self.0.request.name = v.into();
12800            self
12801        }
12802
12803        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
12804        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
12805            self.0.request.filter = v.into();
12806            self
12807        }
12808
12809        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
12810        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
12811            self.0.request.page_size = v.into();
12812            self
12813        }
12814
12815        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
12816        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
12817            self.0.request.page_token = v.into();
12818            self
12819        }
12820
12821        /// Sets the value of [return_partial_success][longrunning::model::ListOperationsRequest::return_partial_success].
12822        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
12823            self.0.request.return_partial_success = v.into();
12824            self
12825        }
12826    }
12827
12828    #[doc(hidden)]
12829    impl gax::options::internal::RequestBuilder for ListOperations {
12830        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
12831            &mut self.0.options
12832        }
12833    }
12834
12835    /// The request builder for [DataScanService::get_operation][crate::client::DataScanService::get_operation] calls.
12836    ///
12837    /// # Example
12838    /// ```no_run
12839    /// # use google_cloud_dataplex_v1::builder;
12840    /// use builder::data_scan_service::GetOperation;
12841    /// # tokio_test::block_on(async {
12842    ///
12843    /// let builder = prepare_request_builder();
12844    /// let response = builder.send().await?;
12845    /// # gax::Result::<()>::Ok(()) });
12846    ///
12847    /// fn prepare_request_builder() -> GetOperation {
12848    ///   # panic!();
12849    ///   // ... details omitted ...
12850    /// }
12851    /// ```
12852    #[derive(Clone, Debug)]
12853    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
12854
12855    impl GetOperation {
12856        pub(crate) fn new(
12857            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12858        ) -> Self {
12859            Self(RequestBuilder::new(stub))
12860        }
12861
12862        /// Sets the full request, replacing any prior values.
12863        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
12864            mut self,
12865            v: V,
12866        ) -> Self {
12867            self.0.request = v.into();
12868            self
12869        }
12870
12871        /// Sets all the options, replacing any prior values.
12872        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
12873            self.0.options = v.into();
12874            self
12875        }
12876
12877        /// Sends the request.
12878        pub async fn send(self) -> Result<longrunning::model::Operation> {
12879            (*self.0.stub)
12880                .get_operation(self.0.request, self.0.options)
12881                .await
12882                .map(gax::response::Response::into_body)
12883        }
12884
12885        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
12886        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12887            self.0.request.name = v.into();
12888            self
12889        }
12890    }
12891
12892    #[doc(hidden)]
12893    impl gax::options::internal::RequestBuilder for GetOperation {
12894        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
12895            &mut self.0.options
12896        }
12897    }
12898
12899    /// The request builder for [DataScanService::delete_operation][crate::client::DataScanService::delete_operation] calls.
12900    ///
12901    /// # Example
12902    /// ```no_run
12903    /// # use google_cloud_dataplex_v1::builder;
12904    /// use builder::data_scan_service::DeleteOperation;
12905    /// # tokio_test::block_on(async {
12906    ///
12907    /// let builder = prepare_request_builder();
12908    /// let response = builder.send().await?;
12909    /// # gax::Result::<()>::Ok(()) });
12910    ///
12911    /// fn prepare_request_builder() -> DeleteOperation {
12912    ///   # panic!();
12913    ///   // ... details omitted ...
12914    /// }
12915    /// ```
12916    #[derive(Clone, Debug)]
12917    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
12918
12919    impl DeleteOperation {
12920        pub(crate) fn new(
12921            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12922        ) -> Self {
12923            Self(RequestBuilder::new(stub))
12924        }
12925
12926        /// Sets the full request, replacing any prior values.
12927        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
12928            mut self,
12929            v: V,
12930        ) -> Self {
12931            self.0.request = v.into();
12932            self
12933        }
12934
12935        /// Sets all the options, replacing any prior values.
12936        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
12937            self.0.options = v.into();
12938            self
12939        }
12940
12941        /// Sends the request.
12942        pub async fn send(self) -> Result<()> {
12943            (*self.0.stub)
12944                .delete_operation(self.0.request, self.0.options)
12945                .await
12946                .map(gax::response::Response::into_body)
12947        }
12948
12949        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
12950        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
12951            self.0.request.name = v.into();
12952            self
12953        }
12954    }
12955
12956    #[doc(hidden)]
12957    impl gax::options::internal::RequestBuilder for DeleteOperation {
12958        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
12959            &mut self.0.options
12960        }
12961    }
12962
12963    /// The request builder for [DataScanService::cancel_operation][crate::client::DataScanService::cancel_operation] calls.
12964    ///
12965    /// # Example
12966    /// ```no_run
12967    /// # use google_cloud_dataplex_v1::builder;
12968    /// use builder::data_scan_service::CancelOperation;
12969    /// # tokio_test::block_on(async {
12970    ///
12971    /// let builder = prepare_request_builder();
12972    /// let response = builder.send().await?;
12973    /// # gax::Result::<()>::Ok(()) });
12974    ///
12975    /// fn prepare_request_builder() -> CancelOperation {
12976    ///   # panic!();
12977    ///   // ... details omitted ...
12978    /// }
12979    /// ```
12980    #[derive(Clone, Debug)]
12981    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
12982
12983    impl CancelOperation {
12984        pub(crate) fn new(
12985            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataScanService>,
12986        ) -> Self {
12987            Self(RequestBuilder::new(stub))
12988        }
12989
12990        /// Sets the full request, replacing any prior values.
12991        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
12992            mut self,
12993            v: V,
12994        ) -> Self {
12995            self.0.request = v.into();
12996            self
12997        }
12998
12999        /// Sets all the options, replacing any prior values.
13000        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
13001            self.0.options = v.into();
13002            self
13003        }
13004
13005        /// Sends the request.
13006        pub async fn send(self) -> Result<()> {
13007            (*self.0.stub)
13008                .cancel_operation(self.0.request, self.0.options)
13009                .await
13010                .map(gax::response::Response::into_body)
13011        }
13012
13013        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
13014        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13015            self.0.request.name = v.into();
13016            self
13017        }
13018    }
13019
13020    #[doc(hidden)]
13021    impl gax::options::internal::RequestBuilder for CancelOperation {
13022        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
13023            &mut self.0.options
13024        }
13025    }
13026}
13027
13028pub mod metadata_service {
13029    use crate::Result;
13030
13031    /// A builder for [MetadataService][crate::client::MetadataService].
13032    ///
13033    /// ```
13034    /// # tokio_test::block_on(async {
13035    /// # use google_cloud_dataplex_v1::*;
13036    /// # use builder::metadata_service::ClientBuilder;
13037    /// # use client::MetadataService;
13038    /// let builder : ClientBuilder = MetadataService::builder();
13039    /// let client = builder
13040    ///     .with_endpoint("https://dataplex.googleapis.com")
13041    ///     .build().await?;
13042    /// # gax::client_builder::Result::<()>::Ok(()) });
13043    /// ```
13044    pub type ClientBuilder =
13045        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
13046
13047    pub(crate) mod client {
13048        use super::super::super::client::MetadataService;
13049        pub struct Factory;
13050        impl gax::client_builder::internal::ClientFactory for Factory {
13051            type Client = MetadataService;
13052            type Credentials = gaxi::options::Credentials;
13053            async fn build(
13054                self,
13055                config: gaxi::options::ClientConfig,
13056            ) -> gax::client_builder::Result<Self::Client> {
13057                Self::Client::new(config).await
13058            }
13059        }
13060    }
13061
13062    /// Common implementation for [crate::client::MetadataService] request builders.
13063    #[derive(Clone, Debug)]
13064    pub(crate) struct RequestBuilder<R: std::default::Default> {
13065        stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13066        request: R,
13067        options: gax::options::RequestOptions,
13068    }
13069
13070    impl<R> RequestBuilder<R>
13071    where
13072        R: std::default::Default,
13073    {
13074        pub(crate) fn new(
13075            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13076        ) -> Self {
13077            Self {
13078                stub,
13079                request: R::default(),
13080                options: gax::options::RequestOptions::default(),
13081            }
13082        }
13083    }
13084
13085    /// The request builder for [MetadataService::create_entity][crate::client::MetadataService::create_entity] calls.
13086    ///
13087    /// # Example
13088    /// ```no_run
13089    /// # use google_cloud_dataplex_v1::builder;
13090    /// use builder::metadata_service::CreateEntity;
13091    /// # tokio_test::block_on(async {
13092    ///
13093    /// let builder = prepare_request_builder();
13094    /// let response = builder.send().await?;
13095    /// # gax::Result::<()>::Ok(()) });
13096    ///
13097    /// fn prepare_request_builder() -> CreateEntity {
13098    ///   # panic!();
13099    ///   // ... details omitted ...
13100    /// }
13101    /// ```
13102    #[derive(Clone, Debug)]
13103    pub struct CreateEntity(RequestBuilder<crate::model::CreateEntityRequest>);
13104
13105    impl CreateEntity {
13106        pub(crate) fn new(
13107            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13108        ) -> Self {
13109            Self(RequestBuilder::new(stub))
13110        }
13111
13112        /// Sets the full request, replacing any prior values.
13113        pub fn with_request<V: Into<crate::model::CreateEntityRequest>>(mut self, v: V) -> Self {
13114            self.0.request = v.into();
13115            self
13116        }
13117
13118        /// Sets all the options, replacing any prior values.
13119        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
13120            self.0.options = v.into();
13121            self
13122        }
13123
13124        /// Sends the request.
13125        pub async fn send(self) -> Result<crate::model::Entity> {
13126            (*self.0.stub)
13127                .create_entity(self.0.request, self.0.options)
13128                .await
13129                .map(gax::response::Response::into_body)
13130        }
13131
13132        /// Sets the value of [parent][crate::model::CreateEntityRequest::parent].
13133        ///
13134        /// This is a **required** field for requests.
13135        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
13136            self.0.request.parent = v.into();
13137            self
13138        }
13139
13140        /// Sets the value of [entity][crate::model::CreateEntityRequest::entity].
13141        ///
13142        /// This is a **required** field for requests.
13143        pub fn set_entity<T>(mut self, v: T) -> Self
13144        where
13145            T: std::convert::Into<crate::model::Entity>,
13146        {
13147            self.0.request.entity = std::option::Option::Some(v.into());
13148            self
13149        }
13150
13151        /// Sets or clears the value of [entity][crate::model::CreateEntityRequest::entity].
13152        ///
13153        /// This is a **required** field for requests.
13154        pub fn set_or_clear_entity<T>(mut self, v: std::option::Option<T>) -> Self
13155        where
13156            T: std::convert::Into<crate::model::Entity>,
13157        {
13158            self.0.request.entity = v.map(|x| x.into());
13159            self
13160        }
13161
13162        /// Sets the value of [validate_only][crate::model::CreateEntityRequest::validate_only].
13163        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
13164            self.0.request.validate_only = v.into();
13165            self
13166        }
13167    }
13168
13169    #[doc(hidden)]
13170    impl gax::options::internal::RequestBuilder for CreateEntity {
13171        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
13172            &mut self.0.options
13173        }
13174    }
13175
13176    /// The request builder for [MetadataService::update_entity][crate::client::MetadataService::update_entity] calls.
13177    ///
13178    /// # Example
13179    /// ```no_run
13180    /// # use google_cloud_dataplex_v1::builder;
13181    /// use builder::metadata_service::UpdateEntity;
13182    /// # tokio_test::block_on(async {
13183    ///
13184    /// let builder = prepare_request_builder();
13185    /// let response = builder.send().await?;
13186    /// # gax::Result::<()>::Ok(()) });
13187    ///
13188    /// fn prepare_request_builder() -> UpdateEntity {
13189    ///   # panic!();
13190    ///   // ... details omitted ...
13191    /// }
13192    /// ```
13193    #[derive(Clone, Debug)]
13194    pub struct UpdateEntity(RequestBuilder<crate::model::UpdateEntityRequest>);
13195
13196    impl UpdateEntity {
13197        pub(crate) fn new(
13198            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13199        ) -> Self {
13200            Self(RequestBuilder::new(stub))
13201        }
13202
13203        /// Sets the full request, replacing any prior values.
13204        pub fn with_request<V: Into<crate::model::UpdateEntityRequest>>(mut self, v: V) -> Self {
13205            self.0.request = v.into();
13206            self
13207        }
13208
13209        /// Sets all the options, replacing any prior values.
13210        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
13211            self.0.options = v.into();
13212            self
13213        }
13214
13215        /// Sends the request.
13216        pub async fn send(self) -> Result<crate::model::Entity> {
13217            (*self.0.stub)
13218                .update_entity(self.0.request, self.0.options)
13219                .await
13220                .map(gax::response::Response::into_body)
13221        }
13222
13223        /// Sets the value of [entity][crate::model::UpdateEntityRequest::entity].
13224        ///
13225        /// This is a **required** field for requests.
13226        pub fn set_entity<T>(mut self, v: T) -> Self
13227        where
13228            T: std::convert::Into<crate::model::Entity>,
13229        {
13230            self.0.request.entity = std::option::Option::Some(v.into());
13231            self
13232        }
13233
13234        /// Sets or clears the value of [entity][crate::model::UpdateEntityRequest::entity].
13235        ///
13236        /// This is a **required** field for requests.
13237        pub fn set_or_clear_entity<T>(mut self, v: std::option::Option<T>) -> Self
13238        where
13239            T: std::convert::Into<crate::model::Entity>,
13240        {
13241            self.0.request.entity = v.map(|x| x.into());
13242            self
13243        }
13244
13245        /// Sets the value of [validate_only][crate::model::UpdateEntityRequest::validate_only].
13246        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
13247            self.0.request.validate_only = v.into();
13248            self
13249        }
13250    }
13251
13252    #[doc(hidden)]
13253    impl gax::options::internal::RequestBuilder for UpdateEntity {
13254        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
13255            &mut self.0.options
13256        }
13257    }
13258
13259    /// The request builder for [MetadataService::delete_entity][crate::client::MetadataService::delete_entity] calls.
13260    ///
13261    /// # Example
13262    /// ```no_run
13263    /// # use google_cloud_dataplex_v1::builder;
13264    /// use builder::metadata_service::DeleteEntity;
13265    /// # tokio_test::block_on(async {
13266    ///
13267    /// let builder = prepare_request_builder();
13268    /// let response = builder.send().await?;
13269    /// # gax::Result::<()>::Ok(()) });
13270    ///
13271    /// fn prepare_request_builder() -> DeleteEntity {
13272    ///   # panic!();
13273    ///   // ... details omitted ...
13274    /// }
13275    /// ```
13276    #[derive(Clone, Debug)]
13277    pub struct DeleteEntity(RequestBuilder<crate::model::DeleteEntityRequest>);
13278
13279    impl DeleteEntity {
13280        pub(crate) fn new(
13281            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13282        ) -> Self {
13283            Self(RequestBuilder::new(stub))
13284        }
13285
13286        /// Sets the full request, replacing any prior values.
13287        pub fn with_request<V: Into<crate::model::DeleteEntityRequest>>(mut self, v: V) -> Self {
13288            self.0.request = v.into();
13289            self
13290        }
13291
13292        /// Sets all the options, replacing any prior values.
13293        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
13294            self.0.options = v.into();
13295            self
13296        }
13297
13298        /// Sends the request.
13299        pub async fn send(self) -> Result<()> {
13300            (*self.0.stub)
13301                .delete_entity(self.0.request, self.0.options)
13302                .await
13303                .map(gax::response::Response::into_body)
13304        }
13305
13306        /// Sets the value of [name][crate::model::DeleteEntityRequest::name].
13307        ///
13308        /// This is a **required** field for requests.
13309        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13310            self.0.request.name = v.into();
13311            self
13312        }
13313
13314        /// Sets the value of [etag][crate::model::DeleteEntityRequest::etag].
13315        ///
13316        /// This is a **required** field for requests.
13317        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
13318            self.0.request.etag = v.into();
13319            self
13320        }
13321    }
13322
13323    #[doc(hidden)]
13324    impl gax::options::internal::RequestBuilder for DeleteEntity {
13325        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
13326            &mut self.0.options
13327        }
13328    }
13329
13330    /// The request builder for [MetadataService::get_entity][crate::client::MetadataService::get_entity] calls.
13331    ///
13332    /// # Example
13333    /// ```no_run
13334    /// # use google_cloud_dataplex_v1::builder;
13335    /// use builder::metadata_service::GetEntity;
13336    /// # tokio_test::block_on(async {
13337    ///
13338    /// let builder = prepare_request_builder();
13339    /// let response = builder.send().await?;
13340    /// # gax::Result::<()>::Ok(()) });
13341    ///
13342    /// fn prepare_request_builder() -> GetEntity {
13343    ///   # panic!();
13344    ///   // ... details omitted ...
13345    /// }
13346    /// ```
13347    #[derive(Clone, Debug)]
13348    pub struct GetEntity(RequestBuilder<crate::model::GetEntityRequest>);
13349
13350    impl GetEntity {
13351        pub(crate) fn new(
13352            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13353        ) -> Self {
13354            Self(RequestBuilder::new(stub))
13355        }
13356
13357        /// Sets the full request, replacing any prior values.
13358        pub fn with_request<V: Into<crate::model::GetEntityRequest>>(mut self, v: V) -> Self {
13359            self.0.request = v.into();
13360            self
13361        }
13362
13363        /// Sets all the options, replacing any prior values.
13364        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
13365            self.0.options = v.into();
13366            self
13367        }
13368
13369        /// Sends the request.
13370        pub async fn send(self) -> Result<crate::model::Entity> {
13371            (*self.0.stub)
13372                .get_entity(self.0.request, self.0.options)
13373                .await
13374                .map(gax::response::Response::into_body)
13375        }
13376
13377        /// Sets the value of [name][crate::model::GetEntityRequest::name].
13378        ///
13379        /// This is a **required** field for requests.
13380        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13381            self.0.request.name = v.into();
13382            self
13383        }
13384
13385        /// Sets the value of [view][crate::model::GetEntityRequest::view].
13386        pub fn set_view<T: Into<crate::model::get_entity_request::EntityView>>(
13387            mut self,
13388            v: T,
13389        ) -> Self {
13390            self.0.request.view = v.into();
13391            self
13392        }
13393    }
13394
13395    #[doc(hidden)]
13396    impl gax::options::internal::RequestBuilder for GetEntity {
13397        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
13398            &mut self.0.options
13399        }
13400    }
13401
13402    /// The request builder for [MetadataService::list_entities][crate::client::MetadataService::list_entities] calls.
13403    ///
13404    /// # Example
13405    /// ```no_run
13406    /// # use google_cloud_dataplex_v1::builder;
13407    /// use builder::metadata_service::ListEntities;
13408    /// # tokio_test::block_on(async {
13409    /// use gax::paginator::ItemPaginator;
13410    ///
13411    /// let builder = prepare_request_builder();
13412    /// let mut items = builder.by_item();
13413    /// while let Some(result) = items.next().await {
13414    ///   let item = result?;
13415    /// }
13416    /// # gax::Result::<()>::Ok(()) });
13417    ///
13418    /// fn prepare_request_builder() -> ListEntities {
13419    ///   # panic!();
13420    ///   // ... details omitted ...
13421    /// }
13422    /// ```
13423    #[derive(Clone, Debug)]
13424    pub struct ListEntities(RequestBuilder<crate::model::ListEntitiesRequest>);
13425
13426    impl ListEntities {
13427        pub(crate) fn new(
13428            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13429        ) -> Self {
13430            Self(RequestBuilder::new(stub))
13431        }
13432
13433        /// Sets the full request, replacing any prior values.
13434        pub fn with_request<V: Into<crate::model::ListEntitiesRequest>>(mut self, v: V) -> Self {
13435            self.0.request = v.into();
13436            self
13437        }
13438
13439        /// Sets all the options, replacing any prior values.
13440        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
13441            self.0.options = v.into();
13442            self
13443        }
13444
13445        /// Sends the request.
13446        pub async fn send(self) -> Result<crate::model::ListEntitiesResponse> {
13447            (*self.0.stub)
13448                .list_entities(self.0.request, self.0.options)
13449                .await
13450                .map(gax::response::Response::into_body)
13451        }
13452
13453        /// Streams each page in the collection.
13454        pub fn by_page(
13455            self,
13456        ) -> impl gax::paginator::Paginator<crate::model::ListEntitiesResponse, gax::error::Error>
13457        {
13458            use std::clone::Clone;
13459            let token = self.0.request.page_token.clone();
13460            let execute = move |token: String| {
13461                let mut builder = self.clone();
13462                builder.0.request = builder.0.request.set_page_token(token);
13463                builder.send()
13464            };
13465            gax::paginator::internal::new_paginator(token, execute)
13466        }
13467
13468        /// Streams each item in the collection.
13469        pub fn by_item(
13470            self,
13471        ) -> impl gax::paginator::ItemPaginator<crate::model::ListEntitiesResponse, gax::error::Error>
13472        {
13473            use gax::paginator::Paginator;
13474            self.by_page().items()
13475        }
13476
13477        /// Sets the value of [parent][crate::model::ListEntitiesRequest::parent].
13478        ///
13479        /// This is a **required** field for requests.
13480        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
13481            self.0.request.parent = v.into();
13482            self
13483        }
13484
13485        /// Sets the value of [view][crate::model::ListEntitiesRequest::view].
13486        ///
13487        /// This is a **required** field for requests.
13488        pub fn set_view<T: Into<crate::model::list_entities_request::EntityView>>(
13489            mut self,
13490            v: T,
13491        ) -> Self {
13492            self.0.request.view = v.into();
13493            self
13494        }
13495
13496        /// Sets the value of [page_size][crate::model::ListEntitiesRequest::page_size].
13497        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
13498            self.0.request.page_size = v.into();
13499            self
13500        }
13501
13502        /// Sets the value of [page_token][crate::model::ListEntitiesRequest::page_token].
13503        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
13504            self.0.request.page_token = v.into();
13505            self
13506        }
13507
13508        /// Sets the value of [filter][crate::model::ListEntitiesRequest::filter].
13509        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
13510            self.0.request.filter = v.into();
13511            self
13512        }
13513    }
13514
13515    #[doc(hidden)]
13516    impl gax::options::internal::RequestBuilder for ListEntities {
13517        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
13518            &mut self.0.options
13519        }
13520    }
13521
13522    /// The request builder for [MetadataService::create_partition][crate::client::MetadataService::create_partition] calls.
13523    ///
13524    /// # Example
13525    /// ```no_run
13526    /// # use google_cloud_dataplex_v1::builder;
13527    /// use builder::metadata_service::CreatePartition;
13528    /// # tokio_test::block_on(async {
13529    ///
13530    /// let builder = prepare_request_builder();
13531    /// let response = builder.send().await?;
13532    /// # gax::Result::<()>::Ok(()) });
13533    ///
13534    /// fn prepare_request_builder() -> CreatePartition {
13535    ///   # panic!();
13536    ///   // ... details omitted ...
13537    /// }
13538    /// ```
13539    #[derive(Clone, Debug)]
13540    pub struct CreatePartition(RequestBuilder<crate::model::CreatePartitionRequest>);
13541
13542    impl CreatePartition {
13543        pub(crate) fn new(
13544            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13545        ) -> Self {
13546            Self(RequestBuilder::new(stub))
13547        }
13548
13549        /// Sets the full request, replacing any prior values.
13550        pub fn with_request<V: Into<crate::model::CreatePartitionRequest>>(mut self, v: V) -> Self {
13551            self.0.request = v.into();
13552            self
13553        }
13554
13555        /// Sets all the options, replacing any prior values.
13556        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
13557            self.0.options = v.into();
13558            self
13559        }
13560
13561        /// Sends the request.
13562        pub async fn send(self) -> Result<crate::model::Partition> {
13563            (*self.0.stub)
13564                .create_partition(self.0.request, self.0.options)
13565                .await
13566                .map(gax::response::Response::into_body)
13567        }
13568
13569        /// Sets the value of [parent][crate::model::CreatePartitionRequest::parent].
13570        ///
13571        /// This is a **required** field for requests.
13572        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
13573            self.0.request.parent = v.into();
13574            self
13575        }
13576
13577        /// Sets the value of [partition][crate::model::CreatePartitionRequest::partition].
13578        ///
13579        /// This is a **required** field for requests.
13580        pub fn set_partition<T>(mut self, v: T) -> Self
13581        where
13582            T: std::convert::Into<crate::model::Partition>,
13583        {
13584            self.0.request.partition = std::option::Option::Some(v.into());
13585            self
13586        }
13587
13588        /// Sets or clears the value of [partition][crate::model::CreatePartitionRequest::partition].
13589        ///
13590        /// This is a **required** field for requests.
13591        pub fn set_or_clear_partition<T>(mut self, v: std::option::Option<T>) -> Self
13592        where
13593            T: std::convert::Into<crate::model::Partition>,
13594        {
13595            self.0.request.partition = v.map(|x| x.into());
13596            self
13597        }
13598
13599        /// Sets the value of [validate_only][crate::model::CreatePartitionRequest::validate_only].
13600        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
13601            self.0.request.validate_only = v.into();
13602            self
13603        }
13604    }
13605
13606    #[doc(hidden)]
13607    impl gax::options::internal::RequestBuilder for CreatePartition {
13608        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
13609            &mut self.0.options
13610        }
13611    }
13612
13613    /// The request builder for [MetadataService::delete_partition][crate::client::MetadataService::delete_partition] calls.
13614    ///
13615    /// # Example
13616    /// ```no_run
13617    /// # use google_cloud_dataplex_v1::builder;
13618    /// use builder::metadata_service::DeletePartition;
13619    /// # tokio_test::block_on(async {
13620    ///
13621    /// let builder = prepare_request_builder();
13622    /// let response = builder.send().await?;
13623    /// # gax::Result::<()>::Ok(()) });
13624    ///
13625    /// fn prepare_request_builder() -> DeletePartition {
13626    ///   # panic!();
13627    ///   // ... details omitted ...
13628    /// }
13629    /// ```
13630    #[derive(Clone, Debug)]
13631    pub struct DeletePartition(RequestBuilder<crate::model::DeletePartitionRequest>);
13632
13633    impl DeletePartition {
13634        pub(crate) fn new(
13635            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13636        ) -> Self {
13637            Self(RequestBuilder::new(stub))
13638        }
13639
13640        /// Sets the full request, replacing any prior values.
13641        pub fn with_request<V: Into<crate::model::DeletePartitionRequest>>(mut self, v: V) -> Self {
13642            self.0.request = v.into();
13643            self
13644        }
13645
13646        /// Sets all the options, replacing any prior values.
13647        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
13648            self.0.options = v.into();
13649            self
13650        }
13651
13652        /// Sends the request.
13653        pub async fn send(self) -> Result<()> {
13654            (*self.0.stub)
13655                .delete_partition(self.0.request, self.0.options)
13656                .await
13657                .map(gax::response::Response::into_body)
13658        }
13659
13660        /// Sets the value of [name][crate::model::DeletePartitionRequest::name].
13661        ///
13662        /// This is a **required** field for requests.
13663        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13664            self.0.request.name = v.into();
13665            self
13666        }
13667
13668        /// Sets the value of [etag][crate::model::DeletePartitionRequest::etag].
13669        #[deprecated]
13670        pub fn set_etag<T: Into<std::string::String>>(mut self, v: T) -> Self {
13671            self.0.request.etag = v.into();
13672            self
13673        }
13674    }
13675
13676    #[doc(hidden)]
13677    impl gax::options::internal::RequestBuilder for DeletePartition {
13678        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
13679            &mut self.0.options
13680        }
13681    }
13682
13683    /// The request builder for [MetadataService::get_partition][crate::client::MetadataService::get_partition] calls.
13684    ///
13685    /// # Example
13686    /// ```no_run
13687    /// # use google_cloud_dataplex_v1::builder;
13688    /// use builder::metadata_service::GetPartition;
13689    /// # tokio_test::block_on(async {
13690    ///
13691    /// let builder = prepare_request_builder();
13692    /// let response = builder.send().await?;
13693    /// # gax::Result::<()>::Ok(()) });
13694    ///
13695    /// fn prepare_request_builder() -> GetPartition {
13696    ///   # panic!();
13697    ///   // ... details omitted ...
13698    /// }
13699    /// ```
13700    #[derive(Clone, Debug)]
13701    pub struct GetPartition(RequestBuilder<crate::model::GetPartitionRequest>);
13702
13703    impl GetPartition {
13704        pub(crate) fn new(
13705            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13706        ) -> Self {
13707            Self(RequestBuilder::new(stub))
13708        }
13709
13710        /// Sets the full request, replacing any prior values.
13711        pub fn with_request<V: Into<crate::model::GetPartitionRequest>>(mut self, v: V) -> Self {
13712            self.0.request = v.into();
13713            self
13714        }
13715
13716        /// Sets all the options, replacing any prior values.
13717        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
13718            self.0.options = v.into();
13719            self
13720        }
13721
13722        /// Sends the request.
13723        pub async fn send(self) -> Result<crate::model::Partition> {
13724            (*self.0.stub)
13725                .get_partition(self.0.request, self.0.options)
13726                .await
13727                .map(gax::response::Response::into_body)
13728        }
13729
13730        /// Sets the value of [name][crate::model::GetPartitionRequest::name].
13731        ///
13732        /// This is a **required** field for requests.
13733        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13734            self.0.request.name = v.into();
13735            self
13736        }
13737    }
13738
13739    #[doc(hidden)]
13740    impl gax::options::internal::RequestBuilder for GetPartition {
13741        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
13742            &mut self.0.options
13743        }
13744    }
13745
13746    /// The request builder for [MetadataService::list_partitions][crate::client::MetadataService::list_partitions] calls.
13747    ///
13748    /// # Example
13749    /// ```no_run
13750    /// # use google_cloud_dataplex_v1::builder;
13751    /// use builder::metadata_service::ListPartitions;
13752    /// # tokio_test::block_on(async {
13753    /// use gax::paginator::ItemPaginator;
13754    ///
13755    /// let builder = prepare_request_builder();
13756    /// let mut items = builder.by_item();
13757    /// while let Some(result) = items.next().await {
13758    ///   let item = result?;
13759    /// }
13760    /// # gax::Result::<()>::Ok(()) });
13761    ///
13762    /// fn prepare_request_builder() -> ListPartitions {
13763    ///   # panic!();
13764    ///   // ... details omitted ...
13765    /// }
13766    /// ```
13767    #[derive(Clone, Debug)]
13768    pub struct ListPartitions(RequestBuilder<crate::model::ListPartitionsRequest>);
13769
13770    impl ListPartitions {
13771        pub(crate) fn new(
13772            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13773        ) -> Self {
13774            Self(RequestBuilder::new(stub))
13775        }
13776
13777        /// Sets the full request, replacing any prior values.
13778        pub fn with_request<V: Into<crate::model::ListPartitionsRequest>>(mut self, v: V) -> Self {
13779            self.0.request = v.into();
13780            self
13781        }
13782
13783        /// Sets all the options, replacing any prior values.
13784        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
13785            self.0.options = v.into();
13786            self
13787        }
13788
13789        /// Sends the request.
13790        pub async fn send(self) -> Result<crate::model::ListPartitionsResponse> {
13791            (*self.0.stub)
13792                .list_partitions(self.0.request, self.0.options)
13793                .await
13794                .map(gax::response::Response::into_body)
13795        }
13796
13797        /// Streams each page in the collection.
13798        pub fn by_page(
13799            self,
13800        ) -> impl gax::paginator::Paginator<crate::model::ListPartitionsResponse, gax::error::Error>
13801        {
13802            use std::clone::Clone;
13803            let token = self.0.request.page_token.clone();
13804            let execute = move |token: String| {
13805                let mut builder = self.clone();
13806                builder.0.request = builder.0.request.set_page_token(token);
13807                builder.send()
13808            };
13809            gax::paginator::internal::new_paginator(token, execute)
13810        }
13811
13812        /// Streams each item in the collection.
13813        pub fn by_item(
13814            self,
13815        ) -> impl gax::paginator::ItemPaginator<crate::model::ListPartitionsResponse, gax::error::Error>
13816        {
13817            use gax::paginator::Paginator;
13818            self.by_page().items()
13819        }
13820
13821        /// Sets the value of [parent][crate::model::ListPartitionsRequest::parent].
13822        ///
13823        /// This is a **required** field for requests.
13824        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
13825            self.0.request.parent = v.into();
13826            self
13827        }
13828
13829        /// Sets the value of [page_size][crate::model::ListPartitionsRequest::page_size].
13830        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
13831            self.0.request.page_size = v.into();
13832            self
13833        }
13834
13835        /// Sets the value of [page_token][crate::model::ListPartitionsRequest::page_token].
13836        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
13837            self.0.request.page_token = v.into();
13838            self
13839        }
13840
13841        /// Sets the value of [filter][crate::model::ListPartitionsRequest::filter].
13842        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
13843            self.0.request.filter = v.into();
13844            self
13845        }
13846    }
13847
13848    #[doc(hidden)]
13849    impl gax::options::internal::RequestBuilder for ListPartitions {
13850        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
13851            &mut self.0.options
13852        }
13853    }
13854
13855    /// The request builder for [MetadataService::list_locations][crate::client::MetadataService::list_locations] calls.
13856    ///
13857    /// # Example
13858    /// ```no_run
13859    /// # use google_cloud_dataplex_v1::builder;
13860    /// use builder::metadata_service::ListLocations;
13861    /// # tokio_test::block_on(async {
13862    /// use gax::paginator::ItemPaginator;
13863    ///
13864    /// let builder = prepare_request_builder();
13865    /// let mut items = builder.by_item();
13866    /// while let Some(result) = items.next().await {
13867    ///   let item = result?;
13868    /// }
13869    /// # gax::Result::<()>::Ok(()) });
13870    ///
13871    /// fn prepare_request_builder() -> ListLocations {
13872    ///   # panic!();
13873    ///   // ... details omitted ...
13874    /// }
13875    /// ```
13876    #[derive(Clone, Debug)]
13877    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
13878
13879    impl ListLocations {
13880        pub(crate) fn new(
13881            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13882        ) -> Self {
13883            Self(RequestBuilder::new(stub))
13884        }
13885
13886        /// Sets the full request, replacing any prior values.
13887        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
13888            mut self,
13889            v: V,
13890        ) -> Self {
13891            self.0.request = v.into();
13892            self
13893        }
13894
13895        /// Sets all the options, replacing any prior values.
13896        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
13897            self.0.options = v.into();
13898            self
13899        }
13900
13901        /// Sends the request.
13902        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
13903            (*self.0.stub)
13904                .list_locations(self.0.request, self.0.options)
13905                .await
13906                .map(gax::response::Response::into_body)
13907        }
13908
13909        /// Streams each page in the collection.
13910        pub fn by_page(
13911            self,
13912        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
13913        {
13914            use std::clone::Clone;
13915            let token = self.0.request.page_token.clone();
13916            let execute = move |token: String| {
13917                let mut builder = self.clone();
13918                builder.0.request = builder.0.request.set_page_token(token);
13919                builder.send()
13920            };
13921            gax::paginator::internal::new_paginator(token, execute)
13922        }
13923
13924        /// Streams each item in the collection.
13925        pub fn by_item(
13926            self,
13927        ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
13928        {
13929            use gax::paginator::Paginator;
13930            self.by_page().items()
13931        }
13932
13933        /// Sets the value of [name][location::model::ListLocationsRequest::name].
13934        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
13935            self.0.request.name = v.into();
13936            self
13937        }
13938
13939        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
13940        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
13941            self.0.request.filter = v.into();
13942            self
13943        }
13944
13945        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
13946        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
13947            self.0.request.page_size = v.into();
13948            self
13949        }
13950
13951        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
13952        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
13953            self.0.request.page_token = v.into();
13954            self
13955        }
13956    }
13957
13958    #[doc(hidden)]
13959    impl gax::options::internal::RequestBuilder for ListLocations {
13960        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
13961            &mut self.0.options
13962        }
13963    }
13964
13965    /// The request builder for [MetadataService::get_location][crate::client::MetadataService::get_location] calls.
13966    ///
13967    /// # Example
13968    /// ```no_run
13969    /// # use google_cloud_dataplex_v1::builder;
13970    /// use builder::metadata_service::GetLocation;
13971    /// # tokio_test::block_on(async {
13972    ///
13973    /// let builder = prepare_request_builder();
13974    /// let response = builder.send().await?;
13975    /// # gax::Result::<()>::Ok(()) });
13976    ///
13977    /// fn prepare_request_builder() -> GetLocation {
13978    ///   # panic!();
13979    ///   // ... details omitted ...
13980    /// }
13981    /// ```
13982    #[derive(Clone, Debug)]
13983    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
13984
13985    impl GetLocation {
13986        pub(crate) fn new(
13987            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
13988        ) -> Self {
13989            Self(RequestBuilder::new(stub))
13990        }
13991
13992        /// Sets the full request, replacing any prior values.
13993        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
13994            self.0.request = v.into();
13995            self
13996        }
13997
13998        /// Sets all the options, replacing any prior values.
13999        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
14000            self.0.options = v.into();
14001            self
14002        }
14003
14004        /// Sends the request.
14005        pub async fn send(self) -> Result<location::model::Location> {
14006            (*self.0.stub)
14007                .get_location(self.0.request, self.0.options)
14008                .await
14009                .map(gax::response::Response::into_body)
14010        }
14011
14012        /// Sets the value of [name][location::model::GetLocationRequest::name].
14013        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14014            self.0.request.name = v.into();
14015            self
14016        }
14017    }
14018
14019    #[doc(hidden)]
14020    impl gax::options::internal::RequestBuilder for GetLocation {
14021        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
14022            &mut self.0.options
14023        }
14024    }
14025
14026    /// The request builder for [MetadataService::set_iam_policy][crate::client::MetadataService::set_iam_policy] calls.
14027    ///
14028    /// # Example
14029    /// ```no_run
14030    /// # use google_cloud_dataplex_v1::builder;
14031    /// use builder::metadata_service::SetIamPolicy;
14032    /// # tokio_test::block_on(async {
14033    ///
14034    /// let builder = prepare_request_builder();
14035    /// let response = builder.send().await?;
14036    /// # gax::Result::<()>::Ok(()) });
14037    ///
14038    /// fn prepare_request_builder() -> SetIamPolicy {
14039    ///   # panic!();
14040    ///   // ... details omitted ...
14041    /// }
14042    /// ```
14043    #[derive(Clone, Debug)]
14044    pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
14045
14046    impl SetIamPolicy {
14047        pub(crate) fn new(
14048            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
14049        ) -> Self {
14050            Self(RequestBuilder::new(stub))
14051        }
14052
14053        /// Sets the full request, replacing any prior values.
14054        pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
14055            self.0.request = v.into();
14056            self
14057        }
14058
14059        /// Sets all the options, replacing any prior values.
14060        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
14061            self.0.options = v.into();
14062            self
14063        }
14064
14065        /// Sends the request.
14066        pub async fn send(self) -> Result<iam_v1::model::Policy> {
14067            (*self.0.stub)
14068                .set_iam_policy(self.0.request, self.0.options)
14069                .await
14070                .map(gax::response::Response::into_body)
14071        }
14072
14073        /// Sets the value of [resource][iam_v1::model::SetIamPolicyRequest::resource].
14074        ///
14075        /// This is a **required** field for requests.
14076        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
14077            self.0.request.resource = v.into();
14078            self
14079        }
14080
14081        /// Sets the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
14082        ///
14083        /// This is a **required** field for requests.
14084        pub fn set_policy<T>(mut self, v: T) -> Self
14085        where
14086            T: std::convert::Into<iam_v1::model::Policy>,
14087        {
14088            self.0.request.policy = std::option::Option::Some(v.into());
14089            self
14090        }
14091
14092        /// Sets or clears the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
14093        ///
14094        /// This is a **required** field for requests.
14095        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
14096        where
14097            T: std::convert::Into<iam_v1::model::Policy>,
14098        {
14099            self.0.request.policy = v.map(|x| x.into());
14100            self
14101        }
14102
14103        /// Sets the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
14104        pub fn set_update_mask<T>(mut self, v: T) -> Self
14105        where
14106            T: std::convert::Into<wkt::FieldMask>,
14107        {
14108            self.0.request.update_mask = std::option::Option::Some(v.into());
14109            self
14110        }
14111
14112        /// Sets or clears the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
14113        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
14114        where
14115            T: std::convert::Into<wkt::FieldMask>,
14116        {
14117            self.0.request.update_mask = v.map(|x| x.into());
14118            self
14119        }
14120    }
14121
14122    #[doc(hidden)]
14123    impl gax::options::internal::RequestBuilder for SetIamPolicy {
14124        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
14125            &mut self.0.options
14126        }
14127    }
14128
14129    /// The request builder for [MetadataService::get_iam_policy][crate::client::MetadataService::get_iam_policy] calls.
14130    ///
14131    /// # Example
14132    /// ```no_run
14133    /// # use google_cloud_dataplex_v1::builder;
14134    /// use builder::metadata_service::GetIamPolicy;
14135    /// # tokio_test::block_on(async {
14136    ///
14137    /// let builder = prepare_request_builder();
14138    /// let response = builder.send().await?;
14139    /// # gax::Result::<()>::Ok(()) });
14140    ///
14141    /// fn prepare_request_builder() -> GetIamPolicy {
14142    ///   # panic!();
14143    ///   // ... details omitted ...
14144    /// }
14145    /// ```
14146    #[derive(Clone, Debug)]
14147    pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
14148
14149    impl GetIamPolicy {
14150        pub(crate) fn new(
14151            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
14152        ) -> Self {
14153            Self(RequestBuilder::new(stub))
14154        }
14155
14156        /// Sets the full request, replacing any prior values.
14157        pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
14158            self.0.request = v.into();
14159            self
14160        }
14161
14162        /// Sets all the options, replacing any prior values.
14163        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
14164            self.0.options = v.into();
14165            self
14166        }
14167
14168        /// Sends the request.
14169        pub async fn send(self) -> Result<iam_v1::model::Policy> {
14170            (*self.0.stub)
14171                .get_iam_policy(self.0.request, self.0.options)
14172                .await
14173                .map(gax::response::Response::into_body)
14174        }
14175
14176        /// Sets the value of [resource][iam_v1::model::GetIamPolicyRequest::resource].
14177        ///
14178        /// This is a **required** field for requests.
14179        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
14180            self.0.request.resource = v.into();
14181            self
14182        }
14183
14184        /// Sets the value of [options][iam_v1::model::GetIamPolicyRequest::options].
14185        pub fn set_options<T>(mut self, v: T) -> Self
14186        where
14187            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
14188        {
14189            self.0.request.options = std::option::Option::Some(v.into());
14190            self
14191        }
14192
14193        /// Sets or clears the value of [options][iam_v1::model::GetIamPolicyRequest::options].
14194        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
14195        where
14196            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
14197        {
14198            self.0.request.options = v.map(|x| x.into());
14199            self
14200        }
14201    }
14202
14203    #[doc(hidden)]
14204    impl gax::options::internal::RequestBuilder for GetIamPolicy {
14205        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
14206            &mut self.0.options
14207        }
14208    }
14209
14210    /// The request builder for [MetadataService::test_iam_permissions][crate::client::MetadataService::test_iam_permissions] calls.
14211    ///
14212    /// # Example
14213    /// ```no_run
14214    /// # use google_cloud_dataplex_v1::builder;
14215    /// use builder::metadata_service::TestIamPermissions;
14216    /// # tokio_test::block_on(async {
14217    ///
14218    /// let builder = prepare_request_builder();
14219    /// let response = builder.send().await?;
14220    /// # gax::Result::<()>::Ok(()) });
14221    ///
14222    /// fn prepare_request_builder() -> TestIamPermissions {
14223    ///   # panic!();
14224    ///   // ... details omitted ...
14225    /// }
14226    /// ```
14227    #[derive(Clone, Debug)]
14228    pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
14229
14230    impl TestIamPermissions {
14231        pub(crate) fn new(
14232            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
14233        ) -> Self {
14234            Self(RequestBuilder::new(stub))
14235        }
14236
14237        /// Sets the full request, replacing any prior values.
14238        pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
14239            mut self,
14240            v: V,
14241        ) -> Self {
14242            self.0.request = v.into();
14243            self
14244        }
14245
14246        /// Sets all the options, replacing any prior values.
14247        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
14248            self.0.options = v.into();
14249            self
14250        }
14251
14252        /// Sends the request.
14253        pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
14254            (*self.0.stub)
14255                .test_iam_permissions(self.0.request, self.0.options)
14256                .await
14257                .map(gax::response::Response::into_body)
14258        }
14259
14260        /// Sets the value of [resource][iam_v1::model::TestIamPermissionsRequest::resource].
14261        ///
14262        /// This is a **required** field for requests.
14263        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
14264            self.0.request.resource = v.into();
14265            self
14266        }
14267
14268        /// Sets the value of [permissions][iam_v1::model::TestIamPermissionsRequest::permissions].
14269        ///
14270        /// This is a **required** field for requests.
14271        pub fn set_permissions<T, V>(mut self, v: T) -> Self
14272        where
14273            T: std::iter::IntoIterator<Item = V>,
14274            V: std::convert::Into<std::string::String>,
14275        {
14276            use std::iter::Iterator;
14277            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
14278            self
14279        }
14280    }
14281
14282    #[doc(hidden)]
14283    impl gax::options::internal::RequestBuilder for TestIamPermissions {
14284        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
14285            &mut self.0.options
14286        }
14287    }
14288
14289    /// The request builder for [MetadataService::list_operations][crate::client::MetadataService::list_operations] calls.
14290    ///
14291    /// # Example
14292    /// ```no_run
14293    /// # use google_cloud_dataplex_v1::builder;
14294    /// use builder::metadata_service::ListOperations;
14295    /// # tokio_test::block_on(async {
14296    /// use gax::paginator::ItemPaginator;
14297    ///
14298    /// let builder = prepare_request_builder();
14299    /// let mut items = builder.by_item();
14300    /// while let Some(result) = items.next().await {
14301    ///   let item = result?;
14302    /// }
14303    /// # gax::Result::<()>::Ok(()) });
14304    ///
14305    /// fn prepare_request_builder() -> ListOperations {
14306    ///   # panic!();
14307    ///   // ... details omitted ...
14308    /// }
14309    /// ```
14310    #[derive(Clone, Debug)]
14311    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
14312
14313    impl ListOperations {
14314        pub(crate) fn new(
14315            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
14316        ) -> Self {
14317            Self(RequestBuilder::new(stub))
14318        }
14319
14320        /// Sets the full request, replacing any prior values.
14321        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
14322            mut self,
14323            v: V,
14324        ) -> Self {
14325            self.0.request = v.into();
14326            self
14327        }
14328
14329        /// Sets all the options, replacing any prior values.
14330        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
14331            self.0.options = v.into();
14332            self
14333        }
14334
14335        /// Sends the request.
14336        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
14337            (*self.0.stub)
14338                .list_operations(self.0.request, self.0.options)
14339                .await
14340                .map(gax::response::Response::into_body)
14341        }
14342
14343        /// Streams each page in the collection.
14344        pub fn by_page(
14345            self,
14346        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
14347        {
14348            use std::clone::Clone;
14349            let token = self.0.request.page_token.clone();
14350            let execute = move |token: String| {
14351                let mut builder = self.clone();
14352                builder.0.request = builder.0.request.set_page_token(token);
14353                builder.send()
14354            };
14355            gax::paginator::internal::new_paginator(token, execute)
14356        }
14357
14358        /// Streams each item in the collection.
14359        pub fn by_item(
14360            self,
14361        ) -> impl gax::paginator::ItemPaginator<
14362            longrunning::model::ListOperationsResponse,
14363            gax::error::Error,
14364        > {
14365            use gax::paginator::Paginator;
14366            self.by_page().items()
14367        }
14368
14369        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
14370        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14371            self.0.request.name = v.into();
14372            self
14373        }
14374
14375        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
14376        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
14377            self.0.request.filter = v.into();
14378            self
14379        }
14380
14381        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
14382        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
14383            self.0.request.page_size = v.into();
14384            self
14385        }
14386
14387        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
14388        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
14389            self.0.request.page_token = v.into();
14390            self
14391        }
14392
14393        /// Sets the value of [return_partial_success][longrunning::model::ListOperationsRequest::return_partial_success].
14394        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
14395            self.0.request.return_partial_success = v.into();
14396            self
14397        }
14398    }
14399
14400    #[doc(hidden)]
14401    impl gax::options::internal::RequestBuilder for ListOperations {
14402        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
14403            &mut self.0.options
14404        }
14405    }
14406
14407    /// The request builder for [MetadataService::get_operation][crate::client::MetadataService::get_operation] calls.
14408    ///
14409    /// # Example
14410    /// ```no_run
14411    /// # use google_cloud_dataplex_v1::builder;
14412    /// use builder::metadata_service::GetOperation;
14413    /// # tokio_test::block_on(async {
14414    ///
14415    /// let builder = prepare_request_builder();
14416    /// let response = builder.send().await?;
14417    /// # gax::Result::<()>::Ok(()) });
14418    ///
14419    /// fn prepare_request_builder() -> GetOperation {
14420    ///   # panic!();
14421    ///   // ... details omitted ...
14422    /// }
14423    /// ```
14424    #[derive(Clone, Debug)]
14425    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
14426
14427    impl GetOperation {
14428        pub(crate) fn new(
14429            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
14430        ) -> Self {
14431            Self(RequestBuilder::new(stub))
14432        }
14433
14434        /// Sets the full request, replacing any prior values.
14435        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
14436            mut self,
14437            v: V,
14438        ) -> Self {
14439            self.0.request = v.into();
14440            self
14441        }
14442
14443        /// Sets all the options, replacing any prior values.
14444        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
14445            self.0.options = v.into();
14446            self
14447        }
14448
14449        /// Sends the request.
14450        pub async fn send(self) -> Result<longrunning::model::Operation> {
14451            (*self.0.stub)
14452                .get_operation(self.0.request, self.0.options)
14453                .await
14454                .map(gax::response::Response::into_body)
14455        }
14456
14457        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
14458        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14459            self.0.request.name = v.into();
14460            self
14461        }
14462    }
14463
14464    #[doc(hidden)]
14465    impl gax::options::internal::RequestBuilder for GetOperation {
14466        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
14467            &mut self.0.options
14468        }
14469    }
14470
14471    /// The request builder for [MetadataService::delete_operation][crate::client::MetadataService::delete_operation] calls.
14472    ///
14473    /// # Example
14474    /// ```no_run
14475    /// # use google_cloud_dataplex_v1::builder;
14476    /// use builder::metadata_service::DeleteOperation;
14477    /// # tokio_test::block_on(async {
14478    ///
14479    /// let builder = prepare_request_builder();
14480    /// let response = builder.send().await?;
14481    /// # gax::Result::<()>::Ok(()) });
14482    ///
14483    /// fn prepare_request_builder() -> DeleteOperation {
14484    ///   # panic!();
14485    ///   // ... details omitted ...
14486    /// }
14487    /// ```
14488    #[derive(Clone, Debug)]
14489    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
14490
14491    impl DeleteOperation {
14492        pub(crate) fn new(
14493            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
14494        ) -> Self {
14495            Self(RequestBuilder::new(stub))
14496        }
14497
14498        /// Sets the full request, replacing any prior values.
14499        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
14500            mut self,
14501            v: V,
14502        ) -> Self {
14503            self.0.request = v.into();
14504            self
14505        }
14506
14507        /// Sets all the options, replacing any prior values.
14508        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
14509            self.0.options = v.into();
14510            self
14511        }
14512
14513        /// Sends the request.
14514        pub async fn send(self) -> Result<()> {
14515            (*self.0.stub)
14516                .delete_operation(self.0.request, self.0.options)
14517                .await
14518                .map(gax::response::Response::into_body)
14519        }
14520
14521        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
14522        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14523            self.0.request.name = v.into();
14524            self
14525        }
14526    }
14527
14528    #[doc(hidden)]
14529    impl gax::options::internal::RequestBuilder for DeleteOperation {
14530        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
14531            &mut self.0.options
14532        }
14533    }
14534
14535    /// The request builder for [MetadataService::cancel_operation][crate::client::MetadataService::cancel_operation] calls.
14536    ///
14537    /// # Example
14538    /// ```no_run
14539    /// # use google_cloud_dataplex_v1::builder;
14540    /// use builder::metadata_service::CancelOperation;
14541    /// # tokio_test::block_on(async {
14542    ///
14543    /// let builder = prepare_request_builder();
14544    /// let response = builder.send().await?;
14545    /// # gax::Result::<()>::Ok(()) });
14546    ///
14547    /// fn prepare_request_builder() -> CancelOperation {
14548    ///   # panic!();
14549    ///   // ... details omitted ...
14550    /// }
14551    /// ```
14552    #[derive(Clone, Debug)]
14553    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
14554
14555    impl CancelOperation {
14556        pub(crate) fn new(
14557            stub: std::sync::Arc<dyn super::super::stub::dynamic::MetadataService>,
14558        ) -> Self {
14559            Self(RequestBuilder::new(stub))
14560        }
14561
14562        /// Sets the full request, replacing any prior values.
14563        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
14564            mut self,
14565            v: V,
14566        ) -> Self {
14567            self.0.request = v.into();
14568            self
14569        }
14570
14571        /// Sets all the options, replacing any prior values.
14572        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
14573            self.0.options = v.into();
14574            self
14575        }
14576
14577        /// Sends the request.
14578        pub async fn send(self) -> Result<()> {
14579            (*self.0.stub)
14580                .cancel_operation(self.0.request, self.0.options)
14581                .await
14582                .map(gax::response::Response::into_body)
14583        }
14584
14585        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
14586        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
14587            self.0.request.name = v.into();
14588            self
14589        }
14590    }
14591
14592    #[doc(hidden)]
14593    impl gax::options::internal::RequestBuilder for CancelOperation {
14594        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
14595            &mut self.0.options
14596        }
14597    }
14598}
14599
14600pub mod dataplex_service {
14601    use crate::Result;
14602
14603    /// A builder for [DataplexService][crate::client::DataplexService].
14604    ///
14605    /// ```
14606    /// # tokio_test::block_on(async {
14607    /// # use google_cloud_dataplex_v1::*;
14608    /// # use builder::dataplex_service::ClientBuilder;
14609    /// # use client::DataplexService;
14610    /// let builder : ClientBuilder = DataplexService::builder();
14611    /// let client = builder
14612    ///     .with_endpoint("https://dataplex.googleapis.com")
14613    ///     .build().await?;
14614    /// # gax::client_builder::Result::<()>::Ok(()) });
14615    /// ```
14616    pub type ClientBuilder =
14617        gax::client_builder::ClientBuilder<client::Factory, gaxi::options::Credentials>;
14618
14619    pub(crate) mod client {
14620        use super::super::super::client::DataplexService;
14621        pub struct Factory;
14622        impl gax::client_builder::internal::ClientFactory for Factory {
14623            type Client = DataplexService;
14624            type Credentials = gaxi::options::Credentials;
14625            async fn build(
14626                self,
14627                config: gaxi::options::ClientConfig,
14628            ) -> gax::client_builder::Result<Self::Client> {
14629                Self::Client::new(config).await
14630            }
14631        }
14632    }
14633
14634    /// Common implementation for [crate::client::DataplexService] request builders.
14635    #[derive(Clone, Debug)]
14636    pub(crate) struct RequestBuilder<R: std::default::Default> {
14637        stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
14638        request: R,
14639        options: gax::options::RequestOptions,
14640    }
14641
14642    impl<R> RequestBuilder<R>
14643    where
14644        R: std::default::Default,
14645    {
14646        pub(crate) fn new(
14647            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
14648        ) -> Self {
14649            Self {
14650                stub,
14651                request: R::default(),
14652                options: gax::options::RequestOptions::default(),
14653            }
14654        }
14655    }
14656
14657    /// The request builder for [DataplexService::create_lake][crate::client::DataplexService::create_lake] calls.
14658    ///
14659    /// # Example
14660    /// ```no_run
14661    /// # use google_cloud_dataplex_v1::builder;
14662    /// use builder::dataplex_service::CreateLake;
14663    /// # tokio_test::block_on(async {
14664    /// use lro::Poller;
14665    ///
14666    /// let builder = prepare_request_builder();
14667    /// let response = builder.poller().until_done().await?;
14668    /// # gax::Result::<()>::Ok(()) });
14669    ///
14670    /// fn prepare_request_builder() -> CreateLake {
14671    ///   # panic!();
14672    ///   // ... details omitted ...
14673    /// }
14674    /// ```
14675    #[derive(Clone, Debug)]
14676    pub struct CreateLake(RequestBuilder<crate::model::CreateLakeRequest>);
14677
14678    impl CreateLake {
14679        pub(crate) fn new(
14680            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
14681        ) -> Self {
14682            Self(RequestBuilder::new(stub))
14683        }
14684
14685        /// Sets the full request, replacing any prior values.
14686        pub fn with_request<V: Into<crate::model::CreateLakeRequest>>(mut self, v: V) -> Self {
14687            self.0.request = v.into();
14688            self
14689        }
14690
14691        /// Sets all the options, replacing any prior values.
14692        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
14693            self.0.options = v.into();
14694            self
14695        }
14696
14697        /// Sends the request.
14698        ///
14699        /// # Long running operations
14700        ///
14701        /// This starts, but does not poll, a longrunning operation. More information
14702        /// on [create_lake][crate::client::DataplexService::create_lake].
14703        pub async fn send(self) -> Result<longrunning::model::Operation> {
14704            (*self.0.stub)
14705                .create_lake(self.0.request, self.0.options)
14706                .await
14707                .map(gax::response::Response::into_body)
14708        }
14709
14710        /// Creates a [Poller][lro::Poller] to work with `create_lake`.
14711        pub fn poller(
14712            self,
14713        ) -> impl lro::Poller<crate::model::Lake, crate::model::OperationMetadata> {
14714            type Operation =
14715                lro::internal::Operation<crate::model::Lake, crate::model::OperationMetadata>;
14716            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
14717            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
14718
14719            let stub = self.0.stub.clone();
14720            let mut options = self.0.options.clone();
14721            options.set_retry_policy(gax::retry_policy::NeverRetry);
14722            let query = move |name| {
14723                let stub = stub.clone();
14724                let options = options.clone();
14725                async {
14726                    let op = GetOperation::new(stub)
14727                        .set_name(name)
14728                        .with_options(options)
14729                        .send()
14730                        .await?;
14731                    Ok(Operation::new(op))
14732                }
14733            };
14734
14735            let start = move || async {
14736                let op = self.send().await?;
14737                Ok(Operation::new(op))
14738            };
14739
14740            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
14741        }
14742
14743        /// Sets the value of [parent][crate::model::CreateLakeRequest::parent].
14744        ///
14745        /// This is a **required** field for requests.
14746        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
14747            self.0.request.parent = v.into();
14748            self
14749        }
14750
14751        /// Sets the value of [lake_id][crate::model::CreateLakeRequest::lake_id].
14752        ///
14753        /// This is a **required** field for requests.
14754        pub fn set_lake_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
14755            self.0.request.lake_id = v.into();
14756            self
14757        }
14758
14759        /// Sets the value of [lake][crate::model::CreateLakeRequest::lake].
14760        ///
14761        /// This is a **required** field for requests.
14762        pub fn set_lake<T>(mut self, v: T) -> Self
14763        where
14764            T: std::convert::Into<crate::model::Lake>,
14765        {
14766            self.0.request.lake = std::option::Option::Some(v.into());
14767            self
14768        }
14769
14770        /// Sets or clears the value of [lake][crate::model::CreateLakeRequest::lake].
14771        ///
14772        /// This is a **required** field for requests.
14773        pub fn set_or_clear_lake<T>(mut self, v: std::option::Option<T>) -> Self
14774        where
14775            T: std::convert::Into<crate::model::Lake>,
14776        {
14777            self.0.request.lake = v.map(|x| x.into());
14778            self
14779        }
14780
14781        /// Sets the value of [validate_only][crate::model::CreateLakeRequest::validate_only].
14782        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
14783            self.0.request.validate_only = v.into();
14784            self
14785        }
14786    }
14787
14788    #[doc(hidden)]
14789    impl gax::options::internal::RequestBuilder for CreateLake {
14790        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
14791            &mut self.0.options
14792        }
14793    }
14794
14795    /// The request builder for [DataplexService::update_lake][crate::client::DataplexService::update_lake] calls.
14796    ///
14797    /// # Example
14798    /// ```no_run
14799    /// # use google_cloud_dataplex_v1::builder;
14800    /// use builder::dataplex_service::UpdateLake;
14801    /// # tokio_test::block_on(async {
14802    /// use lro::Poller;
14803    ///
14804    /// let builder = prepare_request_builder();
14805    /// let response = builder.poller().until_done().await?;
14806    /// # gax::Result::<()>::Ok(()) });
14807    ///
14808    /// fn prepare_request_builder() -> UpdateLake {
14809    ///   # panic!();
14810    ///   // ... details omitted ...
14811    /// }
14812    /// ```
14813    #[derive(Clone, Debug)]
14814    pub struct UpdateLake(RequestBuilder<crate::model::UpdateLakeRequest>);
14815
14816    impl UpdateLake {
14817        pub(crate) fn new(
14818            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
14819        ) -> Self {
14820            Self(RequestBuilder::new(stub))
14821        }
14822
14823        /// Sets the full request, replacing any prior values.
14824        pub fn with_request<V: Into<crate::model::UpdateLakeRequest>>(mut self, v: V) -> Self {
14825            self.0.request = v.into();
14826            self
14827        }
14828
14829        /// Sets all the options, replacing any prior values.
14830        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
14831            self.0.options = v.into();
14832            self
14833        }
14834
14835        /// Sends the request.
14836        ///
14837        /// # Long running operations
14838        ///
14839        /// This starts, but does not poll, a longrunning operation. More information
14840        /// on [update_lake][crate::client::DataplexService::update_lake].
14841        pub async fn send(self) -> Result<longrunning::model::Operation> {
14842            (*self.0.stub)
14843                .update_lake(self.0.request, self.0.options)
14844                .await
14845                .map(gax::response::Response::into_body)
14846        }
14847
14848        /// Creates a [Poller][lro::Poller] to work with `update_lake`.
14849        pub fn poller(
14850            self,
14851        ) -> impl lro::Poller<crate::model::Lake, crate::model::OperationMetadata> {
14852            type Operation =
14853                lro::internal::Operation<crate::model::Lake, crate::model::OperationMetadata>;
14854            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
14855            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
14856
14857            let stub = self.0.stub.clone();
14858            let mut options = self.0.options.clone();
14859            options.set_retry_policy(gax::retry_policy::NeverRetry);
14860            let query = move |name| {
14861                let stub = stub.clone();
14862                let options = options.clone();
14863                async {
14864                    let op = GetOperation::new(stub)
14865                        .set_name(name)
14866                        .with_options(options)
14867                        .send()
14868                        .await?;
14869                    Ok(Operation::new(op))
14870                }
14871            };
14872
14873            let start = move || async {
14874                let op = self.send().await?;
14875                Ok(Operation::new(op))
14876            };
14877
14878            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
14879        }
14880
14881        /// Sets the value of [update_mask][crate::model::UpdateLakeRequest::update_mask].
14882        ///
14883        /// This is a **required** field for requests.
14884        pub fn set_update_mask<T>(mut self, v: T) -> Self
14885        where
14886            T: std::convert::Into<wkt::FieldMask>,
14887        {
14888            self.0.request.update_mask = std::option::Option::Some(v.into());
14889            self
14890        }
14891
14892        /// Sets or clears the value of [update_mask][crate::model::UpdateLakeRequest::update_mask].
14893        ///
14894        /// This is a **required** field for requests.
14895        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
14896        where
14897            T: std::convert::Into<wkt::FieldMask>,
14898        {
14899            self.0.request.update_mask = v.map(|x| x.into());
14900            self
14901        }
14902
14903        /// Sets the value of [lake][crate::model::UpdateLakeRequest::lake].
14904        ///
14905        /// This is a **required** field for requests.
14906        pub fn set_lake<T>(mut self, v: T) -> Self
14907        where
14908            T: std::convert::Into<crate::model::Lake>,
14909        {
14910            self.0.request.lake = std::option::Option::Some(v.into());
14911            self
14912        }
14913
14914        /// Sets or clears the value of [lake][crate::model::UpdateLakeRequest::lake].
14915        ///
14916        /// This is a **required** field for requests.
14917        pub fn set_or_clear_lake<T>(mut self, v: std::option::Option<T>) -> Self
14918        where
14919            T: std::convert::Into<crate::model::Lake>,
14920        {
14921            self.0.request.lake = v.map(|x| x.into());
14922            self
14923        }
14924
14925        /// Sets the value of [validate_only][crate::model::UpdateLakeRequest::validate_only].
14926        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
14927            self.0.request.validate_only = v.into();
14928            self
14929        }
14930    }
14931
14932    #[doc(hidden)]
14933    impl gax::options::internal::RequestBuilder for UpdateLake {
14934        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
14935            &mut self.0.options
14936        }
14937    }
14938
14939    /// The request builder for [DataplexService::delete_lake][crate::client::DataplexService::delete_lake] calls.
14940    ///
14941    /// # Example
14942    /// ```no_run
14943    /// # use google_cloud_dataplex_v1::builder;
14944    /// use builder::dataplex_service::DeleteLake;
14945    /// # tokio_test::block_on(async {
14946    /// use lro::Poller;
14947    ///
14948    /// let builder = prepare_request_builder();
14949    /// let response = builder.poller().until_done().await?;
14950    /// # gax::Result::<()>::Ok(()) });
14951    ///
14952    /// fn prepare_request_builder() -> DeleteLake {
14953    ///   # panic!();
14954    ///   // ... details omitted ...
14955    /// }
14956    /// ```
14957    #[derive(Clone, Debug)]
14958    pub struct DeleteLake(RequestBuilder<crate::model::DeleteLakeRequest>);
14959
14960    impl DeleteLake {
14961        pub(crate) fn new(
14962            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
14963        ) -> Self {
14964            Self(RequestBuilder::new(stub))
14965        }
14966
14967        /// Sets the full request, replacing any prior values.
14968        pub fn with_request<V: Into<crate::model::DeleteLakeRequest>>(mut self, v: V) -> Self {
14969            self.0.request = v.into();
14970            self
14971        }
14972
14973        /// Sets all the options, replacing any prior values.
14974        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
14975            self.0.options = v.into();
14976            self
14977        }
14978
14979        /// Sends the request.
14980        ///
14981        /// # Long running operations
14982        ///
14983        /// This starts, but does not poll, a longrunning operation. More information
14984        /// on [delete_lake][crate::client::DataplexService::delete_lake].
14985        pub async fn send(self) -> Result<longrunning::model::Operation> {
14986            (*self.0.stub)
14987                .delete_lake(self.0.request, self.0.options)
14988                .await
14989                .map(gax::response::Response::into_body)
14990        }
14991
14992        /// Creates a [Poller][lro::Poller] to work with `delete_lake`.
14993        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
14994            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
14995            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
14996            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
14997
14998            let stub = self.0.stub.clone();
14999            let mut options = self.0.options.clone();
15000            options.set_retry_policy(gax::retry_policy::NeverRetry);
15001            let query = move |name| {
15002                let stub = stub.clone();
15003                let options = options.clone();
15004                async {
15005                    let op = GetOperation::new(stub)
15006                        .set_name(name)
15007                        .with_options(options)
15008                        .send()
15009                        .await?;
15010                    Ok(Operation::new(op))
15011                }
15012            };
15013
15014            let start = move || async {
15015                let op = self.send().await?;
15016                Ok(Operation::new(op))
15017            };
15018
15019            lro::internal::new_unit_response_poller(
15020                polling_error_policy,
15021                polling_backoff_policy,
15022                start,
15023                query,
15024            )
15025        }
15026
15027        /// Sets the value of [name][crate::model::DeleteLakeRequest::name].
15028        ///
15029        /// This is a **required** field for requests.
15030        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15031            self.0.request.name = v.into();
15032            self
15033        }
15034    }
15035
15036    #[doc(hidden)]
15037    impl gax::options::internal::RequestBuilder for DeleteLake {
15038        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
15039            &mut self.0.options
15040        }
15041    }
15042
15043    /// The request builder for [DataplexService::list_lakes][crate::client::DataplexService::list_lakes] calls.
15044    ///
15045    /// # Example
15046    /// ```no_run
15047    /// # use google_cloud_dataplex_v1::builder;
15048    /// use builder::dataplex_service::ListLakes;
15049    /// # tokio_test::block_on(async {
15050    /// use gax::paginator::ItemPaginator;
15051    ///
15052    /// let builder = prepare_request_builder();
15053    /// let mut items = builder.by_item();
15054    /// while let Some(result) = items.next().await {
15055    ///   let item = result?;
15056    /// }
15057    /// # gax::Result::<()>::Ok(()) });
15058    ///
15059    /// fn prepare_request_builder() -> ListLakes {
15060    ///   # panic!();
15061    ///   // ... details omitted ...
15062    /// }
15063    /// ```
15064    #[derive(Clone, Debug)]
15065    pub struct ListLakes(RequestBuilder<crate::model::ListLakesRequest>);
15066
15067    impl ListLakes {
15068        pub(crate) fn new(
15069            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15070        ) -> Self {
15071            Self(RequestBuilder::new(stub))
15072        }
15073
15074        /// Sets the full request, replacing any prior values.
15075        pub fn with_request<V: Into<crate::model::ListLakesRequest>>(mut self, v: V) -> Self {
15076            self.0.request = v.into();
15077            self
15078        }
15079
15080        /// Sets all the options, replacing any prior values.
15081        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
15082            self.0.options = v.into();
15083            self
15084        }
15085
15086        /// Sends the request.
15087        pub async fn send(self) -> Result<crate::model::ListLakesResponse> {
15088            (*self.0.stub)
15089                .list_lakes(self.0.request, self.0.options)
15090                .await
15091                .map(gax::response::Response::into_body)
15092        }
15093
15094        /// Streams each page in the collection.
15095        pub fn by_page(
15096            self,
15097        ) -> impl gax::paginator::Paginator<crate::model::ListLakesResponse, gax::error::Error>
15098        {
15099            use std::clone::Clone;
15100            let token = self.0.request.page_token.clone();
15101            let execute = move |token: String| {
15102                let mut builder = self.clone();
15103                builder.0.request = builder.0.request.set_page_token(token);
15104                builder.send()
15105            };
15106            gax::paginator::internal::new_paginator(token, execute)
15107        }
15108
15109        /// Streams each item in the collection.
15110        pub fn by_item(
15111            self,
15112        ) -> impl gax::paginator::ItemPaginator<crate::model::ListLakesResponse, gax::error::Error>
15113        {
15114            use gax::paginator::Paginator;
15115            self.by_page().items()
15116        }
15117
15118        /// Sets the value of [parent][crate::model::ListLakesRequest::parent].
15119        ///
15120        /// This is a **required** field for requests.
15121        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
15122            self.0.request.parent = v.into();
15123            self
15124        }
15125
15126        /// Sets the value of [page_size][crate::model::ListLakesRequest::page_size].
15127        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
15128            self.0.request.page_size = v.into();
15129            self
15130        }
15131
15132        /// Sets the value of [page_token][crate::model::ListLakesRequest::page_token].
15133        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
15134            self.0.request.page_token = v.into();
15135            self
15136        }
15137
15138        /// Sets the value of [filter][crate::model::ListLakesRequest::filter].
15139        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
15140            self.0.request.filter = v.into();
15141            self
15142        }
15143
15144        /// Sets the value of [order_by][crate::model::ListLakesRequest::order_by].
15145        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
15146            self.0.request.order_by = v.into();
15147            self
15148        }
15149    }
15150
15151    #[doc(hidden)]
15152    impl gax::options::internal::RequestBuilder for ListLakes {
15153        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
15154            &mut self.0.options
15155        }
15156    }
15157
15158    /// The request builder for [DataplexService::get_lake][crate::client::DataplexService::get_lake] calls.
15159    ///
15160    /// # Example
15161    /// ```no_run
15162    /// # use google_cloud_dataplex_v1::builder;
15163    /// use builder::dataplex_service::GetLake;
15164    /// # tokio_test::block_on(async {
15165    ///
15166    /// let builder = prepare_request_builder();
15167    /// let response = builder.send().await?;
15168    /// # gax::Result::<()>::Ok(()) });
15169    ///
15170    /// fn prepare_request_builder() -> GetLake {
15171    ///   # panic!();
15172    ///   // ... details omitted ...
15173    /// }
15174    /// ```
15175    #[derive(Clone, Debug)]
15176    pub struct GetLake(RequestBuilder<crate::model::GetLakeRequest>);
15177
15178    impl GetLake {
15179        pub(crate) fn new(
15180            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15181        ) -> Self {
15182            Self(RequestBuilder::new(stub))
15183        }
15184
15185        /// Sets the full request, replacing any prior values.
15186        pub fn with_request<V: Into<crate::model::GetLakeRequest>>(mut self, v: V) -> Self {
15187            self.0.request = v.into();
15188            self
15189        }
15190
15191        /// Sets all the options, replacing any prior values.
15192        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
15193            self.0.options = v.into();
15194            self
15195        }
15196
15197        /// Sends the request.
15198        pub async fn send(self) -> Result<crate::model::Lake> {
15199            (*self.0.stub)
15200                .get_lake(self.0.request, self.0.options)
15201                .await
15202                .map(gax::response::Response::into_body)
15203        }
15204
15205        /// Sets the value of [name][crate::model::GetLakeRequest::name].
15206        ///
15207        /// This is a **required** field for requests.
15208        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15209            self.0.request.name = v.into();
15210            self
15211        }
15212    }
15213
15214    #[doc(hidden)]
15215    impl gax::options::internal::RequestBuilder for GetLake {
15216        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
15217            &mut self.0.options
15218        }
15219    }
15220
15221    /// The request builder for [DataplexService::list_lake_actions][crate::client::DataplexService::list_lake_actions] calls.
15222    ///
15223    /// # Example
15224    /// ```no_run
15225    /// # use google_cloud_dataplex_v1::builder;
15226    /// use builder::dataplex_service::ListLakeActions;
15227    /// # tokio_test::block_on(async {
15228    /// use gax::paginator::ItemPaginator;
15229    ///
15230    /// let builder = prepare_request_builder();
15231    /// let mut items = builder.by_item();
15232    /// while let Some(result) = items.next().await {
15233    ///   let item = result?;
15234    /// }
15235    /// # gax::Result::<()>::Ok(()) });
15236    ///
15237    /// fn prepare_request_builder() -> ListLakeActions {
15238    ///   # panic!();
15239    ///   // ... details omitted ...
15240    /// }
15241    /// ```
15242    #[derive(Clone, Debug)]
15243    pub struct ListLakeActions(RequestBuilder<crate::model::ListLakeActionsRequest>);
15244
15245    impl ListLakeActions {
15246        pub(crate) fn new(
15247            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15248        ) -> Self {
15249            Self(RequestBuilder::new(stub))
15250        }
15251
15252        /// Sets the full request, replacing any prior values.
15253        pub fn with_request<V: Into<crate::model::ListLakeActionsRequest>>(mut self, v: V) -> Self {
15254            self.0.request = v.into();
15255            self
15256        }
15257
15258        /// Sets all the options, replacing any prior values.
15259        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
15260            self.0.options = v.into();
15261            self
15262        }
15263
15264        /// Sends the request.
15265        pub async fn send(self) -> Result<crate::model::ListActionsResponse> {
15266            (*self.0.stub)
15267                .list_lake_actions(self.0.request, self.0.options)
15268                .await
15269                .map(gax::response::Response::into_body)
15270        }
15271
15272        /// Streams each page in the collection.
15273        pub fn by_page(
15274            self,
15275        ) -> impl gax::paginator::Paginator<crate::model::ListActionsResponse, gax::error::Error>
15276        {
15277            use std::clone::Clone;
15278            let token = self.0.request.page_token.clone();
15279            let execute = move |token: String| {
15280                let mut builder = self.clone();
15281                builder.0.request = builder.0.request.set_page_token(token);
15282                builder.send()
15283            };
15284            gax::paginator::internal::new_paginator(token, execute)
15285        }
15286
15287        /// Streams each item in the collection.
15288        pub fn by_item(
15289            self,
15290        ) -> impl gax::paginator::ItemPaginator<crate::model::ListActionsResponse, gax::error::Error>
15291        {
15292            use gax::paginator::Paginator;
15293            self.by_page().items()
15294        }
15295
15296        /// Sets the value of [parent][crate::model::ListLakeActionsRequest::parent].
15297        ///
15298        /// This is a **required** field for requests.
15299        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
15300            self.0.request.parent = v.into();
15301            self
15302        }
15303
15304        /// Sets the value of [page_size][crate::model::ListLakeActionsRequest::page_size].
15305        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
15306            self.0.request.page_size = v.into();
15307            self
15308        }
15309
15310        /// Sets the value of [page_token][crate::model::ListLakeActionsRequest::page_token].
15311        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
15312            self.0.request.page_token = v.into();
15313            self
15314        }
15315    }
15316
15317    #[doc(hidden)]
15318    impl gax::options::internal::RequestBuilder for ListLakeActions {
15319        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
15320            &mut self.0.options
15321        }
15322    }
15323
15324    /// The request builder for [DataplexService::create_zone][crate::client::DataplexService::create_zone] calls.
15325    ///
15326    /// # Example
15327    /// ```no_run
15328    /// # use google_cloud_dataplex_v1::builder;
15329    /// use builder::dataplex_service::CreateZone;
15330    /// # tokio_test::block_on(async {
15331    /// use lro::Poller;
15332    ///
15333    /// let builder = prepare_request_builder();
15334    /// let response = builder.poller().until_done().await?;
15335    /// # gax::Result::<()>::Ok(()) });
15336    ///
15337    /// fn prepare_request_builder() -> CreateZone {
15338    ///   # panic!();
15339    ///   // ... details omitted ...
15340    /// }
15341    /// ```
15342    #[derive(Clone, Debug)]
15343    pub struct CreateZone(RequestBuilder<crate::model::CreateZoneRequest>);
15344
15345    impl CreateZone {
15346        pub(crate) fn new(
15347            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15348        ) -> Self {
15349            Self(RequestBuilder::new(stub))
15350        }
15351
15352        /// Sets the full request, replacing any prior values.
15353        pub fn with_request<V: Into<crate::model::CreateZoneRequest>>(mut self, v: V) -> Self {
15354            self.0.request = v.into();
15355            self
15356        }
15357
15358        /// Sets all the options, replacing any prior values.
15359        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
15360            self.0.options = v.into();
15361            self
15362        }
15363
15364        /// Sends the request.
15365        ///
15366        /// # Long running operations
15367        ///
15368        /// This starts, but does not poll, a longrunning operation. More information
15369        /// on [create_zone][crate::client::DataplexService::create_zone].
15370        pub async fn send(self) -> Result<longrunning::model::Operation> {
15371            (*self.0.stub)
15372                .create_zone(self.0.request, self.0.options)
15373                .await
15374                .map(gax::response::Response::into_body)
15375        }
15376
15377        /// Creates a [Poller][lro::Poller] to work with `create_zone`.
15378        pub fn poller(
15379            self,
15380        ) -> impl lro::Poller<crate::model::Zone, crate::model::OperationMetadata> {
15381            type Operation =
15382                lro::internal::Operation<crate::model::Zone, crate::model::OperationMetadata>;
15383            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
15384            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
15385
15386            let stub = self.0.stub.clone();
15387            let mut options = self.0.options.clone();
15388            options.set_retry_policy(gax::retry_policy::NeverRetry);
15389            let query = move |name| {
15390                let stub = stub.clone();
15391                let options = options.clone();
15392                async {
15393                    let op = GetOperation::new(stub)
15394                        .set_name(name)
15395                        .with_options(options)
15396                        .send()
15397                        .await?;
15398                    Ok(Operation::new(op))
15399                }
15400            };
15401
15402            let start = move || async {
15403                let op = self.send().await?;
15404                Ok(Operation::new(op))
15405            };
15406
15407            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
15408        }
15409
15410        /// Sets the value of [parent][crate::model::CreateZoneRequest::parent].
15411        ///
15412        /// This is a **required** field for requests.
15413        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
15414            self.0.request.parent = v.into();
15415            self
15416        }
15417
15418        /// Sets the value of [zone_id][crate::model::CreateZoneRequest::zone_id].
15419        ///
15420        /// This is a **required** field for requests.
15421        pub fn set_zone_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
15422            self.0.request.zone_id = v.into();
15423            self
15424        }
15425
15426        /// Sets the value of [zone][crate::model::CreateZoneRequest::zone].
15427        ///
15428        /// This is a **required** field for requests.
15429        pub fn set_zone<T>(mut self, v: T) -> Self
15430        where
15431            T: std::convert::Into<crate::model::Zone>,
15432        {
15433            self.0.request.zone = std::option::Option::Some(v.into());
15434            self
15435        }
15436
15437        /// Sets or clears the value of [zone][crate::model::CreateZoneRequest::zone].
15438        ///
15439        /// This is a **required** field for requests.
15440        pub fn set_or_clear_zone<T>(mut self, v: std::option::Option<T>) -> Self
15441        where
15442            T: std::convert::Into<crate::model::Zone>,
15443        {
15444            self.0.request.zone = v.map(|x| x.into());
15445            self
15446        }
15447
15448        /// Sets the value of [validate_only][crate::model::CreateZoneRequest::validate_only].
15449        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
15450            self.0.request.validate_only = v.into();
15451            self
15452        }
15453    }
15454
15455    #[doc(hidden)]
15456    impl gax::options::internal::RequestBuilder for CreateZone {
15457        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
15458            &mut self.0.options
15459        }
15460    }
15461
15462    /// The request builder for [DataplexService::update_zone][crate::client::DataplexService::update_zone] calls.
15463    ///
15464    /// # Example
15465    /// ```no_run
15466    /// # use google_cloud_dataplex_v1::builder;
15467    /// use builder::dataplex_service::UpdateZone;
15468    /// # tokio_test::block_on(async {
15469    /// use lro::Poller;
15470    ///
15471    /// let builder = prepare_request_builder();
15472    /// let response = builder.poller().until_done().await?;
15473    /// # gax::Result::<()>::Ok(()) });
15474    ///
15475    /// fn prepare_request_builder() -> UpdateZone {
15476    ///   # panic!();
15477    ///   // ... details omitted ...
15478    /// }
15479    /// ```
15480    #[derive(Clone, Debug)]
15481    pub struct UpdateZone(RequestBuilder<crate::model::UpdateZoneRequest>);
15482
15483    impl UpdateZone {
15484        pub(crate) fn new(
15485            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15486        ) -> Self {
15487            Self(RequestBuilder::new(stub))
15488        }
15489
15490        /// Sets the full request, replacing any prior values.
15491        pub fn with_request<V: Into<crate::model::UpdateZoneRequest>>(mut self, v: V) -> Self {
15492            self.0.request = v.into();
15493            self
15494        }
15495
15496        /// Sets all the options, replacing any prior values.
15497        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
15498            self.0.options = v.into();
15499            self
15500        }
15501
15502        /// Sends the request.
15503        ///
15504        /// # Long running operations
15505        ///
15506        /// This starts, but does not poll, a longrunning operation. More information
15507        /// on [update_zone][crate::client::DataplexService::update_zone].
15508        pub async fn send(self) -> Result<longrunning::model::Operation> {
15509            (*self.0.stub)
15510                .update_zone(self.0.request, self.0.options)
15511                .await
15512                .map(gax::response::Response::into_body)
15513        }
15514
15515        /// Creates a [Poller][lro::Poller] to work with `update_zone`.
15516        pub fn poller(
15517            self,
15518        ) -> impl lro::Poller<crate::model::Zone, crate::model::OperationMetadata> {
15519            type Operation =
15520                lro::internal::Operation<crate::model::Zone, crate::model::OperationMetadata>;
15521            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
15522            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
15523
15524            let stub = self.0.stub.clone();
15525            let mut options = self.0.options.clone();
15526            options.set_retry_policy(gax::retry_policy::NeverRetry);
15527            let query = move |name| {
15528                let stub = stub.clone();
15529                let options = options.clone();
15530                async {
15531                    let op = GetOperation::new(stub)
15532                        .set_name(name)
15533                        .with_options(options)
15534                        .send()
15535                        .await?;
15536                    Ok(Operation::new(op))
15537                }
15538            };
15539
15540            let start = move || async {
15541                let op = self.send().await?;
15542                Ok(Operation::new(op))
15543            };
15544
15545            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
15546        }
15547
15548        /// Sets the value of [update_mask][crate::model::UpdateZoneRequest::update_mask].
15549        ///
15550        /// This is a **required** field for requests.
15551        pub fn set_update_mask<T>(mut self, v: T) -> Self
15552        where
15553            T: std::convert::Into<wkt::FieldMask>,
15554        {
15555            self.0.request.update_mask = std::option::Option::Some(v.into());
15556            self
15557        }
15558
15559        /// Sets or clears the value of [update_mask][crate::model::UpdateZoneRequest::update_mask].
15560        ///
15561        /// This is a **required** field for requests.
15562        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
15563        where
15564            T: std::convert::Into<wkt::FieldMask>,
15565        {
15566            self.0.request.update_mask = v.map(|x| x.into());
15567            self
15568        }
15569
15570        /// Sets the value of [zone][crate::model::UpdateZoneRequest::zone].
15571        ///
15572        /// This is a **required** field for requests.
15573        pub fn set_zone<T>(mut self, v: T) -> Self
15574        where
15575            T: std::convert::Into<crate::model::Zone>,
15576        {
15577            self.0.request.zone = std::option::Option::Some(v.into());
15578            self
15579        }
15580
15581        /// Sets or clears the value of [zone][crate::model::UpdateZoneRequest::zone].
15582        ///
15583        /// This is a **required** field for requests.
15584        pub fn set_or_clear_zone<T>(mut self, v: std::option::Option<T>) -> Self
15585        where
15586            T: std::convert::Into<crate::model::Zone>,
15587        {
15588            self.0.request.zone = v.map(|x| x.into());
15589            self
15590        }
15591
15592        /// Sets the value of [validate_only][crate::model::UpdateZoneRequest::validate_only].
15593        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
15594            self.0.request.validate_only = v.into();
15595            self
15596        }
15597    }
15598
15599    #[doc(hidden)]
15600    impl gax::options::internal::RequestBuilder for UpdateZone {
15601        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
15602            &mut self.0.options
15603        }
15604    }
15605
15606    /// The request builder for [DataplexService::delete_zone][crate::client::DataplexService::delete_zone] calls.
15607    ///
15608    /// # Example
15609    /// ```no_run
15610    /// # use google_cloud_dataplex_v1::builder;
15611    /// use builder::dataplex_service::DeleteZone;
15612    /// # tokio_test::block_on(async {
15613    /// use lro::Poller;
15614    ///
15615    /// let builder = prepare_request_builder();
15616    /// let response = builder.poller().until_done().await?;
15617    /// # gax::Result::<()>::Ok(()) });
15618    ///
15619    /// fn prepare_request_builder() -> DeleteZone {
15620    ///   # panic!();
15621    ///   // ... details omitted ...
15622    /// }
15623    /// ```
15624    #[derive(Clone, Debug)]
15625    pub struct DeleteZone(RequestBuilder<crate::model::DeleteZoneRequest>);
15626
15627    impl DeleteZone {
15628        pub(crate) fn new(
15629            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15630        ) -> Self {
15631            Self(RequestBuilder::new(stub))
15632        }
15633
15634        /// Sets the full request, replacing any prior values.
15635        pub fn with_request<V: Into<crate::model::DeleteZoneRequest>>(mut self, v: V) -> Self {
15636            self.0.request = v.into();
15637            self
15638        }
15639
15640        /// Sets all the options, replacing any prior values.
15641        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
15642            self.0.options = v.into();
15643            self
15644        }
15645
15646        /// Sends the request.
15647        ///
15648        /// # Long running operations
15649        ///
15650        /// This starts, but does not poll, a longrunning operation. More information
15651        /// on [delete_zone][crate::client::DataplexService::delete_zone].
15652        pub async fn send(self) -> Result<longrunning::model::Operation> {
15653            (*self.0.stub)
15654                .delete_zone(self.0.request, self.0.options)
15655                .await
15656                .map(gax::response::Response::into_body)
15657        }
15658
15659        /// Creates a [Poller][lro::Poller] to work with `delete_zone`.
15660        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
15661            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
15662            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
15663            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
15664
15665            let stub = self.0.stub.clone();
15666            let mut options = self.0.options.clone();
15667            options.set_retry_policy(gax::retry_policy::NeverRetry);
15668            let query = move |name| {
15669                let stub = stub.clone();
15670                let options = options.clone();
15671                async {
15672                    let op = GetOperation::new(stub)
15673                        .set_name(name)
15674                        .with_options(options)
15675                        .send()
15676                        .await?;
15677                    Ok(Operation::new(op))
15678                }
15679            };
15680
15681            let start = move || async {
15682                let op = self.send().await?;
15683                Ok(Operation::new(op))
15684            };
15685
15686            lro::internal::new_unit_response_poller(
15687                polling_error_policy,
15688                polling_backoff_policy,
15689                start,
15690                query,
15691            )
15692        }
15693
15694        /// Sets the value of [name][crate::model::DeleteZoneRequest::name].
15695        ///
15696        /// This is a **required** field for requests.
15697        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15698            self.0.request.name = v.into();
15699            self
15700        }
15701    }
15702
15703    #[doc(hidden)]
15704    impl gax::options::internal::RequestBuilder for DeleteZone {
15705        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
15706            &mut self.0.options
15707        }
15708    }
15709
15710    /// The request builder for [DataplexService::list_zones][crate::client::DataplexService::list_zones] calls.
15711    ///
15712    /// # Example
15713    /// ```no_run
15714    /// # use google_cloud_dataplex_v1::builder;
15715    /// use builder::dataplex_service::ListZones;
15716    /// # tokio_test::block_on(async {
15717    /// use gax::paginator::ItemPaginator;
15718    ///
15719    /// let builder = prepare_request_builder();
15720    /// let mut items = builder.by_item();
15721    /// while let Some(result) = items.next().await {
15722    ///   let item = result?;
15723    /// }
15724    /// # gax::Result::<()>::Ok(()) });
15725    ///
15726    /// fn prepare_request_builder() -> ListZones {
15727    ///   # panic!();
15728    ///   // ... details omitted ...
15729    /// }
15730    /// ```
15731    #[derive(Clone, Debug)]
15732    pub struct ListZones(RequestBuilder<crate::model::ListZonesRequest>);
15733
15734    impl ListZones {
15735        pub(crate) fn new(
15736            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15737        ) -> Self {
15738            Self(RequestBuilder::new(stub))
15739        }
15740
15741        /// Sets the full request, replacing any prior values.
15742        pub fn with_request<V: Into<crate::model::ListZonesRequest>>(mut self, v: V) -> Self {
15743            self.0.request = v.into();
15744            self
15745        }
15746
15747        /// Sets all the options, replacing any prior values.
15748        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
15749            self.0.options = v.into();
15750            self
15751        }
15752
15753        /// Sends the request.
15754        pub async fn send(self) -> Result<crate::model::ListZonesResponse> {
15755            (*self.0.stub)
15756                .list_zones(self.0.request, self.0.options)
15757                .await
15758                .map(gax::response::Response::into_body)
15759        }
15760
15761        /// Streams each page in the collection.
15762        pub fn by_page(
15763            self,
15764        ) -> impl gax::paginator::Paginator<crate::model::ListZonesResponse, gax::error::Error>
15765        {
15766            use std::clone::Clone;
15767            let token = self.0.request.page_token.clone();
15768            let execute = move |token: String| {
15769                let mut builder = self.clone();
15770                builder.0.request = builder.0.request.set_page_token(token);
15771                builder.send()
15772            };
15773            gax::paginator::internal::new_paginator(token, execute)
15774        }
15775
15776        /// Streams each item in the collection.
15777        pub fn by_item(
15778            self,
15779        ) -> impl gax::paginator::ItemPaginator<crate::model::ListZonesResponse, gax::error::Error>
15780        {
15781            use gax::paginator::Paginator;
15782            self.by_page().items()
15783        }
15784
15785        /// Sets the value of [parent][crate::model::ListZonesRequest::parent].
15786        ///
15787        /// This is a **required** field for requests.
15788        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
15789            self.0.request.parent = v.into();
15790            self
15791        }
15792
15793        /// Sets the value of [page_size][crate::model::ListZonesRequest::page_size].
15794        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
15795            self.0.request.page_size = v.into();
15796            self
15797        }
15798
15799        /// Sets the value of [page_token][crate::model::ListZonesRequest::page_token].
15800        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
15801            self.0.request.page_token = v.into();
15802            self
15803        }
15804
15805        /// Sets the value of [filter][crate::model::ListZonesRequest::filter].
15806        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
15807            self.0.request.filter = v.into();
15808            self
15809        }
15810
15811        /// Sets the value of [order_by][crate::model::ListZonesRequest::order_by].
15812        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
15813            self.0.request.order_by = v.into();
15814            self
15815        }
15816    }
15817
15818    #[doc(hidden)]
15819    impl gax::options::internal::RequestBuilder for ListZones {
15820        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
15821            &mut self.0.options
15822        }
15823    }
15824
15825    /// The request builder for [DataplexService::get_zone][crate::client::DataplexService::get_zone] calls.
15826    ///
15827    /// # Example
15828    /// ```no_run
15829    /// # use google_cloud_dataplex_v1::builder;
15830    /// use builder::dataplex_service::GetZone;
15831    /// # tokio_test::block_on(async {
15832    ///
15833    /// let builder = prepare_request_builder();
15834    /// let response = builder.send().await?;
15835    /// # gax::Result::<()>::Ok(()) });
15836    ///
15837    /// fn prepare_request_builder() -> GetZone {
15838    ///   # panic!();
15839    ///   // ... details omitted ...
15840    /// }
15841    /// ```
15842    #[derive(Clone, Debug)]
15843    pub struct GetZone(RequestBuilder<crate::model::GetZoneRequest>);
15844
15845    impl GetZone {
15846        pub(crate) fn new(
15847            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15848        ) -> Self {
15849            Self(RequestBuilder::new(stub))
15850        }
15851
15852        /// Sets the full request, replacing any prior values.
15853        pub fn with_request<V: Into<crate::model::GetZoneRequest>>(mut self, v: V) -> Self {
15854            self.0.request = v.into();
15855            self
15856        }
15857
15858        /// Sets all the options, replacing any prior values.
15859        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
15860            self.0.options = v.into();
15861            self
15862        }
15863
15864        /// Sends the request.
15865        pub async fn send(self) -> Result<crate::model::Zone> {
15866            (*self.0.stub)
15867                .get_zone(self.0.request, self.0.options)
15868                .await
15869                .map(gax::response::Response::into_body)
15870        }
15871
15872        /// Sets the value of [name][crate::model::GetZoneRequest::name].
15873        ///
15874        /// This is a **required** field for requests.
15875        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
15876            self.0.request.name = v.into();
15877            self
15878        }
15879    }
15880
15881    #[doc(hidden)]
15882    impl gax::options::internal::RequestBuilder for GetZone {
15883        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
15884            &mut self.0.options
15885        }
15886    }
15887
15888    /// The request builder for [DataplexService::list_zone_actions][crate::client::DataplexService::list_zone_actions] calls.
15889    ///
15890    /// # Example
15891    /// ```no_run
15892    /// # use google_cloud_dataplex_v1::builder;
15893    /// use builder::dataplex_service::ListZoneActions;
15894    /// # tokio_test::block_on(async {
15895    /// use gax::paginator::ItemPaginator;
15896    ///
15897    /// let builder = prepare_request_builder();
15898    /// let mut items = builder.by_item();
15899    /// while let Some(result) = items.next().await {
15900    ///   let item = result?;
15901    /// }
15902    /// # gax::Result::<()>::Ok(()) });
15903    ///
15904    /// fn prepare_request_builder() -> ListZoneActions {
15905    ///   # panic!();
15906    ///   // ... details omitted ...
15907    /// }
15908    /// ```
15909    #[derive(Clone, Debug)]
15910    pub struct ListZoneActions(RequestBuilder<crate::model::ListZoneActionsRequest>);
15911
15912    impl ListZoneActions {
15913        pub(crate) fn new(
15914            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
15915        ) -> Self {
15916            Self(RequestBuilder::new(stub))
15917        }
15918
15919        /// Sets the full request, replacing any prior values.
15920        pub fn with_request<V: Into<crate::model::ListZoneActionsRequest>>(mut self, v: V) -> Self {
15921            self.0.request = v.into();
15922            self
15923        }
15924
15925        /// Sets all the options, replacing any prior values.
15926        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
15927            self.0.options = v.into();
15928            self
15929        }
15930
15931        /// Sends the request.
15932        pub async fn send(self) -> Result<crate::model::ListActionsResponse> {
15933            (*self.0.stub)
15934                .list_zone_actions(self.0.request, self.0.options)
15935                .await
15936                .map(gax::response::Response::into_body)
15937        }
15938
15939        /// Streams each page in the collection.
15940        pub fn by_page(
15941            self,
15942        ) -> impl gax::paginator::Paginator<crate::model::ListActionsResponse, gax::error::Error>
15943        {
15944            use std::clone::Clone;
15945            let token = self.0.request.page_token.clone();
15946            let execute = move |token: String| {
15947                let mut builder = self.clone();
15948                builder.0.request = builder.0.request.set_page_token(token);
15949                builder.send()
15950            };
15951            gax::paginator::internal::new_paginator(token, execute)
15952        }
15953
15954        /// Streams each item in the collection.
15955        pub fn by_item(
15956            self,
15957        ) -> impl gax::paginator::ItemPaginator<crate::model::ListActionsResponse, gax::error::Error>
15958        {
15959            use gax::paginator::Paginator;
15960            self.by_page().items()
15961        }
15962
15963        /// Sets the value of [parent][crate::model::ListZoneActionsRequest::parent].
15964        ///
15965        /// This is a **required** field for requests.
15966        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
15967            self.0.request.parent = v.into();
15968            self
15969        }
15970
15971        /// Sets the value of [page_size][crate::model::ListZoneActionsRequest::page_size].
15972        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
15973            self.0.request.page_size = v.into();
15974            self
15975        }
15976
15977        /// Sets the value of [page_token][crate::model::ListZoneActionsRequest::page_token].
15978        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
15979            self.0.request.page_token = v.into();
15980            self
15981        }
15982    }
15983
15984    #[doc(hidden)]
15985    impl gax::options::internal::RequestBuilder for ListZoneActions {
15986        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
15987            &mut self.0.options
15988        }
15989    }
15990
15991    /// The request builder for [DataplexService::create_asset][crate::client::DataplexService::create_asset] calls.
15992    ///
15993    /// # Example
15994    /// ```no_run
15995    /// # use google_cloud_dataplex_v1::builder;
15996    /// use builder::dataplex_service::CreateAsset;
15997    /// # tokio_test::block_on(async {
15998    /// use lro::Poller;
15999    ///
16000    /// let builder = prepare_request_builder();
16001    /// let response = builder.poller().until_done().await?;
16002    /// # gax::Result::<()>::Ok(()) });
16003    ///
16004    /// fn prepare_request_builder() -> CreateAsset {
16005    ///   # panic!();
16006    ///   // ... details omitted ...
16007    /// }
16008    /// ```
16009    #[derive(Clone, Debug)]
16010    pub struct CreateAsset(RequestBuilder<crate::model::CreateAssetRequest>);
16011
16012    impl CreateAsset {
16013        pub(crate) fn new(
16014            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
16015        ) -> Self {
16016            Self(RequestBuilder::new(stub))
16017        }
16018
16019        /// Sets the full request, replacing any prior values.
16020        pub fn with_request<V: Into<crate::model::CreateAssetRequest>>(mut self, v: V) -> Self {
16021            self.0.request = v.into();
16022            self
16023        }
16024
16025        /// Sets all the options, replacing any prior values.
16026        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
16027            self.0.options = v.into();
16028            self
16029        }
16030
16031        /// Sends the request.
16032        ///
16033        /// # Long running operations
16034        ///
16035        /// This starts, but does not poll, a longrunning operation. More information
16036        /// on [create_asset][crate::client::DataplexService::create_asset].
16037        pub async fn send(self) -> Result<longrunning::model::Operation> {
16038            (*self.0.stub)
16039                .create_asset(self.0.request, self.0.options)
16040                .await
16041                .map(gax::response::Response::into_body)
16042        }
16043
16044        /// Creates a [Poller][lro::Poller] to work with `create_asset`.
16045        pub fn poller(
16046            self,
16047        ) -> impl lro::Poller<crate::model::Asset, crate::model::OperationMetadata> {
16048            type Operation =
16049                lro::internal::Operation<crate::model::Asset, crate::model::OperationMetadata>;
16050            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
16051            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
16052
16053            let stub = self.0.stub.clone();
16054            let mut options = self.0.options.clone();
16055            options.set_retry_policy(gax::retry_policy::NeverRetry);
16056            let query = move |name| {
16057                let stub = stub.clone();
16058                let options = options.clone();
16059                async {
16060                    let op = GetOperation::new(stub)
16061                        .set_name(name)
16062                        .with_options(options)
16063                        .send()
16064                        .await?;
16065                    Ok(Operation::new(op))
16066                }
16067            };
16068
16069            let start = move || async {
16070                let op = self.send().await?;
16071                Ok(Operation::new(op))
16072            };
16073
16074            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
16075        }
16076
16077        /// Sets the value of [parent][crate::model::CreateAssetRequest::parent].
16078        ///
16079        /// This is a **required** field for requests.
16080        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
16081            self.0.request.parent = v.into();
16082            self
16083        }
16084
16085        /// Sets the value of [asset_id][crate::model::CreateAssetRequest::asset_id].
16086        ///
16087        /// This is a **required** field for requests.
16088        pub fn set_asset_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
16089            self.0.request.asset_id = v.into();
16090            self
16091        }
16092
16093        /// Sets the value of [asset][crate::model::CreateAssetRequest::asset].
16094        ///
16095        /// This is a **required** field for requests.
16096        pub fn set_asset<T>(mut self, v: T) -> Self
16097        where
16098            T: std::convert::Into<crate::model::Asset>,
16099        {
16100            self.0.request.asset = std::option::Option::Some(v.into());
16101            self
16102        }
16103
16104        /// Sets or clears the value of [asset][crate::model::CreateAssetRequest::asset].
16105        ///
16106        /// This is a **required** field for requests.
16107        pub fn set_or_clear_asset<T>(mut self, v: std::option::Option<T>) -> Self
16108        where
16109            T: std::convert::Into<crate::model::Asset>,
16110        {
16111            self.0.request.asset = v.map(|x| x.into());
16112            self
16113        }
16114
16115        /// Sets the value of [validate_only][crate::model::CreateAssetRequest::validate_only].
16116        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
16117            self.0.request.validate_only = v.into();
16118            self
16119        }
16120    }
16121
16122    #[doc(hidden)]
16123    impl gax::options::internal::RequestBuilder for CreateAsset {
16124        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
16125            &mut self.0.options
16126        }
16127    }
16128
16129    /// The request builder for [DataplexService::update_asset][crate::client::DataplexService::update_asset] calls.
16130    ///
16131    /// # Example
16132    /// ```no_run
16133    /// # use google_cloud_dataplex_v1::builder;
16134    /// use builder::dataplex_service::UpdateAsset;
16135    /// # tokio_test::block_on(async {
16136    /// use lro::Poller;
16137    ///
16138    /// let builder = prepare_request_builder();
16139    /// let response = builder.poller().until_done().await?;
16140    /// # gax::Result::<()>::Ok(()) });
16141    ///
16142    /// fn prepare_request_builder() -> UpdateAsset {
16143    ///   # panic!();
16144    ///   // ... details omitted ...
16145    /// }
16146    /// ```
16147    #[derive(Clone, Debug)]
16148    pub struct UpdateAsset(RequestBuilder<crate::model::UpdateAssetRequest>);
16149
16150    impl UpdateAsset {
16151        pub(crate) fn new(
16152            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
16153        ) -> Self {
16154            Self(RequestBuilder::new(stub))
16155        }
16156
16157        /// Sets the full request, replacing any prior values.
16158        pub fn with_request<V: Into<crate::model::UpdateAssetRequest>>(mut self, v: V) -> Self {
16159            self.0.request = v.into();
16160            self
16161        }
16162
16163        /// Sets all the options, replacing any prior values.
16164        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
16165            self.0.options = v.into();
16166            self
16167        }
16168
16169        /// Sends the request.
16170        ///
16171        /// # Long running operations
16172        ///
16173        /// This starts, but does not poll, a longrunning operation. More information
16174        /// on [update_asset][crate::client::DataplexService::update_asset].
16175        pub async fn send(self) -> Result<longrunning::model::Operation> {
16176            (*self.0.stub)
16177                .update_asset(self.0.request, self.0.options)
16178                .await
16179                .map(gax::response::Response::into_body)
16180        }
16181
16182        /// Creates a [Poller][lro::Poller] to work with `update_asset`.
16183        pub fn poller(
16184            self,
16185        ) -> impl lro::Poller<crate::model::Asset, crate::model::OperationMetadata> {
16186            type Operation =
16187                lro::internal::Operation<crate::model::Asset, crate::model::OperationMetadata>;
16188            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
16189            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
16190
16191            let stub = self.0.stub.clone();
16192            let mut options = self.0.options.clone();
16193            options.set_retry_policy(gax::retry_policy::NeverRetry);
16194            let query = move |name| {
16195                let stub = stub.clone();
16196                let options = options.clone();
16197                async {
16198                    let op = GetOperation::new(stub)
16199                        .set_name(name)
16200                        .with_options(options)
16201                        .send()
16202                        .await?;
16203                    Ok(Operation::new(op))
16204                }
16205            };
16206
16207            let start = move || async {
16208                let op = self.send().await?;
16209                Ok(Operation::new(op))
16210            };
16211
16212            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
16213        }
16214
16215        /// Sets the value of [update_mask][crate::model::UpdateAssetRequest::update_mask].
16216        ///
16217        /// This is a **required** field for requests.
16218        pub fn set_update_mask<T>(mut self, v: T) -> Self
16219        where
16220            T: std::convert::Into<wkt::FieldMask>,
16221        {
16222            self.0.request.update_mask = std::option::Option::Some(v.into());
16223            self
16224        }
16225
16226        /// Sets or clears the value of [update_mask][crate::model::UpdateAssetRequest::update_mask].
16227        ///
16228        /// This is a **required** field for requests.
16229        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
16230        where
16231            T: std::convert::Into<wkt::FieldMask>,
16232        {
16233            self.0.request.update_mask = v.map(|x| x.into());
16234            self
16235        }
16236
16237        /// Sets the value of [asset][crate::model::UpdateAssetRequest::asset].
16238        ///
16239        /// This is a **required** field for requests.
16240        pub fn set_asset<T>(mut self, v: T) -> Self
16241        where
16242            T: std::convert::Into<crate::model::Asset>,
16243        {
16244            self.0.request.asset = std::option::Option::Some(v.into());
16245            self
16246        }
16247
16248        /// Sets or clears the value of [asset][crate::model::UpdateAssetRequest::asset].
16249        ///
16250        /// This is a **required** field for requests.
16251        pub fn set_or_clear_asset<T>(mut self, v: std::option::Option<T>) -> Self
16252        where
16253            T: std::convert::Into<crate::model::Asset>,
16254        {
16255            self.0.request.asset = v.map(|x| x.into());
16256            self
16257        }
16258
16259        /// Sets the value of [validate_only][crate::model::UpdateAssetRequest::validate_only].
16260        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
16261            self.0.request.validate_only = v.into();
16262            self
16263        }
16264    }
16265
16266    #[doc(hidden)]
16267    impl gax::options::internal::RequestBuilder for UpdateAsset {
16268        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
16269            &mut self.0.options
16270        }
16271    }
16272
16273    /// The request builder for [DataplexService::delete_asset][crate::client::DataplexService::delete_asset] calls.
16274    ///
16275    /// # Example
16276    /// ```no_run
16277    /// # use google_cloud_dataplex_v1::builder;
16278    /// use builder::dataplex_service::DeleteAsset;
16279    /// # tokio_test::block_on(async {
16280    /// use lro::Poller;
16281    ///
16282    /// let builder = prepare_request_builder();
16283    /// let response = builder.poller().until_done().await?;
16284    /// # gax::Result::<()>::Ok(()) });
16285    ///
16286    /// fn prepare_request_builder() -> DeleteAsset {
16287    ///   # panic!();
16288    ///   // ... details omitted ...
16289    /// }
16290    /// ```
16291    #[derive(Clone, Debug)]
16292    pub struct DeleteAsset(RequestBuilder<crate::model::DeleteAssetRequest>);
16293
16294    impl DeleteAsset {
16295        pub(crate) fn new(
16296            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
16297        ) -> Self {
16298            Self(RequestBuilder::new(stub))
16299        }
16300
16301        /// Sets the full request, replacing any prior values.
16302        pub fn with_request<V: Into<crate::model::DeleteAssetRequest>>(mut self, v: V) -> Self {
16303            self.0.request = v.into();
16304            self
16305        }
16306
16307        /// Sets all the options, replacing any prior values.
16308        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
16309            self.0.options = v.into();
16310            self
16311        }
16312
16313        /// Sends the request.
16314        ///
16315        /// # Long running operations
16316        ///
16317        /// This starts, but does not poll, a longrunning operation. More information
16318        /// on [delete_asset][crate::client::DataplexService::delete_asset].
16319        pub async fn send(self) -> Result<longrunning::model::Operation> {
16320            (*self.0.stub)
16321                .delete_asset(self.0.request, self.0.options)
16322                .await
16323                .map(gax::response::Response::into_body)
16324        }
16325
16326        /// Creates a [Poller][lro::Poller] to work with `delete_asset`.
16327        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
16328            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
16329            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
16330            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
16331
16332            let stub = self.0.stub.clone();
16333            let mut options = self.0.options.clone();
16334            options.set_retry_policy(gax::retry_policy::NeverRetry);
16335            let query = move |name| {
16336                let stub = stub.clone();
16337                let options = options.clone();
16338                async {
16339                    let op = GetOperation::new(stub)
16340                        .set_name(name)
16341                        .with_options(options)
16342                        .send()
16343                        .await?;
16344                    Ok(Operation::new(op))
16345                }
16346            };
16347
16348            let start = move || async {
16349                let op = self.send().await?;
16350                Ok(Operation::new(op))
16351            };
16352
16353            lro::internal::new_unit_response_poller(
16354                polling_error_policy,
16355                polling_backoff_policy,
16356                start,
16357                query,
16358            )
16359        }
16360
16361        /// Sets the value of [name][crate::model::DeleteAssetRequest::name].
16362        ///
16363        /// This is a **required** field for requests.
16364        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16365            self.0.request.name = v.into();
16366            self
16367        }
16368    }
16369
16370    #[doc(hidden)]
16371    impl gax::options::internal::RequestBuilder for DeleteAsset {
16372        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
16373            &mut self.0.options
16374        }
16375    }
16376
16377    /// The request builder for [DataplexService::list_assets][crate::client::DataplexService::list_assets] calls.
16378    ///
16379    /// # Example
16380    /// ```no_run
16381    /// # use google_cloud_dataplex_v1::builder;
16382    /// use builder::dataplex_service::ListAssets;
16383    /// # tokio_test::block_on(async {
16384    /// use gax::paginator::ItemPaginator;
16385    ///
16386    /// let builder = prepare_request_builder();
16387    /// let mut items = builder.by_item();
16388    /// while let Some(result) = items.next().await {
16389    ///   let item = result?;
16390    /// }
16391    /// # gax::Result::<()>::Ok(()) });
16392    ///
16393    /// fn prepare_request_builder() -> ListAssets {
16394    ///   # panic!();
16395    ///   // ... details omitted ...
16396    /// }
16397    /// ```
16398    #[derive(Clone, Debug)]
16399    pub struct ListAssets(RequestBuilder<crate::model::ListAssetsRequest>);
16400
16401    impl ListAssets {
16402        pub(crate) fn new(
16403            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
16404        ) -> Self {
16405            Self(RequestBuilder::new(stub))
16406        }
16407
16408        /// Sets the full request, replacing any prior values.
16409        pub fn with_request<V: Into<crate::model::ListAssetsRequest>>(mut self, v: V) -> Self {
16410            self.0.request = v.into();
16411            self
16412        }
16413
16414        /// Sets all the options, replacing any prior values.
16415        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
16416            self.0.options = v.into();
16417            self
16418        }
16419
16420        /// Sends the request.
16421        pub async fn send(self) -> Result<crate::model::ListAssetsResponse> {
16422            (*self.0.stub)
16423                .list_assets(self.0.request, self.0.options)
16424                .await
16425                .map(gax::response::Response::into_body)
16426        }
16427
16428        /// Streams each page in the collection.
16429        pub fn by_page(
16430            self,
16431        ) -> impl gax::paginator::Paginator<crate::model::ListAssetsResponse, gax::error::Error>
16432        {
16433            use std::clone::Clone;
16434            let token = self.0.request.page_token.clone();
16435            let execute = move |token: String| {
16436                let mut builder = self.clone();
16437                builder.0.request = builder.0.request.set_page_token(token);
16438                builder.send()
16439            };
16440            gax::paginator::internal::new_paginator(token, execute)
16441        }
16442
16443        /// Streams each item in the collection.
16444        pub fn by_item(
16445            self,
16446        ) -> impl gax::paginator::ItemPaginator<crate::model::ListAssetsResponse, gax::error::Error>
16447        {
16448            use gax::paginator::Paginator;
16449            self.by_page().items()
16450        }
16451
16452        /// Sets the value of [parent][crate::model::ListAssetsRequest::parent].
16453        ///
16454        /// This is a **required** field for requests.
16455        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
16456            self.0.request.parent = v.into();
16457            self
16458        }
16459
16460        /// Sets the value of [page_size][crate::model::ListAssetsRequest::page_size].
16461        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
16462            self.0.request.page_size = v.into();
16463            self
16464        }
16465
16466        /// Sets the value of [page_token][crate::model::ListAssetsRequest::page_token].
16467        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
16468            self.0.request.page_token = v.into();
16469            self
16470        }
16471
16472        /// Sets the value of [filter][crate::model::ListAssetsRequest::filter].
16473        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
16474            self.0.request.filter = v.into();
16475            self
16476        }
16477
16478        /// Sets the value of [order_by][crate::model::ListAssetsRequest::order_by].
16479        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
16480            self.0.request.order_by = v.into();
16481            self
16482        }
16483    }
16484
16485    #[doc(hidden)]
16486    impl gax::options::internal::RequestBuilder for ListAssets {
16487        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
16488            &mut self.0.options
16489        }
16490    }
16491
16492    /// The request builder for [DataplexService::get_asset][crate::client::DataplexService::get_asset] calls.
16493    ///
16494    /// # Example
16495    /// ```no_run
16496    /// # use google_cloud_dataplex_v1::builder;
16497    /// use builder::dataplex_service::GetAsset;
16498    /// # tokio_test::block_on(async {
16499    ///
16500    /// let builder = prepare_request_builder();
16501    /// let response = builder.send().await?;
16502    /// # gax::Result::<()>::Ok(()) });
16503    ///
16504    /// fn prepare_request_builder() -> GetAsset {
16505    ///   # panic!();
16506    ///   // ... details omitted ...
16507    /// }
16508    /// ```
16509    #[derive(Clone, Debug)]
16510    pub struct GetAsset(RequestBuilder<crate::model::GetAssetRequest>);
16511
16512    impl GetAsset {
16513        pub(crate) fn new(
16514            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
16515        ) -> Self {
16516            Self(RequestBuilder::new(stub))
16517        }
16518
16519        /// Sets the full request, replacing any prior values.
16520        pub fn with_request<V: Into<crate::model::GetAssetRequest>>(mut self, v: V) -> Self {
16521            self.0.request = v.into();
16522            self
16523        }
16524
16525        /// Sets all the options, replacing any prior values.
16526        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
16527            self.0.options = v.into();
16528            self
16529        }
16530
16531        /// Sends the request.
16532        pub async fn send(self) -> Result<crate::model::Asset> {
16533            (*self.0.stub)
16534                .get_asset(self.0.request, self.0.options)
16535                .await
16536                .map(gax::response::Response::into_body)
16537        }
16538
16539        /// Sets the value of [name][crate::model::GetAssetRequest::name].
16540        ///
16541        /// This is a **required** field for requests.
16542        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
16543            self.0.request.name = v.into();
16544            self
16545        }
16546    }
16547
16548    #[doc(hidden)]
16549    impl gax::options::internal::RequestBuilder for GetAsset {
16550        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
16551            &mut self.0.options
16552        }
16553    }
16554
16555    /// The request builder for [DataplexService::list_asset_actions][crate::client::DataplexService::list_asset_actions] calls.
16556    ///
16557    /// # Example
16558    /// ```no_run
16559    /// # use google_cloud_dataplex_v1::builder;
16560    /// use builder::dataplex_service::ListAssetActions;
16561    /// # tokio_test::block_on(async {
16562    /// use gax::paginator::ItemPaginator;
16563    ///
16564    /// let builder = prepare_request_builder();
16565    /// let mut items = builder.by_item();
16566    /// while let Some(result) = items.next().await {
16567    ///   let item = result?;
16568    /// }
16569    /// # gax::Result::<()>::Ok(()) });
16570    ///
16571    /// fn prepare_request_builder() -> ListAssetActions {
16572    ///   # panic!();
16573    ///   // ... details omitted ...
16574    /// }
16575    /// ```
16576    #[derive(Clone, Debug)]
16577    pub struct ListAssetActions(RequestBuilder<crate::model::ListAssetActionsRequest>);
16578
16579    impl ListAssetActions {
16580        pub(crate) fn new(
16581            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
16582        ) -> Self {
16583            Self(RequestBuilder::new(stub))
16584        }
16585
16586        /// Sets the full request, replacing any prior values.
16587        pub fn with_request<V: Into<crate::model::ListAssetActionsRequest>>(
16588            mut self,
16589            v: V,
16590        ) -> Self {
16591            self.0.request = v.into();
16592            self
16593        }
16594
16595        /// Sets all the options, replacing any prior values.
16596        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
16597            self.0.options = v.into();
16598            self
16599        }
16600
16601        /// Sends the request.
16602        pub async fn send(self) -> Result<crate::model::ListActionsResponse> {
16603            (*self.0.stub)
16604                .list_asset_actions(self.0.request, self.0.options)
16605                .await
16606                .map(gax::response::Response::into_body)
16607        }
16608
16609        /// Streams each page in the collection.
16610        pub fn by_page(
16611            self,
16612        ) -> impl gax::paginator::Paginator<crate::model::ListActionsResponse, gax::error::Error>
16613        {
16614            use std::clone::Clone;
16615            let token = self.0.request.page_token.clone();
16616            let execute = move |token: String| {
16617                let mut builder = self.clone();
16618                builder.0.request = builder.0.request.set_page_token(token);
16619                builder.send()
16620            };
16621            gax::paginator::internal::new_paginator(token, execute)
16622        }
16623
16624        /// Streams each item in the collection.
16625        pub fn by_item(
16626            self,
16627        ) -> impl gax::paginator::ItemPaginator<crate::model::ListActionsResponse, gax::error::Error>
16628        {
16629            use gax::paginator::Paginator;
16630            self.by_page().items()
16631        }
16632
16633        /// Sets the value of [parent][crate::model::ListAssetActionsRequest::parent].
16634        ///
16635        /// This is a **required** field for requests.
16636        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
16637            self.0.request.parent = v.into();
16638            self
16639        }
16640
16641        /// Sets the value of [page_size][crate::model::ListAssetActionsRequest::page_size].
16642        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
16643            self.0.request.page_size = v.into();
16644            self
16645        }
16646
16647        /// Sets the value of [page_token][crate::model::ListAssetActionsRequest::page_token].
16648        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
16649            self.0.request.page_token = v.into();
16650            self
16651        }
16652    }
16653
16654    #[doc(hidden)]
16655    impl gax::options::internal::RequestBuilder for ListAssetActions {
16656        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
16657            &mut self.0.options
16658        }
16659    }
16660
16661    /// The request builder for [DataplexService::create_task][crate::client::DataplexService::create_task] calls.
16662    ///
16663    /// # Example
16664    /// ```no_run
16665    /// # use google_cloud_dataplex_v1::builder;
16666    /// use builder::dataplex_service::CreateTask;
16667    /// # tokio_test::block_on(async {
16668    /// use lro::Poller;
16669    ///
16670    /// let builder = prepare_request_builder();
16671    /// let response = builder.poller().until_done().await?;
16672    /// # gax::Result::<()>::Ok(()) });
16673    ///
16674    /// fn prepare_request_builder() -> CreateTask {
16675    ///   # panic!();
16676    ///   // ... details omitted ...
16677    /// }
16678    /// ```
16679    #[derive(Clone, Debug)]
16680    pub struct CreateTask(RequestBuilder<crate::model::CreateTaskRequest>);
16681
16682    impl CreateTask {
16683        pub(crate) fn new(
16684            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
16685        ) -> Self {
16686            Self(RequestBuilder::new(stub))
16687        }
16688
16689        /// Sets the full request, replacing any prior values.
16690        pub fn with_request<V: Into<crate::model::CreateTaskRequest>>(mut self, v: V) -> Self {
16691            self.0.request = v.into();
16692            self
16693        }
16694
16695        /// Sets all the options, replacing any prior values.
16696        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
16697            self.0.options = v.into();
16698            self
16699        }
16700
16701        /// Sends the request.
16702        ///
16703        /// # Long running operations
16704        ///
16705        /// This starts, but does not poll, a longrunning operation. More information
16706        /// on [create_task][crate::client::DataplexService::create_task].
16707        pub async fn send(self) -> Result<longrunning::model::Operation> {
16708            (*self.0.stub)
16709                .create_task(self.0.request, self.0.options)
16710                .await
16711                .map(gax::response::Response::into_body)
16712        }
16713
16714        /// Creates a [Poller][lro::Poller] to work with `create_task`.
16715        pub fn poller(
16716            self,
16717        ) -> impl lro::Poller<crate::model::Task, crate::model::OperationMetadata> {
16718            type Operation =
16719                lro::internal::Operation<crate::model::Task, crate::model::OperationMetadata>;
16720            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
16721            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
16722
16723            let stub = self.0.stub.clone();
16724            let mut options = self.0.options.clone();
16725            options.set_retry_policy(gax::retry_policy::NeverRetry);
16726            let query = move |name| {
16727                let stub = stub.clone();
16728                let options = options.clone();
16729                async {
16730                    let op = GetOperation::new(stub)
16731                        .set_name(name)
16732                        .with_options(options)
16733                        .send()
16734                        .await?;
16735                    Ok(Operation::new(op))
16736                }
16737            };
16738
16739            let start = move || async {
16740                let op = self.send().await?;
16741                Ok(Operation::new(op))
16742            };
16743
16744            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
16745        }
16746
16747        /// Sets the value of [parent][crate::model::CreateTaskRequest::parent].
16748        ///
16749        /// This is a **required** field for requests.
16750        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
16751            self.0.request.parent = v.into();
16752            self
16753        }
16754
16755        /// Sets the value of [task_id][crate::model::CreateTaskRequest::task_id].
16756        ///
16757        /// This is a **required** field for requests.
16758        pub fn set_task_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
16759            self.0.request.task_id = v.into();
16760            self
16761        }
16762
16763        /// Sets the value of [task][crate::model::CreateTaskRequest::task].
16764        ///
16765        /// This is a **required** field for requests.
16766        pub fn set_task<T>(mut self, v: T) -> Self
16767        where
16768            T: std::convert::Into<crate::model::Task>,
16769        {
16770            self.0.request.task = std::option::Option::Some(v.into());
16771            self
16772        }
16773
16774        /// Sets or clears the value of [task][crate::model::CreateTaskRequest::task].
16775        ///
16776        /// This is a **required** field for requests.
16777        pub fn set_or_clear_task<T>(mut self, v: std::option::Option<T>) -> Self
16778        where
16779            T: std::convert::Into<crate::model::Task>,
16780        {
16781            self.0.request.task = v.map(|x| x.into());
16782            self
16783        }
16784
16785        /// Sets the value of [validate_only][crate::model::CreateTaskRequest::validate_only].
16786        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
16787            self.0.request.validate_only = v.into();
16788            self
16789        }
16790    }
16791
16792    #[doc(hidden)]
16793    impl gax::options::internal::RequestBuilder for CreateTask {
16794        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
16795            &mut self.0.options
16796        }
16797    }
16798
16799    /// The request builder for [DataplexService::update_task][crate::client::DataplexService::update_task] calls.
16800    ///
16801    /// # Example
16802    /// ```no_run
16803    /// # use google_cloud_dataplex_v1::builder;
16804    /// use builder::dataplex_service::UpdateTask;
16805    /// # tokio_test::block_on(async {
16806    /// use lro::Poller;
16807    ///
16808    /// let builder = prepare_request_builder();
16809    /// let response = builder.poller().until_done().await?;
16810    /// # gax::Result::<()>::Ok(()) });
16811    ///
16812    /// fn prepare_request_builder() -> UpdateTask {
16813    ///   # panic!();
16814    ///   // ... details omitted ...
16815    /// }
16816    /// ```
16817    #[derive(Clone, Debug)]
16818    pub struct UpdateTask(RequestBuilder<crate::model::UpdateTaskRequest>);
16819
16820    impl UpdateTask {
16821        pub(crate) fn new(
16822            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
16823        ) -> Self {
16824            Self(RequestBuilder::new(stub))
16825        }
16826
16827        /// Sets the full request, replacing any prior values.
16828        pub fn with_request<V: Into<crate::model::UpdateTaskRequest>>(mut self, v: V) -> Self {
16829            self.0.request = v.into();
16830            self
16831        }
16832
16833        /// Sets all the options, replacing any prior values.
16834        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
16835            self.0.options = v.into();
16836            self
16837        }
16838
16839        /// Sends the request.
16840        ///
16841        /// # Long running operations
16842        ///
16843        /// This starts, but does not poll, a longrunning operation. More information
16844        /// on [update_task][crate::client::DataplexService::update_task].
16845        pub async fn send(self) -> Result<longrunning::model::Operation> {
16846            (*self.0.stub)
16847                .update_task(self.0.request, self.0.options)
16848                .await
16849                .map(gax::response::Response::into_body)
16850        }
16851
16852        /// Creates a [Poller][lro::Poller] to work with `update_task`.
16853        pub fn poller(
16854            self,
16855        ) -> impl lro::Poller<crate::model::Task, crate::model::OperationMetadata> {
16856            type Operation =
16857                lro::internal::Operation<crate::model::Task, crate::model::OperationMetadata>;
16858            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
16859            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
16860
16861            let stub = self.0.stub.clone();
16862            let mut options = self.0.options.clone();
16863            options.set_retry_policy(gax::retry_policy::NeverRetry);
16864            let query = move |name| {
16865                let stub = stub.clone();
16866                let options = options.clone();
16867                async {
16868                    let op = GetOperation::new(stub)
16869                        .set_name(name)
16870                        .with_options(options)
16871                        .send()
16872                        .await?;
16873                    Ok(Operation::new(op))
16874                }
16875            };
16876
16877            let start = move || async {
16878                let op = self.send().await?;
16879                Ok(Operation::new(op))
16880            };
16881
16882            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
16883        }
16884
16885        /// Sets the value of [update_mask][crate::model::UpdateTaskRequest::update_mask].
16886        ///
16887        /// This is a **required** field for requests.
16888        pub fn set_update_mask<T>(mut self, v: T) -> Self
16889        where
16890            T: std::convert::Into<wkt::FieldMask>,
16891        {
16892            self.0.request.update_mask = std::option::Option::Some(v.into());
16893            self
16894        }
16895
16896        /// Sets or clears the value of [update_mask][crate::model::UpdateTaskRequest::update_mask].
16897        ///
16898        /// This is a **required** field for requests.
16899        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
16900        where
16901            T: std::convert::Into<wkt::FieldMask>,
16902        {
16903            self.0.request.update_mask = v.map(|x| x.into());
16904            self
16905        }
16906
16907        /// Sets the value of [task][crate::model::UpdateTaskRequest::task].
16908        ///
16909        /// This is a **required** field for requests.
16910        pub fn set_task<T>(mut self, v: T) -> Self
16911        where
16912            T: std::convert::Into<crate::model::Task>,
16913        {
16914            self.0.request.task = std::option::Option::Some(v.into());
16915            self
16916        }
16917
16918        /// Sets or clears the value of [task][crate::model::UpdateTaskRequest::task].
16919        ///
16920        /// This is a **required** field for requests.
16921        pub fn set_or_clear_task<T>(mut self, v: std::option::Option<T>) -> Self
16922        where
16923            T: std::convert::Into<crate::model::Task>,
16924        {
16925            self.0.request.task = v.map(|x| x.into());
16926            self
16927        }
16928
16929        /// Sets the value of [validate_only][crate::model::UpdateTaskRequest::validate_only].
16930        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
16931            self.0.request.validate_only = v.into();
16932            self
16933        }
16934    }
16935
16936    #[doc(hidden)]
16937    impl gax::options::internal::RequestBuilder for UpdateTask {
16938        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
16939            &mut self.0.options
16940        }
16941    }
16942
16943    /// The request builder for [DataplexService::delete_task][crate::client::DataplexService::delete_task] calls.
16944    ///
16945    /// # Example
16946    /// ```no_run
16947    /// # use google_cloud_dataplex_v1::builder;
16948    /// use builder::dataplex_service::DeleteTask;
16949    /// # tokio_test::block_on(async {
16950    /// use lro::Poller;
16951    ///
16952    /// let builder = prepare_request_builder();
16953    /// let response = builder.poller().until_done().await?;
16954    /// # gax::Result::<()>::Ok(()) });
16955    ///
16956    /// fn prepare_request_builder() -> DeleteTask {
16957    ///   # panic!();
16958    ///   // ... details omitted ...
16959    /// }
16960    /// ```
16961    #[derive(Clone, Debug)]
16962    pub struct DeleteTask(RequestBuilder<crate::model::DeleteTaskRequest>);
16963
16964    impl DeleteTask {
16965        pub(crate) fn new(
16966            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
16967        ) -> Self {
16968            Self(RequestBuilder::new(stub))
16969        }
16970
16971        /// Sets the full request, replacing any prior values.
16972        pub fn with_request<V: Into<crate::model::DeleteTaskRequest>>(mut self, v: V) -> Self {
16973            self.0.request = v.into();
16974            self
16975        }
16976
16977        /// Sets all the options, replacing any prior values.
16978        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
16979            self.0.options = v.into();
16980            self
16981        }
16982
16983        /// Sends the request.
16984        ///
16985        /// # Long running operations
16986        ///
16987        /// This starts, but does not poll, a longrunning operation. More information
16988        /// on [delete_task][crate::client::DataplexService::delete_task].
16989        pub async fn send(self) -> Result<longrunning::model::Operation> {
16990            (*self.0.stub)
16991                .delete_task(self.0.request, self.0.options)
16992                .await
16993                .map(gax::response::Response::into_body)
16994        }
16995
16996        /// Creates a [Poller][lro::Poller] to work with `delete_task`.
16997        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
16998            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
16999            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
17000            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
17001
17002            let stub = self.0.stub.clone();
17003            let mut options = self.0.options.clone();
17004            options.set_retry_policy(gax::retry_policy::NeverRetry);
17005            let query = move |name| {
17006                let stub = stub.clone();
17007                let options = options.clone();
17008                async {
17009                    let op = GetOperation::new(stub)
17010                        .set_name(name)
17011                        .with_options(options)
17012                        .send()
17013                        .await?;
17014                    Ok(Operation::new(op))
17015                }
17016            };
17017
17018            let start = move || async {
17019                let op = self.send().await?;
17020                Ok(Operation::new(op))
17021            };
17022
17023            lro::internal::new_unit_response_poller(
17024                polling_error_policy,
17025                polling_backoff_policy,
17026                start,
17027                query,
17028            )
17029        }
17030
17031        /// Sets the value of [name][crate::model::DeleteTaskRequest::name].
17032        ///
17033        /// This is a **required** field for requests.
17034        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17035            self.0.request.name = v.into();
17036            self
17037        }
17038    }
17039
17040    #[doc(hidden)]
17041    impl gax::options::internal::RequestBuilder for DeleteTask {
17042        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
17043            &mut self.0.options
17044        }
17045    }
17046
17047    /// The request builder for [DataplexService::list_tasks][crate::client::DataplexService::list_tasks] calls.
17048    ///
17049    /// # Example
17050    /// ```no_run
17051    /// # use google_cloud_dataplex_v1::builder;
17052    /// use builder::dataplex_service::ListTasks;
17053    /// # tokio_test::block_on(async {
17054    /// use gax::paginator::ItemPaginator;
17055    ///
17056    /// let builder = prepare_request_builder();
17057    /// let mut items = builder.by_item();
17058    /// while let Some(result) = items.next().await {
17059    ///   let item = result?;
17060    /// }
17061    /// # gax::Result::<()>::Ok(()) });
17062    ///
17063    /// fn prepare_request_builder() -> ListTasks {
17064    ///   # panic!();
17065    ///   // ... details omitted ...
17066    /// }
17067    /// ```
17068    #[derive(Clone, Debug)]
17069    pub struct ListTasks(RequestBuilder<crate::model::ListTasksRequest>);
17070
17071    impl ListTasks {
17072        pub(crate) fn new(
17073            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17074        ) -> Self {
17075            Self(RequestBuilder::new(stub))
17076        }
17077
17078        /// Sets the full request, replacing any prior values.
17079        pub fn with_request<V: Into<crate::model::ListTasksRequest>>(mut self, v: V) -> Self {
17080            self.0.request = v.into();
17081            self
17082        }
17083
17084        /// Sets all the options, replacing any prior values.
17085        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
17086            self.0.options = v.into();
17087            self
17088        }
17089
17090        /// Sends the request.
17091        pub async fn send(self) -> Result<crate::model::ListTasksResponse> {
17092            (*self.0.stub)
17093                .list_tasks(self.0.request, self.0.options)
17094                .await
17095                .map(gax::response::Response::into_body)
17096        }
17097
17098        /// Streams each page in the collection.
17099        pub fn by_page(
17100            self,
17101        ) -> impl gax::paginator::Paginator<crate::model::ListTasksResponse, gax::error::Error>
17102        {
17103            use std::clone::Clone;
17104            let token = self.0.request.page_token.clone();
17105            let execute = move |token: String| {
17106                let mut builder = self.clone();
17107                builder.0.request = builder.0.request.set_page_token(token);
17108                builder.send()
17109            };
17110            gax::paginator::internal::new_paginator(token, execute)
17111        }
17112
17113        /// Streams each item in the collection.
17114        pub fn by_item(
17115            self,
17116        ) -> impl gax::paginator::ItemPaginator<crate::model::ListTasksResponse, gax::error::Error>
17117        {
17118            use gax::paginator::Paginator;
17119            self.by_page().items()
17120        }
17121
17122        /// Sets the value of [parent][crate::model::ListTasksRequest::parent].
17123        ///
17124        /// This is a **required** field for requests.
17125        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
17126            self.0.request.parent = v.into();
17127            self
17128        }
17129
17130        /// Sets the value of [page_size][crate::model::ListTasksRequest::page_size].
17131        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
17132            self.0.request.page_size = v.into();
17133            self
17134        }
17135
17136        /// Sets the value of [page_token][crate::model::ListTasksRequest::page_token].
17137        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
17138            self.0.request.page_token = v.into();
17139            self
17140        }
17141
17142        /// Sets the value of [filter][crate::model::ListTasksRequest::filter].
17143        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
17144            self.0.request.filter = v.into();
17145            self
17146        }
17147
17148        /// Sets the value of [order_by][crate::model::ListTasksRequest::order_by].
17149        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
17150            self.0.request.order_by = v.into();
17151            self
17152        }
17153    }
17154
17155    #[doc(hidden)]
17156    impl gax::options::internal::RequestBuilder for ListTasks {
17157        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
17158            &mut self.0.options
17159        }
17160    }
17161
17162    /// The request builder for [DataplexService::get_task][crate::client::DataplexService::get_task] calls.
17163    ///
17164    /// # Example
17165    /// ```no_run
17166    /// # use google_cloud_dataplex_v1::builder;
17167    /// use builder::dataplex_service::GetTask;
17168    /// # tokio_test::block_on(async {
17169    ///
17170    /// let builder = prepare_request_builder();
17171    /// let response = builder.send().await?;
17172    /// # gax::Result::<()>::Ok(()) });
17173    ///
17174    /// fn prepare_request_builder() -> GetTask {
17175    ///   # panic!();
17176    ///   // ... details omitted ...
17177    /// }
17178    /// ```
17179    #[derive(Clone, Debug)]
17180    pub struct GetTask(RequestBuilder<crate::model::GetTaskRequest>);
17181
17182    impl GetTask {
17183        pub(crate) fn new(
17184            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17185        ) -> Self {
17186            Self(RequestBuilder::new(stub))
17187        }
17188
17189        /// Sets the full request, replacing any prior values.
17190        pub fn with_request<V: Into<crate::model::GetTaskRequest>>(mut self, v: V) -> Self {
17191            self.0.request = v.into();
17192            self
17193        }
17194
17195        /// Sets all the options, replacing any prior values.
17196        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
17197            self.0.options = v.into();
17198            self
17199        }
17200
17201        /// Sends the request.
17202        pub async fn send(self) -> Result<crate::model::Task> {
17203            (*self.0.stub)
17204                .get_task(self.0.request, self.0.options)
17205                .await
17206                .map(gax::response::Response::into_body)
17207        }
17208
17209        /// Sets the value of [name][crate::model::GetTaskRequest::name].
17210        ///
17211        /// This is a **required** field for requests.
17212        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17213            self.0.request.name = v.into();
17214            self
17215        }
17216    }
17217
17218    #[doc(hidden)]
17219    impl gax::options::internal::RequestBuilder for GetTask {
17220        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
17221            &mut self.0.options
17222        }
17223    }
17224
17225    /// The request builder for [DataplexService::list_jobs][crate::client::DataplexService::list_jobs] calls.
17226    ///
17227    /// # Example
17228    /// ```no_run
17229    /// # use google_cloud_dataplex_v1::builder;
17230    /// use builder::dataplex_service::ListJobs;
17231    /// # tokio_test::block_on(async {
17232    /// use gax::paginator::ItemPaginator;
17233    ///
17234    /// let builder = prepare_request_builder();
17235    /// let mut items = builder.by_item();
17236    /// while let Some(result) = items.next().await {
17237    ///   let item = result?;
17238    /// }
17239    /// # gax::Result::<()>::Ok(()) });
17240    ///
17241    /// fn prepare_request_builder() -> ListJobs {
17242    ///   # panic!();
17243    ///   // ... details omitted ...
17244    /// }
17245    /// ```
17246    #[derive(Clone, Debug)]
17247    pub struct ListJobs(RequestBuilder<crate::model::ListJobsRequest>);
17248
17249    impl ListJobs {
17250        pub(crate) fn new(
17251            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17252        ) -> Self {
17253            Self(RequestBuilder::new(stub))
17254        }
17255
17256        /// Sets the full request, replacing any prior values.
17257        pub fn with_request<V: Into<crate::model::ListJobsRequest>>(mut self, v: V) -> Self {
17258            self.0.request = v.into();
17259            self
17260        }
17261
17262        /// Sets all the options, replacing any prior values.
17263        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
17264            self.0.options = v.into();
17265            self
17266        }
17267
17268        /// Sends the request.
17269        pub async fn send(self) -> Result<crate::model::ListJobsResponse> {
17270            (*self.0.stub)
17271                .list_jobs(self.0.request, self.0.options)
17272                .await
17273                .map(gax::response::Response::into_body)
17274        }
17275
17276        /// Streams each page in the collection.
17277        pub fn by_page(
17278            self,
17279        ) -> impl gax::paginator::Paginator<crate::model::ListJobsResponse, gax::error::Error>
17280        {
17281            use std::clone::Clone;
17282            let token = self.0.request.page_token.clone();
17283            let execute = move |token: String| {
17284                let mut builder = self.clone();
17285                builder.0.request = builder.0.request.set_page_token(token);
17286                builder.send()
17287            };
17288            gax::paginator::internal::new_paginator(token, execute)
17289        }
17290
17291        /// Streams each item in the collection.
17292        pub fn by_item(
17293            self,
17294        ) -> impl gax::paginator::ItemPaginator<crate::model::ListJobsResponse, gax::error::Error>
17295        {
17296            use gax::paginator::Paginator;
17297            self.by_page().items()
17298        }
17299
17300        /// Sets the value of [parent][crate::model::ListJobsRequest::parent].
17301        ///
17302        /// This is a **required** field for requests.
17303        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
17304            self.0.request.parent = v.into();
17305            self
17306        }
17307
17308        /// Sets the value of [page_size][crate::model::ListJobsRequest::page_size].
17309        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
17310            self.0.request.page_size = v.into();
17311            self
17312        }
17313
17314        /// Sets the value of [page_token][crate::model::ListJobsRequest::page_token].
17315        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
17316            self.0.request.page_token = v.into();
17317            self
17318        }
17319    }
17320
17321    #[doc(hidden)]
17322    impl gax::options::internal::RequestBuilder for ListJobs {
17323        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
17324            &mut self.0.options
17325        }
17326    }
17327
17328    /// The request builder for [DataplexService::run_task][crate::client::DataplexService::run_task] calls.
17329    ///
17330    /// # Example
17331    /// ```no_run
17332    /// # use google_cloud_dataplex_v1::builder;
17333    /// use builder::dataplex_service::RunTask;
17334    /// # tokio_test::block_on(async {
17335    ///
17336    /// let builder = prepare_request_builder();
17337    /// let response = builder.send().await?;
17338    /// # gax::Result::<()>::Ok(()) });
17339    ///
17340    /// fn prepare_request_builder() -> RunTask {
17341    ///   # panic!();
17342    ///   // ... details omitted ...
17343    /// }
17344    /// ```
17345    #[derive(Clone, Debug)]
17346    pub struct RunTask(RequestBuilder<crate::model::RunTaskRequest>);
17347
17348    impl RunTask {
17349        pub(crate) fn new(
17350            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17351        ) -> Self {
17352            Self(RequestBuilder::new(stub))
17353        }
17354
17355        /// Sets the full request, replacing any prior values.
17356        pub fn with_request<V: Into<crate::model::RunTaskRequest>>(mut self, v: V) -> Self {
17357            self.0.request = v.into();
17358            self
17359        }
17360
17361        /// Sets all the options, replacing any prior values.
17362        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
17363            self.0.options = v.into();
17364            self
17365        }
17366
17367        /// Sends the request.
17368        pub async fn send(self) -> Result<crate::model::RunTaskResponse> {
17369            (*self.0.stub)
17370                .run_task(self.0.request, self.0.options)
17371                .await
17372                .map(gax::response::Response::into_body)
17373        }
17374
17375        /// Sets the value of [name][crate::model::RunTaskRequest::name].
17376        ///
17377        /// This is a **required** field for requests.
17378        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17379            self.0.request.name = v.into();
17380            self
17381        }
17382
17383        /// Sets the value of [labels][crate::model::RunTaskRequest::labels].
17384        pub fn set_labels<T, K, V>(mut self, v: T) -> Self
17385        where
17386            T: std::iter::IntoIterator<Item = (K, V)>,
17387            K: std::convert::Into<std::string::String>,
17388            V: std::convert::Into<std::string::String>,
17389        {
17390            self.0.request.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
17391            self
17392        }
17393
17394        /// Sets the value of [args][crate::model::RunTaskRequest::args].
17395        pub fn set_args<T, K, V>(mut self, v: T) -> Self
17396        where
17397            T: std::iter::IntoIterator<Item = (K, V)>,
17398            K: std::convert::Into<std::string::String>,
17399            V: std::convert::Into<std::string::String>,
17400        {
17401            self.0.request.args = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
17402            self
17403        }
17404    }
17405
17406    #[doc(hidden)]
17407    impl gax::options::internal::RequestBuilder for RunTask {
17408        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
17409            &mut self.0.options
17410        }
17411    }
17412
17413    /// The request builder for [DataplexService::get_job][crate::client::DataplexService::get_job] calls.
17414    ///
17415    /// # Example
17416    /// ```no_run
17417    /// # use google_cloud_dataplex_v1::builder;
17418    /// use builder::dataplex_service::GetJob;
17419    /// # tokio_test::block_on(async {
17420    ///
17421    /// let builder = prepare_request_builder();
17422    /// let response = builder.send().await?;
17423    /// # gax::Result::<()>::Ok(()) });
17424    ///
17425    /// fn prepare_request_builder() -> GetJob {
17426    ///   # panic!();
17427    ///   // ... details omitted ...
17428    /// }
17429    /// ```
17430    #[derive(Clone, Debug)]
17431    pub struct GetJob(RequestBuilder<crate::model::GetJobRequest>);
17432
17433    impl GetJob {
17434        pub(crate) fn new(
17435            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17436        ) -> Self {
17437            Self(RequestBuilder::new(stub))
17438        }
17439
17440        /// Sets the full request, replacing any prior values.
17441        pub fn with_request<V: Into<crate::model::GetJobRequest>>(mut self, v: V) -> Self {
17442            self.0.request = v.into();
17443            self
17444        }
17445
17446        /// Sets all the options, replacing any prior values.
17447        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
17448            self.0.options = v.into();
17449            self
17450        }
17451
17452        /// Sends the request.
17453        pub async fn send(self) -> Result<crate::model::Job> {
17454            (*self.0.stub)
17455                .get_job(self.0.request, self.0.options)
17456                .await
17457                .map(gax::response::Response::into_body)
17458        }
17459
17460        /// Sets the value of [name][crate::model::GetJobRequest::name].
17461        ///
17462        /// This is a **required** field for requests.
17463        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17464            self.0.request.name = v.into();
17465            self
17466        }
17467    }
17468
17469    #[doc(hidden)]
17470    impl gax::options::internal::RequestBuilder for GetJob {
17471        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
17472            &mut self.0.options
17473        }
17474    }
17475
17476    /// The request builder for [DataplexService::cancel_job][crate::client::DataplexService::cancel_job] calls.
17477    ///
17478    /// # Example
17479    /// ```no_run
17480    /// # use google_cloud_dataplex_v1::builder;
17481    /// use builder::dataplex_service::CancelJob;
17482    /// # tokio_test::block_on(async {
17483    ///
17484    /// let builder = prepare_request_builder();
17485    /// let response = builder.send().await?;
17486    /// # gax::Result::<()>::Ok(()) });
17487    ///
17488    /// fn prepare_request_builder() -> CancelJob {
17489    ///   # panic!();
17490    ///   // ... details omitted ...
17491    /// }
17492    /// ```
17493    #[derive(Clone, Debug)]
17494    pub struct CancelJob(RequestBuilder<crate::model::CancelJobRequest>);
17495
17496    impl CancelJob {
17497        pub(crate) fn new(
17498            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17499        ) -> Self {
17500            Self(RequestBuilder::new(stub))
17501        }
17502
17503        /// Sets the full request, replacing any prior values.
17504        pub fn with_request<V: Into<crate::model::CancelJobRequest>>(mut self, v: V) -> Self {
17505            self.0.request = v.into();
17506            self
17507        }
17508
17509        /// Sets all the options, replacing any prior values.
17510        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
17511            self.0.options = v.into();
17512            self
17513        }
17514
17515        /// Sends the request.
17516        pub async fn send(self) -> Result<()> {
17517            (*self.0.stub)
17518                .cancel_job(self.0.request, self.0.options)
17519                .await
17520                .map(gax::response::Response::into_body)
17521        }
17522
17523        /// Sets the value of [name][crate::model::CancelJobRequest::name].
17524        ///
17525        /// This is a **required** field for requests.
17526        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17527            self.0.request.name = v.into();
17528            self
17529        }
17530    }
17531
17532    #[doc(hidden)]
17533    impl gax::options::internal::RequestBuilder for CancelJob {
17534        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
17535            &mut self.0.options
17536        }
17537    }
17538
17539    /// The request builder for [DataplexService::create_environment][crate::client::DataplexService::create_environment] calls.
17540    ///
17541    /// # Example
17542    /// ```no_run
17543    /// # use google_cloud_dataplex_v1::builder;
17544    /// use builder::dataplex_service::CreateEnvironment;
17545    /// # tokio_test::block_on(async {
17546    /// use lro::Poller;
17547    ///
17548    /// let builder = prepare_request_builder();
17549    /// let response = builder.poller().until_done().await?;
17550    /// # gax::Result::<()>::Ok(()) });
17551    ///
17552    /// fn prepare_request_builder() -> CreateEnvironment {
17553    ///   # panic!();
17554    ///   // ... details omitted ...
17555    /// }
17556    /// ```
17557    #[derive(Clone, Debug)]
17558    pub struct CreateEnvironment(RequestBuilder<crate::model::CreateEnvironmentRequest>);
17559
17560    impl CreateEnvironment {
17561        pub(crate) fn new(
17562            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17563        ) -> Self {
17564            Self(RequestBuilder::new(stub))
17565        }
17566
17567        /// Sets the full request, replacing any prior values.
17568        pub fn with_request<V: Into<crate::model::CreateEnvironmentRequest>>(
17569            mut self,
17570            v: V,
17571        ) -> Self {
17572            self.0.request = v.into();
17573            self
17574        }
17575
17576        /// Sets all the options, replacing any prior values.
17577        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
17578            self.0.options = v.into();
17579            self
17580        }
17581
17582        /// Sends the request.
17583        ///
17584        /// # Long running operations
17585        ///
17586        /// This starts, but does not poll, a longrunning operation. More information
17587        /// on [create_environment][crate::client::DataplexService::create_environment].
17588        pub async fn send(self) -> Result<longrunning::model::Operation> {
17589            (*self.0.stub)
17590                .create_environment(self.0.request, self.0.options)
17591                .await
17592                .map(gax::response::Response::into_body)
17593        }
17594
17595        /// Creates a [Poller][lro::Poller] to work with `create_environment`.
17596        pub fn poller(
17597            self,
17598        ) -> impl lro::Poller<crate::model::Environment, crate::model::OperationMetadata> {
17599            type Operation = lro::internal::Operation<
17600                crate::model::Environment,
17601                crate::model::OperationMetadata,
17602            >;
17603            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
17604            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
17605
17606            let stub = self.0.stub.clone();
17607            let mut options = self.0.options.clone();
17608            options.set_retry_policy(gax::retry_policy::NeverRetry);
17609            let query = move |name| {
17610                let stub = stub.clone();
17611                let options = options.clone();
17612                async {
17613                    let op = GetOperation::new(stub)
17614                        .set_name(name)
17615                        .with_options(options)
17616                        .send()
17617                        .await?;
17618                    Ok(Operation::new(op))
17619                }
17620            };
17621
17622            let start = move || async {
17623                let op = self.send().await?;
17624                Ok(Operation::new(op))
17625            };
17626
17627            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
17628        }
17629
17630        /// Sets the value of [parent][crate::model::CreateEnvironmentRequest::parent].
17631        ///
17632        /// This is a **required** field for requests.
17633        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
17634            self.0.request.parent = v.into();
17635            self
17636        }
17637
17638        /// Sets the value of [environment_id][crate::model::CreateEnvironmentRequest::environment_id].
17639        ///
17640        /// This is a **required** field for requests.
17641        pub fn set_environment_id<T: Into<std::string::String>>(mut self, v: T) -> Self {
17642            self.0.request.environment_id = v.into();
17643            self
17644        }
17645
17646        /// Sets the value of [environment][crate::model::CreateEnvironmentRequest::environment].
17647        ///
17648        /// This is a **required** field for requests.
17649        pub fn set_environment<T>(mut self, v: T) -> Self
17650        where
17651            T: std::convert::Into<crate::model::Environment>,
17652        {
17653            self.0.request.environment = std::option::Option::Some(v.into());
17654            self
17655        }
17656
17657        /// Sets or clears the value of [environment][crate::model::CreateEnvironmentRequest::environment].
17658        ///
17659        /// This is a **required** field for requests.
17660        pub fn set_or_clear_environment<T>(mut self, v: std::option::Option<T>) -> Self
17661        where
17662            T: std::convert::Into<crate::model::Environment>,
17663        {
17664            self.0.request.environment = v.map(|x| x.into());
17665            self
17666        }
17667
17668        /// Sets the value of [validate_only][crate::model::CreateEnvironmentRequest::validate_only].
17669        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
17670            self.0.request.validate_only = v.into();
17671            self
17672        }
17673    }
17674
17675    #[doc(hidden)]
17676    impl gax::options::internal::RequestBuilder for CreateEnvironment {
17677        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
17678            &mut self.0.options
17679        }
17680    }
17681
17682    /// The request builder for [DataplexService::update_environment][crate::client::DataplexService::update_environment] calls.
17683    ///
17684    /// # Example
17685    /// ```no_run
17686    /// # use google_cloud_dataplex_v1::builder;
17687    /// use builder::dataplex_service::UpdateEnvironment;
17688    /// # tokio_test::block_on(async {
17689    /// use lro::Poller;
17690    ///
17691    /// let builder = prepare_request_builder();
17692    /// let response = builder.poller().until_done().await?;
17693    /// # gax::Result::<()>::Ok(()) });
17694    ///
17695    /// fn prepare_request_builder() -> UpdateEnvironment {
17696    ///   # panic!();
17697    ///   // ... details omitted ...
17698    /// }
17699    /// ```
17700    #[derive(Clone, Debug)]
17701    pub struct UpdateEnvironment(RequestBuilder<crate::model::UpdateEnvironmentRequest>);
17702
17703    impl UpdateEnvironment {
17704        pub(crate) fn new(
17705            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17706        ) -> Self {
17707            Self(RequestBuilder::new(stub))
17708        }
17709
17710        /// Sets the full request, replacing any prior values.
17711        pub fn with_request<V: Into<crate::model::UpdateEnvironmentRequest>>(
17712            mut self,
17713            v: V,
17714        ) -> Self {
17715            self.0.request = v.into();
17716            self
17717        }
17718
17719        /// Sets all the options, replacing any prior values.
17720        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
17721            self.0.options = v.into();
17722            self
17723        }
17724
17725        /// Sends the request.
17726        ///
17727        /// # Long running operations
17728        ///
17729        /// This starts, but does not poll, a longrunning operation. More information
17730        /// on [update_environment][crate::client::DataplexService::update_environment].
17731        pub async fn send(self) -> Result<longrunning::model::Operation> {
17732            (*self.0.stub)
17733                .update_environment(self.0.request, self.0.options)
17734                .await
17735                .map(gax::response::Response::into_body)
17736        }
17737
17738        /// Creates a [Poller][lro::Poller] to work with `update_environment`.
17739        pub fn poller(
17740            self,
17741        ) -> impl lro::Poller<crate::model::Environment, crate::model::OperationMetadata> {
17742            type Operation = lro::internal::Operation<
17743                crate::model::Environment,
17744                crate::model::OperationMetadata,
17745            >;
17746            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
17747            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
17748
17749            let stub = self.0.stub.clone();
17750            let mut options = self.0.options.clone();
17751            options.set_retry_policy(gax::retry_policy::NeverRetry);
17752            let query = move |name| {
17753                let stub = stub.clone();
17754                let options = options.clone();
17755                async {
17756                    let op = GetOperation::new(stub)
17757                        .set_name(name)
17758                        .with_options(options)
17759                        .send()
17760                        .await?;
17761                    Ok(Operation::new(op))
17762                }
17763            };
17764
17765            let start = move || async {
17766                let op = self.send().await?;
17767                Ok(Operation::new(op))
17768            };
17769
17770            lro::internal::new_poller(polling_error_policy, polling_backoff_policy, start, query)
17771        }
17772
17773        /// Sets the value of [update_mask][crate::model::UpdateEnvironmentRequest::update_mask].
17774        ///
17775        /// This is a **required** field for requests.
17776        pub fn set_update_mask<T>(mut self, v: T) -> Self
17777        where
17778            T: std::convert::Into<wkt::FieldMask>,
17779        {
17780            self.0.request.update_mask = std::option::Option::Some(v.into());
17781            self
17782        }
17783
17784        /// Sets or clears the value of [update_mask][crate::model::UpdateEnvironmentRequest::update_mask].
17785        ///
17786        /// This is a **required** field for requests.
17787        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
17788        where
17789            T: std::convert::Into<wkt::FieldMask>,
17790        {
17791            self.0.request.update_mask = v.map(|x| x.into());
17792            self
17793        }
17794
17795        /// Sets the value of [environment][crate::model::UpdateEnvironmentRequest::environment].
17796        ///
17797        /// This is a **required** field for requests.
17798        pub fn set_environment<T>(mut self, v: T) -> Self
17799        where
17800            T: std::convert::Into<crate::model::Environment>,
17801        {
17802            self.0.request.environment = std::option::Option::Some(v.into());
17803            self
17804        }
17805
17806        /// Sets or clears the value of [environment][crate::model::UpdateEnvironmentRequest::environment].
17807        ///
17808        /// This is a **required** field for requests.
17809        pub fn set_or_clear_environment<T>(mut self, v: std::option::Option<T>) -> Self
17810        where
17811            T: std::convert::Into<crate::model::Environment>,
17812        {
17813            self.0.request.environment = v.map(|x| x.into());
17814            self
17815        }
17816
17817        /// Sets the value of [validate_only][crate::model::UpdateEnvironmentRequest::validate_only].
17818        pub fn set_validate_only<T: Into<bool>>(mut self, v: T) -> Self {
17819            self.0.request.validate_only = v.into();
17820            self
17821        }
17822    }
17823
17824    #[doc(hidden)]
17825    impl gax::options::internal::RequestBuilder for UpdateEnvironment {
17826        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
17827            &mut self.0.options
17828        }
17829    }
17830
17831    /// The request builder for [DataplexService::delete_environment][crate::client::DataplexService::delete_environment] calls.
17832    ///
17833    /// # Example
17834    /// ```no_run
17835    /// # use google_cloud_dataplex_v1::builder;
17836    /// use builder::dataplex_service::DeleteEnvironment;
17837    /// # tokio_test::block_on(async {
17838    /// use lro::Poller;
17839    ///
17840    /// let builder = prepare_request_builder();
17841    /// let response = builder.poller().until_done().await?;
17842    /// # gax::Result::<()>::Ok(()) });
17843    ///
17844    /// fn prepare_request_builder() -> DeleteEnvironment {
17845    ///   # panic!();
17846    ///   // ... details omitted ...
17847    /// }
17848    /// ```
17849    #[derive(Clone, Debug)]
17850    pub struct DeleteEnvironment(RequestBuilder<crate::model::DeleteEnvironmentRequest>);
17851
17852    impl DeleteEnvironment {
17853        pub(crate) fn new(
17854            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17855        ) -> Self {
17856            Self(RequestBuilder::new(stub))
17857        }
17858
17859        /// Sets the full request, replacing any prior values.
17860        pub fn with_request<V: Into<crate::model::DeleteEnvironmentRequest>>(
17861            mut self,
17862            v: V,
17863        ) -> Self {
17864            self.0.request = v.into();
17865            self
17866        }
17867
17868        /// Sets all the options, replacing any prior values.
17869        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
17870            self.0.options = v.into();
17871            self
17872        }
17873
17874        /// Sends the request.
17875        ///
17876        /// # Long running operations
17877        ///
17878        /// This starts, but does not poll, a longrunning operation. More information
17879        /// on [delete_environment][crate::client::DataplexService::delete_environment].
17880        pub async fn send(self) -> Result<longrunning::model::Operation> {
17881            (*self.0.stub)
17882                .delete_environment(self.0.request, self.0.options)
17883                .await
17884                .map(gax::response::Response::into_body)
17885        }
17886
17887        /// Creates a [Poller][lro::Poller] to work with `delete_environment`.
17888        pub fn poller(self) -> impl lro::Poller<(), crate::model::OperationMetadata> {
17889            type Operation = lro::internal::Operation<wkt::Empty, crate::model::OperationMetadata>;
17890            let polling_error_policy = self.0.stub.get_polling_error_policy(&self.0.options);
17891            let polling_backoff_policy = self.0.stub.get_polling_backoff_policy(&self.0.options);
17892
17893            let stub = self.0.stub.clone();
17894            let mut options = self.0.options.clone();
17895            options.set_retry_policy(gax::retry_policy::NeverRetry);
17896            let query = move |name| {
17897                let stub = stub.clone();
17898                let options = options.clone();
17899                async {
17900                    let op = GetOperation::new(stub)
17901                        .set_name(name)
17902                        .with_options(options)
17903                        .send()
17904                        .await?;
17905                    Ok(Operation::new(op))
17906                }
17907            };
17908
17909            let start = move || async {
17910                let op = self.send().await?;
17911                Ok(Operation::new(op))
17912            };
17913
17914            lro::internal::new_unit_response_poller(
17915                polling_error_policy,
17916                polling_backoff_policy,
17917                start,
17918                query,
17919            )
17920        }
17921
17922        /// Sets the value of [name][crate::model::DeleteEnvironmentRequest::name].
17923        ///
17924        /// This is a **required** field for requests.
17925        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
17926            self.0.request.name = v.into();
17927            self
17928        }
17929    }
17930
17931    #[doc(hidden)]
17932    impl gax::options::internal::RequestBuilder for DeleteEnvironment {
17933        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
17934            &mut self.0.options
17935        }
17936    }
17937
17938    /// The request builder for [DataplexService::list_environments][crate::client::DataplexService::list_environments] calls.
17939    ///
17940    /// # Example
17941    /// ```no_run
17942    /// # use google_cloud_dataplex_v1::builder;
17943    /// use builder::dataplex_service::ListEnvironments;
17944    /// # tokio_test::block_on(async {
17945    /// use gax::paginator::ItemPaginator;
17946    ///
17947    /// let builder = prepare_request_builder();
17948    /// let mut items = builder.by_item();
17949    /// while let Some(result) = items.next().await {
17950    ///   let item = result?;
17951    /// }
17952    /// # gax::Result::<()>::Ok(()) });
17953    ///
17954    /// fn prepare_request_builder() -> ListEnvironments {
17955    ///   # panic!();
17956    ///   // ... details omitted ...
17957    /// }
17958    /// ```
17959    #[derive(Clone, Debug)]
17960    pub struct ListEnvironments(RequestBuilder<crate::model::ListEnvironmentsRequest>);
17961
17962    impl ListEnvironments {
17963        pub(crate) fn new(
17964            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
17965        ) -> Self {
17966            Self(RequestBuilder::new(stub))
17967        }
17968
17969        /// Sets the full request, replacing any prior values.
17970        pub fn with_request<V: Into<crate::model::ListEnvironmentsRequest>>(
17971            mut self,
17972            v: V,
17973        ) -> Self {
17974            self.0.request = v.into();
17975            self
17976        }
17977
17978        /// Sets all the options, replacing any prior values.
17979        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
17980            self.0.options = v.into();
17981            self
17982        }
17983
17984        /// Sends the request.
17985        pub async fn send(self) -> Result<crate::model::ListEnvironmentsResponse> {
17986            (*self.0.stub)
17987                .list_environments(self.0.request, self.0.options)
17988                .await
17989                .map(gax::response::Response::into_body)
17990        }
17991
17992        /// Streams each page in the collection.
17993        pub fn by_page(
17994            self,
17995        ) -> impl gax::paginator::Paginator<crate::model::ListEnvironmentsResponse, gax::error::Error>
17996        {
17997            use std::clone::Clone;
17998            let token = self.0.request.page_token.clone();
17999            let execute = move |token: String| {
18000                let mut builder = self.clone();
18001                builder.0.request = builder.0.request.set_page_token(token);
18002                builder.send()
18003            };
18004            gax::paginator::internal::new_paginator(token, execute)
18005        }
18006
18007        /// Streams each item in the collection.
18008        pub fn by_item(
18009            self,
18010        ) -> impl gax::paginator::ItemPaginator<crate::model::ListEnvironmentsResponse, gax::error::Error>
18011        {
18012            use gax::paginator::Paginator;
18013            self.by_page().items()
18014        }
18015
18016        /// Sets the value of [parent][crate::model::ListEnvironmentsRequest::parent].
18017        ///
18018        /// This is a **required** field for requests.
18019        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
18020            self.0.request.parent = v.into();
18021            self
18022        }
18023
18024        /// Sets the value of [page_size][crate::model::ListEnvironmentsRequest::page_size].
18025        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
18026            self.0.request.page_size = v.into();
18027            self
18028        }
18029
18030        /// Sets the value of [page_token][crate::model::ListEnvironmentsRequest::page_token].
18031        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
18032            self.0.request.page_token = v.into();
18033            self
18034        }
18035
18036        /// Sets the value of [filter][crate::model::ListEnvironmentsRequest::filter].
18037        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
18038            self.0.request.filter = v.into();
18039            self
18040        }
18041
18042        /// Sets the value of [order_by][crate::model::ListEnvironmentsRequest::order_by].
18043        pub fn set_order_by<T: Into<std::string::String>>(mut self, v: T) -> Self {
18044            self.0.request.order_by = v.into();
18045            self
18046        }
18047    }
18048
18049    #[doc(hidden)]
18050    impl gax::options::internal::RequestBuilder for ListEnvironments {
18051        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
18052            &mut self.0.options
18053        }
18054    }
18055
18056    /// The request builder for [DataplexService::get_environment][crate::client::DataplexService::get_environment] calls.
18057    ///
18058    /// # Example
18059    /// ```no_run
18060    /// # use google_cloud_dataplex_v1::builder;
18061    /// use builder::dataplex_service::GetEnvironment;
18062    /// # tokio_test::block_on(async {
18063    ///
18064    /// let builder = prepare_request_builder();
18065    /// let response = builder.send().await?;
18066    /// # gax::Result::<()>::Ok(()) });
18067    ///
18068    /// fn prepare_request_builder() -> GetEnvironment {
18069    ///   # panic!();
18070    ///   // ... details omitted ...
18071    /// }
18072    /// ```
18073    #[derive(Clone, Debug)]
18074    pub struct GetEnvironment(RequestBuilder<crate::model::GetEnvironmentRequest>);
18075
18076    impl GetEnvironment {
18077        pub(crate) fn new(
18078            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18079        ) -> Self {
18080            Self(RequestBuilder::new(stub))
18081        }
18082
18083        /// Sets the full request, replacing any prior values.
18084        pub fn with_request<V: Into<crate::model::GetEnvironmentRequest>>(mut self, v: V) -> Self {
18085            self.0.request = v.into();
18086            self
18087        }
18088
18089        /// Sets all the options, replacing any prior values.
18090        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
18091            self.0.options = v.into();
18092            self
18093        }
18094
18095        /// Sends the request.
18096        pub async fn send(self) -> Result<crate::model::Environment> {
18097            (*self.0.stub)
18098                .get_environment(self.0.request, self.0.options)
18099                .await
18100                .map(gax::response::Response::into_body)
18101        }
18102
18103        /// Sets the value of [name][crate::model::GetEnvironmentRequest::name].
18104        ///
18105        /// This is a **required** field for requests.
18106        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
18107            self.0.request.name = v.into();
18108            self
18109        }
18110    }
18111
18112    #[doc(hidden)]
18113    impl gax::options::internal::RequestBuilder for GetEnvironment {
18114        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
18115            &mut self.0.options
18116        }
18117    }
18118
18119    /// The request builder for [DataplexService::list_sessions][crate::client::DataplexService::list_sessions] calls.
18120    ///
18121    /// # Example
18122    /// ```no_run
18123    /// # use google_cloud_dataplex_v1::builder;
18124    /// use builder::dataplex_service::ListSessions;
18125    /// # tokio_test::block_on(async {
18126    /// use gax::paginator::ItemPaginator;
18127    ///
18128    /// let builder = prepare_request_builder();
18129    /// let mut items = builder.by_item();
18130    /// while let Some(result) = items.next().await {
18131    ///   let item = result?;
18132    /// }
18133    /// # gax::Result::<()>::Ok(()) });
18134    ///
18135    /// fn prepare_request_builder() -> ListSessions {
18136    ///   # panic!();
18137    ///   // ... details omitted ...
18138    /// }
18139    /// ```
18140    #[derive(Clone, Debug)]
18141    pub struct ListSessions(RequestBuilder<crate::model::ListSessionsRequest>);
18142
18143    impl ListSessions {
18144        pub(crate) fn new(
18145            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18146        ) -> Self {
18147            Self(RequestBuilder::new(stub))
18148        }
18149
18150        /// Sets the full request, replacing any prior values.
18151        pub fn with_request<V: Into<crate::model::ListSessionsRequest>>(mut self, v: V) -> Self {
18152            self.0.request = v.into();
18153            self
18154        }
18155
18156        /// Sets all the options, replacing any prior values.
18157        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
18158            self.0.options = v.into();
18159            self
18160        }
18161
18162        /// Sends the request.
18163        pub async fn send(self) -> Result<crate::model::ListSessionsResponse> {
18164            (*self.0.stub)
18165                .list_sessions(self.0.request, self.0.options)
18166                .await
18167                .map(gax::response::Response::into_body)
18168        }
18169
18170        /// Streams each page in the collection.
18171        pub fn by_page(
18172            self,
18173        ) -> impl gax::paginator::Paginator<crate::model::ListSessionsResponse, gax::error::Error>
18174        {
18175            use std::clone::Clone;
18176            let token = self.0.request.page_token.clone();
18177            let execute = move |token: String| {
18178                let mut builder = self.clone();
18179                builder.0.request = builder.0.request.set_page_token(token);
18180                builder.send()
18181            };
18182            gax::paginator::internal::new_paginator(token, execute)
18183        }
18184
18185        /// Streams each item in the collection.
18186        pub fn by_item(
18187            self,
18188        ) -> impl gax::paginator::ItemPaginator<crate::model::ListSessionsResponse, gax::error::Error>
18189        {
18190            use gax::paginator::Paginator;
18191            self.by_page().items()
18192        }
18193
18194        /// Sets the value of [parent][crate::model::ListSessionsRequest::parent].
18195        ///
18196        /// This is a **required** field for requests.
18197        pub fn set_parent<T: Into<std::string::String>>(mut self, v: T) -> Self {
18198            self.0.request.parent = v.into();
18199            self
18200        }
18201
18202        /// Sets the value of [page_size][crate::model::ListSessionsRequest::page_size].
18203        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
18204            self.0.request.page_size = v.into();
18205            self
18206        }
18207
18208        /// Sets the value of [page_token][crate::model::ListSessionsRequest::page_token].
18209        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
18210            self.0.request.page_token = v.into();
18211            self
18212        }
18213
18214        /// Sets the value of [filter][crate::model::ListSessionsRequest::filter].
18215        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
18216            self.0.request.filter = v.into();
18217            self
18218        }
18219    }
18220
18221    #[doc(hidden)]
18222    impl gax::options::internal::RequestBuilder for ListSessions {
18223        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
18224            &mut self.0.options
18225        }
18226    }
18227
18228    /// The request builder for [DataplexService::list_locations][crate::client::DataplexService::list_locations] calls.
18229    ///
18230    /// # Example
18231    /// ```no_run
18232    /// # use google_cloud_dataplex_v1::builder;
18233    /// use builder::dataplex_service::ListLocations;
18234    /// # tokio_test::block_on(async {
18235    /// use gax::paginator::ItemPaginator;
18236    ///
18237    /// let builder = prepare_request_builder();
18238    /// let mut items = builder.by_item();
18239    /// while let Some(result) = items.next().await {
18240    ///   let item = result?;
18241    /// }
18242    /// # gax::Result::<()>::Ok(()) });
18243    ///
18244    /// fn prepare_request_builder() -> ListLocations {
18245    ///   # panic!();
18246    ///   // ... details omitted ...
18247    /// }
18248    /// ```
18249    #[derive(Clone, Debug)]
18250    pub struct ListLocations(RequestBuilder<location::model::ListLocationsRequest>);
18251
18252    impl ListLocations {
18253        pub(crate) fn new(
18254            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18255        ) -> Self {
18256            Self(RequestBuilder::new(stub))
18257        }
18258
18259        /// Sets the full request, replacing any prior values.
18260        pub fn with_request<V: Into<location::model::ListLocationsRequest>>(
18261            mut self,
18262            v: V,
18263        ) -> Self {
18264            self.0.request = v.into();
18265            self
18266        }
18267
18268        /// Sets all the options, replacing any prior values.
18269        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
18270            self.0.options = v.into();
18271            self
18272        }
18273
18274        /// Sends the request.
18275        pub async fn send(self) -> Result<location::model::ListLocationsResponse> {
18276            (*self.0.stub)
18277                .list_locations(self.0.request, self.0.options)
18278                .await
18279                .map(gax::response::Response::into_body)
18280        }
18281
18282        /// Streams each page in the collection.
18283        pub fn by_page(
18284            self,
18285        ) -> impl gax::paginator::Paginator<location::model::ListLocationsResponse, gax::error::Error>
18286        {
18287            use std::clone::Clone;
18288            let token = self.0.request.page_token.clone();
18289            let execute = move |token: String| {
18290                let mut builder = self.clone();
18291                builder.0.request = builder.0.request.set_page_token(token);
18292                builder.send()
18293            };
18294            gax::paginator::internal::new_paginator(token, execute)
18295        }
18296
18297        /// Streams each item in the collection.
18298        pub fn by_item(
18299            self,
18300        ) -> impl gax::paginator::ItemPaginator<location::model::ListLocationsResponse, gax::error::Error>
18301        {
18302            use gax::paginator::Paginator;
18303            self.by_page().items()
18304        }
18305
18306        /// Sets the value of [name][location::model::ListLocationsRequest::name].
18307        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
18308            self.0.request.name = v.into();
18309            self
18310        }
18311
18312        /// Sets the value of [filter][location::model::ListLocationsRequest::filter].
18313        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
18314            self.0.request.filter = v.into();
18315            self
18316        }
18317
18318        /// Sets the value of [page_size][location::model::ListLocationsRequest::page_size].
18319        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
18320            self.0.request.page_size = v.into();
18321            self
18322        }
18323
18324        /// Sets the value of [page_token][location::model::ListLocationsRequest::page_token].
18325        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
18326            self.0.request.page_token = v.into();
18327            self
18328        }
18329    }
18330
18331    #[doc(hidden)]
18332    impl gax::options::internal::RequestBuilder for ListLocations {
18333        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
18334            &mut self.0.options
18335        }
18336    }
18337
18338    /// The request builder for [DataplexService::get_location][crate::client::DataplexService::get_location] calls.
18339    ///
18340    /// # Example
18341    /// ```no_run
18342    /// # use google_cloud_dataplex_v1::builder;
18343    /// use builder::dataplex_service::GetLocation;
18344    /// # tokio_test::block_on(async {
18345    ///
18346    /// let builder = prepare_request_builder();
18347    /// let response = builder.send().await?;
18348    /// # gax::Result::<()>::Ok(()) });
18349    ///
18350    /// fn prepare_request_builder() -> GetLocation {
18351    ///   # panic!();
18352    ///   // ... details omitted ...
18353    /// }
18354    /// ```
18355    #[derive(Clone, Debug)]
18356    pub struct GetLocation(RequestBuilder<location::model::GetLocationRequest>);
18357
18358    impl GetLocation {
18359        pub(crate) fn new(
18360            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18361        ) -> Self {
18362            Self(RequestBuilder::new(stub))
18363        }
18364
18365        /// Sets the full request, replacing any prior values.
18366        pub fn with_request<V: Into<location::model::GetLocationRequest>>(mut self, v: V) -> Self {
18367            self.0.request = v.into();
18368            self
18369        }
18370
18371        /// Sets all the options, replacing any prior values.
18372        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
18373            self.0.options = v.into();
18374            self
18375        }
18376
18377        /// Sends the request.
18378        pub async fn send(self) -> Result<location::model::Location> {
18379            (*self.0.stub)
18380                .get_location(self.0.request, self.0.options)
18381                .await
18382                .map(gax::response::Response::into_body)
18383        }
18384
18385        /// Sets the value of [name][location::model::GetLocationRequest::name].
18386        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
18387            self.0.request.name = v.into();
18388            self
18389        }
18390    }
18391
18392    #[doc(hidden)]
18393    impl gax::options::internal::RequestBuilder for GetLocation {
18394        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
18395            &mut self.0.options
18396        }
18397    }
18398
18399    /// The request builder for [DataplexService::set_iam_policy][crate::client::DataplexService::set_iam_policy] calls.
18400    ///
18401    /// # Example
18402    /// ```no_run
18403    /// # use google_cloud_dataplex_v1::builder;
18404    /// use builder::dataplex_service::SetIamPolicy;
18405    /// # tokio_test::block_on(async {
18406    ///
18407    /// let builder = prepare_request_builder();
18408    /// let response = builder.send().await?;
18409    /// # gax::Result::<()>::Ok(()) });
18410    ///
18411    /// fn prepare_request_builder() -> SetIamPolicy {
18412    ///   # panic!();
18413    ///   // ... details omitted ...
18414    /// }
18415    /// ```
18416    #[derive(Clone, Debug)]
18417    pub struct SetIamPolicy(RequestBuilder<iam_v1::model::SetIamPolicyRequest>);
18418
18419    impl SetIamPolicy {
18420        pub(crate) fn new(
18421            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18422        ) -> Self {
18423            Self(RequestBuilder::new(stub))
18424        }
18425
18426        /// Sets the full request, replacing any prior values.
18427        pub fn with_request<V: Into<iam_v1::model::SetIamPolicyRequest>>(mut self, v: V) -> Self {
18428            self.0.request = v.into();
18429            self
18430        }
18431
18432        /// Sets all the options, replacing any prior values.
18433        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
18434            self.0.options = v.into();
18435            self
18436        }
18437
18438        /// Sends the request.
18439        pub async fn send(self) -> Result<iam_v1::model::Policy> {
18440            (*self.0.stub)
18441                .set_iam_policy(self.0.request, self.0.options)
18442                .await
18443                .map(gax::response::Response::into_body)
18444        }
18445
18446        /// Sets the value of [resource][iam_v1::model::SetIamPolicyRequest::resource].
18447        ///
18448        /// This is a **required** field for requests.
18449        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
18450            self.0.request.resource = v.into();
18451            self
18452        }
18453
18454        /// Sets the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
18455        ///
18456        /// This is a **required** field for requests.
18457        pub fn set_policy<T>(mut self, v: T) -> Self
18458        where
18459            T: std::convert::Into<iam_v1::model::Policy>,
18460        {
18461            self.0.request.policy = std::option::Option::Some(v.into());
18462            self
18463        }
18464
18465        /// Sets or clears the value of [policy][iam_v1::model::SetIamPolicyRequest::policy].
18466        ///
18467        /// This is a **required** field for requests.
18468        pub fn set_or_clear_policy<T>(mut self, v: std::option::Option<T>) -> Self
18469        where
18470            T: std::convert::Into<iam_v1::model::Policy>,
18471        {
18472            self.0.request.policy = v.map(|x| x.into());
18473            self
18474        }
18475
18476        /// Sets the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
18477        pub fn set_update_mask<T>(mut self, v: T) -> Self
18478        where
18479            T: std::convert::Into<wkt::FieldMask>,
18480        {
18481            self.0.request.update_mask = std::option::Option::Some(v.into());
18482            self
18483        }
18484
18485        /// Sets or clears the value of [update_mask][iam_v1::model::SetIamPolicyRequest::update_mask].
18486        pub fn set_or_clear_update_mask<T>(mut self, v: std::option::Option<T>) -> Self
18487        where
18488            T: std::convert::Into<wkt::FieldMask>,
18489        {
18490            self.0.request.update_mask = v.map(|x| x.into());
18491            self
18492        }
18493    }
18494
18495    #[doc(hidden)]
18496    impl gax::options::internal::RequestBuilder for SetIamPolicy {
18497        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
18498            &mut self.0.options
18499        }
18500    }
18501
18502    /// The request builder for [DataplexService::get_iam_policy][crate::client::DataplexService::get_iam_policy] calls.
18503    ///
18504    /// # Example
18505    /// ```no_run
18506    /// # use google_cloud_dataplex_v1::builder;
18507    /// use builder::dataplex_service::GetIamPolicy;
18508    /// # tokio_test::block_on(async {
18509    ///
18510    /// let builder = prepare_request_builder();
18511    /// let response = builder.send().await?;
18512    /// # gax::Result::<()>::Ok(()) });
18513    ///
18514    /// fn prepare_request_builder() -> GetIamPolicy {
18515    ///   # panic!();
18516    ///   // ... details omitted ...
18517    /// }
18518    /// ```
18519    #[derive(Clone, Debug)]
18520    pub struct GetIamPolicy(RequestBuilder<iam_v1::model::GetIamPolicyRequest>);
18521
18522    impl GetIamPolicy {
18523        pub(crate) fn new(
18524            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18525        ) -> Self {
18526            Self(RequestBuilder::new(stub))
18527        }
18528
18529        /// Sets the full request, replacing any prior values.
18530        pub fn with_request<V: Into<iam_v1::model::GetIamPolicyRequest>>(mut self, v: V) -> Self {
18531            self.0.request = v.into();
18532            self
18533        }
18534
18535        /// Sets all the options, replacing any prior values.
18536        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
18537            self.0.options = v.into();
18538            self
18539        }
18540
18541        /// Sends the request.
18542        pub async fn send(self) -> Result<iam_v1::model::Policy> {
18543            (*self.0.stub)
18544                .get_iam_policy(self.0.request, self.0.options)
18545                .await
18546                .map(gax::response::Response::into_body)
18547        }
18548
18549        /// Sets the value of [resource][iam_v1::model::GetIamPolicyRequest::resource].
18550        ///
18551        /// This is a **required** field for requests.
18552        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
18553            self.0.request.resource = v.into();
18554            self
18555        }
18556
18557        /// Sets the value of [options][iam_v1::model::GetIamPolicyRequest::options].
18558        pub fn set_options<T>(mut self, v: T) -> Self
18559        where
18560            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
18561        {
18562            self.0.request.options = std::option::Option::Some(v.into());
18563            self
18564        }
18565
18566        /// Sets or clears the value of [options][iam_v1::model::GetIamPolicyRequest::options].
18567        pub fn set_or_clear_options<T>(mut self, v: std::option::Option<T>) -> Self
18568        where
18569            T: std::convert::Into<iam_v1::model::GetPolicyOptions>,
18570        {
18571            self.0.request.options = v.map(|x| x.into());
18572            self
18573        }
18574    }
18575
18576    #[doc(hidden)]
18577    impl gax::options::internal::RequestBuilder for GetIamPolicy {
18578        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
18579            &mut self.0.options
18580        }
18581    }
18582
18583    /// The request builder for [DataplexService::test_iam_permissions][crate::client::DataplexService::test_iam_permissions] calls.
18584    ///
18585    /// # Example
18586    /// ```no_run
18587    /// # use google_cloud_dataplex_v1::builder;
18588    /// use builder::dataplex_service::TestIamPermissions;
18589    /// # tokio_test::block_on(async {
18590    ///
18591    /// let builder = prepare_request_builder();
18592    /// let response = builder.send().await?;
18593    /// # gax::Result::<()>::Ok(()) });
18594    ///
18595    /// fn prepare_request_builder() -> TestIamPermissions {
18596    ///   # panic!();
18597    ///   // ... details omitted ...
18598    /// }
18599    /// ```
18600    #[derive(Clone, Debug)]
18601    pub struct TestIamPermissions(RequestBuilder<iam_v1::model::TestIamPermissionsRequest>);
18602
18603    impl TestIamPermissions {
18604        pub(crate) fn new(
18605            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18606        ) -> Self {
18607            Self(RequestBuilder::new(stub))
18608        }
18609
18610        /// Sets the full request, replacing any prior values.
18611        pub fn with_request<V: Into<iam_v1::model::TestIamPermissionsRequest>>(
18612            mut self,
18613            v: V,
18614        ) -> Self {
18615            self.0.request = v.into();
18616            self
18617        }
18618
18619        /// Sets all the options, replacing any prior values.
18620        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
18621            self.0.options = v.into();
18622            self
18623        }
18624
18625        /// Sends the request.
18626        pub async fn send(self) -> Result<iam_v1::model::TestIamPermissionsResponse> {
18627            (*self.0.stub)
18628                .test_iam_permissions(self.0.request, self.0.options)
18629                .await
18630                .map(gax::response::Response::into_body)
18631        }
18632
18633        /// Sets the value of [resource][iam_v1::model::TestIamPermissionsRequest::resource].
18634        ///
18635        /// This is a **required** field for requests.
18636        pub fn set_resource<T: Into<std::string::String>>(mut self, v: T) -> Self {
18637            self.0.request.resource = v.into();
18638            self
18639        }
18640
18641        /// Sets the value of [permissions][iam_v1::model::TestIamPermissionsRequest::permissions].
18642        ///
18643        /// This is a **required** field for requests.
18644        pub fn set_permissions<T, V>(mut self, v: T) -> Self
18645        where
18646            T: std::iter::IntoIterator<Item = V>,
18647            V: std::convert::Into<std::string::String>,
18648        {
18649            use std::iter::Iterator;
18650            self.0.request.permissions = v.into_iter().map(|i| i.into()).collect();
18651            self
18652        }
18653    }
18654
18655    #[doc(hidden)]
18656    impl gax::options::internal::RequestBuilder for TestIamPermissions {
18657        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
18658            &mut self.0.options
18659        }
18660    }
18661
18662    /// The request builder for [DataplexService::list_operations][crate::client::DataplexService::list_operations] calls.
18663    ///
18664    /// # Example
18665    /// ```no_run
18666    /// # use google_cloud_dataplex_v1::builder;
18667    /// use builder::dataplex_service::ListOperations;
18668    /// # tokio_test::block_on(async {
18669    /// use gax::paginator::ItemPaginator;
18670    ///
18671    /// let builder = prepare_request_builder();
18672    /// let mut items = builder.by_item();
18673    /// while let Some(result) = items.next().await {
18674    ///   let item = result?;
18675    /// }
18676    /// # gax::Result::<()>::Ok(()) });
18677    ///
18678    /// fn prepare_request_builder() -> ListOperations {
18679    ///   # panic!();
18680    ///   // ... details omitted ...
18681    /// }
18682    /// ```
18683    #[derive(Clone, Debug)]
18684    pub struct ListOperations(RequestBuilder<longrunning::model::ListOperationsRequest>);
18685
18686    impl ListOperations {
18687        pub(crate) fn new(
18688            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18689        ) -> Self {
18690            Self(RequestBuilder::new(stub))
18691        }
18692
18693        /// Sets the full request, replacing any prior values.
18694        pub fn with_request<V: Into<longrunning::model::ListOperationsRequest>>(
18695            mut self,
18696            v: V,
18697        ) -> Self {
18698            self.0.request = v.into();
18699            self
18700        }
18701
18702        /// Sets all the options, replacing any prior values.
18703        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
18704            self.0.options = v.into();
18705            self
18706        }
18707
18708        /// Sends the request.
18709        pub async fn send(self) -> Result<longrunning::model::ListOperationsResponse> {
18710            (*self.0.stub)
18711                .list_operations(self.0.request, self.0.options)
18712                .await
18713                .map(gax::response::Response::into_body)
18714        }
18715
18716        /// Streams each page in the collection.
18717        pub fn by_page(
18718            self,
18719        ) -> impl gax::paginator::Paginator<longrunning::model::ListOperationsResponse, gax::error::Error>
18720        {
18721            use std::clone::Clone;
18722            let token = self.0.request.page_token.clone();
18723            let execute = move |token: String| {
18724                let mut builder = self.clone();
18725                builder.0.request = builder.0.request.set_page_token(token);
18726                builder.send()
18727            };
18728            gax::paginator::internal::new_paginator(token, execute)
18729        }
18730
18731        /// Streams each item in the collection.
18732        pub fn by_item(
18733            self,
18734        ) -> impl gax::paginator::ItemPaginator<
18735            longrunning::model::ListOperationsResponse,
18736            gax::error::Error,
18737        > {
18738            use gax::paginator::Paginator;
18739            self.by_page().items()
18740        }
18741
18742        /// Sets the value of [name][longrunning::model::ListOperationsRequest::name].
18743        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
18744            self.0.request.name = v.into();
18745            self
18746        }
18747
18748        /// Sets the value of [filter][longrunning::model::ListOperationsRequest::filter].
18749        pub fn set_filter<T: Into<std::string::String>>(mut self, v: T) -> Self {
18750            self.0.request.filter = v.into();
18751            self
18752        }
18753
18754        /// Sets the value of [page_size][longrunning::model::ListOperationsRequest::page_size].
18755        pub fn set_page_size<T: Into<i32>>(mut self, v: T) -> Self {
18756            self.0.request.page_size = v.into();
18757            self
18758        }
18759
18760        /// Sets the value of [page_token][longrunning::model::ListOperationsRequest::page_token].
18761        pub fn set_page_token<T: Into<std::string::String>>(mut self, v: T) -> Self {
18762            self.0.request.page_token = v.into();
18763            self
18764        }
18765
18766        /// Sets the value of [return_partial_success][longrunning::model::ListOperationsRequest::return_partial_success].
18767        pub fn set_return_partial_success<T: Into<bool>>(mut self, v: T) -> Self {
18768            self.0.request.return_partial_success = v.into();
18769            self
18770        }
18771    }
18772
18773    #[doc(hidden)]
18774    impl gax::options::internal::RequestBuilder for ListOperations {
18775        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
18776            &mut self.0.options
18777        }
18778    }
18779
18780    /// The request builder for [DataplexService::get_operation][crate::client::DataplexService::get_operation] calls.
18781    ///
18782    /// # Example
18783    /// ```no_run
18784    /// # use google_cloud_dataplex_v1::builder;
18785    /// use builder::dataplex_service::GetOperation;
18786    /// # tokio_test::block_on(async {
18787    ///
18788    /// let builder = prepare_request_builder();
18789    /// let response = builder.send().await?;
18790    /// # gax::Result::<()>::Ok(()) });
18791    ///
18792    /// fn prepare_request_builder() -> GetOperation {
18793    ///   # panic!();
18794    ///   // ... details omitted ...
18795    /// }
18796    /// ```
18797    #[derive(Clone, Debug)]
18798    pub struct GetOperation(RequestBuilder<longrunning::model::GetOperationRequest>);
18799
18800    impl GetOperation {
18801        pub(crate) fn new(
18802            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18803        ) -> Self {
18804            Self(RequestBuilder::new(stub))
18805        }
18806
18807        /// Sets the full request, replacing any prior values.
18808        pub fn with_request<V: Into<longrunning::model::GetOperationRequest>>(
18809            mut self,
18810            v: V,
18811        ) -> Self {
18812            self.0.request = v.into();
18813            self
18814        }
18815
18816        /// Sets all the options, replacing any prior values.
18817        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
18818            self.0.options = v.into();
18819            self
18820        }
18821
18822        /// Sends the request.
18823        pub async fn send(self) -> Result<longrunning::model::Operation> {
18824            (*self.0.stub)
18825                .get_operation(self.0.request, self.0.options)
18826                .await
18827                .map(gax::response::Response::into_body)
18828        }
18829
18830        /// Sets the value of [name][longrunning::model::GetOperationRequest::name].
18831        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
18832            self.0.request.name = v.into();
18833            self
18834        }
18835    }
18836
18837    #[doc(hidden)]
18838    impl gax::options::internal::RequestBuilder for GetOperation {
18839        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
18840            &mut self.0.options
18841        }
18842    }
18843
18844    /// The request builder for [DataplexService::delete_operation][crate::client::DataplexService::delete_operation] calls.
18845    ///
18846    /// # Example
18847    /// ```no_run
18848    /// # use google_cloud_dataplex_v1::builder;
18849    /// use builder::dataplex_service::DeleteOperation;
18850    /// # tokio_test::block_on(async {
18851    ///
18852    /// let builder = prepare_request_builder();
18853    /// let response = builder.send().await?;
18854    /// # gax::Result::<()>::Ok(()) });
18855    ///
18856    /// fn prepare_request_builder() -> DeleteOperation {
18857    ///   # panic!();
18858    ///   // ... details omitted ...
18859    /// }
18860    /// ```
18861    #[derive(Clone, Debug)]
18862    pub struct DeleteOperation(RequestBuilder<longrunning::model::DeleteOperationRequest>);
18863
18864    impl DeleteOperation {
18865        pub(crate) fn new(
18866            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18867        ) -> Self {
18868            Self(RequestBuilder::new(stub))
18869        }
18870
18871        /// Sets the full request, replacing any prior values.
18872        pub fn with_request<V: Into<longrunning::model::DeleteOperationRequest>>(
18873            mut self,
18874            v: V,
18875        ) -> Self {
18876            self.0.request = v.into();
18877            self
18878        }
18879
18880        /// Sets all the options, replacing any prior values.
18881        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
18882            self.0.options = v.into();
18883            self
18884        }
18885
18886        /// Sends the request.
18887        pub async fn send(self) -> Result<()> {
18888            (*self.0.stub)
18889                .delete_operation(self.0.request, self.0.options)
18890                .await
18891                .map(gax::response::Response::into_body)
18892        }
18893
18894        /// Sets the value of [name][longrunning::model::DeleteOperationRequest::name].
18895        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
18896            self.0.request.name = v.into();
18897            self
18898        }
18899    }
18900
18901    #[doc(hidden)]
18902    impl gax::options::internal::RequestBuilder for DeleteOperation {
18903        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
18904            &mut self.0.options
18905        }
18906    }
18907
18908    /// The request builder for [DataplexService::cancel_operation][crate::client::DataplexService::cancel_operation] calls.
18909    ///
18910    /// # Example
18911    /// ```no_run
18912    /// # use google_cloud_dataplex_v1::builder;
18913    /// use builder::dataplex_service::CancelOperation;
18914    /// # tokio_test::block_on(async {
18915    ///
18916    /// let builder = prepare_request_builder();
18917    /// let response = builder.send().await?;
18918    /// # gax::Result::<()>::Ok(()) });
18919    ///
18920    /// fn prepare_request_builder() -> CancelOperation {
18921    ///   # panic!();
18922    ///   // ... details omitted ...
18923    /// }
18924    /// ```
18925    #[derive(Clone, Debug)]
18926    pub struct CancelOperation(RequestBuilder<longrunning::model::CancelOperationRequest>);
18927
18928    impl CancelOperation {
18929        pub(crate) fn new(
18930            stub: std::sync::Arc<dyn super::super::stub::dynamic::DataplexService>,
18931        ) -> Self {
18932            Self(RequestBuilder::new(stub))
18933        }
18934
18935        /// Sets the full request, replacing any prior values.
18936        pub fn with_request<V: Into<longrunning::model::CancelOperationRequest>>(
18937            mut self,
18938            v: V,
18939        ) -> Self {
18940            self.0.request = v.into();
18941            self
18942        }
18943
18944        /// Sets all the options, replacing any prior values.
18945        pub fn with_options<V: Into<gax::options::RequestOptions>>(mut self, v: V) -> Self {
18946            self.0.options = v.into();
18947            self
18948        }
18949
18950        /// Sends the request.
18951        pub async fn send(self) -> Result<()> {
18952            (*self.0.stub)
18953                .cancel_operation(self.0.request, self.0.options)
18954                .await
18955                .map(gax::response::Response::into_body)
18956        }
18957
18958        /// Sets the value of [name][longrunning::model::CancelOperationRequest::name].
18959        pub fn set_name<T: Into<std::string::String>>(mut self, v: T) -> Self {
18960            self.0.request.name = v.into();
18961            self
18962        }
18963    }
18964
18965    #[doc(hidden)]
18966    impl gax::options::internal::RequestBuilder for CancelOperation {
18967        fn request_options(&mut self) -> &mut gax::options::RequestOptions {
18968            &mut self.0.options
18969        }
18970    }
18971}